horses.cpp:80:25: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
80 | int max_pref(int l, auto pred) const{
| ^~~~
horses.cpp:101:25: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
101 | int min_suff(int r, auto pred) const{
| ^~~~
horses.cpp: In constructor 'segment_tree<T, F>::segment_tree(long long int, F, T)':
horses.cpp:38:33: warning: declaration of 'T_id' shadows a member of 'segment_tree<T, F>' [-Wshadow]
38 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~^~~~
horses.cpp:36:7: note: shadowed declaration is here
36 | T T_id; // monoid identity
| ^~~~
horses.cpp:38:27: warning: declaration of 'TT' shadows a member of 'segment_tree<T, F>' [-Wshadow]
38 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~^~
horses.cpp:35:7: note: shadowed declaration is here
35 | F TT; // monoid operation (always adjacent)
| ^~
horses.cpp:38:22: warning: declaration of 'n' shadows a member of 'segment_tree<T, F>' [-Wshadow]
38 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ^
horses.cpp:33:9: note: shadowed declaration is here
33 | int n, size, log;
| ^
horses.cpp: In constructor 'segment_tree<T, F>::segment_tree(long long int, T, F, T)':
horses.cpp:40:41: warning: declaration of 'T_id' shadows a member of 'segment_tree<T, F>' [-Wshadow]
40 | segment_tree(int n, T init, F TT, T T_id): segment_tree(vector<T>(n, init), TT, T_id){}
| ~~^~~~
horses.cpp:36:7: note: shadowed declaration is here
36 | T T_id; // monoid identity
| ^~~~
horses.cpp:40:35: warning: declaration of 'TT' shadows a member of 'segment_tree<T, F>' [-Wshadow]
40 | segment_tree(int n, T init, F TT, T T_id): segment_tree(vector<T>(n, init), TT, T_id){}
| ~~^~
horses.cpp:35:7: note: shadowed declaration is here
35 | F TT; // monoid operation (always adjacent)
| ^~
horses.cpp:40:22: warning: declaration of 'n' shadows a member of 'segment_tree<T, F>' [-Wshadow]
40 | segment_tree(int n, T init, F TT, T T_id): segment_tree(vector<T>(n, init), TT, T_id){}
| ^
horses.cpp:33:9: note: shadowed declaration is here
33 | int n, size, log;
| ^
horses.cpp: In constructor 'segment_tree<T, F>::segment_tree(const std::vector<_Tp>&, F, T)':
horses.cpp:42:46: warning: declaration of 'T_id' shadows a member of 'segment_tree<T, F>' [-Wshadow]
42 | segment_tree(const vector<T> &a, F TT, T T_id): n((int)a.size()), TT(TT), T_id(T_id){ // O(n)
| ~~^~~~
horses.cpp:36:7: note: shadowed declaration is here
36 | T T_id; // monoid identity
| ^~~~
horses.cpp:42:40: warning: declaration of 'TT' shadows a member of 'segment_tree<T, F>' [-Wshadow]
42 | segment_tree(const vector<T> &a, F TT, T T_id): n((int)a.size()), TT(TT), T_id(T_id){ // O(n)
| ~~^~
horses.cpp:35:7: note: shadowed declaration is here
35 | F TT; // monoid operation (always adjacent)
| ^~
horses.cpp:43:32: error: no matching function for call to 'max(long long int, int)'
43 | log = __lg(max(n - 1, 1)) + 1, size = 1 << log;
| ^
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:7:
/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:43:32: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
43 | log = __lg(max(n - 1, 1)) + 1, size = 1 << log;
| ^
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:7:
/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:43:32: note: deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
43 | log = __lg(max(n - 1, 1)) + 1, size = 1 << log;
| ^
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:7:
/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:43:32: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
43 | log = __lg(max(n - 1, 1)) + 1, size = 1 << log;
| ^
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:7:
/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:43:32: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
43 | log = __lg(max(n - 1, 1)) + 1, size = 1 << log;
| ^
horses.cpp: In constructor 'Tmax::Tmax(long long int)':
horses.cpp:136:14: warning: declaration of 'mx' shadows a member of 'Tmax' [-Wshadow]
136 | Tmax(int mx = numeric_limits <int>::min()): mx(mx){
| ^
horses.cpp:134:9: note: shadowed declaration is here
134 | int mx;
| ^~
horses.cpp: In constructor 'Tmax::Tmax(long long int)':
horses.cpp:136:14: warning: declaration of 'mx' shadows a member of 'Tmax' [-Wshadow]
136 | Tmax(int mx = numeric_limits <int>::min()): mx(mx){
| ^
horses.cpp:134:9: note: shadowed declaration is here
134 | int mx;
| ^~
horses.cpp: In constructor 'Tmax::Tmax(long long int)':
horses.cpp:136:14: warning: declaration of 'mx' shadows a member of 'Tmax' [-Wshadow]
136 | Tmax(int mx = numeric_limits <int>::min()): mx(mx){
| ^
horses.cpp:134:9: note: shadowed declaration is here
134 | int mx;
| ^~
horses.cpp: In constructor 'Tprod::Tprod(long long int)':
horses.cpp:148:15: warning: declaration of 'prod' shadows a member of 'Tprod' [-Wshadow]
148 | Tprod(int prod = 1): prod(prod){
| ^
horses.cpp:146:9: note: shadowed declaration is here
146 | int prod;
| ^~~~
horses.cpp: In constructor 'Tprod::Tprod(long long int)':
horses.cpp:148:15: warning: declaration of 'prod' shadows a member of 'Tprod' [-Wshadow]
148 | Tprod(int prod = 1): prod(prod){
| ^
horses.cpp:146:9: note: shadowed declaration is here
146 | int prod;
| ^~~~
horses.cpp: In constructor 'Tprod::Tprod(long long int)':
horses.cpp:148:15: warning: declaration of 'prod' shadows a member of 'Tprod' [-Wshadow]
148 | Tprod(int prod = 1): prod(prod){
| ^
horses.cpp:146:9: note: shadowed declaration is here
146 | int prod;
| ^~~~
horses.cpp: In function 'long long int real_solve()':
horses.cpp:176:28: error: no matching function for call to 'max(int, const long long int&)'
176 | int l = max(0, *itr), r = (next(itr) == stt.end() ? n : *next(itr));
| ^
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:7:
/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:176:28: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
176 | int l = max(0, *itr), r = (next(itr) == stt.end() ? n : *next(itr));
| ^
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:7:
/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:176:28: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
176 | int l = max(0, *itr), r = (next(itr) == stt.end() ? n : *next(itr));
| ^
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:7:
/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:176:28: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
176 | int l = max(0, *itr), r = (next(itr) == stt.end() ? n : *next(itr));
| ^
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:7:
/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:176:28: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
176 | int l = max(0, *itr), r = (next(itr) == stt.end() ? n : *next(itr));
| ^
horses.cpp:177:55: error: 'r' was not declared in this scope
177 | mxprod = max(mxprod, (ll)prod * segy.query(l, r).mx);
| ^
horses.cpp: In instantiation of 'segment_tree<T, F>::segment_tree(long long int, F, T) [with T = Tprod; F = <lambda(const Tprod&, const Tprod&)>]':
horses.cpp:162:63: required from here
horses.cpp:38:33: warning: declaration of 'T_id' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
38 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~^~~~
horses.cpp:36:7: note: shadowed declaration is here
36 | T T_id; // monoid identity
| ^~~~
horses.cpp:38:27: warning: declaration of 'TT' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
38 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~^~
horses.cpp:35:7: note: shadowed declaration is here
35 | F TT; // monoid operation (always adjacent)
| ^~
horses.cpp:38:22: warning: declaration of 'n' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
38 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ^
horses.cpp:33:9: note: shadowed declaration is here
33 | int n, size, log;
| ^
horses.cpp:38:33: warning: declaration of 'T_id' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
38 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~^~~~
horses.cpp:36:7: note: shadowed declaration is here
36 | T T_id; // monoid identity
| ^~~~
horses.cpp:38:27: warning: declaration of 'TT' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
38 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~^~
horses.cpp:35:7: note: shadowed declaration is here
35 | F TT; // monoid operation (always adjacent)
| ^~
horses.cpp:38:22: warning: declaration of 'n' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
38 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ^
horses.cpp:33:9: note: shadowed declaration is here
33 | int n, size, log;
| ^
horses.cpp:38:33: warning: declaration of 'T_id' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
38 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~^~~~
horses.cpp:36:7: note: shadowed declaration is here
36 | T T_id; // monoid identity
| ^~~~
horses.cpp:38:27: warning: declaration of 'TT' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
38 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~^~
horses.cpp:35:7: note: shadowed declaration is here
35 | F TT; // monoid operation (always adjacent)
| ^~
horses.cpp:38:22: warning: declaration of 'n' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
38 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ^
horses.cpp:33:9: note: shadowed declaration is here
33 | int n, size, log;
| ^
horses.cpp: In instantiation of 'segment_tree<T, F>::segment_tree(long long int, F, T) [with T = Tmax; F = <lambda(const Tmax&, const Tmax&)>]':
horses.cpp:163:59: required from here
horses.cpp:38:33: warning: declaration of 'T_id' shadows a member of 'segment_tree<Tmax, <lambda(const Tmax&, const Tmax&)> >' [-Wshadow]
38 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~^~~~
horses.cpp:36:7: note: shadowed declaration is here
36 | T T_id; // monoid identity
| ^~~~
horses.cpp:38:27: warning: declaration of 'TT' shadows a member of 'segment_tree<Tmax, <lambda(const Tmax&, const Tmax&)> >' [-Wshadow]
38 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~^~
horses.cpp:35:7: note: shadowed declaration is here
35 | F TT; // monoid operation (always adjacent)
| ^~
horses.cpp:38:22: warning: declaration of 'n' shadows a member of 'segment_tree<Tmax, <lambda(const Tmax&, const Tmax&)> >' [-Wshadow]
38 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ^
horses.cpp:33:9: note: shadowed declaration is here
33 | int n, size, log;
| ^
horses.cpp:38:33: warning: declaration of 'T_id' shadows a member of 'segment_tree<Tmax, <lambda(const Tmax&, const Tmax&)> >' [-Wshadow]
38 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~^~~~
horses.cpp:36:7: note: shadowed declaration is here
36 | T T_id; // monoid identity
| ^~~~
horses.cpp:38:27: warning: declaration of 'TT' shadows a member of 'segment_tree<Tmax, <lambda(co