摘要: 题目描述 Description 小明玩一个数字游戏,取个n行n列数字矩阵(其中n为不超过100的奇数),数字的填补方法为:在矩阵中心从1开始以逆时针方向绕行,逐圈扩大,直到n行n列填满数字,请输出该n行n列正方形矩阵以及其的对角线数字之和. 输入描述 Input Descript... 阅读全文
posted @ 2017-03-19 18:58 星斗万千 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Description You are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possible to align the sticks in a... 阅读全文
posted @ 2015-08-27 16:28 星斗万千 阅读(160) 评论(0) 推荐(0) 编辑
摘要: Problem Description Bob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fast enough and then ... 阅读全文
posted @ 2015-08-26 17:02 星斗万千 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Problem Description In the Kingdom of Silence, the king has a new problem. There are N cities in the kingdom and there are M directional roads bet... 阅读全文
posted @ 2015-08-26 15:30 星斗万千 阅读(172) 评论(0) 推荐(0) 编辑
摘要: Description Bob is a skilled engineer. He must design a highway that crosses a region with few villages. Since this region is quite unpopulated, he... 阅读全文
posted @ 2015-08-25 15:33 星斗万千 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Problem Description There is a pile of n wooden sticks. The length and weight of each stick are known in advance. The sticks are to be processed b... 阅读全文
posted @ 2015-08-25 14:43 星斗万千 阅读(175) 评论(0) 推荐(0) 编辑
摘要: Problem Description 这是个剑与魔法的世界.英雄和魔物同在,动荡和安定并存.但总的来说,库尔特王国是个安宁的国家,人民安居乐业,魔物也比较少.但是.总有一些魔物不时会进入城市附近,干扰人民的生活.就要有一些人出来守护居民们不被魔物侵害.魔法使艾米莉就是这样的一个人.她骑着... 阅读全文
posted @ 2015-08-24 20:58 星斗万千 阅读(203) 评论(0) 推荐(0) 编辑
摘要: Problem Description N cities of the Java Kingdom need to be covered by radars for being in a state of war. Since the kingdom has M radar stations ... 阅读全文
posted @ 2015-08-24 17:08 星斗万千 阅读(211) 评论(0) 推荐(0) 编辑
摘要: DESCRIPTION There is an N*M matrix with only 0s and 1s, (1 #include #include const int maxnode=100010; const int maxm=1010; const int maxn=1010;... 阅读全文
posted @ 2015-08-24 15:45 星斗万千 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Description Given a M×N matrix A. Aij ∈ {0, 1} (0 ≤ i #include using namespace std; struct DLX { int n,m,size; int U[5000],D[5000],R[5000... 阅读全文
posted @ 2015-08-24 11:34 星斗万千 阅读(152) 评论(0) 推荐(0) 编辑