#1005
Se dă o listă cu numere naturale. Să se determine numerele naturale nenule cu cel mult patru cifre care nu apar în lista dată.
Problema | Numere8 | Operații I/O |
![]() numere8.in /numere8.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58182577 | Utilizator | |
Fișier | numere8.cpp | Dimensiune | 431 B |
Data încărcării | 19 Mai 2025, 10:15 | Scor / rezultat | Eroare de compilare |
numere8.cpp:5:1: error: 'usingnamespace' does not name a type usingnamespace std; ^ numere8.cpp: In function 'int main()': numere8.cpp:9:1: error: 'ifstream' was not declared in this scope ifstream fin("numere8.in"); ^ numere8.cpp:9:1: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from numere8.cpp:1: /usr/include/c++/4.8/iosfwd:157:34: note: 'std::ifstream' typedef basic_ifstream<char> ifstream; ^ numere8.cpp:9:10: error: expected ';' before 'fin' ifstream fin("numere8.in"); ^ numere8.cpp:10:5: error: 'ofstream' was not declared in this scope ofstream fout("numere8.out"); ^ numere8.cpp:10:5: note: suggested alternative: In file included from /usr/include/c++/4.8/ios:38:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from numere8.cpp:1: /usr/include/c++/4.8/iosfwd:160:34: note: 'std::ofstream' typedef basic_ofstream<char> ofstream; ^ numere8.cpp:10:14: error: expected ';' before 'fout' ofstream fout("numere8.out"); ^ numere8.cpp:11:6: error: 'unordered_set' was not declared in this scope unordered_set<int> numere; ^ numere8.cpp:11:6: note: suggested alternative: In file included from /usr/include/c++/4.8/unordered_set:48:0, from numere8.cpp:3: /usr/include/c++/4.8/bits/unordered_set.h:93:11: note: 'std::unordered_set' class unordered_set : __check_copy_constructible<_Alloc> ^ numere8.cpp:11:20: error: expected primary-expression before 'int' unordered_set<int> numere; ^ numere8.cpp:11:20: error: expected ';' before 'int' numere8.cpp:15:9: error: 'fin' was not declared in this scope while (fin >> x) ^ numere8.cpp:17:3: error: 'numer4e' was not declared in this scope numer4e.insert(x); ^ numere8.cpp:22:7: error: 'numere' was not declared in this scope if (numere.find(i) == numere.end()) ^ numere8.cpp:24:4: error: 'fout' was not declared in this scope fout << i << " "; ^ numere8.cpp:27:2: error: 'fin' was not declared in this scope fin.close(); ^ numere8.cpp:28:2: error: 'fout' was not declared in this scope fout.close(); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Numere8 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ă.