12 2012 档案
4.3.7 Sequence two
摘要:Problem Description Search is important in the acm algorithm. When you want to solve a problem by using the search method, try to cut is very important.Now give you a number sequence, include n (<=100) integers, each integer not bigger than 2^31, you want to find the first P subsequences that is 阅读全文
posted @ 2012-12-29 23:03 cssystem 阅读(175) 评论(0) 推荐(0)
4.3.3 蜘蛛牌
摘要:Problem Description蜘蛛牌是windows xp操作系统自带的一款纸牌游戏,游戏规则是这样的:只能将牌拖到比她大一的牌上面(A最小,K最大),如果拖动的牌上有按顺序排好的牌时,那么这些牌也 跟着一起移动,游戏的目的是将所有的牌按同一花色从小到大排好,为了简单起见,我们的游戏只有同一花色的10张牌,从A到10,且随机的在一行上展开,编 号从1到10,把第i号上的牌移到第j号牌上,移动距离为abs(i-j),现在你要做的是求出完成游戏的最小移动距离。 Input 第一个输入数据是T,表示数据的组数。每组数据有一行,10个输入数据,数据的范围是[1,... 阅读全文
posted @ 2012-12-28 17:56 cssystem 阅读(244) 评论(0) 推荐(0)
4.3.1 Tempter of the Bone
摘要:Problem Description The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He realized that the bone was a trap, and he tried desperately to get out of this maze.The maze was a rect 阅读全文
posted @ 2012-12-27 23:26 cssystem 阅读(154) 评论(0) 推荐(0)
4.3.4 Sudoku Killer
摘要:Problem Description 自从2006年3月10日至11日的首届数独世界锦标赛以后,数独这项游戏越来越受到人们的喜爱和重视。据说,在2008北京奥运会上,会将数独列为一个单独的项目进行比赛,冠军将有可能获得的一份巨大的奖品———HDU免费七日游外加lcy亲笔签名以及同hdu acm team合影留念的机会。所以全球人民前仆后继,为了奖品日夜训练茶饭不思。当然也包括初学者linle,不过他太笨了又没有多少耐性,只能做做最最基本的数独题,不过他还是想得到那些奖品,你能帮帮他吗?你只要把答案告诉他就可以,不用教他是怎么做的。数独游戏的规则是这样的:在一个9x9的方格中,你需要把数字1- 阅读全文
posted @ 2012-12-27 22:21 cssystem 阅读(155) 评论(0) 推荐(0)
4.3.2 Prime Ring Problem
摘要:Problem Description 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 adjacent circles should be a prime.Note: the number of first circle should always be 1. Input n (0 < n < 20). O... 阅读全文
posted @ 2012-12-26 22:57 cssystem 阅读(152) 评论(0) 推荐(0)
4.2.2 A strange lift
摘要:Problem Description There is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on every floor.The lift have just two buttons: up and down.When you at floor i,if you press the button "UP" , you will go up Ki floor,i.e,you will go t 阅读全文
posted @ 2012-12-25 23:45 cssystem 阅读(120) 评论(0) 推荐(0)
4.2.7 Waiting ten thousand years for Love
摘要:Problem Description It was ten thousand years, after Demon Lemon caught Yifenfei’s love. In order to revenge and save his love, Yifenfei have been practising sword all day long and his Kongfu skills becomes so powerful that he can kill Demon Lemon immediately. Recently, Yifenfei have found Lemon’s c 阅读全文
posted @ 2012-12-25 23:10 cssystem 阅读(180) 评论(0) 推荐(0)
4.2.3 Knight Moves
摘要:Problem Description A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n squares on a chessboard exactly once. He thinks that the most difficult part of the problem is determ 阅读全文
posted @ 2012-12-24 23:07 cssystem 阅读(164) 评论(0) 推荐(0)
4.2.8 Dating with girls(2)
摘要:Problem Description If you have solved the problem Dating with girls(1).I think you can solve this problem too.This problem is also about dating with girls. Now you are in a maze and the girl you want to date with is also in the maze.If you can find the girl, then you can date with the girl.Else the 阅读全文
posted @ 2012-12-21 00:14 cssystem 阅读(161) 评论(0) 推荐(0)
4.2.5 Red and Black
摘要:Problem Description 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 can't move on red tiles, he can move only on black tiles.Write a program to coun 阅读全文
posted @ 2012-12-20 23:00 cssystem 阅读(145) 评论(0) 推荐(0)
4.2.1 Rescue
摘要:Problem Description Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There are WALLs, ROADs, and GUARDs in the prison.Angel's friends want to save Angel. Their task is: approach Angel. We assume that "approach Ange 阅读全文
posted @ 2012-12-20 01:03 cssystem 阅读(168) 评论(0) 推荐(0)


点击右上角即可分享
微信分享提示