#2720
BucketSort
Metoda Bucket Sort constă în distribuirea elementelor în mai multe grupe, numite “bucket-uri”. Apoi fiecare bucket este sortat individual folosind un algoritm de sortare oarecare.
Problema | BucketSort | Operații I/O |
![]() bucketsort.in /bucketsort.out
|
---|---|---|---|
Limita timp | 0.04 secunde | Limita memorie |
Total: 1.5 MB
/
Stivă 1 MB
|
Id soluție | #51118186 | Utilizator | |
Fișier | bucketsort.cpp | Dimensiune | 1016 B |
Data încărcării | 24 Mai 2024, 17:13 | Scor / rezultat | Eroare de compilare |
bucketsort.cpp:6:1: error: expected ',' or ';' before 'ifstream' ifstream fout("bucketsort.out") ^ bucketsort.cpp: In function 'void Citire()': bucketsort.cpp:10:10: error: 'n' was not declared in this scope fin>>n; ^ bucketsort.cpp:12:14: error: 'a' was not declared in this scope fin>>a[i]; ^ bucketsort.cpp:13:10: error: 'semn' was not declared in this scope fin>>semn; ^ bucketsort.cpp: In function 'int Pivot(int, int, int)': bucketsort.cpp:18:10: error: 'a' was not declared in this scope swap(a[st],a[mijl]); ^ bucketsort.cpp: In function 'int QS(int, int, int)': bucketsort.cpp:52:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ bucketsort.cpp: In function 'void Afisare()': bucketsort.cpp:55:20: error: 'n' was not declared in this scope for(int i=1;i<=n;i++) ^ bucketsort.cpp:56:9: error: 'fout' was not declared in this scope fout<<a[i]<<" "; ^ bucketsort.cpp:56:15: error: 'a' was not declared in this scope fout<<a[i]<<" "; ^ bucketsort.cpp: In function 'int main()': bucketsort.cpp:61:10: error: 'n' was not declared in this scope QS(1,n,semn); ^ bucketsort.cpp:61:12: error: 'semn' was not declared in this scope QS(1,n,semn); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema BucketSort 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ă.