#777
CntColoane
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 | #44717659 | Utilizator | |
Fișier | cntcoloane.cpp | Dimensiune | 714 B |
Data încărcării | 19 Septembrie 2023, 20:46 | Scor / rezultat | Eroare de compilare |
cntcoloane.cpp: In function 'int main()': cntcoloane.cpp:5:26: error: 'n' was not declared in this scope for(int i = 0 ; i <= n ; ++i) ^ cntcoloane.cpp:8:16: error: 'a' was not declared in this scope if(a[i][col] > a[j][col]) ^ cntcoloane.cpp:8:21: error: 'col' was not declared in this scope if(a[i][col] > a[j][col]) ^ cntcoloane.cpp:16:11: error: 'n' was not declared in this scope cin>>n>>m; ^ cntcoloane.cpp:18:44: error: 'a' was not declared in this scope for(int j= 0; j <= m; ++j) cin >> a[i][j]; ^ cntcoloane.cpp:21:16: error: 'sort' was not declared in this scope sort(j); ^ cntcoloane.cpp:25:17: error: 'a' was not declared in this scope if (a[i][j] == a[i-1][j]) ok = 0; ^ cntcoloane.cpp:15:13: warning: unused variable 'cnt' [-Wunused-variable] int m , cnt = 0 , D=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ă.