上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 20 下一页
摘要: Problem Description上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路)。小希现在把她的设计图给你,让你帮忙判断她的设计图是否符合她的设计思路。比如下面的例子,前两个是符合条件的,但是最后一个却有两种方法从5到达8。Input输入包含多组数据,每组数据是一个以0 0结尾的整数对 阅读全文
posted @ 2013-10-31 16:46 persistent codeants 阅读(388) 评论(0) 推荐(0)
摘要: Problem DescriptionToday is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at least. You have to notice that not all the friends know each other, and all the friends do not want to stay with strangers.One important rule 阅读全文
posted @ 2013-10-30 20:29 persistent codeants 阅读(248) 评论(0) 推荐(0)
摘要: Problem DescriptionYou, as a member of a development team for a new spell checking program, are to write a module that will check the correctness of given words using a known dictionary of all correct words in all their forms.If the word is absent in the dictionary then it can be replaced by correct 阅读全文
posted @ 2013-10-30 19:46 persistent codeants 阅读(284) 评论(0) 推荐(0)
摘要: Problem Description年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5000金币就行了。"探险家就跑到大祭司那里,向他要求皮袄或水晶球,大祭司要他用金币来换,或者替他弄来其他的东西,他可以降低价格。探险家于是又跑到其他地方,其他人也提出了类似的要求,或者直接用金币换,或者找到其他东西就可以降低价格。不过探险家没必要用多样东 阅读全文
posted @ 2013-10-30 09:48 persistent codeants 阅读(336) 评论(0) 推荐(0)
摘要: Problem DescriptionYou have devised a new encryption technique which encodes a message by inserting between its characters randomly generated strings in a clever way. Because of pending patent issues we will not discuss in detail how the strings are generated and inserted into the original message. 阅读全文
posted @ 2013-10-29 22:19 persistent codeants 阅读(300) 评论(0) 推荐(0)
摘要: Problem DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence is sorted in ascending order. For the input sequence9 1 0 5 4 ,Ultra-QuickSort produces the 阅读全文
posted @ 2013-10-29 11:39 persistent codeants 阅读(187) 评论(0) 推荐(0)
摘要: Problem DescriptionYou may have heard that no two snowflakes are alike. Your task is to write a program to determine whether this is really true. Your program will read information about a collection of snowflakes, and search for a pair that may be identical. Each snowflake has six arms. For each sn 阅读全文
posted @ 2013-10-28 17:57 persistent codeants 阅读(266) 评论(0) 推荐(0)
摘要: Problem DescriptionFarmer John'sNcows (1 ≤N≤ 100,000) share many similarities. In fact, FJ has been able to narrow down the list of features shared by his cows to a list of onlyKdifferent features (1 ≤K≤ 30). For example, cows exhibiting feature #1 might have spots, cows exhibiting feature #2 mi 阅读全文
posted @ 2013-10-28 16:52 persistent codeants 阅读(263) 评论(0) 推荐(0)
摘要: Problem DescriptionStockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stockbrokers to give your employer the tactical edge in the stock market. For maximum effect, you have to spread the rumours in the fastest possible 阅读全文
posted @ 2013-10-28 13:49 persistent codeants 阅读(208) 评论(0) 推荐(0)
摘要: Problem DescriptionOrganizing a programming contest is not an easy job. To avoid making the problems too difficult, the organizer usually expect the contest result satisfy the following two terms:1. All of the teams solve at least one problem.2. The champion (One of those teams that solve the most p 阅读全文
posted @ 2013-10-26 20:05 persistent codeants 阅读(231) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 20 下一页