12 2013 档案

摘要:Problem DescriptionThe police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang Dragon and Gang Snake. However, the police first needs to identify which gang a criminal belongs to. The present question is, given two criminals; do they 阅读全文
posted @ 2013-12-24 07:58 persistent codeants 阅读(205) 评论(0) 推荐(0)
摘要:Problem DescriptionRailway tickets were difficult to buy around the Lunar New Year in China, so we must get up early and join a long queue…The Lunar New Year was approaching, but unluckily the Little Cat still had schedules going here and there. Now, he had to travel by train to Mianyang, Sichuan Pr 阅读全文
posted @ 2013-12-22 14:49 persistent codeants 阅读(189) 评论(0) 推荐(0)
摘要:Problem DescriptionNchildren are sitting in a circle to play a game.The children are numbered from 1 toNin clockwise order. Each of them has a card with a non-zero integer on it in his/her hand. The game starts from theK-th child, who tells all the others the integer on his card and jumps out of the 阅读全文
posted @ 2013-12-22 11:17 persistent codeants 阅读(189) 评论(0) 推荐(0)
摘要:Problem DescriptionThere is an apple tree outside of kaka's house. Every autumn, a lot of apples will grow in the tree. Kaka likes apple very much, so he has been carefully nurturing the big apple tree.The tree has N forks which are connected by branches. Kaka numbers the forks by 1 to N and the 阅读全文
posted @ 2013-12-21 10:45 persistent codeants 阅读(262) 评论(0) 推荐(0)
摘要:Problem DescriptionFor the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with some of the cows. To keep things simple, he will take a contiguous range of cows from the milking lineup to pl 阅读全文
posted @ 2013-12-20 13:43 persistent codeants 阅读(223) 评论(0) 推荐(0)
摘要:Problem Description1. It is a Strongly Connected graph.2. Each edge of the graph belongs to a circle and only belongs to one circle.We call this graph as CACTUS.There is an example as the figure above. The left one is a cactus, but the right one isn’t. Because the edge (0, 1) in the right graph belo 阅读全文
posted @ 2013-12-02 16:40 persistent codeants 阅读(172) 评论(0) 推荐(0)
摘要:Problem DescriptionAfter coding so many days,Mr Acmer wants to have a good rest.So travelling is the best choice!He has decided to visit n cities(he insists on seeing all the cities!And he does not mind which city being his start station because superman can bring him to any city at first but only o 阅读全文
posted @ 2013-12-01 17:19 persistent codeants 阅读(197) 评论(0) 推荐(0)
摘要:Problem DescriptionEight-puzzle, which is also called "Nine grids", comes from an old game.In this game, you are given a 3 by 3 board and 8 tiles. The tiles are numbered from 1 to 8 and each covers a grid. As you see, there is a blank grid which can be represented as an 'X'. Tiles 阅读全文
posted @ 2013-12-01 14:44 persistent codeants 阅读(219) 评论(0) 推荐(0)