Problem catlunch
User H2510152
Submission Time 2025-02-27 11:33:43
Score 0
Max Time N/A
Max Memory N/A

Compile Error

catlunch.cpp: In function ‘int main()’:
catlunch.cpp:39:5: error: ‘function’ was not declared in this scope
39 | function<long long(int)> solve = [&](int pos) -> long long {
| ^~~~~~~~
catlunch.cpp:3:1: note: ‘std::function’ is defined in header ‘<functional>’; did you forget to ‘#include <functional>’?
2 | #include <vector>
+++ |+#include <functional>
3 | using namespace std;
catlunch.cpp:39:14: error: expected primary-expression before ‘long’
39 | function<long long(int)> solve = [&](int pos) -> long long {
| ^~~~
catlunch.cpp:61:13: error: ‘solve’ was not declared in this scope
61 | cout << solve(0) << endl;
| ^~~~~