QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#779336#5438. Half MixedZhaoZiLongCompile Error//C++20855b2024-11-24 18:25:522024-11-24 18:25:53

Details

answer.code:4:7: error: ‘N’ was not declared in this scope
    4 | int a[N];
      |       ^
answer.code:5:1: error: ‘ll’ does not name a type
    5 | ll n, m;
      | ^~
answer.code: In function ‘void solve()’:
answer.code:8:12: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
    8 |     cin >> n >> m;
      |            ^
      |            yn
answer.code:8:17: error: ‘m’ was not declared in this scope; did you mean ‘tm’?
    8 |     cin >> n >> m;
      |                 ^
      |                 tm
answer.code:14:5: error: ‘ll’ was not declared in this scope
   14 |     ll res = m * (m + 1) / 4;
      |     ^~
answer.code:15:7: error: expected ‘;’ before ‘nw’
   15 |     ll nw = m;
      |       ^~~
      |       ;
answer.code:18:15: error: ‘nw’ was not declared in this scope; did you mean ‘NW’?
   18 |         while(nw * (nw + 1) / 2 + m - (NW + nw) > res && nw > 1) nw --;
      |               ^~
      |               NW
answer.code:18:51: error: ‘res’ was not declared in this scope
   18 |         while(nw * (nw + 1) / 2 + m - (NW + nw) > res && nw > 1) nw --;
      |                                                   ^~~
answer.code:19:9: error: ‘res’ was not declared in this scope
   19 |         res -= nw * (nw + 1) / 2;
      |         ^~~
answer.code:19:16: error: ‘nw’ was not declared in this scope; did you mean ‘NW’?
   19 |         res -= nw * (nw + 1) / 2;
      |                ^~
      |                NW
answer.code:20:39: error: ‘a’ was not declared in this scope
   20 |         for(int i = 1; i <= nw; i ++) a[NW + i] = flag;
      |                                       ^
answer.code:28:46: error: ‘a’ was not declared in this scope
   28 |         for(int j = 1; j <= m; j ++) cout << a[j] << ' ';
      |                                              ^