civilization.cpp: In function 'void merge(int, int)':
civilization.cpp:20:8: error: reference to 'rank' is ambiguous
if(rank[u] > rank[v]) swap(u, v);
^~~~
civilization.cpp:6:29: note: candidates are: int rank [100001]
int pa[100001], sz[100001], rank[100001], ar[2001][2001];
^~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
from /usr/include/c++/7/bits/stl_pair.h:59,
from /usr/include/c++/7/bits/stl_algobase.h:64,
from /usr/include/c++/7/deque:60,
from /usr/include/c++/7/queue:60,
from civilization.cpp:3:
/usr/include/c++/7/type_traits:1468:12: note: template<class> struct std::rank
struct rank
^~~~
civilization.cpp:20:18: error: reference to 'rank' is ambiguous
if(rank[u] > rank[v]) swap(u, v);
^~~~
civilization.cpp:6:29: note: candidates are: int rank [100001]
int pa[100001], sz[100001], rank[100001], ar[2001][2001];
^~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
from /usr/include/c++/7/bits/stl_pair.h:59,
from /usr/include/c++/7/bits/stl_algobase.h:64,
from /usr/include/c++/7/deque:60,
from /usr/include/c++/7/queue:60,
from civilization.cpp:3:
/usr/include/c++/7/type_traits:1468:12: note: template<class> struct std::rank
struct rank
^~~~
civilization.cpp:23:8: error: reference to 'rank' is ambiguous
if(rank[u] == rank[v]) rank[v]++;
^~~~
civilization.cpp:6:29: note: candidates are: int rank [100001]
int pa[100001], sz[100001], rank[100001], ar[2001][2001];
^~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
from /usr/include/c++/7/bits/stl_pair.h:59,
from /usr/include/c++/7/bits/stl_algobase.h:64,
from /usr/include/c++/7/deque:60,
from /usr/include/c++/7/queue:60,
from civilization.cpp:3:
/usr/include/c++/7/type_traits:1468:12: note: template<class> struct std::rank
struct rank
^~~~
civilization.cpp:23:19: error: reference to 'rank' is ambiguous
if(rank[u] == rank[v]) rank[v]++;
^~~~
civilization.cpp:6:29: note: candidates are: int rank [100001]
int pa[100001], sz[100001], rank[100001], ar[2001][2001];
^~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
from /usr/include/c++/7/bits/stl_pair.h:59,
from /usr/include/c++/7/bits/stl_algobase.h:64,
from /usr/include/c++/7/deque:60,
from /usr/include/c++/7/queue:60,
from civilization.cpp:3:
/usr/include/c++/7/type_traits:1468:12: note: template<class> struct std::rank
struct rank
^~~~
civilization.cpp:23:28: error: reference to 'rank' is ambiguous
if(rank[u] == rank[v]) rank[v]++;
^~~~
civilization.cpp:6:29: note: candidates are: int rank [100001]
int pa[100001], sz[100001], rank[100001], ar[2001][2001];
^~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
from /usr/include/c++/7/bits/stl_pair.h:59,
from /usr/include/c++/7/bits/stl_algobase.h:64,
from /usr/include/c++/7/deque:60,
from /usr/include/c++/7/queue:60,
from civilization.cpp:3:
/usr/include/c++/7/type_traits:1468:12: note: template<class> struct std::rank
struct rank
^~~~
civilization.cpp: In function 'int main()':
civilization.cpp:29:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &n, &k);
~~~~~^~~~~~~~~~~~~~~~~
civilization.cpp:33:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &x, &y);
~~~~~^~~~~~~~~~~~~~~~~