horses.cpp: In function 'void up(int, int, int, int, long long int)':
horses.cpp:8:41: warning: declaration of 'x' shadows a global declaration [-Wshadow]
8 | void up ( int nod , int l , int r , int x , long long val )
| ~~~~^
horses.cpp:5:35: note: shadowed declaration is here
5 | long long n , m , mod = 1e9 + 7 , x [500005] , y [500005] , tree [2000006];
| ^
horses.cpp: In function 'long long int qr(int, int, int, int, int)':
horses.cpp:21:54: warning: declaration of 'y' shadows a global declaration [-Wshadow]
21 | long long qr ( int nod , int l , int r , int x , int y )
| ~~~~^
horses.cpp:5:48: note: shadowed declaration is here
5 | long long n , m , mod = 1e9 + 7 , x [500005] , y [500005] , tree [2000006];
| ^
horses.cpp:21:46: warning: declaration of 'x' shadows a global declaration [-Wshadow]
21 | long long qr ( int nod , int l , int r , int x , int y )
| ~~~~^
horses.cpp:5:35: note: shadowed declaration is here
5 | long long n , m , mod = 1e9 + 7 , x [500005] , y [500005] , tree [2000006];
| ^
horses.cpp: In function 'void upmx(int, int, int, int, long long int)':
horses.cpp:28:43: warning: declaration of 'x' shadows a global declaration [-Wshadow]
28 | void upmx ( int nod , int l , int r , int x , long long val )
| ~~~~^
horses.cpp:5:35: note: shadowed declaration is here
5 | long long n , m , mod = 1e9 + 7 , x [500005] , y [500005] , tree [2000006];
| ^
horses.cpp: In function 'std::pair<long long int, long long int> qrmx(int, int, int, int, int)':
horses.cpp:41:77: warning: declaration of 'y' shadows a global declaration [-Wshadow]
41 | pair < long long , long long > qrmx ( int nod , int l , int r , int x , int y )
| ~~~~^
horses.cpp:5:48: note: shadowed declaration is here
5 | long long n , m , mod = 1e9 + 7 , x [500005] , y [500005] , tree [2000006];
| ^
horses.cpp:41:69: warning: declaration of 'x' shadows a global declaration [-Wshadow]
41 | pair < long long , long long > qrmx ( int nod , int l , int r , int x , int y )
| ~~~~^
horses.cpp:5:35: note: shadowed declaration is here
5 | long long n , m , mod = 1e9 + 7 , x [500005] , y [500005] , tree [2000006];
| ^
horses.cpp: In function 'long long int get()':
horses.cpp:52:23: warning: conversion from 'long long int' to 'std::vector<int>::value_type' {aka 'int'} may change value [-Wconversion]
52 | ids . push_back ( n );
| ^
horses.cpp:57:15: warning: statement has no effect [-Wunused-value]
57 | for ( it ; it != vall . begin () ; it -- )
| ^~
horses.cpp:67:25: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
67 | for ( int i = 0 ; i < ids . size () ; i ++ )
| ~~^~~~~~~~~~~~~~~
horses.cpp:71:37: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
71 | int id = qrmx ( 1 , 0 , n , ids [ i - 1 ] + 1 , ids [i] - 1 ) . second;
| ^
horses.cpp:71:77: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
71 | int id = qrmx ( 1 , 0 , n , ids [ i - 1 ] + 1 , ids [i] - 1 ) . second;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
horses.cpp:74:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
74 | if ( i != ids . size () - 1 ) nig . push_back ( ids [i] );
| ~~^~~~~~~~~~~~~~~~~~~~
horses.cpp:78:25: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
78 | for ( int i = 1 ; i < nig . size () ; i ++ )
| ~~^~~~~~~~~~~~~~~
horses.cpp:122:34: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
122 | long long ans = qr ( 1 , 0 , n , 0 , bst );
| ^
horses.cpp:122:42: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
122 | long long ans = qr ( 1 , 0 , n , 0 , bst );
| ^~~
horses.cpp:96:26: warning: unused variable 'mull' [-Wunused-variable]
96 | long long bstt = 0 , mull = 1;
| ^~~~
horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:134:22: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
134 | up ( 1 , 0 , n , i , x [i] );
| ^
horses.cpp:139:24: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
139 | upmx ( 1 , 0 , n , i , y [i] );
| ^
horses.cpp:141:16: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
141 | return get ();
| ~~~~^~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:150:18: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
150 | up ( 1 , 0 , n , pos , x [pos] );
| ^
horses.cpp:151:13: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
151 | return get ();
| ~~~~^~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:158:20: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
158 | upmx ( 1 , 0 , n , pos , val );
| ^
horses.cpp:159:13: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
159 | return get ();
| ~~~~^~