books.cpp: In function 'long long int minimum_walk(std::vector<int>, int)':
books.cpp:4:40: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
4 | #define rep(i,a,b) for (int i = (a); i < (b); i++)
| ^
books.cpp:22:2: note: in expansion of macro 'rep'
22 | rep(i,0,p.size())
| ^~~
books.cpp:4:40: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
4 | #define rep(i,a,b) for (int i = (a); i < (b); i++)
| ^
books.cpp:55:3: note: in expansion of macro 'rep'
55 | rep(i,0,cycle.size())
| ^~~
books.cpp:53:7: warning: unused variable 'low' [-Wunused-variable]
53 | int low = 0, high = 0; // inc
| ^~~
books.cpp:4:40: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
4 | #define rep(i,a,b) for (int i = (a); i < (b); i++)
| ^
books.cpp:89:3: note: in expansion of macro 'rep'
89 | rep(i,0,closest.size())
| ^~~
books.cpp:104:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
104 | while (low > 0 || high < cycle.size() - 1)
| ~~~~~^~~~~~~~~~~~~~~~~~
books.cpp:108:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
108 | if (low > 0 && high < cycle.size() - 1)
| ~~~~~^~~~~~~~~~~~~~~~~~
books.cpp:133:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
133 | else if (high < cycle.size() - 1)
| ~~~~~^~~~~~~~~~~~~~~~~~