#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 |
![]() |
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57255093 | Utilizator | |
Fișier | numere1.cpp | Dimensiune | 504 B |
Data încărcării | 22 Martie 2025, 10:09 | Scor / rezultat | Eroare de compilare |
numere1.cpp:4:21: error: two or more data types in declaration of 'v' double double v[1000]; ^ numere1.cpp: In function 'int main()': numere1.cpp:7:19: error: two or more data types in declaration of 'n' double double n,x[500000],i,ok=0,a,b; ^ numere1.cpp:7:29: error: two or more data types in declaration of 'x' double double n,x[500000],i,ok=0,a,b; ^ numere1.cpp:7:31: error: two or more data types in declaration of 'i' double double n,x[500000],i,ok=0,a,b; ^ numere1.cpp:7:33: error: two or more data types in declaration of 'ok' double double n,x[500000],i,ok=0,a,b; ^ numere1.cpp:7:38: error: two or more data types in declaration of 'a' double double n,x[500000],i,ok=0,a,b; ^ numere1.cpp:7:40: error: two or more data types in declaration of 'b' double double n,x[500000],i,ok=0,a,b; ^ numere1.cpp:8:10: error: 'n' was not declared in this scope cin>>n; ^ numere1.cpp:9:10: error: 'i' was not declared in this scope for (i=1;i<=n;i++) ^ numere1.cpp:10:14: error: 'x' was not declared in this scope cin>>x[i]; ^ numere1.cpp:11:10: error: 'i' was not declared in this scope for (i=1;i<=n;i++) ^ numere1.cpp:12:9: error: 'v' was not declared in this scope v[x[i]]++; ^ numere1.cpp:12:11: error: 'x' was not declared in this scope v[x[i]]++; ^ numere1.cpp:13:10: error: 'i' was not declared in this scope for (i=999;i>=100 && ok!=2;i--) ^ numere1.cpp:13:26: error: 'ok' was not declared in this scope for (i=999;i>=100 && ok!=2;i--) ^ numere1.cpp:14:13: error: 'v' was not declared in this scope if (v[i]==0) ^ numere1.cpp:18:13: error: 'b' was not declared in this scope b=i; ^ numere1.cpp:23:13: error: 'a' was not declared in this scope a=i; ^ numere1.cpp:27:11: error: 'a' was not declared in this scope cout<<a<<' '<<b; ^ numere1.cpp:27:19: error: 'b' was not declared in this scope cout<<a<<' '<<b; ^
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ă.