/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int bfs()':
/in/foo.cc:45:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for(int i=0;i<temp.size();i++)if(temp[i] == '0')ti = i;
                     ~^~~~~~~~~~~~
/in/foo.cc:47:25: error: reference to 'move' is ambiguous
             if(bound(ti,move[i])) {
                         ^~~~
/in/foo.cc:13:11: note: candidates are: const int move [4]
 const int move[] = {-3,3,-1,1};
           ^~~~
In file included from /usr/include/c++/6/deque:64:0,
                 from /usr/include/c++/6/queue:60,
                 from /in/foo.cc:5:
/usr/include/c++/6/bits/stl_deque.h:422:5: note:                 template<class _Tp> std::_Deque_iterator<_Tp, _Tp&, _Tp*> std::move(std::_Deque_iterator<_Tp, _Tp&, _Tp*>, std::_Deque_iterator<_Tp, _Tp&, _Tp*>, std::_Deque_iterator<_Tp, _Tp&, _Tp*>)
     move(_Deque_iterator<_Tp, _Tp&, _Tp*> __first,
     ^~~~
In file included from /usr/include/c++/6/deque:66:0,
                 from /usr/include/c++/6/queue:60,
                 from /in/foo.cc:5:
/usr/include/c++/6/bits/deque.tcc:1032:5: note:                 template<class _Tp> std::_Deque_iterator<_Tp, _Tp&, _Tp*> std::move(std::_Deque_iterator<_Tp, const _Tp&, const _Tp*>, std::_Deque_iterator<_Tp, const _Tp&, const _Tp*>, std::_Deque_iterator<_Tp, _Tp&, _Tp*>)
     move(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first,
     ^~~~
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                 from /usr/include/c++/6/ios:40,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:2:
/usr/include/c++/6/bits/stl_algobase.h:479:5: note:                 template<class _II, class _OI> _OI std::move(_II, _II, _OI)
     move(_II __first, _II __last, _OI __result)
     ^~~~
In file included from /usr/include/c++/6/bits/nested_exception.h:40:0,
                 from /usr/include/c++/6/exception:173,
                 from /usr/include/c++/6/ios:39,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:2:
/usr/include/c++/6/bits/move.h:101:5: note:                 template<class _Tp> constexpr typename std::remove_reference< <template-parameter-1-1> >::type&& std::move(_Tp&&)
     move(_Tp&& __t) noexcept
     ^~~~
/in/foo.cc:48:39: error: reference to 'move' is ambiguous
                 swap(temp[ti],temp[ti+move[i]]);
                                       ^~~~
/in/foo.cc:13:11: note: candidates are: const int move [4]
 const int move[] = {-3,3,-1,1};
           ^~~~
In file included from /usr/include/c++/6/deque:64:0,
                 from /usr/include/c++/6/queue:60,
                 from /in/foo.cc:5:
/usr/include/c++/6/bits/stl_deque.h:422:5: note:                 template<class _Tp> std::_Deque_iterator<_Tp, _Tp&, _Tp*> std::move(std::_Deque_iterator<_Tp, _Tp&, _Tp*>, std::_Deque_iterator<_Tp, _Tp&, _Tp*>, std::_Deque_iterator<_Tp, _Tp&, _Tp*>)
     move(_Deque_iterator<_Tp, _Tp&, _Tp*> __first,
     ^~~~
In file included from /usr/include/c++/6/deque:66:0,
                 from /usr/include/c++/6/queue:60,
                 from /in/foo.cc:5:
/usr/include/c++/6/bits/deque.tcc:1032:5: note:                 template<class _Tp> std::_Deque_iterator<_Tp, _Tp&, _Tp*> std::move(std::_Deque_iterator<_Tp, const _Tp&, const _Tp*>, std::_Deque_iterator<_Tp, const _Tp&, const _Tp*>, std::_Deque_iterator<_Tp, _Tp&, _Tp*>)
     move(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first,
     ^~~~
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                 from /usr/include/c++/6/ios:40,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:2:
/usr/include/c++/6/bits/stl_algobase.h:479:5: note:                 template<class _II, class _OI> _OI std::move(_II, _II, _OI)
     move(_II __first, _II __last, _OI __result)
     ^~~~
In file included from /usr/include/c++/6/bits/nested_exception.h:40:0,
                 from /usr/include/c++/6/exception:173,
                 from /usr/include/c++/6/ios:39,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:2:
/usr/include/c++/6/bits/move.h:101:5: note:                 template<class _Tp> constexpr typename std::remove_reference< <template-parameter-1-1> >::type&& std::move(_Tp&&)
     move(_Tp&& __t) noexcept
     ^~~~
/in/foo.cc:54:39: error: reference to 'move' is ambiguous
                 swap(temp[ti],temp[ti+move[i]]);
                                       ^~~~
/in/foo.cc:13:11: note: candidates are: const int move [4]
 const int move[] = {-3,3,-1,1};
           ^~~~
In file included from /usr/include/c++/6/deque:64:0,
                 from /usr/include/c++/6/queue:60,
                 from /in/foo.cc:5:
/usr/include/c++/6/bits/stl_deque.h:422:5: note:                 template<class _Tp> std::_Deque_iterator<_Tp, _Tp&, _Tp*> std::move(std::_Deque_iterator<_Tp, _Tp&, _Tp*>, std::_Deque_iterator<_Tp, _Tp&, _Tp*>, std::_Deque_iterator<_Tp, _Tp&, _Tp*>)
     move(_Deque_iterator<_Tp, _Tp&, _Tp*> __first,
     ^~~~
In file included from /usr/include/c++/6/deque:66:0,
                 from /usr/include/c++/6/queue:60,
                 from /in/foo.cc:5:
/usr/include/c++/6/bits/deque.tcc:1032:5: note:                 template<class _Tp> std::_Deque_iterator<_Tp, _Tp&, _Tp*> std::move(std::_Deque_iterator<_Tp, const _Tp&, const _Tp*>, std::_Deque_iterator<_Tp, const _Tp&, const _Tp*>, std::_Deque_iterator<_Tp, _Tp&, _Tp*>)
     move(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first,
     ^~~~
In file included from /usr/include/c++/6/bits/char_traits.h:39:0,
                 from /usr/include/c++/6/ios:40,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:2:
/usr/include/c++/6/bits/stl_algobase.h:479:5: note:                 template<class _II, class _OI> _OI std::move(_II, _II, _OI)
     move(_II __first, _II __last, _OI __result)
     ^~~~
In file included from /usr/include/c++/6/bits/nested_exception.h:40:0,
                 from /usr/include/c++/6/exception:173,
                 from /usr/include/c++/6/ios:39,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from /in/foo.cc:2:
/usr/include/c++/6/bits/move.h:101:5: note:                 template<class _Tp> constexpr typename std::remove_reference< <template-parameter-1-1> >::type&& std::move(_Tp&&)
     move(_Tp&& __t) noexcept
     ^~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:63:9: warning: unused variable 'si' [-Wunused-variable]
     int si,sj;
         ^~
/in/foo.cc:63:12: warning: unused variable 'sj' [-Wunused-variable]
     int si,sj;
            ^~
/in/foo.cc: In function 'bool bound(int, int)':
/in/foo.cc:31:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

信息

递交者
类型
递交
题目
P1360 八数码问题
语言
C++
递交时间
2018-07-16 19:06:13
评测时间
2018-07-16 19:06:13
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes