摘要: Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 5 16 17 阅读全文
posted @ 2019-07-23 15:28 GRedComeT 阅读(232) 评论(0) 推荐(0) 编辑
摘要: A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacen 阅读全文
posted @ 2019-07-23 13:37 GRedComeT 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Input 输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将 阅读全文
posted @ 2019-07-23 11:30 GRedComeT 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 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 c 阅读全文
posted @ 2019-07-23 10:37 GRedComeT 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 给定一个m × n (m行, n列)的迷宫,迷宫中有两个位置,gloria想从迷宫的一个位置走到另外一个位置,当然迷宫中有些地方是空地,gloria可以穿越,有些地方是障碍,她必须绕行,从迷宫的一个位置,只能走到与它相邻的4个位置中,当然在行走过程中,gloria不能走到迷宫外面去。令人头痛的是,g 阅读全文
posted @ 2019-07-23 10:18 GRedComeT 阅读(264) 评论(0) 推荐(0) 编辑
摘要: You must have heard of the Knight's Tour problem. In that problem, a knight is placed on an empty chess board and you are to determine whether it can 阅读全文
posted @ 2019-07-22 21:05 GRedComeT 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S (S<101)毫升 ( 阅读全文
posted @ 2019-07-21 22:00 GRedComeT 阅读(137) 评论(0) 推荐(0) 编辑
摘要: George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to the origina 阅读全文
posted @ 2019-07-21 21:21 GRedComeT 阅读(191) 评论(0) 推荐(0) 编辑
摘要: Background The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around the world. 阅读全文
posted @ 2019-07-21 15:32 GRedComeT 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a numb 阅读全文
posted @ 2019-07-21 14:00 GRedComeT 阅读(158) 评论(0) 推荐(0) 编辑