#131
SortCif2
Să se scrie un program care ordonează elementele unui vector crescător după prima cifră.
Problema | SortCif2 | Operații I/O |
sortcif2.in /sortcif2.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #35581641 | Utilizator | |
Fișier | sortcif2.cpp | Dimensiune | 580 B |
Data încărcării | 15 Martie 2022, 08:28 | Scor / rezultat | Eroare de compilare |
sortcif2.cpp:2:1: error: 'ifstream' does not name a type ifstream cin("sortcif2.in") ^ sortcif2.cpp: In function 'int main()': sortcif2.cpp:9:5: error: 'cin' was not declared in this scope cin >> n; ^ sortcif2.cpp:9:5: note: suggested alternative: In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from sortcif2.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ sortcif2.cpp:22:33: error: 'swap' was not declared in this scope swap (v[i], v[j]); ^ sortcif2.cpp:22:33: note: suggested alternatives: In file included from /usr/include/c++/4.8/unordered_set:48:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:116, from sortcif2.cpp:1: /usr/include/c++/4.8/bits/unordered_set.h:1265:5: note: 'std::swap' swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, ^ In file included from /usr/include/c++/4.8/exception:152:0, from /usr/include/c++/4.8/ios:39, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/sstream:38, from /usr/include/c++/4.8/complex:45, from /usr/include/c++/4.8/ccomplex:38, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:52, from sortcif2.cpp:1: /usr/include/c++/4.8/bits/exception_ptr.h:160:5: note: 'std::__exception_ptr::swap' swap(exception_ptr& __lhs, exception_ptr& __rhs) ^ sortcif2.cpp:25:9: error: 'cout' was not declared in this scope cout << v[i] <<" "; ^ sortcif2.cpp:25:9: note: suggested alternative: In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from sortcif2.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SortCif2 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ă.