QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#722893#9570. Binary Treeucup-team5467Compile Error//C++202.7kb2024-11-07 20:31:532024-11-07 20:31:59

詳細信息

answer.code: In function ‘long long int ask(long long int&, long long int&)’:
answer.code:39:1: warning: no return statement in function returning non-void [-Wreturn-type]
   39 | }
      | ^
answer.code: In function ‘void Get(long long int, long long int)’:
answer.code:63:9: error: reference to ‘size’ is ambiguous
   63 |         size[cur] = 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:11:5: note:                 ‘long long int size [100010]’
   11 | int size[N],weight[N],centroid[2],sum[N];
      |     ^~~~
answer.code:68:17: error: reference to ‘size’ is ambiguous
   68 |                 size[cur] += size[k];
      |                 ^~~~
/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:11:5: note:                 ‘long long int size [100010]’
   11 | int size[N],weight[N],centroid[2],sum[N];
      |     ^~~~
answer.code:68:30: error: reference to ‘size’ is ambiguous
   68 |                 size[cur] += size[k];
      |                              ^~~~
/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:11:5: note:                 ‘long long int size [100010]’
   11 | int size[N],weight[N],centroid[2],sum[N];
      |     ^~~~
answer.code:69:47: error: reference to ‘size’ is ambiguous
   69 |                 weight[cur] = max(weight[cur],size[k]);
      |                                               ^~~~
/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:11:5: note:                 ‘long long int size [100010]’
   11 | int size[N],weight[N],centroid[2],sum[N];
      |     ^~~~
answer.code:71:45: error: reference to ‘size’ is ambiguous
   71 |         weight[cur] = max(weight[cur],sub - size[cur]);
      |                                             ^~~~
/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:11:5: note:                 ‘long long int size [100010]’
   11 | int size[N],weight[N],centroid[2],sum[N];
      |     ^~~~
answer.code: In function ‘void solve()’:
answer.code:84:44: error: reference to ‘size’ is ambiguous
   84 |                 for(int i = 1;i <= n;i ++) size[i] = 0,weight[i] = 0,sum[i] = 0;
      |                                            ^~~~
/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...