Submission #00278


ソースコード

ステータス

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

コンパイルメッセージ

./Main.cpp: In function ‘void dijkstra(std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >&)’:
./Main.cpp:29:17: error: reference to ‘prev’ is ambiguous
                 prev[u]=v;
                 ^~~~
./Main.cpp:14:5: note: candidates are: int prev [100005]
 int prev[SZ];
     ^~~~
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/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/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 ‘ll solve()’:
./Main.cpp:37:14: error: reference to ‘prev’ is ambiguous
     rep(i,n) prev[i]=-1,d[i]=INF;
              ^~~~
./Main.cpp:14:5: note: candidates are: int prev [100005]
 int prev[SZ];
     ^~~~
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/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/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:44:18: error: reference to ‘prev’ is ambiguous
     for(;b!=-1;b=prev[b]){
                  ^~~~
./Main.cpp:14:5: note: candidates are: int prev [100005]
 int prev[SZ];
     ^~~~
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/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/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

テストケース

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