Borderou de evaluare (job #2465397)
Utilizator | Data | 30 septembrie 2019 08:33:39 | |
---|---|---|---|
Problema | Algoritmul lui Dijkstra | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void solve()':
main.cpp:51:69: error: no matching function for call to 'std::set<Elem>::find(int&, int&)'
heap.erase(heap.find(it.node, distances[it.node]));
^
In file included from /usr/include/c++/6/set:61:0,
from main.cpp:4:
/usr/include/c++/6/bits/stl_set.h:692:7: note: candidate: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::find(const key_type&) [with _Key = Elem; _Compare = std::less<Elem>; _Alloc = std::allocator<Elem>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<Elem>; std::set<_Key, _Compare, _Alloc>::key_type = Elem]
find(const key_type& __x)
^~~~
/usr/include/c++/6/bits/stl_set.h:692:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/6/bits/stl_set.h:696:7: note: candidate: std::set<_Key, _Compare, _Alloc>::const_iterator std::set<_Key, _Compare, _Alloc>::find(const key_type&) const [with _Key = Elem; _Compare = std::less<Elem>; _Alloc = std::allocator<Elem>; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<Elem>; std::set<_Key, _Compare, _Alloc>::key_type = Elem]
find(const key_type& __x) const
^~~~
/usr/include/c++/6/bits/stl_set.h:696:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/6/bits/stl_set.h:702:2: note: candidate: template<class _Kt> decltype (std::set<_Key, _Compare, _Alloc>::iterator{((std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_find_tr(__x)}) std::set<_Key, _Compare, _Alloc>::find(const _Kt&) [with _Kt = _Kt; _Key = Elem; _Compare = std::less<Elem>; _Alloc = std::allocator<Elem>]
find(const _Kt& __x)
^~~~
/usr/include/c++/6/bits/stl_set.h:702:2: note: template argument deduction/substitution failed:
main.cpp:51:69: note: candidate expects 1 argument, 2 provided
heap.erase(heap.find(it.node, distances[it.node]));
^
In file included from /usr/include/c++/6/set:61:0,
from main.cpp:4:
/usr/include/c++/6/bits/stl_set.h:708:2: note: candidate: template<class _Kt> decltype (std::set<_Key, _Compare, _Alloc>::const_iterator{((const std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_find_tr(__x)}) std::set<_Key, _Compare, _Alloc>::find(const _Kt&) const [with _Kt = _Kt; _Key = Elem; _Compare = std::less<Elem>; _Alloc = std::allocator<Elem>]
find(const _Kt& __x) const
^~~~
/usr/include/c++/6/bits/stl_set.h:708:2: note: template argument deduction/substitution failed:
main.cpp:51:69: note: candidate expects 1 argument, 2 provided
heap.erase(heap.find(it.node, distances[it.node]));
^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !