#2269
MaximPar
Se dau n numere naturale. Determinați cel mai mare număr par introdus și numărul său de apariții.
Problema | MaximPar | Operații I/O |
maximpar.in /maximpar.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53806808 | Utilizator | |
Fișier | maximpar.cpp | Dimensiune | 435 B |
Data încărcării | 12 Noiembrie 2024, 10:23 | Scor / rezultat | Eroare de compilare |
maximpar.cpp: In function 'int main()': maximpar.cpp:6:14: error: variable 'std::ifstream f' has initializer but incomplete type { ifstream f("maximpar.in") ^ maximpar.cpp:7:4: error: expected ',' or ';' before 'ofstream' ofstream g("maximpar.out") ^ maximpar.cpp:9:9: error: 'n' was not declared in this scope cin>>n; ^ maximpar.cpp:10:4: error: 'vmaxpar' was not declared in this scope vmaxpar=-1; ^ maximpar.cpp:11:8: error: 'i' was not declared in this scope for(i=1; i<n; i++) ^ maximpar.cpp:13:11: error: 'x' was not declared in this scope f>>x; ^ maximpar.cpp:16:12: error: 'maxpar' was not declared in this scope maxpar=x; ^ maximpar.cpp:17:12: error: 'ap' was not declared in this scope ap=1; ^ maximpar.cpp:20:9: error: 'ap' was not declared in this scope ap++; ^ maximpar.cpp:22:7: error: 'vmax' was not declared in this scope if(vmax==-1) ^ maximpar.cpp:23:6: error: 'g' was not declared in this scope g<<vmaxpar; ^ maximpar.cpp:25:5: error: 'g' was not declared in this scope g<<vmaxpar<<" "<<ap; ^ maximpar.cpp:25:22: error: 'ap' was not declared in this scope g<<vmaxpar<<" "<<ap; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MaximPar 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ă.