QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#624014#7615. Sequence Foldingucup-team1817#Compile Error//C++233.3kb2024-10-09 14:42:252024-10-09 14:42:29

Details

answer.code: In function ‘int main()’:
answer.code:77:27: error: expected identifier before ‘this’
   77 |   auto solve_0_to_1 = [&](this auto &&self, const vector<int64_t> &A,
      |                           ^~~~
answer.code:77:27: error: expected ‘,’ or ‘...’ before ‘this’
answer.code: In lambda function:
answer.code:80:9: error: ‘N’ was not declared in this scope
   80 |     if (N == 1)
      |         ^
answer.code:84:20: error: ‘A’ was not declared in this scope
   84 |     for (auto &a : A)
      |                    ^
answer.code:85:15: error: ‘N’ was not declared in this scope
   85 |       if (a < N / 2) {
      |               ^
answer.code:99:20: error: ‘N’ was not declared in this scope
   99 |     return self(B, N / 2) + need_change;
      |                    ^
answer.code:99:12: error: ‘self’ was not declared in this scope
   99 |     return self(B, N / 2) + need_change;
      |            ^~~~
answer.code: In function ‘int main()’:
answer.code:102:27: error: expected identifier before ‘this’
  102 |   auto solve_1_to_0 = [&](this auto &&self, const vector<int64_t> &A,
      |                           ^~~~
answer.code:102:27: error: expected ‘,’ or ‘...’ before ‘this’
answer.code: In lambda function:
answer.code:105:9: error: ‘N’ was not declared in this scope
  105 |     if (N == 1)
      |         ^
answer.code:109:20: error: ‘A’ was not declared in this scope
  109 |     for (auto &a : A)
      |                    ^
answer.code:110:15: error: ‘N’ was not declared in this scope
  110 |       if (a < N / 2) {
      |               ^
answer.code:121:20: error: ‘N’ was not declared in this scope
  121 |     return self(B, N / 2) + need_change;
      |                    ^
answer.code:121:12: error: ‘self’ was not declared in this scope
  121 |     return self(B, N / 2) + need_change;
      |            ^~~~
answer.code: In function ‘int main()’:
answer.code:135:26: error: no match for call to ‘(main()::<lambda(int)>) (std::vector<long int>&, int64_t&)’
  135 |   int ans1 = solve_0_to_1(cur, N);
      |              ~~~~~~~~~~~~^~~~~~~~
answer.code:77:23: note: candidate: ‘main()::<lambda(int)>’
   77 |   auto solve_0_to_1 = [&](this auto &&self, const vector<int64_t> &A,
      |                       ^
answer.code:77:23: note:   candidate expects 1 argument, 2 provided
answer.code:136:26: error: no match for call to ‘(main()::<lambda(int)>) (std::vector<long int>&, int64_t&)’
  136 |   int ans2 = solve_1_to_0(cur, N);
      |              ~~~~~~~~~~~~^~~~~~~~
answer.code:102:23: note: candidate: ‘main()::<lambda(int)>’
  102 |   auto solve_1_to_0 = [&](this auto &&self, const vector<int64_t> &A,
      |                       ^
answer.code:102:23: note:   candidate expects 1 argument, 2 provided