Submission #00372


ソースコード

ステータス

項目 データ
問題 0004 - railway
ユーザー名 nii
投稿日時 2017-11-26 14:55:36
言語 C++11
状態 Compile Error
得点 0
ソースコード長 1056 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.cpp: In function ‘void warshall_froyd()’:
./Main.cpp:14:7: error: reference to ‘prev’ is ambiguous
       prev[i][j]=i;
       ^~~~
./Main.cpp:8:13: note: candidates are: int prev [3000][3000]
 int N,M,A,B,prev[3000][3000],G[3000][3000];
             ^~~~
In file included from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/stl_algobase.h:66:0,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/char_traits.h:39,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/ios:40,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/ostream:38,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-7.1.0/include/c++/7.1.0/bits/stl_iterator_base_funcs.h:220:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^~~~
./Main.cpp:22:11: error: reference to ‘prev’ is ambiguous
           prev[i][j]=prev[k][j];
           ^~~~
./Main.cpp:8:13: note: candidates are: int prev [3000][3000]
 int N,M,A,B,prev[3000][3000],G[3000][3000];
             ^~~~
In file included from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/stl_algobase.h:66:0,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/char_traits.h:39,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/ios:40,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/ostream:38,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-7.1.0/include/c++/7.1.0/bits/stl_iterator_base_funcs.h:220:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^~~~
./Main.cpp:22:22: error: reference to ‘prev’ is ambiguous
           prev[i][j]=prev[k][j];
                      ^~~~
./Main.cpp:8:13: note: candidates are: int prev [3000][3000]
 int N,M,A,B,prev[3000][3000],G[3000][3000];
             ^~~~
In file included from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/stl_algobase.h:66:0,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/char_traits.h:39,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/ios:40,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/ostream:38,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-7.1.0/include/c++/7.1.0/bits/stl_iterator_base_funcs.h:220:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^~~~
./Main.cpp: In function ‘void get_path(int, int)’:
./Main.cpp:29:28: error: reference to ‘prev’ is ambiguous
   for(int cur=g;cur!=s;cur=prev[s][cur]){
                            ^~~~
./Main.cpp:8:13: note: candidates are: int prev [3000][3000]
 int N,M,A,B,prev[3000][3000],G[3000][3000];
             ^~~~
In file included from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/stl_algobase.h:66:0,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/bits/char_traits.h:39,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/ios:40,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/ostream:38,
                 from /usr/local/gcc-7.1.0/include/c++/7.1.0/iostream:39,
                 from ./Main.cpp:1:
/usr/local/gcc-7.1.0/include/c++/7.1.0/bits/stl_iterator_base_funcs.h:220:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^~~~

セット

セット 得点 Cases

テストケース

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