Submission #00304
ソースコード
ステータス
項目 |
データ |
問題 |
0004 - railway |
ユーザー名 |
nii
|
投稿日時 |
2017-11-26 14:26:39 |
言語 |
C++11 |
状態 |
Compile Error |
得点 |
0
|
ソースコード長 |
1021 Byte |
最大実行時間 |
-
|
最大メモリ使用量 |
|
コンパイルメッセージ
./Main.cpp: In function ‘void warshall_froyd()’:
./Main.cpp:12:7: error: reference to ‘prev’ is ambiguous
prev[i][j]=i;
^~~~
./Main.cpp:7:27: note: candidates are: int prev [1001][1001]
int N,M,A,B,G[1001][1001],prev[1001][1001],ans=0;
^~~~
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:20:11: error: reference to ‘prev’ is ambiguous
prev[i][j]=prev[k][j];
^~~~
./Main.cpp:7:27: note: candidates are: int prev [1001][1001]
int N,M,A,B,G[1001][1001],prev[1001][1001],ans=0;
^~~~
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:20:22: error: reference to ‘prev’ is ambiguous
prev[i][j]=prev[k][j];
^~~~
./Main.cpp:7:27: note: candidates are: int prev [1001][1001]
int N,M,A,B,G[1001][1001],prev[1001][1001],ans=0;
^~~~
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:27:28: error: reference to ‘prev’ is ambiguous
for(int cur=g;cur!=s;cur=prev[s][cur]){
^~~~
./Main.cpp:7:27: note: candidates are: int prev [1001][1001]
int N,M,A,B,G[1001][1001],prev[1001][1001],ans=0;
^~~~
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
^~~~
セット
テストケース