QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#605269 | #8941. Even or Odd Spanning Tree | HuangHanSheng | Compile Error | / | / | C++17 | 2.9kb | 2024-10-02 16:29:28 | 2024-10-02 16:29:29 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
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])’ ...