#961
Adminul unei rețelei de n*n calculatoare așezate sub forma unei matrici n linii și n coloane dorește să cripteze calculatoarele pentru a securiza rețeaua.
| Problema | Criptare | Operații I/O |
criptare.in/criptare.out
|
|---|---|---|---|
| Limita timp | 0.3 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64832668 | Utilizator | |
| Fișier | criptare.cpp | Dimensiune | 432 B |
| Data încărcării | 04 Iunie 2026, 14:20 | Scor/rezultat | Eroare de compilare |
criptare.cpp: In function ‘int main()’: criptare.cpp:15:1: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 15 | if(a[i][j]==1) | ^~ criptare.cpp:16:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 16 | S++; if(S>0) a[i][0]=9; else a[i][0]=2; //9 inseamna adv sisi 2 fals} | ^~ criptare.cpp:20:15: error: expected statement at end of input 20 | if(a[i][j]==1) | ^ criptare.cpp:19:1: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 19 | for(i=1;i<=n;i++) | ^~~ criptare.cpp:20:15: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 20 | if(a[i][j]==1) | ^ criptare.cpp:20:15: error: expected ‘}’ at end of input criptare.cpp:18:1: note: to match this ‘{’ 18 | { S=0; | ^ criptare.cpp:20:15: error: expected ‘}’ at end of input 20 | if(a[i][j]==1) | ^ criptare.cpp:13:1: note: to match this ‘{’ 13 | {S=0; | ^ criptare.cpp:20:15: error: expected ‘}’ at end of input 20 | if(a[i][j]==1) | ^ criptare.cpp:5:1: note: to match this ‘{’ 5 | { int n,i,j,sol,S=0; int a[1001][1001]; | ^ criptare.cpp:5:13: warning: unused variable ‘sol’ [-Wunused-variable] 5 | { int n,i,j,sol,S=0; int a[1001][1001]; | ^~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Criptare face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.