题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5352看题看得心好累。题目大意:给出 n 个点,依次执行 m 次操作:输入“1 x”时,表示将与 x 连通的点全部修复;输入“2 x y”,表示在 x 与 y 之间加一条边;输入“3 x y”,表示删除 ...
分类:
其他好文 时间:
2015-08-08 18:14:07
阅读次数:
172
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5348题目大意:给出一幅无向图,问是否存在一种方案,使得给每条边赋予方向后,每个点的入度与出度之差小于等于1。如不存在,输出-1;存在,则按边的输入顺序输出方向。比如:若给出第 m 条边为 u,v,则在对...
分类:
其他好文 时间:
2015-08-08 13:23:45
阅读次数:
94
Problem DescriptionXYZ is playing an interesting game called "drops". It is played on ar?cgrid. Each grid cell is either empty, or occupied by a water...
分类:
其他好文 时间:
2015-08-04 22:41:50
阅读次数:
121
Problem DescriptionIn ann?mmaze, the right-bottom corner is the exit (position(n,m)is the exit). In every position of this maze, there is either a0or ...
分类:
其他好文 时间:
2015-08-04 22:35:59
阅读次数:
221
Problem DescriptionThere arenpeople andmpairs of friends. For every pair of friends, they can choose to become online friends (communicating using onl...
分类:
其他好文 时间:
2015-08-04 22:20:52
阅读次数:
108
总算今天静下心来学算法。。DescriptionInnocent Wu follows Dumb Zhang into a ancient tomb. Innocent Wu’s at the entrance of the tomb while Dumb Zhang’s at the end of...
分类:
其他好文 时间:
2015-08-04 20:56:29
阅读次数:
146
DescriptionYour current task is to make a ground plan for a residential building located in HZXJHS. So you must determine a way to split the floor bui...
分类:
其他好文 时间:
2015-08-04 20:55:14
阅读次数:
179
Problem DescriptionThere arenapple trees planted along a cyclic road, which isLmetres long. Your storehouse is built at position0on that cyclic road.T...
分类:
其他好文 时间:
2015-08-04 20:52:18
阅读次数:
212
这题说的是 在一个 森林中 两个人在这棵树上涂颜色,黑色或者白色,第一次只能在1 号节点上涂色 第二次 只能在2上涂,以此类推, 在每个节点上只能涂黑色或者白色,并且相邻的点不能有相同的颜色,最后求不能填的人就输了。每个点周围的比他小的点 都会有一个祖先(或者是他们自己),我们知道他周围的点的祖先中...
分类:
其他好文 时间:
2015-08-02 00:48:04
阅读次数:
122
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5328题目大意:找到连续的最长的等差数列or等比数列。解题思路:1、等差等比的性质有很多。其中比较重要的一个就是解题关键:如a[i-2],a[i-1],a[i],a[i+1]这个序列。a[i-2],a[i...
分类:
其他好文 时间:
2015-08-01 11:18:34
阅读次数:
82