Jin Ge Jin Qu hao (If you smiled when you see the title, this problem is for you ^_^) For those who don’t know KTV, see: http://en.wikipedia.org/wiki/ ...
分类:
其他好文 时间:
2017-08-26 10:19:59
阅读次数:
212
Unidirectional TSP Problems that require minimum paths through some domain appear in many different areas of computer science. For example, one of the ...
分类:
其他好文 时间:
2017-08-26 10:18:34
阅读次数:
141
The Tower of Babylon Perhaps you have heard of the legend of the Tower of Babylon. Nowadays many details of this tale have been forgotten. So now, in ...
分类:
其他好文 时间:
2017-08-25 20:31:02
阅读次数:
209
被打哭了......神特么kmp,还能这么用!看来我理解的还不够透彻,这里最神奇的就是只有相同的字串才能往下延伸,而"i-f[i]"就正好是前面空出来的模板块,也就是f[i]中不计数的那块,而字符串都是从0开始的,对应的往下加一个却正好成立构成倍数关系 ,很神奇,这是什么,规律? ...
分类:
其他好文 时间:
2017-08-25 19:58:25
阅读次数:
147
DFS+并查集 如果只用DFS的话会超时,用并查集剪枝,和起点终点不联通的点就不用跑了 这题有好多人写了博客,但是我觉得我的代码写的比较通俗易懂所以就贴上来了,我觉得我写代码的目标就是让任何人都能看懂,越小白越好(其实是因为真小白吧…… ...
分类:
其他好文 时间:
2017-08-24 22:32:39
阅读次数:
138
https://vjudge.net/problem/UVA-1648 设上升x层,列个方程解出来,再把x带回去 ...
分类:
其他好文 时间:
2017-08-24 19:44:47
阅读次数:
127
链接: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=989 题意&题解: 紫书P365 代码: ...
分类:
其他好文 时间:
2017-08-24 14:53:19
阅读次数:
156
Fixing the Great Wall UVA - 1336 题意:修长城,初始位置为fp,n个点要修,初始每个点修缮费用为ci,单位时间增加费用di,问最少费用。 区间dp 和送外卖那个差不多~ 有一个细节,输入不加!=EOF的话会超时(虽然题目说了以00结束) 1 #include <cst ...
分类:
其他好文 时间:
2017-08-24 12:38:49
阅读次数:
165
Dropping water balloons UVA - 10934 题意: 可以说是很懵比了。。。 和上一个题有相似之处,就是我们需要判断的结果是一个未知量。如本题气球的硬度,可能为1,2,3, ,n,n+1。 最坏情况需要测到n楼才知道结果。题目要求确定气球硬度,我们要考虑所有情况。【即我们要 ...
分类:
其他好文 时间:
2017-08-24 12:30:54
阅读次数:
242