Borderou de evaluare (job #2705701)
Utilizator | Data | 13 februarie 2021 10:11:47 | |
---|---|---|---|
Problema | Transport2 | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void dijkstra(int)':
main.cpp:68:32: error: no matching function for call to 'std::set<std::tuple<int, int, int> >::insert(<brace-enclosed initializer list>)'
q.insert({d[k][y],});
^
In file included from /usr/include/c++/6/set:61:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:87,
from main.cpp:1:
/usr/include/c++/6/bits/stl_set.h:480:7: note: candidate: std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = std::tuple<int, int, int>; _Compare = std::less<std::tuple<int, int, int> >; _Alloc = std::allocator<std::tuple<int, int, int> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree_const_iterator<std::tuple<int, int, int> >; std::set<_Key, _Compare, _Alloc>::value_type = std::tuple<int, int, int>]
insert(const value_type& __x)
^~~~~~
/usr/include/c++/6/bits/stl_set.h:480:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::tuple<int, int, int>&}'
/usr/include/c++/6/bits/stl_set.h:489:7: note: candidate: std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = std::tuple<int, int, int>; _Compare = std::less<std::tuple<int, int, int> >; _Alloc = std::allocator<std::tuple<int, int, int> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree_const_iterator<std::tuple<int, int, int> >; std::set<_Key, _Compare, _Alloc>::value_type = std::tuple<int, int, int>]
insert(value_type&& __x)
^~~~~~
/usr/include/c++/6/bits/stl_set.h:489:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<std::tuple<int, int, int> >::value_type&& {aka std::tuple<int, int, int>&&}'
/usr/include/c++/6/bits/stl_set.h:517:7: note: candidate: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, const value_type&) [with _Key = std::tuple<int, int, int>; _Compare = std::less<std::tuple<int, int, int> >; _Alloc = std::allocator<std::tuple<int, int, int> >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<std::tuple<int, int, int> >; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<std::tuple<int, int, int> >; std::set<_Key, _Compare, _Alloc>::value_type = std::tuple<int, int, int>]
insert(const_iterator __position, const value_type& __x)
^~~~~~
/usr/include/c++/6/bits/stl_set.h:517:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/6/bits/stl_set.h:522:7: note: candidate: std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = std::tuple<int, int, int>; _Compare = std::less<std::tuple<int, int, int> >; _Alloc = std::allocator<std::tuple<int, int, int> >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<std::tuple<int, int, int> >; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<std::tuple<int, int, int> >; std::set<_Key, _Compare, _Alloc>::value_type = std::tuple<int, int, int>]
insert(const_iterator __position, value_type&& __x)
^~~~~~
/usr/include/c++/6/bits/stl_set.h:522:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/6/bits/stl_set.h:537:2: note: candidate: template<class _InputIterator> void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _Key = std::tuple<int, int, int>; _Compare = std::less<std::tuple<int, int, int> >; _Alloc = std::allocator<std::tuple<int, int, int> >]
insert(_InputIterator __first, _InputIterator __last)
^~~~~~
/usr/include/c++/6/bits/stl_set.h:537:2: note: template argument deduction/substitution failed:
main.cpp:68:32: note: candidate expects 2 arguments, 1 provided
q.insert({d[k][y],});
^
In file included from /usr/include/c++/6/set:61:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:87,
from main.cpp:1:
/usr/include/c++/6/bits/stl_set.h:549:7: note: candidate: void std::set<_Key, _Compare, _Alloc>::insert(std::initializer_list<_Tp>) [with _Key = std::tuple<int, int, int>; _Compare = std::less<std::tuple<int, int, int> >; _Alloc = std::allocator<std::tuple<int, int, int> >]
insert(initializer_list<value_type> __l)
^~~~~~
/usr/include/c++/6/bits/stl_set.h:549:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<std::tuple<int, int, int> >'
main.cpp:79:40: error: no matching function for call to 'std::set<std::tuple<int, int, int> >::insert(<brace-enclosed initializer list>)'
q.insert({cost, {k+1,y}});
^
In file included from /usr/include/c++/6/set:61:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:87,
from main.cpp:1:
/usr/include/c++/6/bits/stl_set.h:480:7: note: candidate: std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = std::tuple<int, int, int>; _Compare = std::less<std::tuple<int, int, int> >; _Alloc = std::allocator<std::tuple<int, int, int> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree_const_iterator<std::tuple<int, int, int> >; std::set<_Key, _Compare, _Alloc>::value_type = std::tuple<int, int, int>]
insert(const value_type& __x)
^~~~~~
/usr/include/c++/6/bits/stl_set.h:480:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::tuple<int, int, int>&}'
/usr/include/c++/6/bits/stl_set.h:489:7: note: candidate: std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = std::tuple<int, int, int>; _Compare = std::less<std::tuple<int, int, int> >; _Alloc = std::allocator<std::tuple<int, int, int> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree_const_iterator<std::tuple<int, int, int> >; std::set<_Key, _Compare, _Alloc>::value_type = std::tuple<int, int, int>]
insert(value_type&& __x)
^~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !