#777
Se dă o matrice cu n linii şi m coloane şi elemente numere naturale. Să se determine câte coloane ale matricei au elementele distincte două câte două.
| Problema | CntColoane | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64535338 | Utilizator | |
| Fișier | cntcoloane.cpp | Dimensiune | 398 B |
| Data încărcării | 13 Mai 2026, 08:12 | Scor/rezultat | Eroare de compilare |
cntcoloane.cpp: In function ‘int main()’: cntcoloane.cpp:7:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 7 | for(int i=1;i<=n;i++) | ^~~ cntcoloane.cpp:10:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 10 | for(int j=1;j<=m;j++) | ^~~ cntcoloane.cpp:12:6: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 12 | for(int i=1;i<=n;i++) | ^~~ cntcoloane.cpp:15:10: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 15 | if(ok)cnt++; | ^~ cntcoloane.cpp: At global scope: cntcoloane.cpp:18:1: error: expected unqualified-id before ‘return’ 18 | return 0;} | ^~~~~~ cntcoloane.cpp:18:10: error: expected declaration before ‘}’ token 18 | return 0;} | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema CntColoane 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ă.