洛谷P3372_template
参考:将线段树封装成模板
线段树封装成模板需要C++20 :)
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
template < typename T, auto op, T e, typename F, auto mapping, auto composition,
F e1 >
class segtree
{
int n;
vector< T > v;
vector< F >
more...