#314
Se consideră tabloul bidimensional cu m linii şi n coloane şi elemente numere naturale. Să se determine numărul de coloane care conţin doar elemente egale cu 0.
| Problema | ColZero | Operații I/O |
colzero.in/colzero.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64640126 | Utilizator | |
| Fișier | colzero.cpp | Dimensiune | 470 B |
| Data încărcării | 19 Mai 2026, 21:48 | Scor/rezultat | Eroare de compilare |
colzero.cpp: In function ‘int main()’: colzero.cpp:13:10: error: initializer in range-based ‘for’ loop 13 | for(int i=1:i<=m;i++) | ^ colzero.cpp:13:17: error: expected ‘)’ before ‘;’ token 13 | for(int i=1:i<=m;i++) | ~ ^ | ) colzero.cpp:13:1: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 13 | for(int i=1:i<=m;i++) | ^~~ colzero.cpp:13:18: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 13 | for(int i=1:i<=m;i++) | ^ colzero.cpp:12:1: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 12 | for(int j=1;j<=n;j++) | ^~~ colzero.cpp:13:18: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 13 | for(int i=1:i<=m;i++) | ^ colzero.cpp:13:18: error: ‘i’ was not declared in this scope colzero.cpp:19:10: error: initializer in range-based ‘for’ loop 19 | for(int i=1:i<=m;i++) | ^ colzero.cpp:19:17: error: expected ‘)’ before ‘;’ token 19 | for(int i=1:i<=m;i++) | ~ ^ | ) colzero.cpp:19:1: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 19 | for(int i=1:i<=m;i++) | ^~~ colzero.cpp:19:18: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 19 | for(int i=1:i<=m;i++) | ^ colzero.cpp:29:10: error: initializer in range-based ‘for’ loop 29 | for(int i=1:i<=m;i++) | ^ colzero.cpp:29:17: error: expected ‘)’ before ‘;’ token 29 | for(int i=1:i<=m;i++) | ~ ^ | ) colzero.cpp:29:1: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 29 | for(int i=1:i<=m;i++) | ^~~ colzero.cpp:29:18: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 29 | for(int i=1:i<=m;i++) | ^ colzero.cpp:10:9: warning: unused variable ‘a’ [-Wunused-variable] 10 | int m,n,a[11][11]; | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ColZero 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ă.