题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5635 LCP Array Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 282    Accepted Submission(s): 79 Problem Description Peter has a string s=s1s2..…
LCP Array Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 830    Accepted Submission(s): 232 Problem Description Peter has a string s=s1s2...sn, let suffi=sisi+1...sn be the suffix start with …
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5632 ------------------------------------------------------------------------------------------ 这场比赛的官方题解说这题比较明显, 然而我比赛完后对着题解看了好久也没有想明白 于是先做了几道数位$DP$找找感觉 可惜感觉并没有找到 这题和传统数位$DP$不一样 这题是求范围内满足要求的数对的个数 既然是数对…
Cut Pieces Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others) Total Submission(s): 728    Accepted Submission(s): 303 Problem Description Suppose we have a sequence of n blocks. Then we paint the blocks. Each block s…
http://acm.hdu.edu.cn/showproblem.php?pid=5806 题意:给你一个n元素序列,求第k大的数大于等于m的子序列的个数. 题解:题目要求很奇怪,很多头绪但写不出,选择跳过的题,简称想法题. 首先考虑区间的更新方法:区间左端l不动,右端r滑动, 滑到有k个数>=m时,此区间符合条件,并且发现右端点再往右滑到底,此条件一直符合(因为若加入的数小于“第K大的数”,则毫无影响.若不然,加入该数会产生一个新的第k大数,保证>=“第K大的数”>=m) 所以一找…
Bisharp and Charizard Time Limit: 1 Sec  Memory Limit: 256 MB Description Dragon is watching NBA. He loves James and Miami Heat. Here's an introduction of basketball game:http://en.wikipedia.org/wiki/Basketball. However the game in Dragon's version i…
LCP Array Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 90    Accepted Submission(s): 26 Problem Description Peter has a string s=s1s2...sn, let suffi=sisi+1...sn be the suffix start with i…
找每个数的约数(暴力就够了...1~x^0.5)....看这约数的倍数最后是哪个数...若距离大于了y..统计++...然后将这个约数的最后倍数赋值为当前位置...好叼的想法题.... Program: #include<iostream> #include<stack> #include<queue> #include<stdio.h> #include<algorithm> #include<string.h> #include&…
LCP Array Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 358    Accepted Submission(s): 102 Problem Description Peter has a string s=s1s2...sn, let suffi=sisi+1...sn be the suffix start with …
http://acm.hdu.edu.cn/showproblem.php?pid=5969 (合肥)区域赛签到题...orz 题意:给你l,r,求x|y的max,x,y满足l<=x<=y<=r. 题解:初始想法是找到形如(111,1000).(11111,100000)····这样的进位点,一旦区间里有这种相邻两位进位的或一下就可以得到1111····,必然最大.(后面的是瞎搞)如果区间里没有,说明l,r二进制长度一样,于是从最高位往下找,一直找到不一样的一位,变成了前一种有进位的…