horses.cpp: In function 'int powm(int, int)':
horses.cpp:13:22: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
ans=(1ll*ans*ans)%mod;
~~~~~~~~~~~~~^~~~
horses.cpp:15:25: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
ans=(1ll*ans*x1)%mod;
~~~~~~~~~~~~^~~~
horses.cpp: In function 'int get(int, int, int, int, int)':
horses.cpp:43:27: warning: unused parameter 'v' [-Wunused-parameter]
int get(int l,int r,int v=1,int s=0,int e=n){
^
horses.cpp:43:35: warning: unused parameter 's' [-Wunused-parameter]
int get(int l,int r,int v=1,int s=0,int e=n){
^
horses.cpp:43:43: warning: unused parameter 'e' [-Wunused-parameter]
int get(int l,int r,int v=1,int s=0,int e=n){
^
horses.cpp: In function 'int ans()':
horses.cpp:71:25: error: expected unqualified-id before '=' token
long long ans1=0,ym,=0,mul=mulx;
^
horses.cpp:73:23: error: no matching function for call to 'max(long long int&, int&)'
ym=max(ym,y[i]);
^
In file included from /usr/include/c++/7/bits/specfun.h:45:0,
from /usr/include/c++/7/cmath:1914,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
from horses.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h:219:5: note: candidate: template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/7/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:
horses.cpp:73:23: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
ym=max(ym,y[i]);
^
In file included from /usr/include/c++/7/bits/specfun.h:45:0,
from /usr/include/c++/7/cmath:1914,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:41,
from horses.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h:265:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed:
horses.cpp:73:23: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
ym=max(ym,y[i]);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from horses.cpp:1:
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: candidate: template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)
max(initializer_list<_Tp> __l)
^~~
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: template argument deduction/substitution failed:
horses.cpp:73:23: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
ym=max(ym,y[i]);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from horses.cpp:1:
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)
max(initializer_list<_Tp> __l, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: template argument deduction/substitution failed:
horses.cpp:73:23: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
ym=max(ym,y[i]);
^
horses.cpp:74:23: error: 'mul' was not declared in this scope
ans1=max(ans1,mul*ym);
^~~
horses.cpp:74:23: note: suggested alternative: 'mulx'
ans1=max(ans1,mul*ym);
^~~
mulx
horses.cpp:77:16: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
return ans1%mod;//(1ll*((mulx*powm(mulm,mod-2))%mod)*ym)%mod;
~~~~^~~~
horses.cpp: In function 'int init(int, int*, int*)':
horses.cpp:83:29: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
mulx=(1ll*mulx*x[i])%mod;
~~~~~~~~~~~~~~~^~~~
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:101:39: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
mulx=(1ll*mulx*powm(x[pos],mod-2))%mod;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
horses.cpp:103:27: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
mulx=(1ll*mulx*x[pos])%mod;
~~~~~~~~~~~~~~~~~^~~~