Problem hamster1
User Henries
Submission Time 2024-10-26 23:30:03
Score 0
Max Time N/A
Max Memory N/A

Compile Error

hamster1.cpp: In function ‘long long int recur(std::vector<long long int>, long long int)’:
hamster1.cpp:11:18: error: ‘k’ was not declared in this scope
11 | for(int i =1;i<=k;i++){
| ^
hamster1.cpp:12:31: error: could not convert ‘(pos - ((long long int)i))’ from ‘long long int’ to ‘std::vector<long long int>’
12 | long long result = recur(pos-i) + abs(v[pos] - v[i]);
| ~~~^~
| |
| long long int