#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 | #64747351 | Utilizator | |
| Fișier | cntlinii.cpp | Dimensiune | 449 B |
| Data încărcării | 27 Mai 2026, 15:22 | Scor/rezultat | Eroare de compilare |
cntlinii.cpp: In function ‘int main()’: cntlinii.cpp:7:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 7 | for(i=1;i<=n;i++) | ^~~ cntlinii.cpp:10:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 10 | for(j=1;j<=m:j++) | ^~~ cntlinii.cpp:10:17: warning: range-based ‘for’ loops with initializer only available with ‘-std=c++20’ or ‘-std=gnu++20’ [-Wc++20-extensions] 10 | for(j=1;j<=m:j++) | ^ cntlinii.cpp:10:21: error: found ‘:’ in nested-name-specifier, expected ‘::’ 10 | for(j=1;j<=m:j++) | ^ | :: cntlinii.cpp:10:20: error: ‘m’ is not a class, namespace, or enumeration 10 | for(j=1;j<=m:j++) | ^ cntlinii.cpp:21:1: error: expected primary-expression before ‘}’ token 21 | } | ^ cntlinii.cpp:20:12: error: expected ‘)’ before ‘}’ token 20 | cout<<k; | ^ | ) 21 | } | ~ cntlinii.cpp:10:12: note: to match this ‘(’ 10 | for(j=1;j<=m:j++) | ^ cntlinii.cpp:21:1: error: expected primary-expression before ‘}’ token 21 | } | ^
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ă.