QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#474223#3098. Ancient Machineegypt_ioi2024b_04Compile Error//C++232.5kb2024-07-12 16:46:152024-07-12 16:46:15

詳細信息

Anna.code: In function ‘void Anna(int, std::vector<char>)’:
Anna.code:30:22: error: ‘max’ was not declared in this scope; did you mean ‘std::max’?
   30 |         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:34:24: error: ‘min’ was not declared in this scope; did you mean ‘std::min’?
   34 |         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)
      |     ^~~
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>&’