ACM之数据结构
对ACM竞赛中的数据结构习题进行讲解。并提出相关思考。帮助热爱ACM的伙伴们提高自己的编程,算法,数据结构能力。
GDRetop
这个作者很懒,什么都没留下…
展开
-
后缀自动机
spoj1811 #include#include#include#includeusing namespace std;#define maxn 510000struct Auto_Sufix{ int parent[maxn]; int child[maxn][26]; int len[maxn]; int last; int cn原创 2014-07-31 08:28:54 · 800 阅读 · 0 评论 -
ac自动机系列
hdu 2234 考研路茫茫——单词情结原创 2014-08-01 10:24:34 · 596 阅读 · 0 评论 -
HDU 5371 Hotaru's problem 2015多校联合训练赛7
Hotaru's problemTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 243 Accepted Submission(s): 61Problem DescriptionHotaru Ichij原创 2015-08-11 18:54:27 · 810 阅读 · 0 评论 -
hdu 5384 Danganronpa 2015多校联合训练赛#8 ac自动机
DanganronpaTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 171 Accepted Submission(s): 83Problem DescriptionDanganronpa is原创 2015-08-13 19:55:37 · 732 阅读 · 0 评论 -
HDU 5405 Sometimes Naive 2015多校联合训练赛#9 LCT 树链剖分
Sometimes NaiveTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 11 Accepted Submission(s): 6Problem DescriptionRhason Cheung h原创 2015-08-19 09:07:09 · 1368 阅读 · 0 评论 -
hdu 3436 Queue-jumpers 树状数组
Queue-jumpersTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1663 Accepted Submission(s): 393Problem DescriptionPonyo and Gar原创 2013-07-28 15:16:48 · 894 阅读 · 0 评论 -
hdu 3966 Aragorn's Story 树链剖分
#pragma comment(linker,"/STACK:100000000,100000000")#include#include#include#include#includeusing namespace std;#define maxn 70007#define lc u<<1#define rc u<<1|1#define ll long longstruct原创 2014-08-08 15:27:42 · 667 阅读 · 0 评论 -
hdu 2665 Kth number 划分树
#include#include#include#define maxn 100007using namespace std;int ord[maxn],onleft[18][maxn],val[18][maxn];void build(int fl,int l,int r){ if(l == r) return; int mid = (l+r)/2,fn=fl+1;原创 2014-08-09 08:14:58 · 761 阅读 · 0 评论 -
poj 3481 Double Queue splay
Double QueueTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10244 Accepted: 4651DescriptionThe new founded Balkan Investment Group Bank (BIG-Bank) opene原创 2014-08-11 15:52:01 · 789 阅读 · 0 评论 -
hdu 3487 Play with Chain splay tree
#include#include#include#includeusing namespace std;#define maxn 5000001int ch[maxn][2],fa[maxn],val[maxn],lz[maxn],root,cnt,size[maxn];void init(){ cnt=1; root=ch[0][0]=ch[0][1]=0;原创 2014-08-12 09:54:07 · 804 阅读 · 0 评论 -
hdu 4942 Game on S♂play 线段树
Game on S♂playTime Limit: 16000/8000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 294 Accepted Submission(s): 52Problem DescriptionUncle Fang is l原创 2014-08-15 10:35:19 · 925 阅读 · 0 评论 -
LCT link-cut tree Hdu 5002 Tree 2014鞍山网络赛
#include#include#include#includeusing namespace std;#define maxn 300007#define inf 1000000000struct Node{ Node *fa,*ch[2]; bool rev,root; int val,add,set,size; int max[2],num[2原创 2014-11-05 17:44:29 · 846 阅读 · 0 评论 -
Hdu 4010 Query on The Trees lct link-cut tree
Query on The TreesTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 2628 Accepted Submission(s): 1223Problem DescriptionWe hav原创 2014-11-05 20:01:05 · 1088 阅读 · 0 评论 -
Hdu 5052 Yaoge’s maximum profit 动态树 LCT link-cut tree
#pragma comment(linker, "/STACK:102400000,102400000")#include#include#include#includeusing namespace std;#define maxn 500007#define inf 1000000000struct Node{ Node *fa,*ch[2]; bool re原创 2014-11-06 12:32:49 · 790 阅读 · 0 评论 -
Hdu 4718 The LCIS on the Tree 动态树 LCT
The LCIS on the TreeTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 533 Accepted Submission(s): 167Problem DescriptionFor a s原创 2014-11-06 23:00:18 · 917 阅读 · 0 评论