Problem | hamster1 |
---|---|
User | Henries |
Submission Time | 2024-10-26 23:29:40 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
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
hamster1.cpp: In function ‘int main()’:
hamster1.cpp:27:10: error: ‘pos’ was not declared in this scope; did you mean ‘pow’?
27 | recur(v,pos);
| ^~~
| pow