https://www.luogu.org/problemnew/show/P3834 #include<cstdio> #include<iostream> #include<algorithm> #include<cstring> using namespace std; ; #define RR freopen("gg.in", "r", stdin) int n, m; int cnt; struct node…
那是上上周...也是重构了四遍...后来GG了...今天又拾起,搞了搞终于过了... 好吧就是个线段树,公式懒得推了https://www.cnblogs.com/Jackpei/p/10693561.html大致差不错 #include<iostream> #include<cstdio> #define R register int #define ls (tr<<1) #define rs (tr<<1|1) using namespace std;…