salesman.cpp:29:20: error: 'auto' parameter not permitted in this context
29 | template <class S, auto op, auto e> struct segtree {
| ^~~~
salesman.cpp:29:29: error: 'auto' parameter not permitted in this context
29 | template <class S, auto op, auto e> struct segtree {
| ^~~~
salesman.cpp:30:19: error: 'is_convertible_v' was not declared in this scope
30 | static_assert(is_convertible_v<decltype(op), function<S(S, S)>>,
| ^~~~~~~~~~~~~~~~
salesman.cpp:30:36: error: expected primary-expression before 'decltype'
30 | static_assert(is_convertible_v<decltype(op), function<S(S, S)>>,
| ^~~~~~~~~~~~
salesman.cpp:30:36: error: expected ',' before 'decltype'
30 | static_assert(is_convertible_v<decltype(op), function<S(S, S)>>,
| ^~~~~~~~~~~~
| ,
salesman.cpp:30:36: error: expected string-literal before 'decltype'
30 | static_assert(is_convertible_v<decltype(op), function<S(S, S)>>,
| ^~~~~~~~~~~~
salesman.cpp:30:36: error: expected ')' before 'decltype'
30 | static_assert(is_convertible_v<decltype(op), function<S(S, S)>>,
| ~ ^~~~~~~~~~~~
| )
salesman.cpp:32:19: error: 'is_convertible_v' was not declared in this scope
32 | static_assert(is_convertible_v<decltype(e), function<S()>>,
| ^~~~~~~~~~~~~~~~
salesman.cpp:32:36: error: expected primary-expression before 'decltype'
32 | static_assert(is_convertible_v<decltype(e), function<S()>>,
| ^~~~~~~~~~~
salesman.cpp:32:36: error: expected ',' before 'decltype'
32 | static_assert(is_convertible_v<decltype(e), function<S()>>,
| ^~~~~~~~~~~
| ,
salesman.cpp:32:36: error: expected string-literal before 'decltype'
32 | static_assert(is_convertible_v<decltype(e), function<S()>>,
| ^~~~~~~~~~~
salesman.cpp:32:36: error: expected ')' before 'decltype'
32 | static_assert(is_convertible_v<decltype(e), function<S()>>,
| ~ ^~~~~~~~~~~
| )
salesman.cpp: In function 'void solution(int)':
salesman.cpp:168:22: note: invalid template non-type parameter
168 | segtree<ll, op, e> stD(SEG_MAX), stU(SEG_MAX);
| ^
salesman.cpp:168:22: note: invalid template non-type parameter
salesman.cpp: In lambda function:
salesman.cpp:170:13: error: request for member 'set' in 'stD', which is of non-class type 'int'
170 | stD.set(x, v + x * D);
| ^~~
salesman.cpp:171:13: error: request for member 'set' in 'stU', which is of non-class type 'int'
171 | stU.set(x, v - x * U);
| ^~~
salesman.cpp: In lambda function:
salesman.cpp:174:24: error: request for member 'prod' in 'stD', which is of non-class type 'int'
174 | return max(stD.prod(0, x) - x * D, stU.prod(x + 1, SEG_MAX) + x * U);
| ^~~~
salesman.cpp:174:48: error: request for member 'prod' in 'stU', which is of non-class type 'int'
174 | return max(stD.prod(0, x) - x * D, stU.prod(x + 1, SEG_MAX) + x * U);
| ^~~~
salesman.cpp: In function 'void solution(int)':
salesman.cpp:166:8: warning: unused variable 'ans' [-Wunused-variable]
166 | ll ans = 0;
| ^~~