civilization.cpp: In function 'void uni(int, int)':
civilization.cpp:21:6: error: reference to 'rank' is ambiguous
if(rank[find(a)]<rank[find(b)])
^~~~
civilization.cpp:7:5: note: candidates are: int rank [4000001]
int rank[4000001];
^~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
from /usr/include/c++/7/bits/nested_exception.h:40,
from /usr/include/c++/7/exception:143,
from /usr/include/c++/7/ios:39,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from civilization.cpp:1:
/usr/include/c++/7/type_traits:1468:12: note: template<class> struct std::rank
struct rank
^~~~
civilization.cpp:21:20: error: reference to 'rank' is ambiguous
if(rank[find(a)]<rank[find(b)])
^~~~
civilization.cpp:7:5: note: candidates are: int rank [4000001]
int rank[4000001];
^~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
from /usr/include/c++/7/bits/nested_exception.h:40,
from /usr/include/c++/7/exception:143,
from /usr/include/c++/7/ios:39,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from civilization.cpp:1:
/usr/include/c++/7/type_traits:1468:12: note: template<class> struct std::rank
struct rank
^~~~
civilization.cpp:28:8: error: reference to 'rank' is ambiguous
if(rank[find(a)]==rank[find(b)])
^~~~
civilization.cpp:7:5: note: candidates are: int rank [4000001]
int rank[4000001];
^~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
from /usr/include/c++/7/bits/nested_exception.h:40,
from /usr/include/c++/7/exception:143,
from /usr/include/c++/7/ios:39,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from civilization.cpp:1:
/usr/include/c++/7/type_traits:1468:12: note: template<class> struct std::rank
struct rank
^~~~
civilization.cpp:28:23: error: reference to 'rank' is ambiguous
if(rank[find(a)]==rank[find(b)])
^~~~
civilization.cpp:7:5: note: candidates are: int rank [4000001]
int rank[4000001];
^~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
from /usr/include/c++/7/bits/nested_exception.h:40,
from /usr/include/c++/7/exception:143,
from /usr/include/c++/7/ios:39,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from civilization.cpp:1:
/usr/include/c++/7/type_traits:1468:12: note: template<class> struct std::rank
struct rank
^~~~
civilization.cpp:29:8: error: reference to 'rank' is ambiguous
rank[find(a)]++;
^~~~
civilization.cpp:7:5: note: candidates are: int rank [4000001]
int rank[4000001];
^~~~
In file included from /usr/include/c++/7/bits/move.h:54:0,
from /usr/include/c++/7/bits/nested_exception.h:40,
from /usr/include/c++/7/exception:143,
from /usr/include/c++/7/ios:39,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from civilization.cpp:1:
/usr/include/c++/7/type_traits:1468:12: note: template<class> struct std::rank
struct rank
^~~~
civilization.cpp: In function 'int main()':
civilization.cpp:66:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int j=0;j<q.size();j++) {
~^~~~~~~~~