#1264
Se dau n numere naturale. Să se afișeze al k-lea cel mai mic element din șir.
| Problema | StatisticiOrdine | Operații I/O |
statisticiordine.in/statisticiordine.out
|
|---|---|---|---|
| Limita timp | 1.5 secunde | Limita memorie |
Total: 16 MB
/
Stivă 1 MB
|
| Id soluție | #33715297 | Utilizator | |
| Fișier | statisticiordine.cpp | Dimensiune | 1.49 KB |
| Data încărcării | 06 Ianuarie 2022, 15:24 | Scor/rezultat | Eroare de compilare |
statisticiordine.cpp:20:1: error: 'ifstream' does not name a type ifstream fin("statisticiordine.in"); ^ statisticiordine.cpp:21:1: error: 'ofstream' does not name a type ofstream fout("statisticiordine.out"); ^ statisticiordine.cpp: In function 'void beOlvas(int&, int&, double*&)': statisticiordine.cpp:27:2: error: 'fin' was not declared in this scope fin >> n >> k; ^ statisticiordine.cpp: In function 'int main()': statisticiordine.cpp:91:2: error: 'fout' was not declared in this scope fout << quickSelect(n, a, k, 0, n - 1); ^ statisticiordine.cpp: In function 'double quickSelect(int, double*, int, int, int)': statisticiordine.cpp:77:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema StatisticiOrdine 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ă.