#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 | #53314431 | Utilizator | |
Fișier | nrlipsa.cpp | Dimensiune | 857 B |
Data încărcării | 24 Octombrie 2024, 09:56 | Scor / rezultat | Eroare de compilare |
nrlipsa.cpp:8:18: warning: missing terminating " character [enabled by default] ifstream cin("nrlipsa.in); ^ nrlipsa.cpp:8:5: error: missing terminating " character ifstream cin("nrlipsa.in); ^ nrlipsa.cpp:9:19: warning: missing terminating " character [enabled by default] ofstream cout("nrlipsa.out); ^ nrlipsa.cpp:9:5: error: missing terminating " character ofstream cout("nrlipsa.out); ^ nrlipsa.cpp: In function 'int main()': nrlipsa.cpp:10:12: error: 'max1' has not been declared int a, max1=0, max2=0, cnt=0; ^ nrlipsa.cpp:10:16: error: default arguments are only permitted for function parameters int a, max1=0, max2=0, cnt=0; ^ nrlipsa.cpp:10:20: error: 'max2' has not been declared int a, max1=0, max2=0, cnt=0; ^ nrlipsa.cpp:10:24: error: default arguments are only permitted for function parameters int a, max1=0, max2=0, cnt=0; ^ nrlipsa.cpp:10:28: error: 'cnt' has not been declared int a, max1=0, max2=0, cnt=0; ^ nrlipsa.cpp:10:31: error: default arguments are only permitted for function parameters int a, max1=0, max2=0, cnt=0; ^ nrlipsa.cpp:10:33: error: expected ')' before ';' token int a, max1=0, max2=0, cnt=0; ^ nrlipsa.cpp:10:33: error: expected ')' before ';' token nrlipsa.cpp:11:16: error: 'a' was not declared in this scope while(cin>>a) ^ nrlipsa.cpp:21:13: error: 'cnt' was not declared in this scope cnt++; ^ nrlipsa.cpp:22:13: error: 'max2' was not declared in this scope max2=max1; ^ nrlipsa.cpp:22:18: error: 'max1' was not declared in this scope max2=max1; ^ nrlipsa.cpp:28:8: error: 'max1' was not declared in this scope if(max1==0 || max2==0) ^ nrlipsa.cpp:28:19: error: 'max2' was not declared in this scope if(max1==0 || max2==0) ^
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ă.