game.cpp: In function 'void unite(int, int)':
game.cpp:14:9: error: 'swap' was not declared in this scope
14 | swap(u, v);
| ^~~~
game.cpp:14:9: note: suggested alternatives:
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from game.cpp:1:
/usr/include/c++/9/bits/regex.h:2029:5: note: 'std::__cxx11::swap'
2029 | swap(match_results<_Bi_iter, _Alloc>& __lhs,
| ^~~~
In file included from /usr/include/c++/9/bits/stl_pair.h:59,
from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from game.cpp:1:
/usr/include/c++/9/bits/move.h:182:5: note: 'std::swap'
182 | swap(_Tp& __a, _Tp& __b)
| ^~~~
/usr/include/c++/9/bits/move.h:182:5: note: 'std::swap'
In file included from /usr/include/c++/9/exception:143,
from /usr/include/c++/9/ios:39,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from game.cpp:1:
/usr/include/c++/9/bits/exception_ptr.h:166:5: note: 'std::__exception_ptr::swap'
166 | swap(exception_ptr& __lhs, exception_ptr& __rhs)
| ^~~~
In file included from /usr/include/c++/9/filesystem:37,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:129,
from game.cpp:1:
/usr/include/c++/9/bits/fs_path.h:611:15: note: 'std::filesystem::__cxx11::swap'
611 | inline void swap(path& __lhs, path& __rhs) noexcept { __lhs.swap(__rhs); }
| ^~~~
game.cpp: In function 'int hasEdge(int, int)':
game.cpp:41:11: error: 'x' was not declared in this scope
41 | unite(x, y);
| ^
game.cpp:41:14: error: 'y' was not declared in this scope
41 | unite(x, y);
| ^