horses.cpp: In member function 'void SegTreeY::build(const std::vector<int>&)':
horses.cpp:18:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
18 | while (size < a.size()) size *= 2;
| ~~~~~^~~~~~~~~~
horses.cpp:20:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
20 | for (int i = size; i < size + a.size(); i++) tree[i] = a[i - size];
| ~~^~~~~~~~~~~~~~~~~
horses.cpp: In member function 'int SegTreeX::merge(int, int)':
horses.cpp:47:22: warning: conversion from 'long long int' to 'int' may change value [-Wconversion]
47 | return 1ll * a * b % mod;
| ~~~~~~~~~~~~^~~~~
horses.cpp: In member function 'void SegTreeX::build(const std::vector<int>&)':
horses.cpp:52:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
52 | while (size < a.size()) size *= 2;
| ~~~~~^~~~~~~~~~
horses.cpp:54:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
54 | for (int i = size; i < size + a.size(); i++) tree[i] = a[i - size];
| ~~^~~~~~~~~~~~~~~~~
horses.cpp: In function 'int get_ans()':
horses.cpp:83:30: error: no matching function for call to 'max(ll&, int)'
83 | best = max(best, mul * y[i]);
| ^
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:83:30: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
83 | best = max(best, mul * y[i]);
| ^
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:83:30: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
83 | best = max(best, mul * y[i]);
| ^
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:83:30: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
83 | best = max(best, mul * y[i]);
| ^
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:83:30: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
83 | best = max(best, mul * y[i]);
| ^
horses.cpp:85:14: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
85 | return best % mod;
| ~~~~~^~~~~