#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 | #50141191 | Utilizator | |
Fișier | lastk.cpp | Dimensiune | 1.48 KB |
Data încărcării | 28 Martie 2024, 13:16 | Scor / rezultat | Eroare de compilare |
lastk.cpp: In function 'int main()': lastk.cpp:76:16: error: invalid initialization of reference of type 'int&' from expression of type 'long long int' insert(n, A); ^ lastk.cpp:53:6: error: in passing argument 1 of 'void insert(int&, int)' void insert(int &N, int value) ^ lastk.cpp:81:24: error: invalid initialization of reference of type 'int&' from expression of type 'long long int' insert(n, x); ^ lastk.cpp:53:6: error: in passing argument 1 of 'void insert(int&, int)' void insert(int &N, int value) ^ lastk.cpp:86:30: error: invalid initialization of reference of type 'int&' from expression of type 'long long int' extract_min(n); ^ lastk.cpp:64:6: error: in passing argument 1 of 'void extract_min(int&)' void extract_min(int &N) ^ lastk.cpp:87:28: error: invalid initialization of reference of type 'int&' from expression of type 'long long int' insert(n, x); ^ lastk.cpp:53:6: error: in passing argument 1 of 'void insert(int&, int)' void insert(int &N, int value) ^ lastk.cpp:94:22: error: invalid initialization of reference of type 'int&' from expression of type 'long long int' extract_min(n); ^ lastk.cpp:64:6: error: in passing argument 1 of 'void extract_min(int&)' void extract_min(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ă.