记录详情

Compile Error

foo.cc: In function 'void read()':
foo.cc:15:59: error: reference to 'end' is ambiguous
   15 |         for(re int i=1;i<m;i++) scanf("%d",&temp),add(i*2,end,temp);
      |                                                           ^~~
In file included from /nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/deque:66,
                 from /nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/queue:60,
                 from foo.cc:3:
/nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/bits/range_access.h:106:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
In file included from /nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/bits/algorithmfwd.h:39,
                 from /nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/bits/stl_algo.h:59,
                 from /nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/algorithm:61,
                 from foo.cc:2:
/nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:9:28: note:                 'int end'
    9 | int head[maxn],n,m,k,start,end,ans,deep[maxn],dis[maxn],book[maxn];
      |                            ^~~
foo.cc:39:38: error: reference to 'end' is ambiguous
   39 |                 else if(j==m) add(t2,end,temp);
      |                                      ^~~
/nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/bits/range_access.h:106:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:9:28: note:                 'int end'
    9 | int head[maxn],n,m,k,start,end,ans,deep[maxn],dis[maxn],book[maxn];
      |                            ^~~
foo.cc: In function 'int dijkstra(int)':
foo.cc:75:20: error: reference to 'end' is ambiguous
   75 |     for(int i=1;i<=end;i++) dis[i]=inf;
      |                    ^~~
/nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/bits/range_access.h:106:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:9:28: note:                 'int end'
    9 | int head[maxn],n,m,k,start,end,ans,deep[maxn],dis[maxn],book[maxn];
      |                            ^~~
foo.cc:95:16: error: reference to 'end' is ambiguous
   95 |     return dis[end];
      |                ^~~
/nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/bits/range_access.h:106:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:9:28: note:                 'int end'
    9 | int head[maxn],n,m,k,start,end,ans,deep[maxn],dis[maxn],book[maxn];
      |                            ^~~
foo.cc: In function 'int main()':
foo.cc:100:9: error: reference to 'end' is ambiguous
  100 |         end=(2*n-2)*(m-1)+1;
      |         ^~~
/nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/bits/range_access.h:106:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/bits/range_access.h:85:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/bits/range_access.h:74:5: note:                 'template<class _Container> decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/nix/store/x8r9w26yn4sfv0qf2i3jhay214dk6895-gcc/include/c++/12.3.0/initializer_list:101:5: note:                 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
  101 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
foo.cc:9:28: note:                 'int end'
    9 | int head[maxn],n,m,k,start,end,ans,deep[maxn],dis[maxn],book[maxn];
      |                            ^~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1002 [BeiJing2006]狼抓兔子
语言
C++
递交时间
2023-12-30 16:37:17
评测时间
2023-12-30 16:37:17
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes