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:86:21: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
86 | int res=query2(1,1,n,1,n);
| ^
horses.cpp:86:25: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
86 | int res=query2(1,1,n,1,n);
| ^
horses.cpp:89:27: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
89 | ll ans=(query(1,1,n,1,x)*query2(1,1,n,x,n));
| ^
horses.cpp:89:45: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
89 | ll ans=(query(1,1,n,1,x)*query2(1,1,n,x,n));
| ^
horses.cpp:89:49: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
89 | ll ans=(query(1,1,n,1,x)*query2(1,1,n,x,n));
| ^
horses.cpp:90:24: error: no matching function for call to 'max(int&, long long int&)'
90 | res=max(res,ans);
| ^
In file included from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from horses.cpp:2:
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
horses.cpp:90:24: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
90 | res=max(res,ans);
| ^
In file included from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from horses.cpp:2:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed:
horses.cpp:90:24: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
90 | res=max(res,ans);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from horses.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
3480 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: template argument deduction/substitution failed:
horses.cpp:90:24: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
90 | res=max(res,ans);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from horses.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: template argument deduction/substitution failed:
horses.cpp:90:24: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
90 | res=max(res,ans);
| ^
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:105:13: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
105 | update(1,1,n,pos,val);
| ^
horses.cpp:108:21: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
108 | int res=query2(1,1,n,1,n);
| ^
horses.cpp:108:25: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
108 | int res=query2(1,1,n,1,n);
| ^
horses.cpp:111:27: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
111 | ll ans=(query(1,1,n,1,x)*query2(1,1,n,x,n))%MOD;
| ^
horses.cpp:111:45: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
111 | ll ans=(query(1,1,n,1,x)*query2(1,1,n,x,n))%MOD;
| ^
horses.cpp:111:49: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
111 | 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:121:14: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
121 | update2(1,1,n,pos,val);
| ^
horses.cpp:124:21: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
124 | int res=query2(1,1,n,1,n);
| ^
horses.cpp:124:25: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
124 | int res=query2(1,1,n,1,n);
| ^
horses.cpp:127:27: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
127 | ll ans=(query(1,1,n,1,x)*query2(1,1,n,x,n))%MOD;
| ^
horses.cpp:127:45: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
127 | ll ans=(query(1,1,n,1,x)*query2(1,1,n,x,n))%MOD;
| ^
horses.cpp:127:49: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
127 | ll ans=(query(1,1,n,1,x)*query2(1,1,n,x,n))%MOD;
| ^