#4690
Se dă o matrice cu n linii și m coloane și elemente numere naturale. Să se determine câte elemente din matrice sunt mai mari decât suma vecinilor lor.
| Problema | varfuri9 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64812451 | Utilizator | |
| Fișier | varfuri9.cpp | Dimensiune | 923 B |
| Data încărcării | 02 Iunie 2026, 22:32 | Scor/rezultat | 100 puncte |
varfuri9.cpp: In function ‘int main()’: varfuri9.cpp:7:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 7 | for(int i=0;i<n;i++) | ^~~ varfuri9.cpp:9:8: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 9 | if(a[0][0]>a[0][1]+a[1][0]) cnt++; | ^~ varfuri9.cpp:11:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 11 | for(int j=1;j<m-1;j++) | ^~~ varfuri9.cpp:14:8: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 14 | if(a[n-1][0]>a[n-1][1]+a[n-2][0]) cnt++; | ^~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | OK. | 20 | 20 | ||
| 2 | 0.002 secunde | OK. | 20 | 20 | ||
| 3 | 0.003 secunde | OK. | 20 | 20 | ||
| 4 | 0.002 secunde | OK. | 20 | 20 | ||
| 5 | 0.001 secunde | OK. | 20 | 20 | ||
| Punctaj total | 100 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema varfuri9 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ă.