QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#268512#6743. water235ucup-team2499#Compile Error//C++201.1kb2023-11-28 18:04:552023-11-28 18:04:56

Details

answer.code: In function ‘int main()’:
answer.code:13:10: error: ‘function’ is not a member of ‘std’
   13 |     std::function<void(int, int)> solve = [&](int n, int m) {
      |          ^~~~~~~~
answer.code:4:1: note: ‘std::function’ is defined in header ‘<functional>’; did you forget to ‘#include <functional>’?
    3 | #include <numeric>
  +++ |+#include <functional>
    4 | 
answer.code:13:32: error: expression list treated as compound expression in functional cast [-fpermissive]
   13 |     std::function<void(int, int)> solve = [&](int n, int m) {
      |                                ^
answer.code:13:19: error: expected primary-expression before ‘void’
   13 |     std::function<void(int, int)> solve = [&](int n, int m) {
      |                   ^~~~
answer.code:31:5: error: ‘solve’ was not declared in this scope
   31 |     solve(n, m);
      |     ^~~~~