#776
Se dă o matrice cu n linii şi m coloane şi elemente numere naturale. Să se determine câte linii ale matricei au toate elementele egale.
| Problema | CntLinii | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64547117 | Utilizator | |
| Fișier | cntlinii.cpp | Dimensiune | 487 B |
| Data încărcării | 13 Mai 2026, 16:18 | Scor/rezultat | Eroare de compilare |
cntlinii.cpp: In function ‘int main()’: cntlinii.cpp:7:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 7 | for (int i = 0; i < n; i++) | ^~~ cntlinii.cpp:11:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 11 | for(int i=0;i n;i++) | ^~~ cntlinii.cpp:11:22: error: expected ‘;’ before ‘n’ 11 | for(int i=0;i n;i++) | ^~ | ; cntlinii.cpp:11:23: warning: for increment expression has no effect [-Wunused-value] 11 | for(int i=0;i n;i++) | ^ cntlinii.cpp:11:24: error: expected ‘)’ before ‘;’ token 11 | for(int i=0;i n;i++) | ~ ^ | ) cntlinii.cpp:11:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 11 | for(int i=0;i n;i++) | ^~~ cntlinii.cpp:11:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 11 | for(int i=0;i n;i++) | ^ cntlinii.cpp:11:25: error: ‘i’ was not declared in this scope cntlinii.cpp:25:13: error: ‘cnt’ was not declared in this scope; did you mean ‘int’? 25 | cout << cnt; | ^~~ | int cntlinii.cpp:6:7: warning: unused variable ‘x’ [-Wunused-variable] 6 | int x,primul,contor=0; | ^ cntlinii.cpp:6:9: warning: unused variable ‘primul’ [-Wunused-variable] 6 | int x,primul,contor=0; | ^~~~~~ cntlinii.cpp:6:16: warning: unused variable ‘contor’ [-Wunused-variable] 6 | int x,primul,contor=0; | ^~~~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema CntLinii 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ă.