#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 | #35574455 | Utilizator | |
Fișier | statisticiordine.cpp | Dimensiune | 902 B |
Data încărcării | 14 Martie 2022, 19:42 | Scor / rezultat | Eroare de compilare |
statisticiordine.cpp: In function 'int main()': statisticiordine.cpp:13:5: error: 'fout' was not declared in this scope fout << a[k]; ^ statisticiordine.cpp:13:15: error: 'k' was not declared in this scope fout << a[k]; ^ statisticiordine.cpp: In function 'void quicksort(int, int)': statisticiordine.cpp:27:16: error: 'k' was not declared in this scope if(poz>k) ^ statisticiordine.cpp:28:33: error: 'quickselect' was not declared in this scope quickselect(st,poz-1); ^ statisticiordine.cpp:20:9: warning: unused variable 'mij' [-Wunused-variable] int mij,pivot,i,j,d,poz; ^ statisticiordine.cpp:20:19: warning: unused variable 'i' [-Wunused-variable] int mij,pivot,i,j,d,poz; ^ statisticiordine.cpp:20:21: warning: unused variable 'j' [-Wunused-variable] int mij,pivot,i,j,d,poz; ^ statisticiordine.cpp:20:23: warning: unused variable 'd' [-Wunused-variable] int mij,pivot,i,j,d,poz; ^ statisticiordine.cpp: In function 'int divide(int, int)': statisticiordine.cpp:37:9: warning: unused variable 'mij' [-Wunused-variable] int mij=(st+dr)/2; ^
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ă.