books.cpp:3:30: error: expected ',' or '...' before 'p'
3 | long long minimum_walk(int[] p, int s)
| ^
books.cpp: In function 'long long int minimum_walk(int*)':
books.cpp:5:13: error: 'p' was not declared in this scope
5 | long long N=p.size();
| ^
books.cpp:6:1: error: 'int64' was not declared in this scope; did you mean 'int64_t'?
6 | int64 ans=0;
| ^~~~~
| int64_t
books.cpp:9:1: error: 'ans' was not declared in this scope; did you mean 'abs'?
9 | ans+=abs(i-p[i]);
| ^~~
| abs
books.cpp:16:1: error: 'ans' was not declared in this scope; did you mean 'abs'?
16 | ans+=2;
| ^~~
| abs
books.cpp:23:1: error: expected '}' at end of input
23 | }
| ^
books.cpp:4:1: note: to match this '{'
4 | {
| ^