QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#491973#5665. AA Country and King Dreamoonucup-team4204Compile Error//C++204.6kb2024-07-26 03:13:092024-07-26 03:13:09

详细

answer.code: In function ‘int main()’:
answer.code:91:9: error: ‘assert’ was not declared in this scope
   91 |         assert(way.empty());
      |         ^~~~~~
answer.code:4:1: note: ‘assert’ is defined in header ‘<cassert>’; did you forget to ‘#include <cassert>’?
    3 | #include <algorithm>
  +++ |+#include <cassert>
    4 | using namespace std;
answer.code:113:9: error: ‘function’ was not declared in this scope
  113 |         function<void(int, int)> solve = [&](int vertex, int p)
      |         ^~~~~~~~
answer.code:4:1: note: ‘std::function’ is defined in header ‘<functional>’; did you forget to ‘#include <functional>’?
    3 | #include <algorithm>
  +++ |+#include <functional>
    4 | using namespace std;
answer.code:113:31: error: expression list treated as compound expression in functional cast [-fpermissive]
  113 |         function<void(int, int)> solve = [&](int vertex, int p)
      |                               ^
answer.code:113:18: error: expected primary-expression before ‘void’
  113 |         function<void(int, int)> solve = [&](int vertex, int p)
      |                  ^~~~
answer.code:151:9: error: ‘solve’ was not declared in this scope
  151 |         solve(way[0], -1);
      |         ^~~~~