QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#474339#3098. Ancient Machineegypt_ioi2024b_04Compile Error//C++202.5kb2024-07-12 17:30:432024-07-12 17:30:44

Details

Anna.code:1:18: error: ‘std::vector’ has not been declared
    1 | void Anna(int N, std::vector<char> S) {
      |                  ^~~
Anna.code:1:29: error: expected ‘,’ or ‘...’ before ‘<’ token
    1 | void Anna(int N, std::vector<char> S) {
      |                             ^
Anna.code: In function ‘void Anna(int, int)’:
Anna.code:2:10: error: ‘vector’ is not a member of ‘std’
    2 |     std::vector<bool> ar(N, false);
      |          ^~~~~~
Anna.code:1:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
  +++ |+#include <vector>
    1 | void Anna(int N, std::vector<char> S) {
Anna.code:2:17: error: expected primary-expression before ‘bool’
    2 |     std::vector<bool> ar(N, false);
      |                 ^~~~
Anna.code:6:27: error: ‘S’ was not declared in this scope
    6 |         while (j+1 < N && S[j+1] == S[j])j++;
      |                           ^
Anna.code:8:13: error: ‘S’ was not declared in this scope
    8 |         if (S[i] == 'X') {
      |             ^
Anna.code:9:13: error: ‘ar’ was not declared in this scope
    9 |             ar[i] = !f;
      |             ^~
Anna.code:14:13: error: ‘S’ was not declared in this scope
   14 |         if (S[i] == 'Z')ar[i] = true;
      |             ^
Anna.code:14:25: error: ‘ar’ was not declared in this scope
   14 |         if (S[i] == 'Z')ar[i] = true;
      |                         ^~
Anna.code:16:10: error: ‘vector’ is not a member of ‘std’
   16 |     std::vector<ll> v(41, 0);
      |          ^~~~~~
Anna.code:16:10: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
Anna.code:16:17: error: ‘ll’ was not declared in this scope
   16 |     std::vector<ll> v(41, 0);
      |                 ^~
Anna.code:16:21: error: ‘v’ was not declared in this scope
   16 |     std::vector<ll> v(41, 0);
      |                     ^
Anna.code:17:7: error: expected ‘;’ before ‘sum’
   17 |     ll sum[2] = {1, 2};
      |       ^~~~
      |       ;
Anna.code:24:9: error: ‘sum’ was not declared in this scope
   24 |         sum[(i & 1)] += v[i];
      |         ^~~
Anna.code:26:10: error: ‘reverse’ is not a member of ‘std’
   26 |     std::reverse(v.begin(), v.end());
      |          ^~~~~~~
Anna.code:28:29: error: ‘min’ is not a member of ‘std’
   28 |         int l = i, r = std::min(N-1, i + 39);
      |                             ^~~
Anna.code:29:11: error: expected ‘;’ before ‘sm’
   29 |         ll sm = 0;
      |           ^~~
      |           ;
Anna.code:31:17: error: ‘ar’ was not declared in this scope; did you mean ‘r’?
   31 |             if (ar[j])sm += v[j-l];
      |                 ^~
      |                 r
Anna.code:31:23: error: ‘sm’ was not declared in this scope
   31 |             if (ar[j])sm += v[j-l];
      |                       ^~
Anna.code:34:18: error: ‘sm’ was not declared in this scope
   34 |             if ((sm & (1ll << bit))) {
      |                  ^~
Anna.code:35:17: error: ‘Send’ was not declared in this scope
   35 |                 Send(1);
      |                 ^~~~
Anna.code:37:17: error: ‘Send’ was not declared in this scope
   37 |                 Send(0);
      |                 ^~~~