Problem | candymountain_ex |
---|---|
User | personjs |
Submission Time | 2025-02-20 07:34:16 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
candymountain_ex.cpp:5:1: error: expected initializer before ‘long’
5 | long long memo[100000] = {-1};
| ^~~~
candymountain_ex.cpp: In function ‘long long int dp(int)’:
candymountain_ex.cpp:9:9: error: ‘memo’ was not declared in this scope
9 | if (memo[i] != -1) return memo[i];
| ^~~~
candymountain_ex.cpp:11:22: error: ‘k’ was not declared in this scope
11 | for (int j=1; j<=k; j++) {
| ^
candymountain_ex.cpp:14:12: error: ‘memo’ was not declared in this scope
14 | return memo[i] = res + c[i];
| ^~~~
candymountain_ex.cpp:14:28: error: ‘c’ was not declared in this scope
14 | return memo[i] = res + c[i];
| ^
candymountain_ex.cpp: In function ‘int main()’:
candymountain_ex.cpp:22:36: error: ‘c’ was not declared in this scope
22 | for (int i=0; i<n; i++) cin >> c[i];
|