Problem | hamster1 |
---|---|
User | Minjia |
Submission Time | 2023-11-15 13:18:19 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
hamster1.cpp: In function ‘int main()’:
hamster1.cpp:13:15: error: ‘i’ was not declared in this scope
13 | for (int j= i-k; j <=i-1; j++){
| ^
hamster1.cpp:15:5: error: ‘temp’ was not declared in this scope
15 | temp = min (temp, dp [j] + abs(arr [i]- arr [j]));
| ^~~~
hamster1.cpp:18:7: error: ‘i’ was not declared in this scope
18 | dp [i]= temp;
| ^
hamster1.cpp:18:11: error: ‘temp’ was not declared in this scope
18 | dp [i]= temp;
| ^~~~
hamster1.cpp: At global scope:
hamster1.cpp:20:2: error: ‘cout’ does not name a type
20 | cout<<dp[n-1]
| ^~~~
hamster1.cpp:23:1: error: expected declaration before ‘}’ token
23 | }
| ^