#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 | #64653032 | Utilizator | |
| Fișier | zone1.cpp | Dimensiune | 878 B |
| Data încărcării | 20 Mai 2026, 17:13 | Scor/rezultat | 20 puncte |
zone1.cpp: In function ‘int main()’: zone1.cpp:9:13: warning: unused variable ‘k’ [-Wunused-variable] 9 | int i,j,k,l,m,n,z, cnt=0, ind = 0,mx = -2e9, mn = 2e9,tmx; | ^ zone1.cpp:9:15: warning: unused variable ‘l’ [-Wunused-variable] 9 | int i,j,k,l,m,n,z, cnt=0, ind = 0,mx = -2e9, mn = 2e9,tmx; | ^ zone1.cpp:9:17: warning: unused variable ‘m’ [-Wunused-variable] 9 | int i,j,k,l,m,n,z, cnt=0, ind = 0,mx = -2e9, mn = 2e9,tmx; | ^ zone1.cpp:9:21: warning: unused variable ‘z’ [-Wunused-variable] 9 | int i,j,k,l,m,n,z, cnt=0, ind = 0,mx = -2e9, mn = 2e9,tmx; | ^ zone1.cpp:9:24: warning: unused variable ‘cnt’ [-Wunused-variable] 9 | int i,j,k,l,m,n,z, cnt=0, ind = 0,mx = -2e9, mn = 2e9,tmx; | ^~~ zone1.cpp:9:31: warning: unused variable ‘ind’ [-Wunused-variable] 9 | int i,j,k,l,m,n,z, cnt=0, ind = 0,mx = -2e9, mn = 2e9,tmx; | ^~~ zone1.cpp:9:39: warning: unused variable ‘mx’ [-Wunused-variable] 9 | int i,j,k,l,m,n,z, cnt=0, ind = 0,mx = -2e9, mn = 2e9,tmx; | ^~ zone1.cpp:9:50: warning: unused variable ‘mn’ [-Wunused-variable] 9 | int i,j,k,l,m,n,z, cnt=0, ind = 0,mx = -2e9, mn = 2e9,tmx; | ^~ zone1.cpp:9:59: warning: unused variable ‘tmx’ [-Wunused-variable] 9 | int i,j,k,l,m,n,z, cnt=0, ind = 0,mx = -2e9, mn = 2e9,tmx; | ^~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.003 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 40 | 0 | ||
| 3 | 0.003 secunde | Raspuns gresit. | 40 | 0 | ||
| Punctaj total | 20 | |||||
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ă.