sortbooks.cpp: In function 'void build(long long int, long long int, long long int)':
sortbooks.cpp:22:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
22 | int m=l+r>>1;
| ~^~
sortbooks.cpp: In function 'long long int get_ans(long long int, long long int, long long int, long long int, long long int)':
sortbooks.cpp:32:15: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
32 | int m = l+r>>1;
| ~^~
sortbooks.cpp: At global scope:
sortbooks.cpp:36:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
36 | main(){
| ^
sortbooks.cpp: In function 'int main()':
sortbooks.cpp:37:15: warning: unused variable 'j' [-Wunused-variable]
37 | int n,t,i,j,k;
| ^
sortbooks.cpp:37:17: warning: unused variable 'k' [-Wunused-variable]
37 | int n,t,i,j,k;
| ^
sortbooks.cpp:10:25: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
10 | #define scan2(a,b) scanf("%lld %lld",&a, &b);
| ~~~~~^~~~~~~~~~~~~~~~~~~~
sortbooks.cpp:38:5: note: in expansion of macro 'scan2'
38 | scan2(n,t)
| ^~~~~
sortbooks.cpp:9:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
9 | #define scan1(a) scanf("%lld",&a);
| ~~~~~^~~~~~~~~~~
sortbooks.cpp:40:9: note: in expansion of macro 'scan1'
40 | scan1(a[i])
| ^~~~~
sortbooks.cpp:11:27: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
11 | #define scan3(a,b,c) scanf("%lld %lld %lld",&a,&b,&c);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
sortbooks.cpp:50:9: note: in expansion of macro 'scan3'
50 | scan3(l,r,k)
| ^~~~~