摘要: Problem Description 在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。你的任务是,对于给定的N,求出有多少种合法的放置方法。 Input 共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量; 阅读全文
posted @ 2018-09-04 20:26 Hacklover 阅读(231) 评论(0) 推荐(0) 编辑
摘要: Description The cows have been making movies lately, so they are ready to play a variant of the famous game "Six Degrees of Kevin Bacon". The game wor 阅读全文
posted @ 2018-09-04 09:00 Hacklover 阅读(238) 评论(0) 推荐(0) 编辑
摘要: Description An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, 阅读全文
posted @ 2018-09-03 18:55 Hacklover 阅读(421) 评论(0) 推荐(0) 编辑
摘要: Description Farmer John commanded his cows to search for different sets of numbers that sum to a given number. The cows use only numbers that are an i 阅读全文
posted @ 2018-09-02 22:45 Hacklover 阅读(124) 评论(0) 推荐(0) 编辑
摘要: Description Farmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around the barn. He always wants to have one cow 阅读全文
posted @ 2018-09-02 08:34 Hacklover 阅读(298) 评论(0) 推荐(0) 编辑
摘要: Description Bessie hears that an extraordinary meteor shower is coming; reports say that these meteors will crash into earth and destroy anything they 阅读全文
posted @ 2018-08-31 20:51 Hacklover 阅读(383) 评论(0) 推荐(0) 编辑
摘要: Description There 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 阅读全文
posted @ 2018-08-31 09:10 Hacklover 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 恢复内容开始 Description Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the 阅读全文
posted @ 2018-08-30 17:00 Hacklover 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Description Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 阅读全文
posted @ 2018-08-28 15:15 Hacklover 阅读(346) 评论(0) 推荐(0) 编辑
摘要: Description Little Johnny has got a new car. He decided to drive around the town to visit his friends. Johnny wanted to visit all his friends, but the 阅读全文
posted @ 2018-08-27 10:36 Hacklover 阅读(317) 评论(0) 推荐(0) 编辑