#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 | #58498641 | Utilizator | |
Fișier | numere25.cpp | Dimensiune | 445 B |
Data încărcării | 11 Iunie 2025, 17:45 | Scor / rezultat | Eroare de compilare |
numere25.cpp:5:13: error: variable 'std::ifstream fin' has initializer but incomplete type ifstream fin("numere25.in"); ^ numere25.cpp:7:14: error: variable 'std::ofstream fout' has initializer but incomplete type ofstream fout("numere25.out"); ^ numere25.cpp: In function 'int main()': numere25.cpp:11:12: error: 'n' was not declared in this scope fin >> n; ^ numere25.cpp:12:19: error: 'y' was not declared in this scope while (fin >> y) ^ numere25.cpp:14:20: error: 'x' was not declared in this scope for (int i=x+1 ; i<y ; i++) ^ numere25.cpp:17:13: error: 'k' was not declared in this scope k=1; ^ numere25.cpp:19:9: error: 'x' was not declared in this scope x=y; ^ numere25.cpp:21:16: error: 'x' was not declared in this scope for (int i=x+1 ; i<=n ; i++) ^ numere25.cpp:24:9: error: 'k' was not declared in this scope k=1; ^ numere25.cpp:26:9: error: 'k' was not declared in this scope if (k!=1) fout << "Nu exista"; ^
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ă.