DescriptionOn Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different fr...
分类:
Web程序 时间:
2015-05-03 23:27:57
阅读次数:
195
George is a cat, so he loves playing very much.Vitaly put n cards in a row in front of George. Each card has one integer written on it. All cards had distinct numbers written on them. Let’s number the...
分类:
编程语言 时间:
2015-04-29 21:54:23
阅读次数:
211
To The MaxProblem DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-...
分类:
其他好文 时间:
2015-04-27 21:25:15
阅读次数:
100
这道题综合性挺强的,又牵扯到数论,又有线段树。线段树维护的信息就是区间中有多少个人没跳出去,然后计算出下一个人是剩下的人中第几个。我在这调程序调了好久,就是那个模来模去的弄得我头晕。不过题确实是好题,给赞。 1 #include 2 #include 3 #include 4 #include...
分类:
其他好文 时间:
2015-04-26 15:02:37
阅读次数:
120
HDU 1142 A Walk Through the Forest (Dijkstra + 记忆化搜索 好题)...
分类:
其他好文 时间:
2015-04-25 22:47:28
阅读次数:
176
POJ 3249 Test for Job (记忆化搜索 好题)...
分类:
其他好文 时间:
2015-04-25 21:16:45
阅读次数:
121
看第一眼以为这个题不好做,把过多的时间浪费在第二题上了。《彩色的树》这题是一个顶点染色的问题,用点dfs去不断染色,然后记录子树的个数就好,题目的内容如下:
给定一棵n个节点的树,节点编号为1, 2, …, n。树中有n - 1条边,任意两个节点间恰好有一条路径。这是一棵彩色的树,每个节点恰好可以染一种颜色。初始时,所有节点的颜色都为0。现在需要实现两种操作:
改变节点x的颜色为y;...
分类:
其他好文 时间:
2015-04-25 18:24:49
阅读次数:
128
Constructing Roads In JGShining's KingdomProblem DescriptionJGShining's kingdom consists of 2n(n is no more than 500,000) small cities which are...
分类:
其他好文 时间:
2015-04-24 00:57:02
阅读次数:
154
重温世界杯Problem Description世界杯结束了,意大利人连本带利的收回了法国人6年前欠他们的债,捧起了大力神杯,成就了4星意大利.世界杯虽然结束了,但是这界世界杯给我们还是留下许多值得回忆的东西.比如我们听到了黄名嘴的3分钟激情解说,我们懂得了原来可以向同一个人...
分类:
其他好文 时间:
2015-04-22 11:11:27
阅读次数:
131