horses.cpp: In function 'int power(int, int)':
horses.cpp:9:40: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
9 | for(; b > 0; b >>= 1, a = 1LL * a * a % mod){
| ~~~~~~~~~~~~^~~~~
horses.cpp:11:24: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
11 | ans = 1LL * ans * a % mod;
| ~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'int get_bit(int)':
horses.cpp:20:28: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
20 | ans = 1LL * ans * bit[p] % mod;
| ~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'void update_bit(int, int)':
horses.cpp:24:28: warning: declaration of 'x' shadows a global declaration [-Wshadow]
24 | void update_bit(int p, int x){
| ~~~~^
horses.cpp:16:22: note: shadowed declaration is here
16 | int n, st[lim << 2], x[lim], x_st[lim << 1], y[lim], bit[lim];
| ^
horses.cpp:26:29: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
26 | bit[p] = 1LL * bit[p] * x % mod;
| ~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'int get_x_prod(int, int)':
horses.cpp:33:13: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
33 | res = min(ll(mod), 1LL * res * x_st[l++]);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
horses.cpp:36:13: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
36 | res = min(ll(mod), 1LL * res * x_st[--r]);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
horses.cpp: In function 'void modify_x(int, int)':
horses.cpp:42:63: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
42 | update_bit(p, 1LL * power(x[p], mod - 2) * (x_st[p + n] = X) % mod);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp:44:21: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
44 | x_st[p >> 1] = min(ll(mod), 1LL * x_st[p] * x_st[p ^ 1]);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
horses.cpp: In function 'void update_X(int, int, int, int, int)':
horses.cpp:70:16: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
70 | x_st[id] = min(ll(mod), 1LL * x_st[id << 1] * x_st[id << 1 | 1]);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:101:41: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
101 | return 1LL * get_bit(st[1]) * y[st[1]] % mod;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:105:41: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
105 | return 1LL * get_bit(st[1]) * y[st[1]] % mod;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:109:41: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
109 | return 1LL * get_bit(st[1]) * y[st[1]] % mod;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:97:6: warning: array subscript 2000020 is outside array bounds of 'int [1000010]' [-Warray-bounds]
97 | fill(x_st, x_st + (lim << 2), 1);
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
horses.cpp:16:30: note: while referencing 'x_st'
16 | int n, st[lim << 2], x[lim], x_st[lim << 1], y[lim], bit[lim];
| ^~~~