Borderou de evaluare (job #3282075)
Utilizator | Data | 4 martie 2025 13:53:43 | |
---|---|---|---|
Problema | Catun | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void dijkstra()':
main.cpp:17:18: error: no matching function for call to 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::emplace(<brace-enclosed initializer list>)'
17 | q.emplace({i,0});
| ~~~~~~~~~^~~~~~~
In file included from /usr/include/c++/12.2.1/queue:64,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:86,
from main.cpp:1:
/usr/include/c++/12.2.1/bits/stl_queue.h:754:9: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::emplace(_Args&& ...) [with _Args = {}; _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >]'
754 | emplace(_Args&&... __args)
| ^~~~~~~
/usr/include/c++/12.2.1/bits/stl_queue.h:754:9: note: candidate expects 0 arguments, 1 provided
main.cpp:35:26: error: no matching function for call to 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::emplace(<brace-enclosed initializer list>)'
35 | q.emplace({nxt,dist[nxt]});
| ~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_queue.h:754:9: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::emplace(_Args&& ...) [with _Args = {}; _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >]'
754 | emplace(_Args&&... __args)
| ^~~~~~~
/usr/include/c++/12.2.1/bits/stl_queue.h:754:9: note: candidate expects 0 arguments, 1 provided
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !