horses.cpp: In function 'long long int ans()':
horses.cpp:10:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
10 | for(int i = 0; i < mult.size(); i++)
| ~~^~~~~~~~~~~~~
horses.cpp:12:55: error: no matching function for call to 'max(int&, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type)'
12 | maxVal = max(maxVal, mult[i]*y[i] % 1000000007);
| ^
In file included from /usr/include/c++/10/vector:60,
from horses.cpp:1:
/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:12:55: note: deduced conflicting types for parameter 'const _Tp' ('int' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'})
12 | maxVal = max(maxVal, mult[i]*y[i] % 1000000007);
| ^
In file included from /usr/include/c++/10/vector:60,
from horses.cpp:1:
/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:12:55: note: deduced conflicting types for parameter 'const _Tp' ('int' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'})
12 | maxVal = max(maxVal, mult[i]*y[i] % 1000000007);
| ^
horses.cpp: In function 'int updateX(int, int)':
horses.cpp:40:26: error: 'N' was not declared in this scope
40 | for(int i = pos; i < N; i++)
| ^
horses.cpp:42:15: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
42 | return ans();
| ~~~^~
horses.cpp: In function 'int updateY(int, int)':
horses.cpp:48:15: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
48 | return ans();
| ~~~^~