foo.cc:15:32: error: 'vector' has not been declared
15 | void dfs(int s, int t, LL sum, vector<LL>& now)
| ^~~~~~
foo.cc:15:38: error: expected ',' or '...' before '<' token
15 | void dfs(int s, int t, LL sum, vector<LL>& now)
| ^
foo.cc: In function 'void dfs(int, int, LL, int)':
foo.cc:20:17: error: 'now' was not declared in this scope
20 | now.push_back(sum);
| ^~~
foo.cc:24:31: error: 'now' was not declared in this scope
24 | dfs(s+1, t, sum+w[s], now);
| ^~~
foo.cc: At global scope:
foo.cc:28:12: error: 'vector' was not declared in this scope
28 | LL findmax(vector<LL>& a, LL x)
| ^~~~~~
foo.cc:4:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
3 | #include <algorithm>
+++ |+#include <vector>
4 |
foo.cc:28:21: error: expected primary-expression before '>' token
28 | LL findmax(vector<LL>& a, LL x)
| ^
foo.cc:28:24: error: 'a' was not declared in this scope
28 | LL findmax(vector<LL>& a, LL x)
| ^
foo.cc:28:30: error: expected primary-expression before 'x'
28 | LL findmax(vector<LL>& a, LL x)
| ^
foo.cc:28:31: error: expression list treated as compound expression in initializer [-fpermissive]
28 | LL findmax(vector<LL>& a, LL x)
| ^
foo.cc: In function 'int main()':
foo.cc:47:9: error: 'vector' was not declared in this scope
47 | vector<LL> a, b;
| ^~~~~~
foo.cc:47:9: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
foo.cc:47:18: error: expected primary-expression before '>' token
47 | vector<LL> a, b;
| ^
foo.cc:47:20: error: 'a' was not declared in this scope
47 | vector<LL> a, b;
| ^
foo.cc:47:23: error: 'b' was not declared in this scope
47 | vector<LL> a, b;
| ^
foo.cc:56:56: error: 'findmax' cannot be used as a function
56 | res = max(res, b[i] + findmax(a, v-b[i]));
| ^
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务