Submission #00147
ソースコード
ステータス
項目 |
データ |
問題 |
0007 - 部活動調査 |
ユーザー名 |
Cappuccino
|
投稿日時 |
2018-07-30 09:51:03 |
言語 |
C++11 |
状態 |
Compile Error |
得点 |
0
|
ソースコード長 |
1197 Byte |
最大実行時間 |
-
|
最大メモリ使用量 |
|
コンパイルメッセージ
./Main.cpp: In function ‘void init(int)’:
./Main.cpp:13:5: error: reference to ‘rank’ is ambiguous
rank[i] = 0;
^~~~
./Main.cpp:7:5: note: candidates are: int rank [100000]
int rank[MAX_N];
^~~~
In file included from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/move.h:54:0,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/nested_exception.h:40,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/exception:143,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ios:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/istream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/sstream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/complex:45,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ccomplex:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-7.1.0/include/c++/7.1.0/type_traits:1471:12: note: template<class> struct std::rank
struct rank
^~~~
./Main.cpp: In function ‘void unite(int, int)’:
./Main.cpp:31:6: error: reference to ‘rank’ is ambiguous
if(rank[x] < rank[y]){
^~~~
./Main.cpp:7:5: note: candidates are: int rank [100000]
int rank[MAX_N];
^~~~
In file included from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/move.h:54:0,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/nested_exception.h:40,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/exception:143,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ios:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/istream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/sstream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/complex:45,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ccomplex:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-7.1.0/include/c++/7.1.0/type_traits:1471:12: note: template<class> struct std::rank
struct rank
^~~~
./Main.cpp:31:16: error: reference to ‘rank’ is ambiguous
if(rank[x] < rank[y]){
^~~~
./Main.cpp:7:5: note: candidates are: int rank [100000]
int rank[MAX_N];
^~~~
In file included from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/move.h:54:0,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/nested_exception.h:40,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/exception:143,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ios:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/istream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/sstream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/complex:45,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ccomplex:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-7.1.0/include/c++/7.1.0/type_traits:1471:12: note: template<class> struct std::rank
struct rank
^~~~
./Main.cpp:35:8: error: reference to ‘rank’ is ambiguous
if(rank[x] == rank[y]) rank[x]++;
^~~~
./Main.cpp:7:5: note: candidates are: int rank [100000]
int rank[MAX_N];
^~~~
In file included from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/move.h:54:0,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/nested_exception.h:40,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/exception:143,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ios:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/istream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/sstream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/complex:45,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ccomplex:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-7.1.0/include/c++/7.1.0/type_traits:1471:12: note: template<class> struct std::rank
struct rank
^~~~
./Main.cpp:35:19: error: reference to ‘rank’ is ambiguous
if(rank[x] == rank[y]) rank[x]++;
^~~~
./Main.cpp:7:5: note: candidates are: int rank [100000]
int rank[MAX_N];
^~~~
In file included from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/move.h:54:0,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/nested_exception.h:40,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/exception:143,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ios:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/istream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/sstream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/complex:45,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ccomplex:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-7.1.0/include/c++/7.1.0/type_traits:1471:12: note: template<class> struct std::rank
struct rank
^~~~
./Main.cpp:35:28: error: reference to ‘rank’ is ambiguous
if(rank[x] == rank[y]) rank[x]++;
^~~~
./Main.cpp:7:5: note: candidates are: int rank [100000]
int rank[MAX_N];
^~~~
In file included from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/move.h:54:0,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/nested_exception.h:40,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/exception:143,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ios:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/istream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/sstream:38,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/complex:45,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/ccomplex:39,
from /usr/local/gcc-7.1.0/include/c++/7.1.0/x86_64-pc-linux-gnu/bits/stdc++.h:52,
from ./Main.cpp:1:
/usr/local/gcc-7.1.0/include/c++/7.1.0/type_traits:1471:12: note: template<class> struct std::rank
struct rank
^~~~
セット
テストケース