QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#474218#3098. Ancient Machineegypt_ioi2024b_04Compile Error//C++232.5kb2024-07-12 16:45:022024-07-12 16:45:02

Details

Anna.code:3:7: error: expected nested-name-specifier before ‘napespace’
    3 | using napespace std;
      |       ^~~~~~~~~
Anna.code: In function ‘void Anna(int, std::vector<char>)’:
Anna.code:13:5: error: ‘vector’ was not declared in this scope; did you mean ‘std::vector’?
   13 |     vector<bool> ar(N, false);
      |     ^~~~~~
      |     std::vector
In file included from /usr/include/c++/10/vector:67,
                 from Anna.h:1,
                 from Anna.code:1:
/usr/include/c++/10/bits/stl_vector.h:389:11: note: ‘std::vector’ declared here
  389 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
Anna.code:13:12: error: expected primary-expression before ‘bool’
   13 |     vector<bool> ar(N, false);
      |            ^~~~
Anna.code:20:13: error: ‘ar’ was not declared in this scope
   20 |             ar[i] = !f;
      |             ^~
Anna.code:25:25: error: ‘ar’ was not declared in this scope
   25 |         if (S[i] == 'Z')ar[i] = true;
      |                         ^~
Anna.code:27:14: error: expected primary-expression before ‘>’ token
   27 |     vector<ll> v(41, 0);
      |              ^
Anna.code:27:16: error: ‘v’ was not declared in this scope
   27 |     vector<ll> v(41, 0);
      |                ^
Anna.code:31:22: error: ‘max’ was not declared in this scope; did you mean ‘std::max’?
   31 |         v[i] = 1ll + max(sum[0], sum[1]);
      |                      ^~~
      |                      std::max
In file included from /usr/include/c++/10/vector:60,
                 from Anna.h:1,
                 from Anna.code:1:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: ‘std::max’ declared here
  300 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
Anna.code:35:24: error: ‘min’ was not declared in this scope; did you mean ‘std::min’?
   35 |         int l = i, r = min(N-1, i + 39);
      |                        ^~~
      |                        std::min
In file included from /usr/include/c++/10/vector:60,
                 from Anna.h:1,
                 from Anna.code:1:
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: ‘std::min’ declared here
  278 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
Anna.code:38:17: error: ‘ar’ was not declared in this scope; did you mean ‘r’?
   38 |             if (ar[j])sm += v[j-l];
      |                 ^~
      |                 r
grader_Anna.cpp: In function ‘int main()’:
grader_Anna.cpp:67:16: warning: range-based ‘for’ loops only available with ‘-std=c++11’ or ‘-std=gnu++11’
   67 |   for (int x : send_array)
      |                ^~~~~~~~~~
grader_Anna.cpp:67:16: error: forming reference to reference type ‘std::vector<int>&’