#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 | #44105898 | Utilizator | |
Fișier | bucketsort.cpp | Dimensiune | 465 B |
Data încărcării | 23 Iunie 2023, 00:03 | Scor / rezultat | Eroare de compilare |
bucketsort.cpp: In function 'int main()': bucketsort.cpp:9:5: error: reference to 'cin' is ambiguous cin >> n; ^ bucketsort.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("bucketsort.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from bucketsort.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ bucketsort.cpp:11:9: error: reference to 'cin' is ambiguous cin >> a[i]; ^ bucketsort.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("bucketsort.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from bucketsort.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ bucketsort.cpp:13:5: error: reference to 'cin' is ambiguous cin >> d; ^ bucketsort.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("bucketsort.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from bucketsort.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ bucketsort.cpp:17:13: error: reference to 'cout' is ambiguous cout << a[i] << ' '; ^ bucketsort.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("bucketsort.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from bucketsort.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ bucketsort.cpp:20:13: error: reference to 'cout' is ambiguous cout << a[i] << ' '; ^ bucketsort.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("bucketsort.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from bucketsort.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^
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ă.