#781
Se dă o matrice cu n linii şi n coloane şi elemente numere naturale. Să se afişeze, în ordine crescătoare, sumele elementelor din cele patru zone delimitate de diagonale.
| Problema | Zone1 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64086758 | Utilizator | |
| Fișier | zone1.cpp | Dimensiune | 873 B |
| Data încărcării | 16 Aprilie 2026, 11:19 | Scor/rezultat | 100 puncte |
zone1.cpp: In function ‘int main()’: zone1.cpp:9:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 9 | for(int j=0;j<n;j++) | ^~~ zone1.cpp:11:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 11 | int nord=0,est=0,sud=0,vest=0; | ^~~ zone1.cpp:14:11: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 14 | if(i<j && i+j<n-1) | ^~ zone1.cpp:16:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 16 | if(i<j && i+j>n-1) | ^~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 40 | 40 | ||
| 3 | 0.002 secunde | OK. | 40 | 40 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Zone1 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ă.