Borderou de evaluare (job #2856840)

Utilizator lolismekAlex Jerpelea lolismek Data 24 februarie 2022 12:54:56
Problema Cabana2 Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'int main()': main.cpp:49:65: error: request for member 'find' in 'std::left', which is of non-class type 'std::ios_base&(std::ios_base&)' 49 | if(up.find(v[i].x * SHIFT + v[i].y) != up.end() && left.find(v[i].x * SHIFT + v[i].y) != left.end()) | ^~~~ main.cpp:49:103: error: request for member 'end' in 'std::left', which is of non-class type 'std::ios_base&(std::ios_base&)' 49 | if(up.find(v[i].x * SHIFT + v[i].y) != up.end() && left.find(v[i].x * SHIFT + v[i].y) != left.end()) | ^~~ main.cpp:50:21: error: request for member 'find' in 'std::left', which is of non-class type 'std::ios_base&(std::ios_base&)' 50 | if(left.find(up[v[i].x * SHIFT + v[i].y]) != left.end() && up.find(left[v[i].x * SHIFT + v[i].y]) != up.find()) | ^~~~ main.cpp:50:63: error: request for member 'end' in 'std::left', which is of non-class type 'std::ios_base&(std::ios_base&)' 50 | if(left.find(up[v[i].x * SHIFT + v[i].y]) != left.end() && up.find(left[v[i].x * SHIFT + v[i].y]) != up.find()) | ^~~ main.cpp:50:108: warning: pointer to a function used in arithmetic [-Wpointer-arith] 50 | if(left.find(up[v[i].x * SHIFT + v[i].y]) != left.end() && up.find(left[v[i].x * SHIFT + v[i].y]) != up.find()) | ^ main.cpp:50:108: error: invalid conversion from 'std::ios_base& (*)(std::ios_base&)' to 'std::unordered_map<long long int, long long int>::key_type' {aka 'long long int'} [-fpermissive] 50 | if(left.find(up[v[i].x * SHIFT + v[i].y]) != left.end() && up.find(left[v[i].x * SHIFT + v[i].y]) != up.find()) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ | | | std::ios_base& (*)(std::ios_base&) In file included from /usr/include/c++/10/unordered_map:47, from main.cpp:4: /usr/include/c++/10/bits/unordered_map.h:919:28: note: initializing argument 1 of 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::iterator std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::find(const key_type&) [with _Key = long long int; _Tp = long long int; _Hash = std::hash<long long int>; _Pred = std::equal_to<long long int>; _Alloc = std::allocator<std::pair<const long long int, long long int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::iterator = std::__detail::_Hashtable_base<long long int, std::pair<const long long int, long long int>, std::__detail::_Select1st, std::equal_to<long long int>, std::hash<long long int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Hashtable_traits<false, false, true> >::iterator; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = long long int]' 919 | find(const key_type& __x) | ~~~~~~~~~~~~~~~~^~~ main.cpp:50:122: error: no matching function for call to 'std::unordered_map<long long int, long long int>::find()' 50 | if(left.find(up[v[i].x * SHIFT + v[i].y]) != left.end() && up.find(left[v[i].x * SHIFT + v[i].y]) != up.find()) | ^ In file included from /usr/include/c++/10/unordered_map:47, from main.cpp:4: /usr/include/c++/10/bits/unordered_map.h:919:7: note: candidate: 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::iterator std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::find(const key_type&) [with _Key = long long int; _Tp = long long int; _Hash = std::hash<long long int>; _Pred = std::equal_to<long long int>; _Alloc = std::allocator<std::pair<const long long int, long long int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::iterator = std::__detail::_Hashtable_base<long long int, std::pair<const long long int, long long int>, std::__detail::_Select1st, std::equal_to<long long int>, std::hash<long long int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Hashtable_traits<false, false, true> >::iterator; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = long long int]' 919 | find(const key_type& __x) | ^~~~ /usr/include/c++/10/bits/unordered_map.h:919:7: note: candidate expects 1 argument, 0 provided /usr/include/c++/10/bits/unordered_map.h:923:7: note: candidate: 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::const_iterator std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::find(const key_type&) const [with _Key = long long int; _Tp = long long int; _Hash = std::hash<long long int>; _Pred = std::equal_to<long long int>; _Alloc = std::allocator<std::pair<const long long int, long long int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::const_iterator = std::__detail::_Hashtable_base<long long int, std::pair<const long long int, long long int>, std::__detail::_Select1st, std::equal_to<long long int>, std::hash<long long int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Hashtable_traits<false, false, true> >::const_iterator; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = long long int]' 923 | find(const key_type& __x) const | ^~~~ /usr/include/c++/10/bits/unordered_map.h:923:7: note: candidate expects 1 argument, 0 provided main.cpp:51:51: warning: pointer to a function used in arithmetic [-Wpointer-arith] 51 | if(up[left[v[i].x * SHIFT + v[i].y]] == left[up[v[i].x * SHIFT + v[i].y]]){ | ^ main.cpp:51:22: error: ambiguous overload for 'operator[]' (operand types are 'std::unordered_map<long long int, long long int>' and 'std::ios_base&(std::ios_base&)') 51 | if(up[left[v[i].x * SHIFT + v[i].y]] == left[up[v[i].x * SHIFT + v[i].y]]){ | ^ In file included from /usr/include/c++/10/unordered_map:47, from main.cpp:4: /usr/include/c++/10/bits/unordered_map.h:983:7: note: candidate: 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type&) [with _Key = long long int; _Tp = long long int; _Hash = std::hash<long long int>; _Pred = std::equal_to<long long int>; _Alloc = std::allocator<std::pair<const long long int, long long int> >; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type = long long int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_type = long long int]' (near match) 983 | operator[](const key_type& __k) | ^~~~~~~~ Non zero exit status: 1

Ceva nu functioneaza?