#185
CifInit
Se citește de la tastură un număr natural n, apoi n numere naturale. Să se afişeze cel mai mic număr care poate fi scris folosind prima cifră a numerelor citite.
Problema | CifInit | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #55073841 | Utilizator | |
Fișier | cifinit.cpp | Dimensiune | 491 B |
Data încărcării | 20 Decembrie 2024, 16:33 | Scor / rezultat | Eroare de compilare |
cifinit.cpp:3:7: error: expected nested-name-specifier before 'namespcae' using namespcae std; ^ cifinit.cpp:3:7: error: 'namespcae' has not been declared cifinit.cpp:3:17: error: expected ';' before 'std' using namespcae std; ^ cifinit.cpp:3:17: error: 'std' does not name a type cifinit.cpp: In function 'int main()': cifinit.cpp:7:5: error: 'cin' was not declared in this scope cin >> n; ^ cifinit.cpp:7:5: note: suggested alternative: In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from cifinit.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ cifinit.cpp:19:45: error: 'swap' was not declared in this scope if (v[i] > v[j]) swap(v[i], v[j]); ^ cifinit.cpp:19:45: 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 cifinit.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 cifinit.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) ^ cifinit.cpp:22:9: error: 'cout' was not declared in this scope cout << v[i] << " "; ^ cifinit.cpp:22:9: note: suggested alternative: In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from cifinit.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 CifInit 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ă.