#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 | #64658425 | Utilizator | |
| Fișier | cntcoloane.cpp | Dimensiune | 372 B |
| Data încărcării | 21 Mai 2026, 00:22 | Scor/rezultat | 0 puncte |
cntcoloane.cpp: In function ‘int main()’: cntcoloane.cpp:6:2: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 6 | for(i = 0; i<n;i++) | ^~~ cntcoloane.cpp:9:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 9 | for(j=0;j<m;j++) | ^~~ cntcoloane.cpp:13:33: warning: statement has no effect [-Wunused-value] 13 | if(a[i][j] == a[k][j]) ok == false; | ~~~^~~~~~~~ cntcoloane.cpp:11:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 11 | for(i=0;i<n;i++) | ^~~ cntcoloane.cpp:14:7: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 14 | if(ok==true) nr++; | ^~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | Depășit | Limita de timp depășită | 20 | 0 | Exemplu | |
| 2 | Depășit | Limita de timp depășită | 40 | 0 | ||
| 3 | Depășit | Limita de timp depășită | 40 | 0 | ||
| Punctaj total | 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ă.