horses.cpp:79:25: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
79 | int max_pref(int l, auto pred) const{
| ^~~~
horses.cpp:100:25: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
100 | int min_suff(int r, auto pred) const{
| ^~~~
horses.cpp: In constructor 'segment_tree<T, F>::segment_tree(int, F, T)':
horses.cpp:37:33: warning: declaration of 'T_id' shadows a member of 'segment_tree<T, F>' [-Wshadow]
37 | 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 | T T_id; // monoid identity
| ^~~~
horses.cpp:37:27: warning: declaration of 'TT' shadows a member of 'segment_tree<T, F>' [-Wshadow]
37 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~^~
horses.cpp:34:7: note: shadowed declaration is here
34 | F TT; // monoid operation (always adjacent)
| ^~
horses.cpp:37:22: warning: declaration of 'n' shadows a member of 'segment_tree<T, F>' [-Wshadow]
37 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~~~^
horses.cpp:32:9: note: shadowed declaration is here
32 | int n, size, log;
| ^
horses.cpp: In constructor 'segment_tree<T, F>::segment_tree(int, T, F, T)':
horses.cpp:39:41: warning: declaration of 'T_id' shadows a member of 'segment_tree<T, F>' [-Wshadow]
39 | 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 | T T_id; // monoid identity
| ^~~~
horses.cpp:39:35: warning: declaration of 'TT' shadows a member of 'segment_tree<T, F>' [-Wshadow]
39 | segment_tree(int n, T init, F TT, T T_id): segment_tree(vector<T>(n, init), TT, T_id){}
| ~~^~
horses.cpp:34:7: note: shadowed declaration is here
34 | F TT; // monoid operation (always adjacent)
| ^~
horses.cpp:39:22: warning: declaration of 'n' shadows a member of 'segment_tree<T, F>' [-Wshadow]
39 | segment_tree(int n, T init, F TT, T T_id): segment_tree(vector<T>(n, init), TT, T_id){}
| ~~~~^
horses.cpp:32:9: note: shadowed declaration is here
32 | int n, size, log;
| ^
horses.cpp: In constructor 'segment_tree<T, F>::segment_tree(const std::vector<_Tp>&, F, T)':
horses.cpp:41:46: warning: declaration of 'T_id' shadows a member of 'segment_tree<T, F>' [-Wshadow]
41 | 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 | T T_id; // monoid identity
| ^~~~
horses.cpp:41:40: warning: declaration of 'TT' shadows a member of 'segment_tree<T, F>' [-Wshadow]
41 | 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:34:7: note: shadowed declaration is here
34 | F TT; // monoid operation (always adjacent)
| ^~
horses.cpp: In constructor 'Tmax::Tmax(int)':
horses.cpp:135:14: warning: declaration of 'mx' shadows a member of 'Tmax' [-Wshadow]
135 | Tmax(int mx = numeric_limits <int>::min()): mx(mx){
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
horses.cpp:133:9: note: shadowed declaration is here
133 | int mx;
| ^~
horses.cpp: In constructor 'Tmax::Tmax(int)':
horses.cpp:135:14: warning: declaration of 'mx' shadows a member of 'Tmax' [-Wshadow]
135 | Tmax(int mx = numeric_limits <int>::min()): mx(mx){
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
horses.cpp:133:9: note: shadowed declaration is here
133 | int mx;
| ^~
horses.cpp: In constructor 'Tmax::Tmax(int)':
horses.cpp:135:14: warning: declaration of 'mx' shadows a member of 'Tmax' [-Wshadow]
135 | Tmax(int mx = numeric_limits <int>::min()): mx(mx){
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
horses.cpp:133:9: note: shadowed declaration is here
133 | int mx;
| ^~
horses.cpp: In constructor 'Tprod::Tprod(int)':
horses.cpp:147:15: warning: declaration of 'prod' shadows a member of 'Tprod' [-Wshadow]
147 | Tprod(int prod = 1): prod(prod){
| ~~~~^~~~~~~~
horses.cpp:145:9: note: shadowed declaration is here
145 | int prod;
| ^~~~
horses.cpp: In constructor 'Tprod::Tprod(int)':
horses.cpp:147:15: warning: declaration of 'prod' shadows a member of 'Tprod' [-Wshadow]
147 | Tprod(int prod = 1): prod(prod){
| ~~~~^~~~~~~~
horses.cpp:145:9: note: shadowed declaration is here
145 | int prod;
| ^~~~
horses.cpp: In constructor 'Tprod::Tprod(int)':
horses.cpp:147:15: warning: declaration of 'prod' shadows a member of 'Tprod' [-Wshadow]
147 | Tprod(int prod = 1): prod(prod){
| ~~~~^~~~~~~~
horses.cpp:145:9: note: shadowed declaration is here
145 | int prod;
| ^~~~
horses.cpp: In lambda function:
horses.cpp:153:42: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
153 | return Tprod((ll)lhs.prod * rhs.prod % mod);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'int real_solve()':
horses.cpp:183:28: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
183 | ans = (ll)ans * mxprod % mod;
| ~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In instantiation of 'segment_tree<T, F>::segment_tree(int, F, T) [with T = Tprod; F = <lambda(const Tprod&, const Tprod&)>]':
horses.cpp:161:63: required from here
horses.cpp:37:33: warning: declaration of 'T_id' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
37 | 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 | T T_id; // monoid identity
| ^~~~
horses.cpp:37:27: warning: declaration of 'TT' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
37 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~^~
horses.cpp:34:7: note: shadowed declaration is here
34 | F TT; // monoid operation (always adjacent)
| ^~
horses.cpp:37:22: warning: declaration of 'n' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
37 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~~~^
horses.cpp:32:9: note: shadowed declaration is here
32 | int n, size, log;
| ^
horses.cpp:37:33: warning: declaration of 'T_id' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
37 | 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 | T T_id; // monoid identity
| ^~~~
horses.cpp:37:27: warning: declaration of 'TT' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
37 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~^~
horses.cpp:34:7: note: shadowed declaration is here
34 | F TT; // monoid operation (always adjacent)
| ^~
horses.cpp:37:22: warning: declaration of 'n' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
37 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~~~^
horses.cpp:32:9: note: shadowed declaration is here
32 | int n, size, log;
| ^
horses.cpp:37:33: warning: declaration of 'T_id' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
37 | 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 | T T_id; // monoid identity
| ^~~~
horses.cpp:37:27: warning: declaration of 'TT' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
37 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~^~
horses.cpp:34:7: note: shadowed declaration is here
34 | F TT; // monoid operation (always adjacent)
| ^~
horses.cpp:37:22: warning: declaration of 'n' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
37 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~~~^
horses.cpp:32:9: note: shadowed declaration is here
32 | int n, size, log;
| ^
horses.cpp: In instantiation of 'segment_tree<T, F>::segment_tree(int, F, T) [with T = Tmax; F = <lambda(const Tmax&, const Tmax&)>]':
horses.cpp:162:59: required from here
horses.cpp:37:33: warning: declaration of 'T_id' shadows a member of 'segment_tree<Tmax, <lambda(const Tmax&, const Tmax&)> >' [-Wshadow]
37 | 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 | T T_id; // monoid identity
| ^~~~
horses.cpp:37:27: warning: declaration of 'TT' shadows a member of 'segment_tree<Tmax, <lambda(const Tmax&, const Tmax&)> >' [-Wshadow]
37 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~^~
horses.cpp:34:7: note: shadowed declaration is here
34 | F TT; // monoid operation (always adjacent)
| ^~
horses.cpp:37:22: warning: declaration of 'n' shadows a member of 'segment_tree<Tmax, <lambda(const Tmax&, const Tmax&)> >' [-Wshadow]
37 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~~~^
horses.cpp:32:9: note: shadowed declaration is here
32 | int n, size, log;
| ^
horses.cpp:37:33: warning: declaration of 'T_id' shadows a member of 'segment_tree<Tmax, <lambda(const Tmax&, const Tmax&)> >' [-Wshadow]
37 | 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 | T T_id; // monoid identity
| ^~~~
horses.cpp:37:27: warning: declaration of 'TT' shadows a member of 'segment_tree<Tmax, <lambda(const Tmax&, const Tmax&)> >' [-Wshadow]
37 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~^~
horses.cpp:34:7: note: shadowed declaration is here
34 | F TT; // monoid operation (always adjacent)
| ^~
horses.cpp:37:22: warning: declaration of 'n' shadows a member of 'segment_tree<Tmax, <lambda(const Tmax&, const Tmax&)> >' [-Wshadow]
37 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~~~^
horses.cpp:32:9: note: shadowed declaration is here
32 | int n, size, log;
| ^
horses.cpp:37:33: warning: declaration of 'T_id' shadows a member of 'segment_tree<Tmax, <lambda(const Tmax&, const Tmax&)> >' [-Wshadow]
37 | 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 | T T_id; // monoid identity
| ^~~~
horses.cpp:37:27: warning: declaration of 'TT' shadows a member of 'segment_tree<Tmax, <lambda(const Tmax&, const Tmax&)> >' [-Wshadow]
37 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~^~
horses.cpp:34:7: note: shadowed declaration is here
34 | F TT; // monoid operation (always adjacent)
| ^~
horses.cpp:37:22: warning: declaration of 'n' shadows a member of 'segment_tree<Tmax, <lambda(const Tmax&, const Tmax&)> >' [-Wshadow]
37 | segment_tree(int n, F TT, T T_id): segment_tree(vector<T>(n, T_id), TT, T_id){}
| ~~~~^
horses.cpp:32:9: note: shadowed declaration is here
32 | int n, size, log;
| ^
horses.cpp: In instantiation of 'segment_tree<T, F>::segment_tree(const std::vector<_Tp>&, F, T) [with T = Tprod; F = <lambda(const Tprod&, const Tprod&)>]':
horses.cpp:37:81: required from 'segment_tree<T, F>::segment_tree(int, F, T) [with T = Tprod; F = <lambda(const Tprod&, const Tprod&)>]'
horses.cpp:161:63: required from here
horses.cpp:41:46: warning: declaration of 'T_id' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
41 | 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 | T T_id; // monoid identity
| ^~~~
horses.cpp:41:40: warning: declaration of 'TT' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
41 | 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:34:7: note: shadowed declaration is here
34 | F TT; // monoid operation (always adjacent)
| ^~
horses.cpp:41:46: warning: declaration of 'T_id' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
41 | 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 | T T_id; // monoid identity
| ^~~~
horses.cpp:41:40: warning: declaration of 'TT' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
41 | 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:34:7: note: shadowed declaration is here
34 | F TT; // monoid operation (always adjacent)
| ^~
horses.cpp:41:46: warning: declaration of 'T_id' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
41 | 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 | T T_id; // monoid identity
| ^~~~
horses.cpp:41:40: warning: declaration of 'TT' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-Wshadow]
41 | 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:34:7: note: shadowed declaration is here
34 | F TT; // monoid operation (always adjacent)
| ^~
horses.cpp: In instantiation of 'segment_tree<T, F>::segment_tree(const std::vector<_Tp>&, F, T) [with T = Tmax; F = <lambda(const Tmax&, const Tmax&)>]':
horses.cpp:37:81: required from 'segment_tree<T, F>::segment_tree(int, F, T) [with T = Tmax; F = <lambda(const Tmax&, const Tmax&)>]'
horses.cpp:162:59: required from here
horses.cpp:41:46: warning: declaration of 'T_id' shadows a member of 'segment_tree<Tmax, <lambda(const Tmax&, const Tmax&)> >' [-Wshadow]
41 | 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 | T T_id; // monoid identity
| ^~~~
horses.cpp:41:40: warning: declaration of 'TT' shadows a member of 'segment_tree<Tmax, <lambda(const Tmax&, const Tmax&)> >' [-Wshadow]
41 | segment_tree(const vector<T> &a, F TT, T T_id): n((int)a.s