/ Vijos /

记录详情

Compile Error

foo.cc: In function 'll bfs(ll)':
foo.cc:56:9: error: reference to 'end' is ambiguous
   if(u==end)
         ^~~
foo.cc:15:26: note: candidates are: ll end
 ll r,c,state,mat[10][10],end;
                          ^~~
In file included from /usr/include/c++/7/string:51:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from foo.cc:5:
/usr/include/c++/7/bits/range_access.h:97:5: note:                 template<class _Tp, long unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])
     end(_Tp (&__arr)[_Nm])
     ^~~
/usr/include/c++/7/bits/range_access.h:78:5: note:                 template<class _Container> decltype (__cont.end()) std::end(const _Container&)
     end(const _Container& __cont) -> decltype(__cont.end())
     ^~~
/usr/include/c++/7/bits/range_access.h:68:5: note:                 template<class _Container> decltype (__cont.end()) std::end(_Container&)
     end(_Container& __cont) -> decltype(__cont.end())
     ^~~
In file included from /usr/include/c++/7/utility:76:0,
                 from /usr/include/c++/7/algorithm:60,
                 from foo.cc:3:
/usr/include/c++/7/initializer_list:99:5: note:                 template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
     end(initializer_list<_Tp> __ils) noexcept
     ^~~
foo.cc: In function 'int main()':
foo.cc:79:2: error: reference to 'end' is ambiguous
  end = 123804765;
  ^~~
foo.cc:15:26: note: candidates are: ll end
 ll r,c,state,mat[10][10],end;
                          ^~~
In file included from /usr/include/c++/7/string:51:0,
                 from /usr/include/c++/7/bits/locale_classes.h:40,
                 from /usr/include/c++/7/bits/ios_base.h:41,
                 from /usr/include/c++/7/ios:42,
                 from /usr/include/c++/7/ostream:38,
                 from /usr/include/c++/7/iostream:39,
                 from foo.cc:5:
/usr/include/c++/7/bits/range_access.h:97:5: note:                 template<class _Tp, long unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])
     end(_Tp (&__arr)[_Nm])
     ^~~
/usr/include/c++/7/bits/range_access.h:78:5: note:                 template<class _Container> decltype (__cont.end()) std::end(const _Container&)
     end(const _Container& __cont) -> decltype(__cont.end())
     ^~~
/usr/include/c++/7/bits/range_access.h:68:5: note:                 template<class _Container> decltype (__cont.end()) std::end(_Container&)
     end(_Container& __cont) -> decltype(__cont.end())
     ^~~
In file included from /usr/include/c++/7/utility:76:0,
                 from /usr/include/c++/7/algorithm:60,
                 from foo.cc:3:
/usr/include/c++/7/initializer_list:99:5: note:                 template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
     end(initializer_list<_Tp> __ils) noexcept
     ^~~
foo.cc:78:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld",&state);
  ~~~~~^~~~~~~~~~~~~~~
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。

信息

递交者
类型
自测
题目
P1360 八数码问题
语言
C++
递交时间
2021-04-23 11:35:29
评测时间
2021-04-23 11:35:29
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes