上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 20 下一页
摘要: Problem DescriptionYou are given two pots, having the volume ofAandBliters respectively. The following operations can be performed:FILL(i) fill the poti(1 ≤i≤ 2) from the tap;DROP(i) empty the potito the drain;POUR(i,j) pour from potito potj; after this operation either the potjis full (and there ma 阅读全文
posted @ 2013-10-12 12:46 persistent codeants 阅读(248) 评论(0) 推荐(0)
摘要: DescriptionEverybody is fond of computers, but buying a new one is always a money challenge. Fortunately, there is always a convenient way to deal with. You can replace your computer and get a brand new one, thus saving some maintenance cost. Of course, you must pay a fixed cost for each new compute 阅读全文
posted @ 2013-10-12 10:48 persistent codeants 阅读(285) 评论(0) 推荐(0)
摘要: DescriptionDearboy was so busy recently that now he has piles of clothes to wash. Luckily, he has a beautiful and hard-working girlfriend to help him. The clothes are in varieties of colors but each piece of them can be seen as of only one color. In order to prevent the clothes from getting dyed in 阅读全文
posted @ 2013-10-12 09:21 persistent codeants 阅读(187) 评论(0) 推荐(0)
摘要: Problem DescriptionGiven a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not greater than 200 and there is a corresponding m containing no more than 100 decimal digits.InputThe input f 阅读全文
posted @ 2013-10-11 21:52 persistent codeants 阅读(622) 评论(0) 推荐(0)
摘要: Problem DescriptionFarmer 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 same number line. Farmer John has two modes of transportation: walking and tel 阅读全文
posted @ 2013-10-11 21:12 persistent codeants 阅读(168) 评论(0) 推荐(0)
摘要: Problem Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 char map[1001][1001]; 8 int vis[1001. 阅读全文
posted @ 2013-10-11 20:38 persistent codeants 阅读(219) 评论(0) 推荐(0)
摘要: Problem DescriptionBackgroundThe knight is getting bored of seeing the same black and white squares again and again and has decided to make a journeyaround the world. Whenever a knight moves, it is two squares in one direction and one square perpendicular to this. The world of a knight is the chessb 阅读全文
posted @ 2013-10-10 21:18 persistent codeants 阅读(289) 评论(0) 推荐(0)
摘要: Problem DescriptionIt is year 2500 A.D. and there is a terrible war between the forces of the Earth and the Mars. Recently, the commanders of the Earth are informed by their spies that the invaders of Mars want to land some paratroopers in them×ngrid yard of one their main weapon factories in o 阅读全文
posted @ 2013-10-10 19:03 persistent codeants 阅读(281) 评论(0) 推荐(0)
摘要: When we are focusing on solving problems, we usually prefer to stay in front of computers rather than go out for lunch. At this time, we may call for food delivery.Suppose there areNpeople living in a straight street that is just lies on an X-coordinate axis. Theithperson's coordinate isXimeters 阅读全文
posted @ 2013-10-09 13:08 persistent codeants 阅读(346) 评论(0) 推荐(0)
摘要: DescriptionHumans have discovered a kind of new metal mineral on Mars which are distributed in point�like with paths connecting each of them which formed a tree. Now Humans launches k robots on Mars to collect them, and due to the unknown reasons, the landing site S of all robots is identified in ad 阅读全文
posted @ 2013-10-07 12:46 persistent codeants 阅读(169) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 20 下一页