QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#558370 | #1163. Another Tree Queries Problem | Creeper_l | Compile Error | / | / | C++17 | 8.5kb | 2024-09-11 15:43:58 | 2024-09-11 15:44:00 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
answer.code: In function ‘void dfs(long long int, long long int)’: answer.code:14:39: error: reference to ‘size’ is ambiguous 14 | depth[u] = depth[father] + 1; size[u] = 1; fa[u][0] = father; | ^~~~ 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:6:27: note: ‘long long int size [200010]’ 6 | int depth[MAXN],son[MAXN],size[MAXN],top[MAXN]; | ^~~~ answer.code:19:29: error: reference to ‘size’ is ambiguous 19 | dfs(now,u); size[u] += size[now]; | ^~~~ /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:6:27: note: ‘long long int size [200010]’ 6 | int depth[MAXN],son[MAXN],size[MAXN],top[MAXN]; | ^~~~ answer.code:19:40: error: reference to ‘size’ is ambiguous 19 | dfs(now,u); size[u] += size[now]; | ^~~~ /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:6:27: note: ‘long long int size [200010]’ 6 | int depth[MAXN],son[MAXN],size[MAXN],top[MAXN]; | ^~~~ answer.code:20:20: error: reference to ‘size’ is ambiguous 20 | if(size[now] > size[son[u]]) son[u] = now; | ^~~~ /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:6:27: note: ‘long long int size [200010]’ 6 | int depth[MAXN],son[MAXN],size[MAXN],top[MAXN]; | ^~~~ answer.code:20:32: error: reference to ‘size’ is ambiguous 20 | if(size[now] > size[son[u]]) son[u] = now; | ^~~~ /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:6:27: note: ‘long long int size [200010]’ 6 | int depth[MAXN],son[MAXN],size[MAXN],top[MAXN]; | ^~~~ answer.code: In function ‘void UpdateTree(long long int, long long int)’: answer.code:80:20: error: reference to ‘size’ is ambiguous 80 | All += x * size[u]; | ^~~~ /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 _Cont...