horses.cpp: In function 'long long int binp(long long int, int)':
horses.cpp:9:18: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
9 | if(n&1) r = a*r%MOD;
| ~~~^~~~
horses.cpp: In function 'int que(int)':
horses.cpp:23:21: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
23 | ans = (BIT[i]*ans)%MOD;
| ~~~~~~~~~~~~^~~~
horses.cpp: In function 'void cons(int, int, int)':
horses.cpp:39:13: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
39 | int mid = l+r>>1;
| ~^~
horses.cpp: In function 'void upd(int, int, int)':
horses.cpp:53:13: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
53 | int mid = l+r>>1;
| ~^~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:79:18: warning: conversion from 'std::vector<int>::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
79 | up(pos+1, x.size(), val*binp(x[pos], MOD-2)%MOD);
| ~~~~~~^~
horses.cpp:79:45: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
79 | up(pos+1, x.size(), val*binp(x[pos], MOD-2)%MOD);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~
horses.cpp:86:20: warning: conversion from 'std::vector<int>::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
86 | upd(1, 0, x.size()-1);
| ~~~~~~~~^~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:92:20: warning: conversion from 'std::vector<int>::size_type' {aka 'long unsigned int'} to 'int' may change value [-Wconversion]
92 | upd(1, 0, x.size()-1);
| ~~~~~~~~^~