#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 | #64151164 | Utilizator | |
| Fișier | cntcoloane.cpp | Dimensiune | 415 B |
| Data încărcării | 20 Aprilie 2026, 17:00 | Scor/rezultat | Eroare de compilare |
cntcoloane.cpp: In function ‘int main()’: cntcoloane.cpp:16:33: error: ‘l’ was not declared in this scope 16 | for(l=i+1; l<=n; l++) | ^ cntcoloane.cpp:16:29: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 16 | for(l=i+1; l<=n; l++) | ^~~ cntcoloane.cpp:20:33: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 20 | if(ok==1) { | ^~ cntcoloane.cpp: At global scope: cntcoloane.cpp:26:9: error: ‘cout’ does not name a type 26 | cout<<C; | ^~~~ cntcoloane.cpp:27:9: error: expected unqualified-id before ‘return’ 27 | return 0; | ^~~~~~ cntcoloane.cpp:28:1: error: expected declaration before ‘}’ token 28 | } | ^
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ă.