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

Compile Error

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