- 博客(3)
- 收藏
- 关注
原创 bzoj1036 树的统计 树链剖分
又是一道裸题,刚学会树链剖分,存个模版。#include<iostream>#include<cstdio>using namespace std;struct bian{ int to;}b[60005];int fst[30005],nxt[60005];int tot=1;void build(int f,int t){ b[++tot].to=t; n
2016-08-16 15:31:28 456
原创 poj2104 K-th number 主席树模版
这个题以前分块做,学了主席树(抄模版),存一下;#include<iostream>#include<cstdio>#include<algorithm>using namespace std;int a[100005];int L[100005];struct zxs{ int l,r,cnt;}tree[5000005];int tot=1;int rt[100005]
2016-08-16 09:54:07 354
原创 bzoj1001 狼抓兔子 网络流(水)
这道题正解不是网络流,但是网络流(最小割)在这种图上跑得飞起,就能水(2016.8.12)。直接贴代码。#include<iostream>#include<cstdio>#include<queue>using namespace std;struct bian{ int to,cap;}b[6000005];int s,t;int fst[1000005],nxt[6000
2016-08-12 16:05:13 530
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人