horses.cpp: In function 'void update(int, int, int, int)':
horses.cpp:25:39: warning: declaration of 'x' shadows a global declaration [-Wshadow]
void update(int i, int s, int e, int x) {
^
horses.cpp:8:5: note: shadowed declaration is here
int x[500001];
^
horses.cpp: In function 'int query(int, int, int, int, int)':
horses.cpp:36:44: warning: declaration of 'y' shadows a global declaration [-Wshadow]
int query(int i, int s, int e, int x, int y) {
^
horses.cpp:9:5: note: shadowed declaration is here
int y[500001];
^
horses.cpp:36:44: warning: declaration of 'x' shadows a global declaration [-Wshadow]
int query(int i, int s, int e, int x, int y) {
^
horses.cpp:8:5: note: shadowed declaration is here
int x[500001];
^
horses.cpp: In function 'int pw(int, int)':
horses.cpp:45:20: warning: declaration of 'x' shadows a global declaration [-Wshadow]
int pw(int x, int p) {
^
horses.cpp:8:5: note: shadowed declaration is here
int x[500001];
^
horses.cpp:48:41: warning: conversion to 'int' from 'llong {aka long long int}' may alter its value [-Wconversion]
if (p & 1) ret = (llong)ret * x % mod;
~~~~~~~~~~~~~~~^~~~~
horses.cpp:49:26: warning: conversion to 'int' from 'llong {aka long long int}' may alter its value [-Wconversion]
x = (llong)x * x % mod;
~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'void init()':
horses.cpp:59:53: warning: conversion to 'int' from 'llong {aka long long int}' may alter its value [-Wconversion]
if (j <= n) fen[j] = (llong)fen[j] * fen[i] % mod;
~~~~~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'void update(int, int)':
horses.cpp:63:25: warning: declaration of 'x' shadows a global declaration [-Wshadow]
void update(int i, int x) {
^
horses.cpp:8:5: note: shadowed declaration is here
int x[500001];
^
horses.cpp:65:36: warning: conversion to 'int' from 'llong {aka long long int}' may alter its value [-Wconversion]
fen[i] = (llong)fen[i] * x % mod;
~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'int query(int)':
horses.cpp:73:35: warning: conversion to 'int' from 'llong {aka long long int}' may alter its value [-Wconversion]
ret = (llong)ret * fen[i] % mod;
~~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'int get()':
horses.cpp:94:55: warning: conversion to 'int' from 'llong {aka long long int}' may alter its value [-Wconversion]
return (llong)query(mxi) * query(1, 1, n, mxi, n) % mod;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:110:50: warning: conversion to 'int' from 'llong {aka long long int}' may alter its value [-Wconversion]
update(pos, (llong)val * pw(x[pos], mod - 2) % mod);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'int get()':
horses.cpp:94:37: warning: 'mxi' may be used uninitialized in this function [-Wmaybe-uninitialized]
return (llong)query(mxi) * query(1, 1, n, mxi, n) % mod;
~~~~~^~~~~~~~~~~~~~~~~