#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 | #64742567 | Utilizator | |
| Fișier | varfuri9.cpp | Dimensiune | 527 B |
| Data încărcării | 27 Mai 2026, 10:42 | Scor/rezultat | Eroare de compilare |
varfuri9.cpp: In function ‘int main()’: varfuri9.cpp:21:17: warning: statement has no effect [-Wunused-value] 21 | mat[i][0]; | ~~~~~~~~^ varfuri9.cpp:23:19: warning: statement has no effect [-Wunused-value] 23 | mat[i][m+1]; | ~~~~~~~~~~^ varfuri9.cpp:24:18: error: expected primary-expression before ‘;’ token 24 | for(j=1;j<=m;;j++){ | ^ varfuri9.cpp:24:18: error: expected ‘)’ before ‘;’ token 24 | for(j=1;j<=m;;j++){ | ~ ^ | ) varfuri9.cpp:24:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 24 | for(j=1;j<=m;;j++){ | ^~~ varfuri9.cpp:24:19: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 24 | for(j=1;j<=m;;j++){ | ^ varfuri9.cpp:24:22: error: expected ‘;’ before ‘)’ token 24 | for(j=1;j<=m;;j++){ | ^ | ; varfuri9.cpp:7:32: warning: unused variable ‘ok’ [-Wunused-variable] 7 | int mat[102][102],n,m,i,j,k=0,ok,d; | ^~ varfuri9.cpp:7:35: warning: unused variable ‘d’ [-Wunused-variable] 7 | int mat[102][102],n,m,i,j,k=0,ok,d; | ^
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ă.