Problem feast
User beepbeepsheep
Submission Time 2024-02-22 13:43:22
Score 0
Max Time N/A
Max Memory N/A

Compile Error

feast.cpp: In function ‘std::pair<long long int, long long int> solve(long long int)’:
feast.cpp:16:13: error: ‘cost’ was not declared in this scope; did you mean ‘cosl’?
16 | dp[0][1]={-cost,-1};
| ^~~~
| cosl
feast.cpp:16:20: error: no match for ‘operator=’ (operand types are ‘std::pair<long long int, long long int>’ and ‘<brace-enclosed initializer list>’)
16 | dp[0][1]={-cost,-1};
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from feast.cpp:1:
/usr/include/c++/9/bits/stl_pair.h:378:7: note: candidate: ‘std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(typename std::conditional<std::__and_<std::is_copy_assignable&l