#525
Se dau n numere naturale. Determinaţi cele mai mari două numere cu trei cifre care nu apar printre numerele date.
| Problema | Numere1 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64746616 | Utilizator | |
| Fișier | numere1.cpp | Dimensiune | 515 B |
| Data încărcării | 27 Mai 2026, 14:22 | Scor/rezultat | 0 puncte |
numere1.cpp: In function ‘int main()’: numere1.cpp:9:2: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 9 | for(i=0;i<n;i++) | ^~~ numere1.cpp:11:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 11 | for(i=0;i<n;i++) | ^~~ numere1.cpp:11:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] numere1.cpp:13:4: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 13 | i=999; | ^ numere1.cpp:14:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 14 | while(db=!0 and db1!=0 && i>=0) | ~~^~~~~~~~~~~~~~~~~~~~~~ numere1.cpp:30:18: warning: ‘b’ may be used uninitialized [-Wmaybe-uninitialized] 30 | cout<<a<<" "<<b; | ^ numere1.cpp:7:46: note: ‘b’ was declared here 7 | int n,t[1000],freq[1000]={0},i,db=1,db1=1,a,b; | ^ numere1.cpp:30:13: warning: ‘a’ may be used uninitialized [-Wmaybe-uninitialized] 30 | cout<<a<<" "<<b; | ^~~ numere1.cpp:7:44: note: ‘a’ was declared here 7 | int n,t[1000],freq[1000]={0},i,db=1,db1=1,a,b; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.001 secunde | Caught fatal signal 6 | 20 | 0 | ||
| 3 | 0.001 secunde | Caught fatal signal 6 | 20 | 0 | ||
| 4 | 0.004 secunde | Caught fatal signal 11 | 40 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Numere1 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ă.