QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#864001#3434. Restaurant OrdersMaMengQiCompile Error//C++111.6kb2025-01-20 06:57:292025-01-20 06:57:30

Details

answer.code: In function ‘int main()’:
answer.code:30:9: error: ‘function’ was not declared in this scope
   30 |         function<void(int, vector<int>)> solve =
      |         ^~~~~~~~
answer.code:4:1: note: ‘std::function’ is defined in header ‘<functional>’; this is probably fixable by adding ‘#include <functional>’
    3 | #include <algorithm>
  +++ |+#include <functional>
    4 | using namespace std;
answer.code:30:39: error: expression list treated as compound expression in functional cast [-fpermissive]
   30 |         function<void(int, vector<int>)> solve =
      |                                       ^
answer.code:30:18: error: expected primary-expression before ‘void’
   30 |         function<void(int, vector<int>)> solve =
      |                  ^~~~
answer.code:43:9: error: ‘solve’ was not declared in this scope
   43 |         solve(0, count);
      |         ^~~~~