摘要:
可持久化并查集模板(启发式合并) #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pll; typedef pair<int,pll> plll; const int N 阅读全文
posted @ 2020-08-23 20:51
朝暮不思
阅读(159)
评论(0)
推荐(0)
摘要:
#include <bits/stdc++.h> #define INF (1<<25) #define MAXN 200005 #define getSZ(p) (p?p->sz:0) #define getSUM(p) (p?p->sum:0) using namespace std; type 阅读全文
posted @ 2020-08-23 19:40
朝暮不思
阅读(101)
评论(0)
推荐(0)
摘要:
主要是思想是对顶堆,将最大的雷电法术的放入加强集合,其他放入普通集合 之后维护两种法术的集合大小,因为每次操作最多只会将大小与真正的大小差1,因此判断更新即可 具体注释看代码,细节比较多,主要是注意判断集合是否非空 #include<bits/stdc++.h> using namespace st 阅读全文
posted @ 2020-08-23 15:22
朝暮不思
阅读(177)
评论(0)
推荐(0)
摘要:
线段树维护区间取反和区间覆盖操作。 注意他们的优先级。 #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pll; typedef pair<int,pll> plll; 阅读全文
posted @ 2020-08-23 09:52
朝暮不思
阅读(143)
评论(0)
推荐(0)

浙公网安备 33010602011771号