暑假练习
文章平均质量分 60
npuyan2
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
三、搜索和二分 [Cloned] T - 搜索
原题:Background Mr Somurolov, fabulous chess-gamer indeed, asserts that no one else but him can move knights from one position to another so fast. Can you beat him? The Problem Your task is to write...原创 2018-08-05 10:13:29 · 258 阅读 · 0 评论 -
四、学算法啦啦啦——dp,并查集等 [Cloned] F - 最长公共子序列 以及最后十二个
原题:A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = < x1, x2, ..., xm > another sequence Z = < z1, z2, ..., zk > ...原创 2018-08-05 11:14:19 · 266 阅读 · 0 评论 -
四、学算法啦啦啦——dp,并查集等 [Cloned] E - 01背包
原题:Bessie has gone to the mall's jewelry store and spies a charm bracelet. Of course, she'd like to fill it with the best charms possible from the N (1 ≤ N ≤ 3,402) available charms. Each charm i in...原创 2018-08-05 11:09:32 · 170 阅读 · 0 评论 -
四、学算法啦啦啦——dp,并查集等 [Cloned] D - 完全背包
原题:John never knew he had a grand-uncle, until he received the notary's letter. He learned that his late grand-uncle had gathered a lot of money, somewhere in South-America, and that John was the on...原创 2018-08-05 11:06:38 · 190 阅读 · 0 评论 -
四、学算法啦啦啦——dp,并查集等 [Cloned] C - 钉子和小球
原题:有一个三角形木板,竖直立放,上面钉着n(n+1)/2颗钉子,还有(n+1)个格子(当n=5时如图1)。每颗钉子和周围的钉子的距离都等于d,每个格子的宽度也都等于d,且除了最左端和最右端的格子外每个格子都正对着最下面一排钉子的间隙。 让一个直径略小于d的小球中心正对着最上面的钉子在板上自由滚落,小球每碰到一个钉子都可能落向左边或右边(概率各1/2),且球的中心还会正对着下一颗将要碰上的钉...原创 2018-08-05 11:01:07 · 179 阅读 · 0 评论 -
四、学算法啦啦啦——dp,并查集等 [Cloned] A - 数字三角形
原题: 7 3 8 8 1 0 2 7 4 44 5 2 6 5(Figure 1)Figure 1 shows a number triangle. Write a program that calculates the highest sum of numbers passed on a route ...原创 2018-08-05 10:45:26 · 163 阅读 · 0 评论 -
三、搜索和二分 [Cloned] Y - 搜索
原题:Given a set of sticks of various lengths, is it possible to join them end-to-end to form a square?题意:给出一组不定长度的木棍,问这些全部的木棍能否以一定顺序首尾相连成一个正方形。题解:因为是全部木棍首尾相连,所以剪枝条件就有木棍总长度必须是4的倍数,木棍中最长的一根不能超过...原创 2018-08-05 10:31:34 · 240 阅读 · 0 评论 -
三、搜索和二分 [Cloned V - 搜索
原题:Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a piece of wall. A blockhouse is a small cast...原创 2018-08-05 10:26:43 · 167 阅读 · 0 评论 -
三、搜索和二分 [Cloned] U - 搜索
原题:There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he...原创 2018-08-05 10:18:48 · 205 阅读 · 0 评论
分享