#2877
SortMatrixLinCol
Se dă o matrice pătratică de dimensiune n
. Să se ordoneze crescător fiecare linie a matricei, apoi să se ordoneze crescător fiecare coloană a acesteia.
Problema | SortMatrixLinCol | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 1 MB
/
Stivă 1 MB
|
Id soluție | #53592706 | Utilizator | |
Fișier | sortmatrixlincol.cpp | Dimensiune | 682 B |
Data încărcării | 05 Noiembrie 2024, 23:06 | Scor / rezultat | Eroare de compilare |
sortmatrixlincol.cpp:5:11: error: expected '}' before ';' token cin>>n; ^ sortmatrixlincol.cpp:5:8: error: invalid user-defined conversion from 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' to 'int' [-fpermissive] cin>>n; ^ In file included from /usr/include/c++/4.8/ios:44:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from sortmatrixlincol.cpp:1: /usr/include/c++/4.8/bits/basic_ios.h:115:7: note: candidate is: std::basic_ios<_CharT, _Traits>::operator void*() const [with _CharT = char; _Traits = std::char_traits<char>] <near match> operator void*() const ^ /usr/include/c++/4.8/bits/basic_ios.h:115:7: note: no known conversion for implicit 'this' parameter from 'void*' to 'int' sortmatrixlincol.cpp:6:5: error: expected unqualified-id before 'for' for(i=1;i<=n;i++) ^ sortmatrixlincol.cpp:6:13: error: 'i' does not name a type for(i=1;i<=n;i++) ^ sortmatrixlincol.cpp:6:18: error: 'i' does not name a type for(i=1;i<=n;i++) ^ sortmatrixlincol.cpp:7:17: error: 'j' does not name a type for(j=1;j<=n;j++) ^ sortmatrixlincol.cpp:7:22: error: 'j' does not name a type for(j=1;j<=n;j++) ^ sortmatrixlincol.cpp:9:5: error: expected unqualified-id before 'for' for(i=1;i<=n;i++) ^ sortmatrixlincol.cpp:9:13: error: 'i' does not name a type for(i=1;i<=n;i++) ^ sortmatrixlincol.cpp:9:18: error: 'i' does not name a type for(i=1;i<=n;i++) ^ sortmatrixlincol.cpp:17:5: error: expected unqualified-id before 'for' for(i=1;i<=n;i++) ^ sortmatrixlincol.cpp:17:13: error: 'i' does not name a type for(i=1;i<=n;i++) ^ sortmatrixlincol.cpp:17:18: error: 'i' does not name a type for(i=1;i<=n;i++) ^ sortmatrixlincol.cpp:25:5: error: expected unqualified-id before 'for' for(i=1;i<=n;i++){ ^ sortmatrixlincol.cpp:25:13: error: 'i' does not name a type for(i=1;i<=n;i++){ ^ sortmatrixlincol.cpp:25:18: error: 'i' does not name a type for(i=1;i<=n;i++){ ^ sortmatrixlincol.cpp:30:5: error: expected unqualified-id before 'return' return 0; ^ sortmatrixlincol.cpp:31:1: error: expected declaration before '}' token } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SortMatrixLinCol 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ă.