随笔分类 -  搜索(BFS DFS)

摘要:Finding NemoTime Limit:2000MSMemory Limit:30000KTotal Submissions:6985Accepted:1598DescriptionNemo is a naughty boy. One day he went into the deep sea all by himself. Unfortunately, he became lost and couldn't find his way home. Therefore, he sent a signal to his father, Marlin, to ask for help. 阅读全文
posted @ 2013-08-13 10:35 Jack Ge 阅读(1039) 评论(0) 推荐(0) 编辑
摘要:唉,可爱的小朋友Time Limit: 10000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 819Accepted Submission(s): 220Problem Description唉,小朋友是比较麻烦的。在一个幼儿园里,老师要上一节游戏课,有N个小朋友要玩游戏,做游戏时要用小皮球,但是幼儿园里只有M个小皮球,而且有些小朋友不喜欢和一些小朋友在一起玩,而只喜欢和另一些小朋友一起玩,比如傻妞只喜欢和傻瓜,傻根,傻蛋们一起玩,傻根又不喜欢和傻蛋一起玩,傻蛋喜欢和傻子 阅读全文
posted @ 2013-07-31 19:28 Jack Ge 阅读(784) 评论(0) 推荐(0) 编辑
摘要:Sum It UpTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2982Accepted Submission(s): 1493Problem 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 阅读全文
posted @ 2013-07-25 11:22 Jack Ge 阅读(630) 评论(0) 推荐(0) 编辑
摘要:Park VisitTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 523Accepted Submission(s): 236Problem DescriptionClaire and her little friend, ykwd, are travelling in Shevchenko's Park! The park is beautiful - but large, indeed. N feature spots in th 阅读全文
posted @ 2013-07-24 12:25 Jack Ge 阅读(1842) 评论(2) 推荐(0) 编辑
摘要:SudokuTime Limit:2000MSMemory Limit:65536KTotal Submissions:11694Accepted:5812Special JudgeDescriptionSudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the cells are written decimal digits from 1 to 9. The ot 阅读全文
posted @ 2013-07-13 00:29 Jack Ge 阅读(364) 评论(0) 推荐(0) 编辑
摘要:The Pilots Brothers' refrigeratorTime Limit:1000MSMemory Limit:65536KTotal Submissions:15136Accepted:5660Special JudgeDescriptionThe game “The Pilots Brothers: following the stripy elephant” has a quest where a player needs to open a refrigerator.There are 16 handles on the refrigerator door. Ev 阅读全文
posted @ 2013-06-17 13:00 Jack Ge 阅读(520) 评论(0) 推荐(0) 编辑
摘要:The Troublesome FrogTime Limit:5000MSMemory Limit:100000KTotal Submissions:9126Accepted:2749Case Time Limit:500MSDescriptionIn Korea, the naughtiness of the cheonggaeguri, a small frog, is legendary. This is a well-deserved reputation, because the frogs jump through your rice paddy at night, flatten 阅读全文
posted @ 2013-05-22 14:22 Jack Ge 阅读(608) 评论(0) 推荐(0) 编辑
摘要:Pushing BoxesTime Limit:2000MSMemory Limit:131072KTotal Submissions:3943Accepted:1394Special JudgeDescriptionImagine you are standing inside a two-dimensional maze composed of square cells which may or may not be filled with rock. You can move north, south, east or west one cell at a step. These mov 阅读全文
posted @ 2013-05-10 09:23 Jack Ge 阅读(299) 评论(0) 推荐(0) 编辑
摘要:King Arthur's KnightsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1358Accepted Submission(s): 583Special JudgeProblem DescriptionI am the bone of my sword. Steel is my body, and the fire is my blood.- from Fate / Stay NightYou must have know 阅读全文
posted @ 2013-05-01 21:48 Jack Ge 阅读(349) 评论(0) 推荐(0) 编辑
摘要:[1443] Weiqihttp://ac.nbutoj.com/Problem/view.xhtml?id=1443时间限制: 1000 ms 内存限制: 65535 K问题描述Have you ever played Weiqi?In a composition, there exist two kinds of chess pieces black and white.The problem is so easy, can you find out how many white pieces are encircled by blacks?输入First line will contai 阅读全文
posted @ 2013-04-30 23:32 Jack Ge 阅读(216) 评论(0) 推荐(0) 编辑
摘要:连连看Time Limit : 20000/10000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 109Accepted Submission(s) : 33Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem Description“连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规则:在一个棋盘中,放了很多的棋子。如果某两个相同的棋子,可以通过一条线连起来(这条线不能经过其它棋子),而且线的转折次数不超过两 阅读全文
posted @ 2013-04-28 12:27 Jack Ge 阅读(354) 评论(0) 推荐(0) 编辑
摘要:Escape from TetrisTime Limit : 12000/4000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 11Accepted Submission(s) : 5Problem Description由于整日整夜地对着这个棋盘,Lele终于走火入魔。每天一睡觉,他就会梦到自己会被人被扔进一个棋盘中,一直找不到出路,然后从梦中惊醒。久而久之,Lele被搞得精神衰弱。梦境是否会成为现实,谁也说不准,不过不怕一万只怕万一。现在Lele每次看到一个棋盘,都会想象一下自己被关 阅读全文
posted @ 2013-04-19 15:33 Jack Ge 阅读(368) 评论(0) 推荐(0) 编辑
摘要:Tobo or not ToboTime Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 9Accepted Submission(s) : 6Problem DescriptionThe game of Tobo is played on a plastic board designed into a 3 × 3 grid with cells numbered from 1 to 9 as shown in figure (a). The g 阅读全文
posted @ 2013-04-19 14:56 Jack Ge 阅读(439) 评论(0) 推荐(0) 编辑
摘要:无题ITime Limit : 10000/10000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 16Accepted Submission(s) : 8Problem Description一天机器人小A在玩一个简单的智力游戏,这个游戏是这样的,在一个4*4的矩阵中分别有4个1,4个2,4个3和4个4分别表示4种不同的东西,每一步小A可以把同一行的4个数往左移或者往右移一步或者把同一列的4个数字往上移或者往下移一步(1,2,3,4往左移后是2,3,4,1),小A现在想知道进过最少的几 阅读全文
posted @ 2013-04-19 14:12 Jack Ge 阅读(370) 评论(0) 推荐(0) 编辑
摘要:The Rotation GameTime Limit : 45000/15000ms (Java/Other)Memory Limit : 150000/150000K (Java/Other)Total Submission(s) : 7Accepted Submission(s) : 6Problem DescriptionThe rotation game uses a # shaped board, which can hold 24 pieces of square blocks (see Fig.1). The blocks are marked with symbols 1, 阅读全文
posted @ 2013-04-19 12:53 Jack Ge 阅读(919) 评论(0) 推荐(0) 编辑
摘要:PuzzleTime Limit : 6000/3000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 15Accepted Submission(s) : 8Problem DescriptionOne day, Resty gets a very interesting puzzle. Eve said that she will make a cake for Resty if he solved this puzzle, so Resty asks you to help him 阅读全文
posted @ 2013-04-19 11:49 Jack Ge 阅读(412) 评论(0) 推荐(0) 编辑
摘要:Children of the Candy CornTime Limit:1000MSMemory Limit:65536KTotal Submissions:7551Accepted:3292DescriptionThe cornfield maze is a popular Halloween treat. Visitors are shown the entrance and must wander through the maze facing zombies, chainsaw-wielding psychopaths, hippies, and other terrors on t 阅读全文
posted @ 2013-04-16 14:34 Jack Ge 阅读(223) 评论(0) 推荐(0) 编辑
摘要:Dungeon MasterTime Limit:1000MSMemory Limit:65536KTotal Submissions:13187Accepted:5113DescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit north, south, e 阅读全文
posted @ 2013-04-16 12:48 Jack Ge 阅读(383) 评论(0) 推荐(0) 编辑
摘要:Catch That CowTime Limit:2000MSMemory Limit:65536KTotal Submissions:35043Accepted:10800DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a pointN(0 ≤N≤ 100,000) on a number line and the cow is at a pointK(0 ≤K≤ 100,000) on the 阅读全文
posted @ 2013-04-16 12:25 Jack Ge 阅读(1454) 评论(0) 推荐(0) 编辑
摘要:A Famous GridTime Limit: 10000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 798Accepted Submission(s): 318Problem DescriptionMr. B has recently discovered the grid named "spiral grid".Construct the grid like the following figure. (The grid is actually 阅读全文
posted @ 2013-04-16 12:04 Jack Ge 阅读(490) 评论(0) 推荐(0) 编辑

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