/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'void buildDecomp()':
/in/foo.cc:53:5: error: 'function' was not declared in this scope
   53 |     function<void(int,int)> go = [&](int u, int h) {
      |     ^~~~~~~~
/in/foo.cc: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;
/in/foo.cc:53:26: error: expression list treated as compound expression in functional cast [-fpermissive]
   53 |     function<void(int,int)> go = [&](int u, int h) {
      |                          ^
/in/foo.cc:53:14: error: expected primary-expression before 'void'
   53 |     function<void(int,int)> go = [&](int u, int h) {
      |              ^~~~
/in/foo.cc:62:5: error: 'go' was not declared in this scope
   62 |     go(0, 0);
      |     ^~
/in/foo.cc:52:9: warning: unused variable 'cur' [-Wunused-variable]
   52 |     int cur = 0;
      |         ^~~

信息

递交者
类型
递交
题目
P1930 东方明珠下的音乐树
语言
C++
递交时间
2025-06-17 10:44:00
评测时间
2025-06-17 10:44:00
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes