2012年7月25日
摘要: A Knight's JourneyTime Limit : 2000/1000ms (Java/Other)Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 10Accepted Submission(s) : 4Problem DescriptionBackgroundThe knight is getting bored of seeing the same black and white squares again and again and has decided to make a journeya 阅读全文
posted @ 2012-07-25 21:35 Zee、 阅读(187) 评论(0) 推荐(0) 编辑
摘要: Find The MultipleTime Limit:1000MSMemory Limit:10000KTotal Submissions:12137Accepted:4993Special JudgeDescriptionGiven 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 阅读全文
posted @ 2012-07-25 15:43 Zee、 阅读(217) 评论(0) 推荐(0) 编辑
摘要: Count the stringTime Limit : 2000/1000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 5Accepted Submission(s) : 3Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem DescriptionIt is well known that AekdyCoin is good at string problems as well as number theory problem 阅读全文
posted @ 2012-07-25 09:35 Zee、 阅读(697) 评论(0) 推荐(0) 编辑
  2012年7月24日
摘要: 转自bochuan007:#include<iostream> #include<string> using namespace std; string a,b; int p[10000]; int i,j,m,n; int main(){ cin>>a; cin>>b; n=a.length(); m=b.length(); p[0]=-1; j=-1; for(i=1;i<=b.length();i++){ while((j>0)&&(b[j+1]!=b[i])) ... 阅读全文
posted @ 2012-07-24 10:12 Zee、 阅读(1371) 评论(0) 推荐(0) 编辑
  2012年7月23日
摘要: 畅通工程Time Limit : 4000/2000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 7Accepted Submission(s) : 6Font:Times New Roman|Verdana|GeorgiaFont Size:←→Problem Description某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少 阅读全文
posted @ 2012-07-23 15:40 Zee、 阅读(349) 评论(0) 推荐(0) 编辑
  2012年7月22日
摘要: Mayor's postersTime Limit:1000MSMemory Limit:65536KTotal Submissions:26882Accepted:7767DescriptionThe citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim. The city council has finally 阅读全文
posted @ 2012-07-22 10:34 Zee、 阅读(514) 评论(0) 推荐(0) 编辑
  2012年7月21日
摘要: BillboardTime Limit: 20000/8000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3757Accepted Submission(s): 1779Problem DescriptionAt the entrance to the university, there is a huge rectangular billboard of size h*w (h is its height and w is its width). The board is the 阅读全文
posted @ 2012-07-21 16:28 Zee、 阅读(226) 评论(0) 推荐(0) 编辑
摘要: Just a HookTime Limit : 4000/2000ms (Java/Other)Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 9Accepted Submission(s) : 4Problem DescriptionIn the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive me 阅读全文
posted @ 2012-07-21 10:51 Zee、 阅读(371) 评论(0) 推荐(0) 编辑
  2012年7月17日
摘要: 主要是修改区间的时候要维护线段数。。A Simple Problem with IntegersTime Limit:5000MSMemory Limit:131072KTotal Submissions:31920Accepted:9071Case Time Limit:2000MSDescriptionYou haveNintegers,A1,A2, ... ,AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number 阅读全文
posted @ 2012-07-17 15:35 Zee、 阅读(597) 评论(0) 推荐(1) 编辑
  2012年7月14日
摘要: 这里说的很好,把求逆序的步骤说的很明白,我也是看完才懂的,之前自己想了很久就是不明白为什么可以用树状数组求逆序 转载:树状数组,具体的说是 离散化+树状数组。这也是学习树状数组的第一题.算法的大体流程就是:1.先对输入的数组离散化,使得各个元素比较接近,而不是离散的,2.接着,运用树状数组的标准操作来累计数组的逆序数。算法详细解释:1.解释为什么要有离散的这么一个过程? 刚开始以为999.999.999这么一个数字,对于int存储类型来说是足够了。 还有只有500000个数字,何必要离散化呢? 刚开始一直想不通,后来明白了,后面在运用树状数组操作的时候, 用到的树状数组C[i]是建立在一个有. 阅读全文
posted @ 2012-07-14 21:48 Zee、 阅读(8962) 评论(4) 推荐(7) 编辑