QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#605269#8941. Even or Odd Spanning TreeHuangHanShengCompile Error//C++172.9kb2024-10-02 16:29:282024-10-02 16:29:29

Details

answer.code: In function ‘void DFS1(long long int, long long int)’:
answer.code:22:22: error: reference to ‘size’ is ambiguous
   22 |         d[u]=d[ff]+1;size[u]=1;fa[u]=ff;
      |                      ^~~~
In file included from /usr/include/c++/13/string:53,
                 from /usr/include/c++/13/bits/locale_classes.h:40,
                 from /usr/include/c++/13/bits/ios_base.h:41,
                 from /usr/include/c++/13/ios:44,
                 from /usr/include/c++/13/ostream:40,
                 from /usr/include/c++/13/iostream:41,
                 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:9:28: note:                 ‘long long int size [200005]’
    9 | int h[N],top[N],fa[N],d[N],size[N],val[N],dfn[N],tid[N],son[N],prt[N],vis[N];
      |                            ^~~~
answer.code:27:17: error: reference to ‘size’ is ambiguous
   27 |                 size[u]+=size[e];
      |                 ^~~~
/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:9:28: note:                 ‘long long int size [200005]’
    9 | int h[N],top[N],fa[N],d[N],size[N],val[N],dfn[N],tid[N],son[N],prt[N],vis[N];
      |                            ^~~~
answer.code:27:26: error: reference to ‘size’ is ambiguous
   27 |                 size[u]+=size[e];
      |                          ^~~~
/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:9:28: note:                 ‘long long int size [200005]’
    9 | int h[N],top[N],fa[N],d[N],size[N],val[N],dfn[N],tid[N],son[N],prt[N],vis[N];
      |                            ^~~~
answer.code:28:20: error: reference to ‘size’ is ambiguous
   28 |                 if(size[e]>size[son[u]])son[u]=e;
      |                    ^~~~
/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:9:28: note:                 ‘long long int size [200005]’
    9 | int h[N],top[N],fa[N],d[N],size[N],val[N],dfn[N],tid[N],son[N],prt[N],vis[N];
      |                            ^~~~
answer.code:28:28: error: reference to ‘size’ is ambiguous
   28 |                 if(size[e]>size[son[u]])son[u]=e;
      |                            ^~~~
/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:9:28: note:                 ‘long long int size [200005]’
    9 | int h[N],top[N],fa[N],d[N],size[N],val[N],dfn[N],tid[N],son[N],prt[N],vis[N];
      |                            ^~~~
answer.code: In function ‘int main()’:
answer.code:82:39: error: reference to ‘size’ is ambiguous
   82 |                 for(i=1;i<=n;i++)h[i]=size[i]=val[i]=fa[i]=dfn[i]=tid[i]=top[i]=son[i]=vis[i]=0,prt[i]=i;
      |                                       ^~~~
/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])’
  ...