horses.cpp: In function 'int query2(int, int, int, int, int)':
horses.cpp:69:39: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
69 | if(ql<=l&&r<=qr) return tree2[node];
| ~~~~~~~~~~^
horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:82:12: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
82 | build(1,1,n);
| ^
horses.cpp:83:13: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
83 | build2(1,1,n);
| ^
horses.cpp:85:2: error: declaration of 'auto it' has no initializer
85 | auto it;
| ^~~~
horses.cpp:89:20: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
89 | ll res=query2(1,1,n,1,n);
| ^
horses.cpp:89:24: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
89 | ll res=query2(1,1,n,1,n);
| ^
horses.cpp:92:27: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
92 | ll ans=(query(1,1,n,1,x)*query2(1,1,n,x,n));
| ^
horses.cpp:92:45: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
92 | ll ans=(query(1,1,n,1,x)*query2(1,1,n,x,n));
| ^
horses.cpp:92:49: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
92 | ll ans=(query(1,1,n,1,x)*query2(1,1,n,x,n));
| ^
horses.cpp:96:12: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
96 | return res%MOD;
| ^
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:108:13: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
108 | update(1,1,n,pos,val);
| ^
horses.cpp:111:21: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
111 | int res=query2(1,1,n,1,n);
| ^
horses.cpp:111:25: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
111 | int res=query2(1,1,n,1,n);
| ^
horses.cpp:114:27: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
114 | ll ans=(query(1,1,n,1,x)*query2(1,1,n,x,n))%MOD;
| ^
horses.cpp:114:45: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
114 | ll ans=(query(1,1,n,1,x)*query2(1,1,n,x,n))%MOD;
| ^
horses.cpp:114:49: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
114 | ll ans=(query(1,1,n,1,x)*query2(1,1,n,x,n))%MOD;
| ^
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:124:14: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
124 | update2(1,1,n,pos,val);
| ^
horses.cpp:127:21: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
127 | int res=query2(1,1,n,1,n);
| ^
horses.cpp:127:25: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
127 | int res=query2(1,1,n,1,n);
| ^
horses.cpp:130:27: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
130 | ll ans=(query(1,1,n,1,x)*query2(1,1,n,x,n))%MOD;
| ^
horses.cpp:130:45: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
130 | ll ans=(query(1,1,n,1,x)*query2(1,1,n,x,n))%MOD;
| ^
horses.cpp:130:49: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
130 | ll ans=(query(1,1,n,1,x)*query2(1,1,n,x,n))%MOD;
| ^