#92
Proiecte
Cunoscând timpii de evaluare a n proiecte, să se stabilească ordinea de evaluare a acestora, astfel încât să se minimizeze timpul mediu de aşteptare a investitorilor care au depus aceste proiecte.
Problema | Proiecte | Operații I/O |
proiecte.in /proiecte.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51399141 | Utilizator | |
Fișier | proiecte.cpp | Dimensiune | 1.13 KB |
Data încărcării | 12 Iunie 2024, 18:52 | Scor / rezultat | Eroare de compilare |
proiecte.cpp: In function 'int main()': proiecte.cpp:35:52: error: no matching function for call to 'sort(std::vector<Proiect>::iterator, <unresolved overloaded function type>, bool (&)(const Proiect&, const Proiect&))' sort(proiecte.begin(), proiecte.end, comparator); ^ proiecte.cpp:35:52: note: candidates are: In file included from /usr/include/c++/4.8/algorithm:62:0, from proiecte.cpp:4: /usr/include/c++/4.8/bits/stl_algo.h:5447:5: note: template<class _RAIter> void std::sort(_RAIter, _RAIter) sort(_RandomAccessIterator __first, _RandomAccessIterator __last) ^ /usr/include/c++/4.8/bits/stl_algo.h:5447:5: note: template argument deduction/substitution failed: proiecte.cpp:35:52: note: could not resolve address from overloaded function 'proiecte.std::vector<Proiect>::end' sort(proiecte.begin(), proiecte.end, comparator); ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from proiecte.cpp:4: /usr/include/c++/4.8/bits/stl_algo.h:5483:5: note: template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare) sort(_RandomAccessIterator __first, _RandomAccessIterator __last, ^ /usr/include/c++/4.8/bits/stl_algo.h:5483:5: note: template argument deduction/substitution failed: proiecte.cpp:35:52: note: could not resolve address from overloaded function 'proiecte.std::vector<Proiect>::end' sort(proiecte.begin(), proiecte.end, comparator); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Proiecte 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ă.