#187
CifFrecv
Să se scrie un program care citeşte cel mult 1.000.000
de numere naturale din intervalul închis [0,9]
şi determină cel mai mare număr prim citit şi numărul său de apariţii.
Variante Bacalaureat 2009
Problema | CifFrecv | Operații I/O |
ciffrecv.in /ciffrecv.out
|
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 4 MB
/
Stivă 4 MB
|
Id soluție | #54722925 | Utilizator | |
Fișier | ciffrecv.cpp | Dimensiune | 518 B |
Data încărcării | 06 Decembrie 2024, 12:11 | Scor / rezultat | Eroare de compilare |
ciffrecv.cpp:6:1: error: expected ',' or ';' before 'int' int v[1000000],f[100000],nrap,i,d,x,n; ^ ciffrecv.cpp: In function 'int main()': ciffrecv.cpp:9:9: error: 'n' was not declared in this scope cin>>n; ^ ciffrecv.cpp:10:8: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ ciffrecv.cpp:11:10: error: 'x' was not declared in this scope {cin>>x; ^ ciffrecv.cpp:12:8: error: 'f' was not declared in this scope f[x]=0; ^ ciffrecv.cpp:14:19: error: 'x' was not declared in this scope while(cin>>x) ^ ciffrecv.cpp:16:12: error: 'f' was not declared in this scope f[x]++; ^ ciffrecv.cpp:18:11: error: 'v' was not declared in this scope if(v[x]>maxim) ^ ciffrecv.cpp:18:13: error: 'x' was not declared in this scope if(v[x]>maxim) ^ ciffrecv.cpp:18:16: error: 'maxim' was not declared in this scope if(v[x]>maxim) ^ ciffrecv.cpp:20:16: error: 'd' was not declared in this scope for(d=2;d<=f[x]/2;d++) ^ ciffrecv.cpp:20:23: error: 'f' was not declared in this scope for(d=2;d<=f[x]/2;d++) ^ ciffrecv.cpp:23:13: error: 'nrap' was not declared in this scope nrap=f[x]; ^ ciffrecv.cpp:23:18: error: 'f' was not declared in this scope nrap=f[x]; ^ ciffrecv.cpp:25:14: error: 'maxim' was not declared in this scope gout<<maxim<<" "<<nrap; ^ ciffrecv.cpp:25:26: error: 'nrap' was not declared in this scope gout<<maxim<<" "<<nrap; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema CifFrecv 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ă.