books.cpp: In function 'long long int minimum_walk(std::vector<int>, int)':
books.cpp:4:3: error: 'map' was not declared in this scope
4 | map<int,int>v;
| ^~~
books.cpp:4:7: error: expected primary-expression before 'int'
4 | map<int,int>v;
| ^~~
books.cpp:10:14: error: 'abs' was not declared in this scope
10 | a+=abs(i-p[i]);
| ^~~
books.cpp:11:21: error: 'min' was not declared in this scope; did you mean 'std::min'?
11 | for(int j=min(i,p[i]);j<max(i,p[i]);++j)
| ^~~
| std::min
In file included from /usr/include/c++/10/vector:60,
from books.h:1,
from books.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: 'std::min' declared here
278 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
books.cpp:11:35: error: 'max' was not declared in this scope; did you mean 'std::max'?
11 | for(int j=min(i,p[i]);j<max(i,p[i]);++j)
| ^~~
| std::max
In file included from /usr/include/c++/10/vector:60,
from books.h:1,
from books.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: 'std::max' declared here
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
books.cpp:12:13: error: 'v' was not declared in this scope
12 | v[j]=1;
| ^
books.cpp:16:15: error: 'v' was not declared in this scope
16 | if(!v[i])
| ^