Submission #00097
ソースコード
ステータス
コンパイルメッセージ
./Main.cpp: In function ‘int main()’:
./Main.cpp:19:17: error: reference to ‘rank’ is ambiguous
rank[i]=1;
^
./Main.cpp:10:5: note: candidates are: int rank [100000]
int rank[100000];
^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/move.h:57:0,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_pair.h:59,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:64,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/char_traits.h:39,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:40,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ostream:38,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-5.1.0/include/c++/5.1.0/type_traits:1415:12: note: template<class> struct std::rank
struct rank
^
./Main.cpp:63:20: error: reference to ‘rank’ is ambiguous
if(rank[up]>rank[vp])parent[vp]=up;
^
./Main.cpp:10:5: note: candidates are: int rank [100000]
int rank[100000];
^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/move.h:57:0,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_pair.h:59,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:64,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/char_traits.h:39,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:40,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ostream:38,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-5.1.0/include/c++/5.1.0/type_traits:1415:12: note: template<class> struct std::rank
struct rank
^
./Main.cpp:63:29: error: reference to ‘rank’ is ambiguous
if(rank[up]>rank[vp])parent[vp]=up;
^
./Main.cpp:10:5: note: candidates are: int rank [100000]
int rank[100000];
^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/move.h:57:0,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_pair.h:59,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:64,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/char_traits.h:39,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:40,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ostream:38,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-5.1.0/include/c++/5.1.0/type_traits:1415:12: note: template<class> struct std::rank
struct rank
^
./Main.cpp:67:28: error: reference to ‘rank’ is ambiguous
if(rank[up]==rank[vp])rank[vp]++;
^
./Main.cpp:10:5: note: candidates are: int rank [100000]
int rank[100000];
^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/move.h:57:0,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_pair.h:59,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:64,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/char_traits.h:39,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:40,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ostream:38,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-5.1.0/include/c++/5.1.0/type_traits:1415:12: note: template<class> struct std::rank
struct rank
^
./Main.cpp:67:38: error: reference to ‘rank’ is ambiguous
if(rank[up]==rank[vp])rank[vp]++;
^
./Main.cpp:10:5: note: candidates are: int rank [100000]
int rank[100000];
^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/move.h:57:0,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_pair.h:59,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:64,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/char_traits.h:39,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:40,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ostream:38,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-5.1.0/include/c++/5.1.0/type_traits:1415:12: note: template<class> struct std::rank
struct rank
^
./Main.cpp:67:47: error: reference to ‘rank’ is ambiguous
if(rank[up]==rank[vp])rank[vp]++;
^
./Main.cpp:10:5: note: candidates are: int rank [100000]
int rank[100000];
^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/move.h:57:0,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_pair.h:59,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:64,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/char_traits.h:39,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:40,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ostream:38,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-5.1.0/include/c++/5.1.0/type_traits:1415:12: note: template<class> struct std::rank
struct rank
^
./Main.cpp:106:20: error: reference to ‘rank’ is ambiguous
if(rank[up]>rank[vp])parent[vp]=up;
^
./Main.cpp:10:5: note: candidates are: int rank [100000]
int rank[100000];
^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/move.h:57:0,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_pair.h:59,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:64,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/char_traits.h:39,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:40,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ostream:38,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-5.1.0/include/c++/5.1.0/type_traits:1415:12: note: template<class> struct std::rank
struct rank
^
./Main.cpp:106:29: error: reference to ‘rank’ is ambiguous
if(rank[up]>rank[vp])parent[vp]=up;
^
./Main.cpp:10:5: note: candidates are: int rank [100000]
int rank[100000];
^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/move.h:57:0,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_pair.h:59,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:64,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/char_traits.h:39,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:40,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ostream:38,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-5.1.0/include/c++/5.1.0/type_traits:1415:12: note: template<class> struct std::rank
struct rank
^
./Main.cpp:110:28: error: reference to ‘rank’ is ambiguous
if(rank[up]==rank[vp])rank[vp]++;
^
./Main.cpp:10:5: note: candidates are: int rank [100000]
int rank[100000];
^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/move.h:57:0,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_pair.h:59,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:64,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/char_traits.h:39,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:40,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ostream:38,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-5.1.0/include/c++/5.1.0/type_traits:1415:12: note: template<class> struct std::rank
struct rank
^
./Main.cpp:110:38: error: reference to ‘rank’ is ambiguous
if(rank[up]==rank[vp])rank[vp]++;
^
./Main.cpp:10:5: note: candidates are: int rank [100000]
int rank[100000];
^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/move.h:57:0,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_pair.h:59,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:64,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/char_traits.h:39,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:40,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ostream:38,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-5.1.0/include/c++/5.1.0/type_traits:1415:12: note: template<class> struct std::rank
struct rank
^
./Main.cpp:110:47: error: reference to ‘rank’ is ambiguous
if(rank[up]==rank[vp])rank[vp]++;
^
./Main.cpp:10:5: note: candidates are: int rank [100000]
int rank[100000];
^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/move.h:57:0,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_pair.h:59,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:64,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/char_traits.h:39,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:40,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/ostream:38,
from /usr/local/gcc-5.1.0/include/c++/5.1.0/iostream:39,
from ./Main.cpp:1:
/usr/local/gcc-5.1.0/include/c++/5.1.0/type_traits:1415:12: note: template<class> struct std::rank
struct rank
^
セット
テストケース