#239
NrLipsa
Se dau mai multe numere naturale cu cel mult 9
cifre fiecare. Să se determine cele mai mari două numere de 3
cifre care nu se găsesc printre numerele date.
Variante Bacalaureat 2009
Problema | NrLipsa | Operații I/O |
nrlipsa.in /nrlipsa.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #52639113 | Utilizator | |
Fișier | nrlipsa.cpp | Dimensiune | 418 B |
Data încărcării | 05 Octombrie 2024, 15:24 | Scor / rezultat | Eroare de compilare |
nrlipsa.cpp:4:15: error: 'nrlipsa' was not declared in this scope ifstream fin (nrlipsa.in) ^ nrlipsa.cpp:5:1: error: expected ',' or ';' before 'ofstream' ofstream fout (nrlipsa.out) ^ nrlipsa.cpp: In function 'int main()': nrlipsa.cpp:9:16: error: 'x' was not declared in this scope while(fin>>x) ^ nrlipsa.cpp:10:9: error: 'v' was not declared in this scope v[x]++; ^ nrlipsa.cpp:11:9: error: 'i' was not declared in this scope for(i=999;i>=100;i--) ^ nrlipsa.cpp:12:12: error: 'v' was not declared in this scope if(v[i]==0) ^ nrlipsa.cpp:14:12: error: 'k' was not declared in this scope if(k==0) ^ nrlipsa.cpp:15:10: error: 'x' was not declared in this scope x=i; ^ nrlipsa.cpp:17:10: error: 'y' was not declared in this scope y=i; ^ nrlipsa.cpp:18:9: error: 'k' was not declared in this scope k++; ^ nrlipsa.cpp:20:8: error: 'k' was not declared in this scope if(k>2) ^ nrlipsa.cpp:21:9: error: 'fout' was not declared in this scope fout<<"NU"; ^ nrlipsa.cpp:23:9: error: 'fout' was not declared in this scope fout<<x<<' '<<y; ^ nrlipsa.cpp:23:15: error: 'x' was not declared in this scope fout<<x<<' '<<y; ^ nrlipsa.cpp:23:23: error: 'y' was not declared in this scope fout<<x<<' '<<y; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema NrLipsa 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ă.