1. Draugai

Taškai: 0

Compile: FAIL

friend_the_third.cpp: In function ‘void Unite(int, int)’: friend_the_third.cpp:18:6: error: reference to ‘rank’ is ambiguous if (rank[x] < rank[y]){ ^ friend_the_third.cpp:7:5: note: candidates are: int rank [1000000] int rank[1000000]; ^ In file included from /usr/include/c++/5/bits/move.h:57:0, from /usr/include/c++/5/bits/stl_pair.h:59, from /usr/include/c++/5/bits/stl_algobase.h:64, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/ios:40, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from friend_the_third.cpp:3: /usr/include/c++/5/type_traits:1415:12: note: template<class> struct std::rank struct rank ^ friend_the_third.cpp:18:16: error: reference to ‘rank’ is ambiguous if (rank[x] < rank[y]){ ^ friend_the_third.cpp:7:5: note: candidates are: int rank [1000000] int rank[1000000]; ^ In file included from /usr/include/c++/5/bits/move.h:57:0, from /usr/include/c++/5/bits/stl_pair.h:59, from /usr/include/c++/5/bits/stl_algobase.h:64, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/ios:40, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from friend_the_third.cpp:3: /usr/include/c++/5/type_traits:1415:12: note: template<class> struct std::rank struct rank ^ friend_the_third.cpp:23:7: error: reference to ‘rank’ is ambiguous if (rank[x] == rank[y]) rank[x]++; ^ friend_the_third.cpp:7:5: note: candidates are: int rank [1000000] int rank[1000000]; ^ In file included from /usr/include/c++/5/bits/move.h:57:0, from /usr/include/c++/5/bits/stl_pair.h:59, from /usr/include/c++/5/bits/stl_algobase.h:64, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/ios:40, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from friend_the_third.cpp:3: /usr/include/c++/5/type_traits:1415:12: note: template<class> struct std::rank struct rank ^ friend_the_third.cpp:23:18: error: reference to ‘rank’ is ambiguous if (rank[x] == rank[y]) rank[x]++; ^ friend_the_third.cpp:7:5: note: candidates are: int rank [1000000] int rank[1000000]; ^ In file included from /usr/include/c++/5/bits/move.h:57:0, from /usr/include/c++/5/bits/stl_pair.h:59, from /usr/include/c++/5/bits/stl_algobase.h:64, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/ios:40, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from friend_the_third.cpp:3: /usr/include/c++/5/type_traits:1415:12: note: template<class> struct std::rank struct rank ^ friend_the_third.cpp:23:27: error: reference to ‘rank’ is ambiguous if (rank[x] == rank[y]) rank[x]++; ^ friend_the_third.cpp:7:5: note: candidates are: int rank [1000000] int rank[1000000]; ^ In file included from /usr/include/c++/5/bits/move.h:57:0, from /usr/include/c++/5/bits/stl_pair.h:59, from /usr/include/c++/5/bits/stl_algobase.h:64, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/ios:40, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from friend_the_third.cpp:3: /usr/include/c++/5/type_traits:1415:12: note: template<class> struct std::rank struct rank ^

nr.resulttimemessage