Borderou de evaluare (job #2405831)
Utilizator | Data | 15 aprilie 2019 00:14:24 | |
---|---|---|---|
Problema | Componente biconexe | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void dfs(std::vector<std::vector<int> >&, const int&, const int&, std::vector<int>&, std::vector<int>&, std::stack<std::pair<int, int> >&, std::vector<std::unordered_set<int> >&)':
main.cpp:32:11: error: expected unqualified-id before '[' token
auto [x, y] = vertex_stack.top();
^
main.cpp:34:32: error: 'x' was not declared in this scope
components.back().insert({x, y});
^
main.cpp:34:35: error: 'y' was not declared in this scope
components.back().insert({x, y});
^
main.cpp:34:37: error: no matching function for call to 'std::unordered_set<int>::insert(<brace-enclosed initializer list>)'
components.back().insert({x, y});
^
In file included from /usr/include/c++/6/unordered_set:48:0,
from main.cpp:4:
/usr/include/c++/6/bits/unordered_set.h:412:7: note: candidate: std::pair<typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::__detail::__is_noexcept_hash<_Tp, _Hash> > >::value, true, true> >::iterator, bool> std::unordered_set<_Value, _Hash, _Pred, _Alloc>::insert(const value_type&) [with _Value = int; _Hash = std::hash<int>; _Pred = std::equal_to<int>; _Alloc = std::allocator<int>; typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::__detail::__is_noexcept_hash<_Tp, _Hash> > >::value, true, true> >::iterator = std::__detail::_Node_iterator<int, true, false>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::value_type = int]
insert(const value_type& __x)
^~~~~~
/usr/include/c++/6/bits/unordered_set.h:412:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const int&}'
/usr/include/c++/6/bits/unordered_set.h:416:7: note: candidate: std::pair<typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::__detail::__is_noexcept_hash<_Tp, _Hash> > >::value, true, true> >::iterator, bool> std::unordered_set<_Value, _Hash, _Pred, _Alloc>::insert(std::unordered_set<_Value, _Hash, _Pred, _Alloc>::value_type&&) [with _Value = int; _Hash = std::hash<int>; _Pred = std::equal_to<int>; _Alloc = std::allocator<int>; typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::__detail::__is_noexcept_hash<_Tp, _Hash> > >::value, true, true> >::iterator = std::__detail::_Node_iterator<int, true, false>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::value_type = int]
insert(value_type&& __x)
^~~~~~
/usr/include/c++/6/bits/unordered_set.h:416:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::unordered_set<int>::value_type&& {aka int&&}'
/usr/include/c++/6/bits/unordered_set.h:441:7: note: candidate: std::unordered_set<_Value, _Hash, _Pred, _Alloc>::iterator std::unordered_set<_Value, _Hash, _Pred, _Alloc>::insert(std::unordered_set<_Value, _Hash, _Pred, _Alloc>::const_iterator, const value_type&) [with _Value = int; _Hash = std::hash<int>; _Pred = std::equal_to<int>; _Alloc = std::allocator<int>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::iterator = std::__detail::_Node_iterator<int, true, false>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::const_iterator = std::__detail::_Node_const_iterator<int, true, false>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::value_type = int]
insert(const_iterator __hint, const value_type& __x)
^~~~~~
/usr/include/c++/6/bits/unordered_set.h:441:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/6/bits/unordered_set.h:445:7: note: candidate: std::unordered_set<_Value, _Hash, _Pred, _Alloc>::iterator std::unordered_set<_Value, _Hash, _Pred, _Alloc>::insert(std::unordered_set<_Value, _Hash, _Pred, _Alloc>::const_iterator, std::unordered_set<_Value, _Hash, _Pred, _Alloc>::value_type&&) [with _Value = int; _Hash = std::hash<int>; _Pred = std::equal_to<int>; _Alloc = std::allocator<int>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::iterator = std::__detail::_Node_iterator<int, true, false>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::const_iterator = std::__detail::_Node_const_iterator<int, true, false>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::value_type = int]
insert(const_iterator __hint, value_type&& __x)
^~~~~~
/usr/include/c++/6/bits/unordered_set.h:445:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/6/bits/unordered_set.h:460:2: note: candidate: template<class _InputIterator> void std::unordered_set<_Value, _Hash, _Pred, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _Value = int; _Hash = std::hash<int>; _Pred = std::equal_to<int>; _Alloc = std::allocator<int>]
insert(_InputIterator __first, _InputIterator __last)
^~~~~~
/usr/include/c++/6/bits/unordered_set.h:460:2: note: template argument deduction/substitution failed:
main.cpp:34:37: note: candidate expects 2 arguments, 1 provided
components.back().insert({x, y});
^
In file included from /usr/include/c++/6/unordered_set:48:0,
from main.cpp:4:
/usr/include/c++/6/bits/unordered_set.h:471:7: note: candidate: void std::unordered_set<_Value, _Hash, _Pred, _Alloc>::insert(std::initializer_list<typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::__detail::__is_noexcept_hash<_Tp, _Hash> > >::value, true, true> >::value_type>) [with _Value = int; _Hash = std::hash<int>; _Pred = std::equal_to<int>; _Alloc = std::allocator<int>; typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::__detail::__is_noexcept_hash<_Tp, _Hash> > >::value, true, true> >::value_type = int]
insert(initializer_list<value_type> __l)
^~~~~~
/usr/include/c++/6/bits/unordered_set.h:471:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<int>'
main.cpp:44:11: error: expected unqualified-id before '[' token
auto [x, y] = vertex_stack.top();
^
main.cpp:46:32: error: 'x' was not declared in this scope
components.back().insert({x, y});
^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !