QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#474279#3098. Ancient Machineegypt_ioi2024b_04Compile Error//C++202.6kb2024-07-12 17:05:592024-07-12 17:05:59

詳細信息

Anna.code: In function ‘void Anna(int, std::vector<char>)’:
Anna.code:11:5: error: ‘vector’ was not declared in this scope
   11 |     vector<bool> ar(N, false);
      |     ^~~~~~
Anna.code:11:5: note: suggested alternatives:
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’
  389 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
In file included from Anna.h:1,
                 from Anna.code:1:
/usr/include/c++/10/vector:86:13: note:   ‘std::pmr::vector’
   86 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
Anna.code:11:12: error: expected primary-expression before ‘bool’
   11 |     vector<bool> ar(N, false);
      |            ^~~~
Anna.code:18:13: error: ‘ar’ was not declared in this scope
   18 |             ar[i] = !f;
      |             ^~
Anna.code:23:25: error: ‘ar’ was not declared in this scope
   23 |         if (S[i] == 'Z')ar[i] = true;
      |                         ^~
Anna.code:25:14: error: expected primary-expression before ‘>’ token
   25 |     vector<ll> v(41, 0);
      |              ^
Anna.code:25:16: error: ‘v’ was not declared in this scope
   25 |     vector<ll> v(41, 0);
      |                ^
Anna.code:30:22: error: ‘max’ was not declared in this scope
   30 |         v[i] = 1ll + max(sum[0], sum[1]);
      |                      ^~~
Anna.code:30:22: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:62,
                 from Anna.h:1,
                 from Anna.code:1:
/usr/include/c++/10/bits/stl_algo.h:3491:5: note:   ‘std::max’
 3491 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
In file included from /usr/include/c++/10/algorithm:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from Anna.code:2:
/usr/include/c++/10/bits/ranges_algo.h:3219:29: note:   ‘std::ranges::max’
 3219 |   inline constexpr __max_fn max{};
      |                             ^~~
Anna.code:35:24: error: ‘min’ was not declared in this scope
   35 |         int l = i, r = min(N-1, i + 39);
      |                        ^~~
Anna.code:35:24: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:62,
                 from Anna.h:1,
                 from Anna.code:1:
/usr/include/c++/10/bits/stl_algo.h:3479:5: note:   ‘std::min’
 3479 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
In file included from /usr/include/c++/10/algorithm:64,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
                 from Anna.code:2:
/usr/include/c++/10/bits/ranges_algo.h:3165:29: note:   ‘std::ranges::min’
 3165 |   inline constexpr __min_fn min{};
      |                             ^~~
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