Submission #00001


ソースコード

ステータス

項目 データ
問題 0001 - 村の道路計画
ユーザー名 ei1710
投稿日時 2018-05-11 17:46:27
言語 C++11
状態 Compile Error
得点 0
ソースコード長 3381 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.cpp: In function ‘int main()’:
./Main.cpp:41:9: error: reference to ‘rank’ is ambiguous
         rank[i] = 0;
         ^~~~
./Main.cpp:15:5: note: candidates are: int rank [105]
 int rank[105];
     ^~~~
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 link(int, int)’:
./Main.cpp:128:10: error: reference to ‘rank’ is ambiguous
     if ( rank[a] < rank[b] ) {
          ^~~~
./Main.cpp:15:5: note: candidates are: int rank [105]
 int rank[105];
     ^~~~
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:128:20: error: reference to ‘rank’ is ambiguous
     if ( rank[a] < rank[b] ) {
                    ^~~~
./Main.cpp:15:5: note: candidates are: int rank [105]
 int rank[105];
     ^~~~
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:132:9: error: reference to ‘rank’ is ambiguous
         rank[b]++;
         ^~~~
./Main.cpp:15:5: note: candidates are: int rank [105]
 int rank[105];
     ^~~~
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
            ^~~~

セット

セット 得点 Cases

テストケース

ファイル名 状態 実行時間 メモリ使用量 #