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(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(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: In constructor 'Tmax::Tmax(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(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(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(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(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(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 lambda function:
horses.cpp:154:42: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
154 | return Tprod((ll)lhs.prod * rhs.prod % mod);
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
horses.cpp: In function 'int real_solve()':
horses.cpp:184:28: warning: conversion from 'll' {aka 'long long int'} to 'int' may change value [-Wconversion]
184 | 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: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(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(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(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: 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:38:81: required from 'segment_tree<T, F>::segment_tree(int, F, T) [with T = Tprod; F = <lambda(const Tprod&, const Tprod&)>]'
horses.cpp:162:63: required from here
horses.cpp:42:46: warning: declaration of 'T_id' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-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<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-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:42:46: warning: declaration of 'T_id' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-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<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-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:42:46: warning: declaration of 'T_id' shadows a member of 'segment_tree<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-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<Tprod, <lambda(const Tprod&, const Tprod&)> >' [-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: 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:38:81: required from 'segment_tree<T, F>::segment_tree(int, F, T) [with T = Tmax; F = <lambda(const Tmax&, const Tmax&)>]'
horses.cpp:163:59: required from here
horses.cpp:42:46: warning: declaration of 'T_id' shadows a member of 'segment_tree<Tmax, <lambda(const Tmax&, const Tmax&)> >' [-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<Tmax, <lambda(const Tmax&, const Tmax&)> >' [-Wshadow]
42 | segment_tree(const vector<T> &a, F TT, T T_id): n((int)a.s