#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 | #51123006 | Utilizator | |
Fișier | bucketsort.cpp | Dimensiune | 471 B |
Data încărcării | 25 Mai 2024, 10:36 | Scor / rezultat | Eroare de compilare |
bucketsort.cpp: In function 'int main()': bucketsort.cpp:13:5: error: reference to 'cin' is ambiguous cin >> n; ^ bucketsort.cpp:5: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:15:9: error: reference to 'cin' is ambiguous cin >> a[i]; ^ bucketsort.cpp:5: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:5: error: reference to 'cin' is ambiguous cin >> d; ^ bucketsort.cpp:5: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:21:13: error: reference to 'cout' is ambiguous cout << a[i] << ' '; ^ bucketsort.cpp:6: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:24:13: error: reference to 'cout' is ambiguous cout << a[i] << ' '; ^ bucketsort.cpp:6: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ă.