#1264
StatisticiOrdine
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 | #51534266 | Utilizator | |
Fișier | statisticiordine.cpp | Dimensiune | 910 B |
Data încărcării | 06 Iulie 2024, 16:33 | Scor / rezultat | Eroare de compilare |
statisticiordine.cpp:4:13: error: variable 'std::ifstream fin' has initializer but incomplete type ifstream fin("statisticiordine.in"); ^ statisticiordine.cpp:5:14: error: variable 'std::ofstream fout' has initializer but incomplete type ofstream fout("statisticiordine.out"); ^ statisticiordine.cpp: In function 'int poz(int, int)': statisticiordine.cpp:11:12: error: 'v' was not declared in this scope if(v[s]>v[d]) ^ statisticiordine.cpp: In function 'int QuickSelect(int, int, int)': statisticiordine.cpp:31:20: error: 'v' was not declared in this scope return v[p]; ^ statisticiordine.cpp:38:16: error: 'v' was not declared in this scope return v[s]; ^ statisticiordine.cpp: In function 'int main()': statisticiordine.cpp:45:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(i=1;i<=n;i++) ^ statisticiordine.cpp: In function 'int QuickSelect(int, int, int)': statisticiordine.cpp:39: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ă.