#4745
Se dă o matrice cu n linii și n coloane care memorează numere întregi. Să se reordoneze coloanele matricii astfel încât acestea să se afle ordonate lexicografic.
| Problema | qscol | Operații I/O |
qscol.in/qscol.out
|
|---|---|---|---|
| Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64952059 | Utilizator | |
| Fișier | qscol.cpp | Dimensiune | 5.73 KB |
| Data încărcării | 22 Iunie 2026, 15:54 | Scor/rezultat | Eroare de compilare |
qscol.cpp:121:28: error: need ‘typename’ before ‘std::iterator_traits< <template-parameter-1-1> >::iterator_category’ because ‘std::iterator_traits< <template-parameter-1-1> >’ is a dependent scope 121 | class Category = std::iterator_traits<It>::iterator_category, | ^~~ | typename qscol.cpp:122:24: error: need ‘typename’ before ‘std::iterator_traits< <template-parameter-1-1> >::value_type’ because ‘std::iterator_traits< <template-parameter-1-1> >’ is a dependent scope 122 | class Type = std::iterator_traits<It>::value_type, | ^~~ | typename qscol.cpp: In lambda function: qscol.cpp:184:53: error: no matching function for call to ‘lexicographical_compare(std::vector<int>::const_iterator, std::vector<int>::const_iterator, std::vector<int>::const_iterator, std::vector<int>::const_iterator)’ 184 | return algo::lexicographical_compare(a.begin(), a.end(), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ 185 | b.begin(), b.end()); | ~~~~~~~~~~~~~~~~~~~ qscol.cpp:124:13: note: candidate: ‘template<class It, class Category, class Type, class Compare> bool algo::lexicographical_compare(It, It, It, It, Compare)’ 124 | inline bool lexicographical_compare (It first_b, It first_e, It second_b, | ^~~~~~~~~~~~~~~~~~~~~~~ qscol.cpp:124:13: note: template argument deduction/substitution failed:
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema qscol 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ă.