QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#268846#6742. Leavesucup-team2499#Compile Error//C++203.2kb2023-11-28 22:12:402023-11-28 22:12:40

详细

answer.code: In function ‘int main()’:
answer.code:80:10: error: ‘function’ is not a member of ‘std’
   80 |     std::function<void(int)> dfs = [&](int node) {
      |          ^~~~~~~~
answer.code:3:1: note: ‘std::function’ is defined in header ‘<functional>’; did you forget to ‘#include <functional>’?
    2 | #include <vector>
  +++ |+#include <functional>
    3 | 
answer.code:80:19: error: expected primary-expression before ‘void’
   80 |     std::function<void(int)> dfs = [&](int node) {
      |                   ^~~~
answer.code:115:5: error: ‘dfs’ was not declared in this scope
  115 |     dfs(0);
      |     ^~~