上一页 1 2 3 4 5 6 7 8 9 ··· 19 下一页
摘要: Problem DescriptionXiao Ming and Xiao Bao are playing a simple Numbers game. In a round Xiao Ming can choose to write down a number, or ask Xiao Bao what the kth great number is. Because the number written by Xiao Ming is too much, Xiao Bao is feeling giddy. Now, try to help Xiao Bao.InputThere are 阅读全文
posted @ 2013-08-27 13:42 forevermemory 阅读(162) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionConsider a binary operation ☆ defined on digits 0 and 1, 0 if the two operand are equal, 1 if they differ. A binary operation ⊙ is a generalization of ☆to positive integers, The result of a⊙b is defined in the following way: aligning the binary code of b under the binary 阅读全文
posted @ 2013-08-25 11:46 forevermemory 阅读(718) 评论(0) 推荐(0) 编辑
摘要: Fire NetTime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 3Accepted Submission(s) : 1Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem DescriptionSuppose that we have a square city with straight streets. A map of a city is a square board 阅读全文
posted @ 2013-08-17 19:09 forevermemory 阅读(223) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionLast year summer Max straveled to California for his vacation. He had a great time there: took many photos, visited famous universities, enjoyed beatiful beaches and tasted various delicius foods. It is such a good trip that Max plans to travel there one more time this year. Max i 阅读全文
posted @ 2013-08-16 23:39 forevermemory 阅读(212) 评论(0) 推荐(0) 编辑
摘要: Problem Description“连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规则:在一个棋盘中,放了很多的棋子。如果某两个相同的棋子,可以通过一条线连起来(这条线不能经过其它棋子),而且线的转折次数不超过两次,那么这两个棋子就可以在棋盘上消去。不好意思,由于我以前没有玩过连连看,咨询了同学的意见,连线不能从外面绕过去的,但事实上这是错的。现在已经酿成大祸,就只能将错就错了,连线不能从外围绕过。玩家鼠标先后点击两块棋子,试图将他们消去,然后游戏的后台判断这两个方格能不能消去。现在你的任务就是写这个后台程序。Input输入数据有多组。每组数据的第一行有两个正整数n,m 阅读全文
posted @ 2013-08-14 00:11 forevermemory 阅读(494) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionThe 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 recta 阅读全文
posted @ 2013-08-12 11:11 forevermemory 阅读(167) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionZty is a man that always full of enthusiasm. He wants to solve every kind of difficulty ACM problem in the world. And he has a habit that he does not like to solvea problem that is easy than problem he had solved. Now yifenfei give him n difficulty problems, and tell him their rel 阅读全文
posted @ 2013-08-12 08:57 forevermemory 阅读(309) 评论(1) 推荐(0) 编辑
摘要: Problem Description一个规则的实心十二面体,它的 20个顶点标出世界著名的20个城市,你从一个城市出发经过每个城市刚好一次后回到出发的城市。Input前20行的第i行有3个数,表示与第i个城市相邻的3个城市.第20行以后每行有1个数m,m=1.m=0退出.Output输出从第m个城市出发经过每个城市1次又回到m的所有路线,如有多条路线,按字典序输出,每行1条路线.每行首先输出是第几条路线.然后个一个: 后列出经过的城市.参看Sample outputSample Input2 5 201 3 122 4 103 5 81 4 65 7 196 8 174 7 98 10 16 阅读全文
posted @ 2013-08-11 22:04 forevermemory 阅读(277) 评论(0) 推荐(0) 编辑
摘要: Problem Description前文再续,书接上一题。话说当上小面的司机的Lele在施行他的那一套拉客法则以后,由于走的路线太长,油费又贵,不久便亏本了。(真可怜~)于是他又想了一个拉客的办法。对于每一次拉客活动,他一次性把乘客都拉上车(当然也不会超过7个,因为位置只有7个)。然后,Lele计算出一条路线(出于某些目的,Lele只把车上乘客的目的地作为这条路线上的站点),把所有乘客都送到目的地(在这路线上不拉上其他乘客),并且使总路线长度最短。不过Lele每次都要花很多时间来想路线,你能写个程序帮他嘛? Input本题目包含多组测试。最后一组测试后有一个0代表结束。每组测试第一行有一个整 阅读全文
posted @ 2013-08-11 14:24 forevermemory 阅读(279) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionGiven a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t=4, n=6, and the list is [4,3,2,2,1,1], then there are four different sums that equal 4: 4,3+1,2+2, and 2+1+1.(A number can be used within a su 阅读全文
posted @ 2013-08-10 12:00 forevermemory 阅读(206) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 19 下一页