#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 | #64775619 | Utilizator | |
| Fișier | cntcoloane.cpp | Dimensiune | 369 B |
| Data încărcării | 29 Mai 2026, 14:46 | Scor/rezultat | Eroare de compilare |
cntcoloane.cpp:2:1: error: ‘usding’ does not name a type 2 | usding namespace std; | ^~~~~~ cntcoloane.cpp: In function ‘int main()’: cntcoloane.cpp:6:5: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’? 6 | cin>>n>>m; | ^~~ | std::cin In file included from cntcoloane.cpp:1: /usr/include/c++/13/iostream:62:18: note: ‘std::cin’ declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ cntcoloane.cpp:7:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 7 | for(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(j=1;j<=m;j++) { | ^~~ cntcoloane.cpp:17:5: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’? 17 | cout<<nr; | ^~~~ | std::cout /usr/include/c++/13/iostream:63:18: note: ‘std::cout’ declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
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ă.