keys.cpp: In function 'int bfs(int, int, int, const vi&, const vvpi&)':
keys.cpp:67:26: error: no matching function for call to 'std::set<int>::set(int&, bool)'
67 | set<int> vis(n, false);
| ^
In file included from /usr/include/c++/10/set:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87,
from keys.cpp:1:
/usr/include/c++/10/bits/stl_set.h:271:2: note: candidate: 'template<class _InputIterator> std::set<_Key, _Compare, _Alloc>::set(_InputIterator, _InputIterator, const allocator_type&) [with _InputIterator = _InputIterator; _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
271 | set(_InputIterator __first, _InputIterator __last,
| ^~~
/usr/include/c++/10/bits/stl_set.h:271:2: note: template argument deduction/substitution failed:
keys.cpp:67:26: note: deduced conflicting types for parameter '_InputIterator' ('int' and 'bool')
67 | set<int> vis(n, false);
| ^
In file included from /usr/include/c++/10/set:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87,
from keys.cpp:1:
/usr/include/c++/10/bits/stl_set.h:265:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(std::initializer_list<_Tp>, const allocator_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::set<_Key, _Compare, _Alloc>::allocator_type = std::allocator<int>]'
265 | set(initializer_list<value_type> __l, const allocator_type& __a)
| ^~~
/usr/include/c++/10/bits/stl_set.h:265:40: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<int>'
265 | set(initializer_list<value_type> __l, const allocator_type& __a)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_set.h:259:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(std::set<_Key, _Compare, _Alloc>&&, const allocator_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::set<_Key, _Compare, _Alloc>::allocator_type = std::allocator<int>]'
259 | set(set&& __x, const allocator_type& __a)
| ^~~
/usr/include/c++/10/bits/stl_set.h:259:17: note: no known conversion for argument 1 from 'int' to 'std::set<int>&&'
259 | set(set&& __x, const allocator_type& __a)
| ~~~~~~^~~
/usr/include/c++/10/bits/stl_set.h:255:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(const std::set<_Key, _Compare, _Alloc>&, const allocator_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::set<_Key, _Compare, _Alloc>::allocator_type = std::allocator<int>]'
255 | set(const set& __x, const allocator_type& __a)
| ^~~
/usr/include/c++/10/bits/stl_set.h:255:22: note: no known conversion for argument 1 from 'int' to 'const std::set<int>&'
255 | set(const set& __x, const allocator_type& __a)
| ~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_set.h:251:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(const allocator_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::set<_Key, _Compare, _Alloc>::allocator_type = std::allocator<int>]'
251 | set(const allocator_type& __a)
| ^~~
/usr/include/c++/10/bits/stl_set.h:251:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/10/bits/stl_set.h:243:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(std::initializer_list<_Tp>, const _Compare&, const allocator_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::set<_Key, _Compare, _Alloc>::allocator_type = std::allocator<int>]'
243 | set(initializer_list<value_type> __l,
| ^~~
/usr/include/c++/10/bits/stl_set.h:243:40: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<int>'
243 | set(initializer_list<value_type> __l,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_set.h:231:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(std::set<_Key, _Compare, _Alloc>&&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
231 | set(set&&) = default;
| ^~~
/usr/include/c++/10/bits/stl_set.h:231:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/10/bits/stl_set.h:223:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(const std::set<_Key, _Compare, _Alloc>&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
223 | set(const set&) = default;
| ^~~
/usr/include/c++/10/bits/stl_set.h:223:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/10/bits/stl_set.h:208:2: note: candidate: 'template<class _InputIterator> std::set<_Key, _Compare, _Alloc>::set(_InputIterator, _InputIterator, const _Compare&, const allocator_type&) [with _InputIterator = _InputIterator; _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
208 | set(_InputIterator __first, _InputIterator __last,
| ^~~
/usr/include/c++/10/bits/stl_set.h:208:2: note: template argument deduction/substitution failed:
keys.cpp:67:26: note: deduced conflicting types for parameter '_InputIterator' ('int' and 'bool')
67 | set<int> vis(n, false);
| ^
In file included from /usr/include/c++/10/set:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87,
from keys.cpp:1:
/usr/include/c++/10/bits/stl_set.h:191:2: note: candidate: 'template<class _InputIterator> std::set<_Key, _Compare, _Alloc>::set(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
191 | set(_InputIterator __first, _InputIterator __last)
| ^~~
/usr/include/c++/10/bits/stl_set.h:191:2: note: template argument deduction/substitution failed:
keys.cpp:67:26: note: deduced conflicting types for parameter '_InputIterator' ('int' and 'bool')
67 | set<int> vis(n, false);
| ^
In file included from /usr/include/c++/10/set:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87,
from keys.cpp:1:
/usr/include/c++/10/bits/stl_set.h:176:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set(const _Compare&, const allocator_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::set<_Key, _Compare, _Alloc>::allocator_type = std::allocator<int>]'
176 | set(const _Compare& __comp,
| ^~~
/usr/include/c++/10/bits/stl_set.h:176:27: note: no known conversion for argument 1 from 'int' to 'const std::less<int>&'
176 | set(const _Compare& __comp,
| ~~~~~~~~~~~~~~~~^~~~~~
/usr/include/c++/10/bits/stl_set.h:167:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::set() [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
167 | set() = default;
| ^~~
/usr/include/c++/10/bits/stl_set.h:167:7: note: candidate expects 0 arguments, 2 provided
keys.cpp:77:15: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'std::tuple_element<0, std::pair<int, int> >::type' {aka 'int'})
77 | if(vis[i]) continue;
| ^
keys.cpp:78:12: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'std::tuple_element<0, std::pair<int, int> >::type' {aka 'int'})
78 | vis[i] = true;
| ^
keys.cpp:82:29: error: no match for 'operator[]' (operand types are 'std::set<std::pair<int, int> >' and 'const value_type' {aka 'const int'})
82 | while(cant_visit[r[i]].size() > 0) {
| ^
keys.cpp:83:34: error: no match for 'operator[]' (operand types are 'std::set<std::pair<int, int> >' and 'const value_type' {aka 'const int'})
83 | q.push(cant_visit[r[i]].back());
| ^
keys.cpp:84:27: error: no match for 'operator[]' (operand types are 'std::set<std::pair<int, int> >' and 'const value_type' {aka 'const int'})
84 | cant_visit[r[i]].pop_back();
| ^
keys.cpp:90:19: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'std::tuple_element<0, std::pair<int, int> >::type' {aka 'int'})
90 | if(vis[j]) continue;
| ^
keys.cpp:92:28: error: no match for 'operator[]' (operand types are 'std::set<std::pair<int, int> >' and 'std::tuple_element<1, std::pair<int, int> >::type' {aka 'int'})
92 | else cant_visit[c].pb({j, c});
| ^
keys.cpp:97:19: error: no match for 'operator[]' (operand types are 'std::set<std::pair<int, int> >' and 'int')
97 | cant_visit[k].clear();
| ^