#2824
Numere25
Se dă un număr natural n
și un șir de numere naturale din intervalul [1,n]
ordonate crescător. Să se afișeze în ordine strict crescătoare toate numerele din intervalul [1,n]
care nu se găsesc în șirul dat.
Subiect Bacalaureat 2016, sesiunea iunie-iulie, enunț modificat
Problema | Numere25 | Operații I/O |
![]() numere25.in /numere25.out
|
---|---|---|---|
Limita timp | 2.5 secunde | Limita memorie |
Total: 2 MB
/
Stivă 2 MB
|
Id soluție | #51145213 | Utilizator | |
Fișier | numere25.cpp | Dimensiune | 397 B |
Data încărcării | 27 Mai 2024, 09:29 | Scor / rezultat | Eroare de compilare |
numere25.cpp:3:14: warning: missing terminating " character [enabled by default] ifstream cin("numere25.in); ^ numere25.cpp:3:1: error: missing terminating " character ifstream cin("numere25.in); ^ numere25.cpp:4:15: warning: missing terminating " character [enabled by default] ofstream cout("numere25.out); ^ numere25.cpp:4:1: error: missing terminating " character ofstream cout("numere25.out); ^ numere25.cpp:7:1: error: expected ')' before '{' token { ^ numere25.cpp:7:1: error: expected ')' before '{' token numere25.cpp: In function 'std::ifstream cin(std::ofstream (*)(int (*)()))': numere25.cpp:9:10: error: invalid operands of types 'std::ifstream(std::ofstream (*)(int (*)())) {aka std::basic_ifstream<char>(std::basic_ofstream<char> (*)(int (*)()))}' and 'int' to binary 'operator>>' cin>>n>>x; ^ numere25.cpp:11:15: error: invalid operands of types 'std::ofstream (*)(int (*)()) {aka std::basic_ofstream<char> (*)(int (*)())}' and 'int' to binary 'operator<<' cout<<i<<" ",ok=1; ^ numere25.cpp:12:16: error: invalid operands of types 'std::ifstream(std::ofstream (*)(int (*)())) {aka std::basic_ifstream<char>(std::basic_ofstream<char> (*)(int (*)()))}' and 'int' to binary 'operator>>' while(cin>>y) ^ numere25.cpp:15:15: error: invalid operands of types 'std::ofstream (*)(int (*)()) {aka std::basic_ofstream<char> (*)(int (*)())}' and 'int' to binary 'operator<<' cout<<i<<" ",ok=1; ^ numere25.cpp:19:15: error: invalid operands of types 'std::ofstream (*)(int (*)()) {aka std::basic_ofstream<char> (*)(int (*)())}' and 'int' to binary 'operator<<' cout<<i<<" ",ok=1; ^ numere25.cpp:20:21: error: invalid operands of types 'std::ofstream (*)(int (*)()) {aka std::basic_ofstream<char> (*)(int (*)())}' and 'const char [10]' to binary 'operator<<' if(ok==0) cout<<"Nu exista"; ^ numere25.cpp:21:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Numere25 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ă.