QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#797035#4971. Lecture AllocationZhaoZiLongCompile Error//C++17816b2024-12-02 14:46:552024-12-02 14:46:57

Details

answer.code:12:1: error: reference to ‘data’ is ambiguous
   12 | data a[N];
      | ^~~~
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:346:5: note: candidates are: ‘template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)’
  346 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/13/bits/range_access.h:336:5: note:                 ‘template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])’
  336 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/13/bits/range_access.h:325:5: note:                 ‘template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)’
  325 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/13/bits/range_access.h:314:5: note:                 ‘template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)’
  314 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
answer.code:8:8: note:                 ‘struct data’
    8 | struct data
      |        ^~~~
answer.code: In function ‘int solve(int, int)’:
answer.code:24:20: error: ‘f’ was not declared in this scope
   24 |         r = min(r, f(i, j + 1));
      |                    ^
answer.code:26:28: error: ‘a’ was not declared in this scope
   26 |                 r = min(r, a[j].x + solve(i - 1, j + 1));
      |                            ^
answer.code:28:28: error: ‘a’ was not declared in this scope
   28 |                 r = min(r, a[j].y + solve(i - 2, j + 1));
      |                            ^
answer.code:30:28: error: ‘a’ was not declared in this scope
   30 |                 r = min(r, a[j].z + solve(i - 3, j + 1));
      |                            ^
answer.code: In function ‘int main()’:
answer.code:41:24: error: ‘a’ was not declared in this scope
   41 |                 cin >> a[i].x >> a[i].y >> a[i].z;
      |                        ^
answer.code:42:31: error: ‘d’ was not declared in this scope
   42 |         memset(dp, -1, sizeof d);
      |                               ^