#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 | #49232636 | Utilizator | |
Fișier | ciffrecv.cpp | Dimensiune | 374 B |
Data încărcării | 21 Februarie 2024, 12:36 | Scor / rezultat | Eroare de compilare |
ciffrecv.cpp:4:1: error: expected ',' or ';' before 'ofstream' ofstream g("ciffrecv.out") ^ ciffrecv.cpp: In function 'int main()': ciffrecv.cpp:8:14: error: 'x' was not declared in this scope while(f>>x) ^ ciffrecv.cpp:9:9: error: 'v' was not declared in this scope v[x]++; ^ ciffrecv.cpp:10:8: error: 'v' was not declared in this scope if(v[2]) ^ ciffrecv.cpp:11:6: error: 'MAX' was not declared in this scope {MAX=2; NR_AP=v[2]; ^ ciffrecv.cpp:11:13: error: 'NR_AP' was not declared in this scope {MAX=2; NR_AP=v[2]; ^ ciffrecv.cpp:13:8: error: 'v' was not declared in this scope if(v[3]) ^ ciffrecv.cpp:14:6: error: 'MAX' was not declared in this scope {MAX=3; NR_AP=v[3]; ^ ciffrecv.cpp:14:13: error: 'NR_AP' was not declared in this scope {MAX=3; NR_AP=v[3]; ^ ciffrecv.cpp:16:8: error: 'v' was not declared in this scope if(v[5]) ^ ciffrecv.cpp:17:6: error: 'MAX' was not declared in this scope {MAX=5; NR_AP=v[5]; ^ ciffrecv.cpp:17:13: error: 'NR_AP' was not declared in this scope {MAX=5; NR_AP=v[5]; ^ ciffrecv.cpp:19:8: error: 'v' was not declared in this scope if(v[7]) ^ ciffrecv.cpp:20:6: error: 'MAX' was not declared in this scope {MAX=7; NR_AP=v[7]; ^ ciffrecv.cpp:20:13: error: 'NR_AP' was not declared in this scope {MAX=7; NR_AP=v[7]; ^ ciffrecv.cpp:22:5: error: 'g' was not declared in this scope g<<MAX<<' '<<NR_AP; ^ ciffrecv.cpp:22:8: error: 'MAX' was not declared in this scope g<<MAX<<' '<<NR_AP; ^ ciffrecv.cpp:22:18: error: 'NR_AP' was not declared in this scope g<<MAX<<' '<<NR_AP; ^
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ă.