horses.cpp: In member function 'void tree::upd(int, int)':
horses.cpp:22:22: warning: declaration of 'x' shadows a global declaration [-Wshadow]
22 | void upd(int i, int x){
| ~~~~^
horses.cpp:7:13: note: shadowed declaration is here
7 | vector<int> x, y;
| ^
horses.cpp: In constructor 'FT::FT(int)':
horses.cpp:41:9: warning: declaration of 'n' shadows a member of 'FT' [-Wshadow]
41 | FT(int n): n(n), ft(n + 1){}
| ~~~~^
horses.cpp:39:6: note: shadowed declaration is here
39 | int n;
| ^
horses.cpp:39:6: warning: 'FT::n' will be initialized after [-Wreorder]
horses.cpp:38:13: warning: 'std::vector<long long int> FT::ft' [-Wreorder]
38 | vector<ll> ft;
| ^~
horses.cpp:41:2: warning: when initialized here [-Wreorder]
41 | FT(int n): n(n), ft(n + 1){}
| ^~
horses.cpp: In constructor 'FT::FT(int)':
horses.cpp:41:9: warning: declaration of 'n' shadows a member of 'FT' [-Wshadow]
41 | FT(int n): n(n), ft(n + 1){}
| ~~~~^
horses.cpp:39:6: note: shadowed declaration is here
39 | int n;
| ^
horses.cpp: In constructor 'FT::FT(int)':
horses.cpp:41:9: warning: declaration of 'n' shadows a member of 'FT' [-Wshadow]
41 | FT(int n): n(n), ft(n + 1){}
| ~~~~^
horses.cpp:39:6: note: shadowed declaration is here
39 | int n;
| ^
horses.cpp: In member function 'void FT::upd(int, int)':
horses.cpp:42:22: warning: declaration of 'x' shadows a global declaration [-Wshadow]
42 | void upd(int i, int x){
| ~~~~^
horses.cpp:7:13: note: shadowed declaration is here
7 | vector<int> x, y;
| ^
horses.cpp: In function 'll pwr(ll, ll)':
horses.cpp:56:17: warning: declaration of 'y' shadows a global declaration [-Wshadow]
56 | ll pwr(ll x, ll y){
| ~~~^
horses.cpp:7:16: note: shadowed declaration is here
7 | vector<int> x, y;
| ^
horses.cpp:56:11: warning: declaration of 'x' shadows a global declaration [-Wshadow]
56 | ll pwr(ll x, ll y){
| ~~~^
horses.cpp:7:13: note: shadowed declaration is here
7 | vector<int> x, y;
| ^
horses.cpp: In function 'int solve()':
horses.cpp:92:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
92 | for(int i = 0; i < a.size(); i++){
| ~~^~~~~~~~~~
horses.cpp:96:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
96 | for(int j = i + 1; j < a.size(); j++){
| ~~^~~~~~~~~~
horses.cpp:98:7: warning: conversion from 'll' {aka 'long long int'} to 'double' may change value [-Wconversion]
98 | if(pre > 1e9){
| ^~~
horses.cpp:105:29: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
105 | return cur * a[i].second % mod;
| ~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:133:45: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
133 | ft.upd(pos + 1, pwr(x[pos], mod - 2) * val % mod);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~