摘要: 炮兵阵地Time Limit:2000MSMemory Limit:65536KTotal Submissions:14869Accepted:5575Description司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),也可能是平原(用"P"表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示:如果在地图中的灰色所标识的平原上部署一支炮兵部队,则图中的黑色的网格表示它能够攻击到的区域:沿 阅读全文
posted @ 2013-05-23 23:23 Jack Ge 阅读(506) 评论(0) 推荐(0) 编辑
摘要: Corn FieldsTime Limit:2000MSMemory Limit:65536KTotal Submissions:4876Accepted:2573DescriptionFarmer John has purchased a lush new rectangular pasture composed ofMbyN(1 ≤M≤ 12; 1 ≤N≤ 12) square parcels. He wants to grow some yummy corn for the cows on a number of squares. Regrettably, some of the squ 阅读全文
posted @ 2013-05-23 23:05 Jack Ge 阅读(499) 评论(0) 推荐(1) 编辑
摘要: Rescue the RabbitTime Limit: 20000/10000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1010Accepted Submission(s): 274Problem DescriptionDr. X is a biologist, who likes rabbits very much and can do everything for them. 2012 is coming, and Dr. X wants to take some rabb 阅读全文
posted @ 2013-05-23 21:57 Jack Ge 阅读(551) 评论(0) 推荐(0) 编辑
摘要: YY's new problemTime Limit: 12000/4000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 3158Accepted Submission(s): 890Problem DescriptionGiven a permutation P of 1 to N, YY wants to know whether there exists such three elements P[i1], P[i2], P[i3] thatP[i1]-P[i2]=P[ 阅读全文
posted @ 2013-05-23 12:57 Jack Ge 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 测试你是否和LTC水平一样高Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10092Accepted Submission(s): 3254Problem Description大家提到LTC都佩服的不行,不过,如果竞赛只有这一个题目,我敢保证你和他绝对在一个水平线上!你的任务是:计算方程x^2+y^2+z^2= num的一个正整数解。Input输入数据包含多个测试实例,每个实例占一行,仅仅包含一个小于等于10000的正整数num。Outpu 阅读全文
posted @ 2013-05-23 12:38 Jack Ge 阅读(273) 评论(0) 推荐(0) 编辑
摘要: SORT AGAINTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3092Accepted Submission(s): 987Problem Description给你N个整数,x1,x2...xn,任取两个整数组合得到|xi-xj|,(0<i,j<=N,i!=j)。现在请你计算第K大的组合数是哪个(一个组合数为第K大是指有K-1个不同的组合数小于它)。Input输入数据首先包含一个正整数C,表示包含C组测试用例.每组测试数据的 阅读全文
posted @ 2013-05-23 12:25 Jack Ge 阅读(323) 评论(0) 推荐(0) 编辑
摘要: SubstringsTime Limit:1000MSMemory Limit:10000KTotal Submissions:10244Accepted:3515DescriptionYou are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its inverse can be found as a substring of any of the given strings.InputThe first 阅读全文
posted @ 2013-05-23 11:12 Jack Ge 阅读(560) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<cstdio>#include<cstring>#include<algorithm>using namespace std;const int maxn=50;int equ,var; //行数,列数int a[maxn][maxn]; //增广矩阵int x[maxn]; //解集bool free_x[maxn]; //标记是否是不确定的变元void Debug(){ int i,j; for(i=0;i<equ;i++){ for(j=0;j<var+1;j++) pr.. 阅读全文
posted @ 2013-05-23 07:28 Jack Ge 阅读(588) 评论(0) 推荐(0) 编辑