horses.cpp: In constructor 'node::node(int, int)':
horses.cpp:17:17: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
17 | l = new node(s, m);
| ^
horses.cpp:17:20: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
17 | l = new node(s, m);
| ^
horses.cpp:18:18: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
18 | r = new node(m+1, e);
| ~^~
horses.cpp:18:22: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
18 | r = new node(m+1, e);
| ^
horses.cpp: In member function 'void node::upd(int, int, int)':
horses.cpp:36:19: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
36 | else l->upd(a, m, c), r->upd(m+1, b , c);
| ^
horses.cpp:36:34: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
36 | else l->upd(a, m, c), r->upd(m+1, b , c);
| ~^~
horses.cpp: In member function 'int node::query(int)':
horses.cpp:43:20: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
43 | if(s == e)return val;
| ^~~
horses.cpp: In constructor 'node2::node2(int, int)':
horses.cpp:63:18: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
63 | l = new node2(s, m);
| ^
horses.cpp:63:21: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
63 | l = new node2(s, m);
| ^
horses.cpp:64:19: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
64 | r = new node2(m+1, e);
| ~^~
horses.cpp:64:23: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
64 | r = new node2(m+1, e);
| ^
horses.cpp: In member function 'std::pair<long long int, long long int> node2::query(int, int)':
horses.cpp:85:31: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
85 | else return max(l->query(a, m), r->query(m+1, b));
| ^
horses.cpp:85:45: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
85 | else return max(l->query(a, m), r->query(m+1, b));
| ~^~
horses.cpp: In function 'int answer()':
horses.cpp:93:38: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
93 | if(s.empty())return root2->query(1, n).fi;
| ^
horses.cpp:6:12: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
6 | #define fi first
| ^
horses.cpp:93:41: note: in expansion of macro 'fi'
93 | if(s.empty())return root2->query(1, n).fi;
| ^~
horses.cpp:96:8: warning: conversion from 'll' {aka 'long long int'} to 'double' may change value [-Wconversion]
96 | while(cur <= 1e9 && it != s.rend()){
| ^~~
horses.cpp:97:30: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
97 | pi tmp = root2->query(*it, prev);
| ^~~~
horses.cpp:105:25: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
105 | return max(root->query(in) * y[in], root2->query(1, prev).fi) % mod;
| ^~
horses.cpp:105:54: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
105 | return max(root->query(in) * y[in], root2->query(1, prev).fi) % mod;
| ^~~~
horses.cpp:105:64: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
105 | return max(root->query(in) * y[in], root2->query(1, prev).fi) % mod;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:111:21: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
111 | root = new node(1, n);
| ^
horses.cpp:112:37: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
112 | for(int i=1;i<n;i++)root->upd(i+1, n, x[i]);
| ^
horses.cpp:112:43: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
112 | for(int i=1;i<n;i++)root->upd(i+1, n, x[i]);
| ~~~^
horses.cpp:113:23: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
113 | root2 = new node2(1, n);
| ^
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:120:17: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
120 | int tmp = x[pos];
| ~~~~~^
horses.cpp:124:17: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
124 | root->upd(pos, n, val);
| ^
horses.cpp:125:17: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
125 | root->upd(pos, n, expo(tmp, mod-2, mod));
| ^
horses.cpp:125:24: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
125 | root->upd(pos, n, expo(tmp, mod-2, mod));
| ~~~~^~~~~~~~~~~~~~~~~