Submission #00019


ソースコード

ステータス

項目 データ
問題 0007 - 壊れたドア
ユーザー名 I dont any
投稿日時 2015-10-28 18:53:02
言語 C++11
状態 Compile Error
得点 0
ソースコード長 3757 Byte
最大実行時間 -
最大メモリ使用量

コンパイルメッセージ

./Main.cpp: In function ‘int bfs()’:
./Main.cpp:18:9: error: reference to ‘prev’ is ambiguous
         prev[0][0] = Pi(-1, -1);
         ^
./Main.cpp:8:4: note: candidates are: Pi prev [30][30]
 Pi prev[30][30];
    ^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:66:0,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/char_traits.h:39,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:40,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/istream:38,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/sstream:38,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/complex:45,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/ccomplex:38,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/stdc++.h:52,
                 from ./Main.cpp:1:
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_iterator_base_funcs.h:193:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^
./Main.cpp:31:33: error: reference to ‘prev’ is ambiguous
                                 prev[ny][nx] = Pi(p.first, p.second);
                                 ^
./Main.cpp:8:4: note: candidates are: Pi prev [30][30]
 Pi prev[30][30];
    ^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:66:0,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/char_traits.h:39,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:40,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/istream:38,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/sstream:38,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/complex:45,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/ccomplex:38,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/stdc++.h:52,
                 from ./Main.cpp:1:
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_iterator_base_funcs.h:193:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^
./Main.cpp: In function ‘int main()’:
./Main.cpp:90:54: error: reference to ‘prev’ is ambiguous
                 for(Pi now = Pi(h - 1, w - 1), pre = prev[h - 1][w - 1]; pre != Pi(-1, -1); now = prev[now.first][now.second], pre = prev[pre.first][pre.second], PrevCost--) {
                                                      ^
./Main.cpp:8:4: note: candidates are: Pi prev [30][30]
 Pi prev[30][30];
    ^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:66:0,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/char_traits.h:39,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:40,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/istream:38,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/sstream:38,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/complex:45,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/ccomplex:38,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/stdc++.h:52,
                 from ./Main.cpp:1:
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_iterator_base_funcs.h:193:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^
./Main.cpp:90:99: error: reference to ‘prev’ is ambiguous
                 for(Pi now = Pi(h - 1, w - 1), pre = prev[h - 1][w - 1]; pre != Pi(-1, -1); now = prev[now.first][now.second], pre = prev[pre.first][pre.second], PrevCost--) {
                                                                                                   ^
./Main.cpp:8:4: note: candidates are: Pi prev [30][30]
 Pi prev[30][30];
    ^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:66:0,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/char_traits.h:39,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:40,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/istream:38,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/sstream:38,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/complex:45,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/ccomplex:38,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/stdc++.h:52,
                 from ./Main.cpp:1:
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_iterator_base_funcs.h:193:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^
./Main.cpp:90:134: error: reference to ‘prev’ is ambiguous
                 for(Pi now = Pi(h - 1, w - 1), pre = prev[h - 1][w - 1]; pre != Pi(-1, -1); now = prev[now.first][now.second], pre = prev[pre.first][pre.second], PrevCost--) {
                                                                                                                                      ^
./Main.cpp:8:4: note: candidates are: Pi prev [30][30]
 Pi prev[30][30];
    ^
In file included from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_algobase.h:66:0,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/bits/char_traits.h:39,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/ios:40,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/istream:38,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/sstream:38,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/complex:45,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/ccomplex:38,
                 from /usr/local/gcc-5.1.0/include/c++/5.1.0/x86_64-unknown-linux-gnu/bits/stdc++.h:52,
                 from ./Main.cpp:1:
/usr/local/gcc-5.1.0/include/c++/5.1.0/bits/stl_iterator_base_funcs.h:193:5: note:                 template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)
     prev(_BidirectionalIterator __x, typename
     ^

セット

セット 得点 Cases

テストケース

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