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