books.cpp: In function 'void solve(int, int, long long int, int)':
books.cpp:47:10: error: expected initializer before '+=' token
47 | ll sum += ask(r);
| ^~
books.cpp:49:22: warning: narrowing conversion of 'r' from 'long long int' to 'int' [-Wnarrowing]
49 | vector<int> ans = {r};
| ^
books.cpp:49:22: warning: narrowing conversion of 'r' from 'long long int' to 'int' [-Wnarrowing]
books.cpp:51:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
51 | if(ans.size()>=K)break;
| ~~~~~~~~~~^~~
books.cpp:48:7: warning: unused variable 'cnt' [-Wunused-variable]
48 | int cnt = 1;
| ^~~
books.cpp:69:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
69 | for(int j = 0;j<v.size();j++){
| ~^~~~~~~~~
books.cpp:74:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
74 | for(int j = 0;j<v.size();j++){
| ~^~~~~~~~~