摘要: Red and BlackTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 16188Accepted: 8474DescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can& 阅读全文
posted @ 2012-05-08 20:17 w0w0 阅读(161) 评论(0) 推荐(0)
摘要: A Knight's JourneyTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 19356Accepted: 6515DescriptionBackground The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around the world. Whenever a knight moves, it is two square 阅读全文
posted @ 2012-05-08 19:02 w0w0 阅读(214) 评论(0) 推荐(0)
摘要: 棋盘问题Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 14336Accepted: 7067Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8 , k <= n 当为-1 -1时表示输入结 阅读全文
posted @ 2012-05-08 16:03 w0w0 阅读(232) 评论(0) 推荐(0)
摘要: Sum It UpTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 4491Accepted: 2264DescriptionGiven 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 fou 阅读全文
posted @ 2012-05-08 14:26 w0w0 阅读(182) 评论(0) 推荐(0)
摘要: Oil DepositsTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 8624Accepted: 4826DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid that divides the 阅读全文
posted @ 2012-05-08 09:31 w0w0 阅读(205) 评论(0) 推荐(0)