QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#393837#6111. Two Pathsucup-team2335#Compile Error//C++208.0kb2024-04-19 14:44:242024-04-19 14:44:24

Details

answer.code: In function ‘void HLD::dfs1(int, int, int)’:
answer.code:25:17: error: reference to ‘size’ is ambiguous
   25 |                 size[u]=1;
      |                 ^~~~
In file included from /usr/include/c++/13/string:53,
                 from /usr/include/c++/13/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:52,
                 from answer.code:1:
/usr/include/c++/13/bits/range_access.h:274:5: note: candidates are: ‘template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])’
  274 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/13/bits/range_access.h:264:5: note:                 ‘template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)’
  264 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
answer.code:15:27: note:                 ‘int size [200010]’
   15 | int dep0[N],anc[N],top[N],size[N],heavy[N],dfn[N],num[N],idx;
      |                           ^~~~
answer.code:30:25: error: reference to ‘size’ is ambiguous
   30 |                         size[u]+=size[v.fir];
      |                         ^~~~
/usr/include/c++/13/bits/range_access.h:274:5: note: candidates are: ‘template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])’
  274 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/13/bits/range_access.h:264:5: note:                 ‘template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)’
  264 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
answer.code:15:27: note:                 ‘int size [200010]’
   15 | int dep0[N],anc[N],top[N],size[N],heavy[N],dfn[N],num[N],idx;
      |                           ^~~~
answer.code:30:34: error: reference to ‘size’ is ambiguous
   30 |                         size[u]+=size[v.fir];
      |                                  ^~~~
/usr/include/c++/13/bits/range_access.h:274:5: note: candidates are: ‘template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])’
  274 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/13/bits/range_access.h:264:5: note:                 ‘template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)’
  264 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
answer.code:15:27: note:                 ‘int size [200010]’
   15 | int dep0[N],anc[N],top[N],size[N],heavy[N],dfn[N],num[N],idx;
      |                           ^~~~
answer.code:31:29: error: reference to ‘size’ is ambiguous
   31 |                         if (size[v.fir]>size[heavy[u]]) heavy[u]=v.fir;
      |                             ^~~~
/usr/include/c++/13/bits/range_access.h:274:5: note: candidates are: ‘template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])’
  274 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/13/bits/range_access.h:264:5: note:                 ‘template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)’
  264 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
answer.code:15:27: note:                 ‘int size [200010]’
   15 | int dep0[N],anc[N],top[N],size[N],heavy[N],dfn[N],num[N],idx;
      |                           ^~~~
answer.code:31:41: error: reference to ‘size’ is ambiguous
   31 |                         if (size[v.fir]>size[heavy[u]]) heavy[u]=v.fir;
      |                                         ^~~~
/usr/include/c++/13/bits/range_access.h:274:5: note: candidates are: ‘template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])’
  274 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/13/bits/range_access.h:264:5: note:                 ‘template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)’
  264 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
answer.code:15:27: note:                 ‘int size [200010]’
   15 | int dep0[N],anc[N],top[N],size[N],heavy[N],dfn[N],num[N],idx;
      |                           ^~~~
answer.code: In function ‘void O1LCA::build()’:
answer.code:61:13: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
   61 |         rep(i,1,n) st[i][0]=anc[num[i]];
      |             ^
answer.code:2:38: note: in definition of macro ‘rep’
    2 | #define rep(i,a,b) for (register int i=(a);i<=(b);i++)
      |                                      ^
answer.code:62:13: warning: ISO C++17 does not allow ‘register’ storage class specifier [-Wregister]
   62 |         rep(i,2,n) lg2[i]=lg2[i>>1]+1;
      |             ^
answer.code:2:38: note: in definition of macro ‘rep’
    2 | #define rep(i,a,b) for (regis...