#1749
Considerăm o matrice pătratică cu N linii și N coloane. În această matrice sunt definite 4 zone:
1, formată din elementele situate strict deasupra diagonalei principale și strict deasupra diagonalei secundare;2, formată din elementele situate strict deasupra diagonalei principale și strict sub diagonala secundară;3, formată din elementele situate strict sub diagonala principală și strict sub diagonala secundară;4, formată din elementele situate strict sub diagonala principală și strict deasupra diagonalei secundare;Se dă o matrice pătratică și un număr natural Z, reprezentând o zonă din matrice. Să se determine suma elementelor din zona Z.
| Problema | Zona4 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64659971 | Utilizator | |
| Fișier | zona4.cpp | Dimensiune | 1.03 KB |
| Data încărcării | 21 Mai 2026, 08:46 | Scor/rezultat | 100 puncte |
zona4.cpp: In function ‘int produs(int (*)[201], int, int)’: zona4.cpp:17:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 17 | for(int i=1;i<=n;i++) | ^~~ zona4.cpp:21:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 21 | return s; | ^~~~~~ zona4.cpp:25:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 25 | for(int i=1;i<=n;i++) | ^~~ zona4.cpp:29:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 29 | return s; | ^~~~~~ zona4.cpp:33:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 33 | for(int i=1;i<=n;i++) | ^~~ zona4.cpp:37:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 37 | return s; | ^~~~~~ zona4.cpp:41:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 41 | for(int i=1;i<=n;i++) | ^~~ zona4.cpp:45:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 45 | return s; | ^~~~~~ zona4.cpp:47:1: warning: control reaches end of non-void function [-Wreturn-type] 47 | } | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.002 secunde | OK. | 20 | 20 | ||
| 3 | 0.003 secunde | OK. | 20 | 20 | ||
| 4 | 0.002 secunde | OK. | 20 | 20 | ||
| 5 | 0.007 secunde | OK. | 20 | 20 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Zona4 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ă.