QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#714328#9530. A Game On Treeucup-team4598Compile Error//C++172.1kb2024-11-05 22:39:532024-11-05 22:39:53

详细

answer.code: In function ‘void dfs(int, int)’:
answer.code:29:5: error: reference to ‘size’ is ambiguous
   29 |     size[x] = 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:3:
/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:12:4: note:                 ‘ll size [100005]’
   12 | ll size[N], sum[N], ans;
      |    ^~~~
answer.code:35:9: error: reference to ‘size’ is ambiguous
   35 |         size[x] += size[y];
      |         ^~~~
/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:12:4: note:                 ‘ll size [100005]’
   12 | ll size[N], sum[N], ans;
      |    ^~~~
answer.code:35:20: error: reference to ‘size’ is ambiguous
   35 |         size[x] += size[y];
      |                    ^~~~
/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:12:4: note:                 ‘ll size [100005]’
   12 | ll size[N], sum[N], ans;
      |    ^~~~
answer.code:36:28: error: reference to ‘size’ is ambiguous
   36 |         sum[x] = (sum[x] + size[y] * size[y]) % mod;
      |                            ^~~~
/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:12:4: note:                 ‘ll size [100005]’
   12 | ll size[N], sum[N], ans;
      |    ^~~~
answer.code:36:38: error: reference to ‘size’ is ambiguous
   36 |         sum[x] = (sum[x] + size[y] * size[y]) % mod;
      |                                      ^~~~
/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:12:4: note:                 ‘ll size [100005]’
   12 | ll size[N], sum[N], ans;
      |    ^~~~
answer.code:40:24: error: reference to ‘size’ is ambiguous
   40 |     sum[x] = (sum[x] + size[x] * size[x] % mod) % mod;
      |                        ^~~~
/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:12:4: note:                 ‘ll size [100005]’
   12 | ll size[N], sum[N], ans;
      |    ^~~~
answer.code:40:34: error: reference to ‘size’ is ambiguous
   40 |     sum[x] = (sum[x] + size[x] * size[x] % mod) % mod;
      |                                  ^~~~
/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 |    ...