islands.cpp: In function 'bool comp(int, int)':
islands.cpp:71:25: error: named return values are no longer supported
71 | bool comp(int x, int y) return dep[x] < dep[y];
| ^~~~~~
islands.cpp:74:9: error: 'nn' was not declared in this scope; did you mean 'n'?
74 | n = nn;
| ^~
| n
islands.cpp:75:25: error: 'm' was not declared in this scope
75 | for (int i = 0; i < m; i++){
| ^
islands.cpp:76:20: error: 'u' was not declared in this scope
76 | bruh[i] = {u[i], v[i]};
| ^
islands.cpp:76:26: error: 'v' was not declared in this scope
76 | bruh[i] = {u[i], v[i]};
| ^
islands.cpp:76:30: error: no match for 'operator=' (operand types are 'std::pair<int, int>' and '<brace-enclosed initializer list>')
76 | bruh[i] = {u[i], v[i]};
| ^
In file included from /usr/include/c++/10/utility:70,
from /usr/include/c++/10/variant:37,
from islands.h:1,
from islands.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:390:7: note: candidate: 'std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(typename std::conditional<std::__and_<std::is_copy_assignable<_T1>, std::is_copy_assignable<_T2> >::value, const std::pair<_T1, _T2>&, const std::__nonesuch&>::type) [with _T1 = int; _T2 = int; typename std::conditional<std::__and_<std::is_copy_assignable<_T1>, std::is_copy_assignable<_T2> >::value, const std::pair<_T1, _T2>&, const std::__nonesuch&>::type = const std::pair<int, int>&]'
390 | operator=(typename conditional<
| ^~~~~~~~
/usr/include/c++/10/bits/stl_pair.h:393:41: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::conditional<true, const std::pair<int, int>&, const std::__nonesuch&>::type' {aka 'const std::pair<int, int>&'}
390 | operator=(typename conditional<
| ~~~~~~~~~~~~~~~~~~~~~
391 | __and_<is_copy_assignable<_T1>,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
392 | is_copy_assignable<_T2>>::value,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
393 | const pair&, const __nonesuch&>::type __p)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_pair.h:401:7: note: candidate: 'std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(typename std::conditional<std::__and_<std::is_move_assignable<_Tp>, std::is_move_assignable<_T2> >::value, std::pair<_T1, _T2>&&, std::__nonesuch&&>::type) [with _T1 = int; _T2 = int; typename std::conditional<std::__and_<std::is_move_assignable<_Tp>, std::is_move_assignable<_T2> >::value, std::pair<_T1, _T2>&&, std::__nonesuch&&>::type = std::pair<int, int>&&]'
401 | operator=(typename conditional<
| ^~~~~~~~
/usr/include/c++/10/bits/stl_pair.h:404:31: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::conditional<true, std::pair<int, int>&&, std::__nonesuch&&>::type' {aka 'std::pair<int, int>&&'}
401 | operator=(typename conditional<
| ~~~~~~~~~~~~~~~~~~~~~
402 | __and_<is_move_assignable<_T1>,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
403 | is_move_assignable<_T2>>::value,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
404 | pair&&, __nonesuch&&>::type __p)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_pair.h:418:2: note: candidate: 'template<class _U1, class _U2> typename std::enable_if<std::__and_<std::is_assignable<_T1&, const _U1&>, std::is_assignable<_T2&, const _U2&> >::value, std::pair<_T1, _T2>&>::type std::pair<_T1, _T2>::operator=(const std::pair<_U1, _U2>&) [with _U1 = _U1; _U2 = _U2; _T1 = int; _T2 = int]'
418 | operator=(const pair<_U1, _U2>& __p)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_pair.h:418:2: note: template argument deduction/substitution failed:
islands.cpp:76:30: note: couldn't deduce template parameter '_U1'
76 | bruh[i] = {u[i], v[i]};
| ^
In file included from /usr/include/c++/10/utility:70,
from /usr/include/c++/10/variant:37,
from islands.h:1,
from islands.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:430:2: note: candidate: 'template<class _U1, class _U2> typename std::enable_if<std::__and_<std::is_assignable<_T1&, _U1&&>, std::is_assignable<_T2&, _U2&&> >::value, std::pair<_T1, _T2>&>::type std::pair<_T1, _T2>::operator=(std::pair<_U1, _U2>&&) [with _U1 = _U1; _U2 = _U2; _T1 = int; _T2 = int]'
430 | operator=(pair<_U1, _U2>&& __p)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_pair.h:430:2: note: template argument deduction/substitution failed:
islands.cpp:76:30: note: couldn't deduce template parameter '_U1'
76 | bruh[i] = {u[i], v[i]};
| ^
islands.cpp:78:25: error: 'm' was not declared in this scope
78 | for (int i = 0; i < m; i += 2){
| ^
islands.cpp:79:13: error: 'u' was not declared in this scope
79 | adj[u[i]].push_back({v[i], i});
| ^
islands.cpp:79:30: error: 'v' was not declared in this scope
79 | adj[u[i]].push_back({v[i], i});
| ^
islands.cpp:85:21: error: no matching function for call to 'begin()'
85 | sort(perm,begin(), perm.end(), comp);
| ^
In file included from /usr/include/c++/10/utility:76,
from /usr/include/c++/10/variant:37,
from islands.h:1,
from islands.cpp:1:
/usr/include/c++/10/initializer_list:90:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)'
90 | begin(initializer_list<_Tp> __ils) noexcept
| ^~~~~
/usr/include/c++/10/initializer_list:90:5: note: template argument deduction/substitution failed:
islands.cpp:85:21: note: candidate expects 1 argument, 0 provided
85 | sort(perm,begin(), perm.end(), comp);
| ^
In file included from /usr/include/c++/10/vector:69,
from islands.h:2,
from islands.cpp:1:
/usr/include/c++/10/bits/range_access.h:51:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(_Container&)'
51 | begin(_Container& __cont) -> decltype(__cont.begin())
| ^~~~~
/usr/include/c++/10/bits/range_access.h:51:5: note: template argument deduction/substitution failed:
islands.cpp:85:21: note: candidate expects 1 argument, 0 provided
85 | sort(perm,begin(), perm.end(), comp);
| ^
In file included from /usr/include/c++/10/vector:69,
from islands.h:2,
from islands.cpp:1:
/usr/include/c++/10/bits/range_access.h:61:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(const _Container&)'
61 | begin(const _Container& __cont) -> decltype(__cont.begin())
| ^~~~~
/usr/include/c++/10/bits/range_access.h:61:5: note: template argument deduction/substitution failed:
islands.cpp:85:21: note: candidate expects 1 argument, 0 provided
85 | sort(perm,begin(), perm.end(), comp);
| ^
In file included from /usr/include/c++/10/vector:69,
from islands.h:2,
from islands.cpp:1:
/usr/include/c++/10/bits/range_access.h:90:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::begin(_Tp (&)[_Nm])'
90 | begin(_Tp (&__arr)[_Nm])
| ^~~~~
/usr/include/c++/10/bits/range_access.h:90:5: note: template argument deduction/substitution failed:
islands.cpp:85:21: note: candidate expects 1 argument, 0 provided
85 | sort(perm,begin(), perm.end(), comp);
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from islands.cpp:3:
/usr/include/c++/10/valarray:1214:5: note: candidate: 'template<class _Tp> _Tp* std::begin(std::valarray<_Tp>&)'
1214 | begin(valarray<_Tp>& __va)
| ^~~~~
/usr/include/c++/10/valarray:1214:5: note: template argument deduction/substitution failed:
islands.cpp:85:21: note: candidate expects 1 argument, 0 provided
85 | sort(perm,begin(), perm.end(), comp);
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from islands.cpp:3:
/usr/include/c++/10/valarray:1224:5: note: candidate: 'template<class _Tp> const _Tp* std::begin(const std::valarray<_Tp>&)'
1224 | begin(const valarray<_Tp>& __va)
| ^~~~~
/usr/include/c++/10/valarray:1224:5: note: template argument deduction/substitution failed:
islands.cpp:85:21: note: candidate expects 1 argument, 0 provided
85 | sort(perm,begin(), perm.end(), comp);
| ^
islands.cpp:96:39: error: cannot convert 'std::vector<int>' to 'bool' in return
96 | if (ok1.size()) return get(i);
| ~~~^~~
| |
| std::vector<int>