码迷,mamicode.com
首页 >  
搜索关键字:并查集 hdu    ( 34854个结果
百度之星资格赛,hdu 4825 XOR SUM
2014 百度之星资格赛,xor sum ,显然是要建一棵0、1树 其实很简单就是二叉树,只不过为了操作简便,即程序的速度,所以就采用静态树,即不动态分配内存,使用较大的全局数组。...
分类:其他好文   时间:2014-05-26 05:47:20    阅读次数:220
hdu-1166-敌兵布阵-线段树-单点更新,区域查询
线段树的单点更新,区域查询操作。 #include #include #include #include #include using namespace std; #define lmin 1 #define rmax n #define lson l,(l+r)/2,rt<<1 #define rson (l+r)/2+1,r,rt<<1|1 #define root lmin,rmax,1...
分类:其他好文   时间:2014-05-26 05:25:50    阅读次数:187
hdu-1540-Tunnel Warfare-线段树
lmax[i]:i区间内,从左往右,连续的最大长度 rmax[i]:i区间内,从右往左,连续的最大长度 val[i]:i区间的长度。 #include #include #include #include #include #include using namespace std; #define INF 99999999 #define lmin 1 #define rmax n #def...
分类:其他好文   时间:2014-05-26 05:25:27    阅读次数:289
hdu 3081 Marriage Match II(最大流 + 二分 + 并查集)
Marriage Match II                                                                           Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Problem Descript...
分类:其他好文   时间:2014-05-26 04:40:15    阅读次数:228
HDU4430:Yukari's Birthday(二分)
Problem Description Today is Yukari's n-th birthday. Ran and Chen hold a celebration party for her. Now comes the most important part, birthday cake! But it's a big challenge for them to place n ca...
分类:其他好文   时间:2014-05-26 04:38:35    阅读次数:239
POJ 1182 食物链【并查集】
题目链接:http://poj.org/problem?id=1182 POJ 1182...
分类:其他好文   时间:2014-05-26 04:28:36    阅读次数:152
HDU4033:Regular Polygon(二分+余弦定理)
Problem Description In a 2_D plane, there is a point strictly in a regular polygon with N sides. If you are given the distances between it and N vertexes of the regular polygon, can you calculate t...
分类:其他好文   时间:2014-05-26 03:50:40    阅读次数:252
hdu-1698-Just a Hook-线段树-区域更新,区域查询
flag[i]:标记i这个区间的值。 val[i]:i这个区间的长度 #include #include #include #include #include using namespace std; #define INF 99999999 #define lmin 1 #define rmax n #define lson l,(l+r)/2,rt<<1 #define rson (l+r...
分类:其他好文   时间:2014-05-26 03:37:19    阅读次数:203
最小生成树-并查集-Kruskal-zoj-2048-special judge
大意:几个小镇要通过公路互通,已经建成了一些公路,问还需要建哪几条,并满足公路总长最小。 有多组输入,每组输入的格式是:n个城镇的坐标(x,y) m条已经修好的路(公路一端城镇编号,另一端编号)。 输出格式为:(待建公路一端城镇编号,另一端编号)特殊判题,不用在意输出顺序。 注意:相邻两组测试样例的输出要有空行。最后一组后不加空行。不然就WR,竟然还不是PE!zoj不够友好。...
分类:其他好文   时间:2014-05-25 01:48:49    阅读次数:338
百度之星资格赛 hdu 4826 Labyrinth 动态规划
百度之星资格赛...
分类:其他好文   时间:2014-05-24 21:53:36    阅读次数:231
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!