#3011
lastk
Se dă un șir a[1]
, a[2]
, …, a[n]
de numere naturale și un număr natural k
. Să se determine cele mai mari k
numere din șir.
Folclorul informatic
Problema | lastk | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 2 MB
/
Stivă 1 MB
|
Id soluție | #50324693 | Utilizator | |
Fișier | lastk.cpp | Dimensiune | 1.99 KB |
Data încărcării | 04 Aprilie 2024, 16:54 | Scor / rezultat | Eroare de compilare |
lastk.cpp: In function 'int main()': lastk.cpp:89:19: error: invalid initialization of reference of type 'int&' from expression of type 'long long int' insert(H, h, a); ^ lastk.cpp:42:6: error: in passing argument 2 of 'void insert(int*, int&, int)' void insert(int H[], int& N, int value) { ^ lastk.cpp:91:46: error: invalid initialization of reference of type 'int&' from expression of type 'long long int' if(h<k) insert(H, h, (b * nr + c) % d); ^ lastk.cpp:42:6: error: in passing argument 2 of 'void insert(int*, int&, int)' void insert(int H[], int& N, int value) { ^ lastk.cpp:93:29: error: invalid initialization of reference of type 'int&' from expression of type 'long long int' extract_min(H, h); ^ lastk.cpp:51:6: error: in passing argument 2 of 'void extract_min(int*, int&)' void extract_min(int H[], int& N) { ^ lastk.cpp:94:42: error: invalid initialization of reference of type 'int&' from expression of type 'long long int' insert(H, h, (b * nr + c) % d); ^ lastk.cpp:42:6: error: in passing argument 2 of 'void insert(int*, int&, int)' void insert(int H[], int& N, int value) { ^ lastk.cpp:100:25: error: invalid initialization of reference of type 'int&' from expression of type 'long long int' extract_min(H, h); ^ lastk.cpp:51:6: error: in passing argument 2 of 'void extract_min(int*, int&)' void extract_min(int H[], int& N) { ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema lastk 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ă.