books.cpp: In function 'long long int minimum_walk(std::vector<int>, int)':
books.cpp:21:13: error: redeclaration of 'int r'
21 | int r=-1,nf=0,nv=0,ans=0;
| ^
books.cpp:19:13: note: 'int r' previously declared here
19 | int r=-1,nf=0,nv=0,ans=0;
| ^
books.cpp:21:18: error: redeclaration of 'int nf'
21 | int r=-1,nf=0,nv=0,ans=0;
| ^~
books.cpp:19:18: note: 'int nf' previously declared here
19 | int r=-1,nf=0,nv=0,ans=0;
| ^~
books.cpp:21:23: error: redeclaration of 'int nv'
21 | int r=-1,nf=0,nv=0,ans=0;
| ^~
books.cpp:19:23: note: 'int nv' previously declared here
19 | int r=-1,nf=0,nv=0,ans=0;
| ^~
books.cpp:21:28: error: redeclaration of 'int ans'
21 | int r=-1,nf=0,nv=0,ans=0;
| ^~~
books.cpp:19:28: note: 'int ans' previously declared here
19 | int r=-1,nf=0,nv=0,ans=0;
| ^~~
books.cpp:22:21: error: redeclaration of '__gnu_pbds::tree<int, __gnu_pbds::null_type, std::less<int>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update> st'
22 | ordered_set st;
| ^~
books.cpp:20:21: note: '__gnu_pbds::tree<int, __gnu_pbds::null_type, std::less<int>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update> st' previously declared here
20 | ordered_set st;
| ^~