数据结构
此间无物
这个作者很懒,什么都没留下…
展开
-
李超线段树
「数据结构」李超线段树原创 2022-04-25 14:07:32 · 602 阅读 · 0 评论 -
线段树与树状数组
文章目录树状数组线段树树状数组P3374 【模板】树状数组 1#include <bits/stdc++.h>using namespace std;int n,m;typedef long long ll;ll tre[500001],k,a;int opt;ll lowbit(ll x){ return (x & (-x));}void add(ll x,ll k){ for ( ; x <= n; x += lowbit(x)) {原创 2021-10-26 22:10:13 · 63 阅读 · 0 评论 -
st表总结
P3865 【模板】ST 表#include <bits/stdc++.h>using namespace std;int n,m,x[1000001],lg[1000001],st[1000001][50];inline int read(){ int xx=0,f=1;char ch=getchar(); while (ch<'0'||ch>'9'){if (ch=='-') f=-1;ch=getchar();} while (ch>='0'&原创 2021-10-26 21:10:06 · 162 阅读 · 0 评论 -
pb_ds总结
文章目录平衡树平衡树好的博客原创 2021-10-23 12:29:29 · 43 阅读 · 0 评论 -
树链剖分总结
P3384 【模板】轻重链剖分/树链剖分#include <bits/stdc++.h>using namespace std;typedef long long ll;ll mo,va[100001],nva[100001];int n,m,r,fa[100001],top[100001],sz[100001],timer,dfn[100001],depth[100001],hson[100001];vector <int> e[100001];ll sum[400原创 2021-10-22 21:34:49 · 65 阅读 · 0 评论