QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#777543#9791. Intrusive Donkeyucup-team6072#Compile Error//C++232.2kb2024-11-24 03:04:012024-11-24 03:04:01

Details

answer.code:41:20: error: reference to ‘size’ is ambiguous
   41 | long long data[2 * size];
      |                    ^~~~
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:40:11: note:                 ‘const int size’
   40 | const int size = 1 << 18;
      |           ^~~~
In file included from /usr/include/c++/13/cassert:44,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:106:
answer.code: In function ‘void update(int, ll, ll)’:
answer.code:46:19: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
   46 |   assert (r < data[ind]);
      |                   ^
answer.code:48:14: error: reference to ‘size’ is ambiguous
   48 |   if (ind >= size){
      |              ^~~~
/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:40:11: note:                 ‘const int size’
   40 | const int size = 1 << 18;
      |           ^~~~
answer.code:49:9: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
   49 |     data[ind] += r - l + 1;
      |         ^
answer.code:53:17: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
   53 |   ll ct_l = data[ind + ind];
      |                 ^
answer.code:63:7: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
   63 |   data[ind] = data[2 * ind] + data[2 * ind + 1];
      |       ^
answer.code:63:19: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
   63 |   data[ind] = data[2 * ind] + data[2 * ind + 1];
      |                   ^
answer.code:63:35: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
   63 |   data[ind] = data[2 * ind] + data[2 * ind + 1];
      |                                   ^
answer.code: In function ‘int find(int, ll)’:
answer.code:68:19: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
   68 |   assert (x < data[ind]);
      |                   ^
answer.code:70:14: error: reference to ‘size’ is ambiguous
   70 |   if (ind >= size){
      |              ^~~~
/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:40:11: note:                 ‘const int size’
   40 | const int size = 1 << 18;
      |           ^~~~
answer.code:71:18: error: reference to ‘size’ is ambiguous
   71 |     return ind - size;
      |                  ^~~~
/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:40:11: note:                 ‘const int size’
   40 | const int size = 1 << 18;
      |           ^~~~
answer.code:74:17: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
   74 |   ll ct_l = data[ind + ind];
      |                 ^
answer.code: In function ‘int main()’:
answer.code:85:27: error: reference to ‘size’ is ambiguous
   85 |   for (int i = 0; i < 2 * size; i++) {
      |                           ^~~~
/usr/include/c++/13/bits/range_access.h:274:5: note: candidates are: ‘template<class _Tp, lon...