/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'void dfs(int)':
foo.cpp:18:54: error: reference to 'end' is ambiguous
  for(int i=max(int(ans[x-1]+t[x-1]-t[x]+1),sta[x]);i<end[x]&&t[x]+i<n;i++)
                                                      ^
foo.cpp:6:23: note: candidates are: int end [65]
 int n,ans[65],sta[65],end[65];
                       ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/string:51:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/random:40,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algo.h:66,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:62,
                 from foo.cpp:3:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/range_access.h:97:5: note:                 template<class _Tp, unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])
     end(_Tp (&__arr)[_Nm])
     ^
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/range_access.h:78:5: note:                 template<class _Container> decltype (__cont.end()) std::end(const _Container&)
     end(const _Container& __cont) -> decltype(__cont.end())
     ^
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/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 C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/utility:75:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:60,
                 from foo.cpp:3:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/initializer_list:99:5: note:                 template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
     end(initializer_list<_Tp> __ils) noexcept
     ^
foo.cpp: In function 'int main()':
foo.cpp:41:3: error: reference to 'end' is ambiguous
   end[i]=n;
   ^
foo.cpp:6:23: note: candidates are: int end [65]
 int n,ans[65],sta[65],end[65];
                       ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/string:51:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/random:40,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algo.h:66,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:62,
                 from foo.cpp:3:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/range_access.h:97:5: note:                 template<class _Tp, unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])
     end(_Tp (&__arr)[_Nm])
     ^
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/range_access.h:78:5: note:                 template<class _Container> decltype (__cont.end()) std::end(const _Container&)
     end(const _Container& __cont) -> decltype(__cont.end())
     ^
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/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 C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/utility:75:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:60,
                 from foo.cpp:3:
C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/initializer_list:99:5: note:                 template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
     end(initializer_list<_Tp> __ils) noexcept
     ^
foo.cpp:44:5: error: reference to 'end' is ambiguous
     end[i]--;
     ^
foo.cpp:6:23: note: candidates are: int end [65]
 int n,ans[65],sta[65],end[65];
                       ^
In file included from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/string:51:0,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/random:40,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/bits/stl_algo.h:66,
                 from C:/TDM-GCC-32/lib/gcc/mingw32/4.9.2/include/c++/algorithm:62,
                 from foo.cpp:3:
C

信息

递交者
类型
递交
题目
P1749 时区
语言
C++
递交时间
2015-10-12 16:19:24
评测时间
2015-10-12 16:19:25
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes