Let's go home Time Limit: 10000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1616    Accepted Submission(s): 661 Problem Description 小时候,乡愁是一枚小小的邮票,我在这头,母亲在那头. -- 余光中 集训是辛苦的.道路是坎坷的,歇息还是必须的.经过一段时间的训练,lcy决定让大家…
一条边<u,v>表示u选那么v一定被选. #include <iostream> #include <cstring> #include <cstdio> #include <algorithm> using namespace std; ; ; struct EDGE{int to,next;}edge[Maxm]; int T,m,Stack[Maxn],head[Maxn],Belong[Maxn],Id[Maxn],Dfn[Maxn],L…
Let's go home Time Limit: 10000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1940    Accepted Submission(s): 821 Problem Description 小时候,乡愁是一枚小小的邮票,我在这头,母亲在那头.                         —— 余光中 集训是辛苦的,道路是坎坷的,休息…
pid=3966" target="_blank" style="">题目链接:hdu 3966 Aragorn's Story 题目大意:给定一个棵树,然后三种操作 Q x:查询节点x的值 I x y w:节点x到y这条路径上全部节点的值添加w D x y w:节点x到y这条路径上全部节点的值降低w 解题思路:树链剖分,用树状数组维护每一个节点的值. #pragma comment(linker, "/STACK:1024000000,1…
HDU Aragorn's Story 题目链接 树抛入门裸题,这题是区间改动单点查询,于是套树状数组就OK了 代码: #include <cstdio> #include <cstring> #include <vector> #include <algorithm> using namespace std; const int N = 50005; inline int lowbit(int x) {return x&(-x);} int dep…
题链:http://acm.hdu.edu.cn/showproblem.php?pid=5282 Senior's String Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 142    Accepted Submission(s): 40 Problem Description Xuejiejie loves strings m…
主题链接:http://acm.hdu.edu.cn/showproblem.php? pid=3177 Problem Description Crixalis - Sand King used to be a giant scorpion(蝎子) in the deserts of Kalimdor. Though he's a guardian of Lich King now, he keeps the living habit of a scorpion like living und…
zhx's submissions Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 540    Accepted Submission(s): 146 Problem Description As one of the most powerful brushes, zhx submits a lot of code on many o…
职务地址:HDU 2120 这题尽管字数不多,但就是看不懂. . 意思是求最多有多少个被墙围起来的区域.显然就是求环的个数.然后用并查集求环个数就能够了. 代码例如以下: #include <iostream> #include <cstdio> #include <string> #include <cstring> #include <stdlib.h> #include <math.h> #include <ctype.h…
职务地址:HDU 3729 二分图最大匹配+按字典序输出结果. 仅仅要从数字大的開始匹配就能够保证字典序最大了.群里有人问. . 就顺手写了这题. . 代码例如以下: #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; int vis[110000], head[110000], cnt, link[110000]…