1 gcc attribute weak & alias应用
alias ("target")
The alias attribute causesthe declaration to be emitted as an alias for another symbol, which must bespecified. For instance,
voi...
分类:
其他好文 时间:
2014-08-21 11:35:34
阅读次数:
214
思路: 因为是对称的,所以如果两段是对称的,那么一段的前缀和一定等于另一段的后缀和。根据这个性质,我们可以预处理出这个数列的对称点对。然后最后一个对称段是从哪里开始的,做n^2的DP就可以了。代码: 1 #include 2 #include 3 #include 4 #include ...
分类:
其他好文 时间:
2014-08-21 01:33:43
阅读次数:
230
Another OCD Patient
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)
Total Submission(s): 716 Accepted Submission(s): 270
Problem Description
Xiaoji is ...
分类:
其他好文 时间:
2014-08-21 00:13:33
阅读次数:
428
Another OCD PatientTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 645 Accepted Submission(s): ...
分类:
其他好文 时间:
2014-08-20 22:34:02
阅读次数:
478
Another OCD Patient
Time Limit: 2000/1000 MS (Java/Others) Memory Limit:
131072/131072 K (Java/Others)
Problem Descri...
分类:
其他好文 时间:
2014-08-20 18:08:02
阅读次数:
233
Problem Description
Xiaoji is an OCD (obsessive-compulsive disorder) patient. This morning, his children played with plasticene. They broke the plasticene into N pieces, and put them in a line. Eac...
分类:
其他好文 时间:
2014-08-20 16:23:12
阅读次数:
210
Problem Description
Kingdom Rush is a popular TD game, in which you should build some towers to protect your kingdom from monsters. And now another wave of monsters is coming and you need again to ...
分类:
其他好文 时间:
2014-08-20 14:08:52
阅读次数:
169
Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another express...
分类:
其他好文 时间:
2014-08-20 13:57:52
阅读次数:
176
Problem Description
Kingdom Rush is a popular TD game, in which you should build some towers to protect your kingdom from monsters. And now another wave of monsters is coming and you need again to kn...
分类:
其他好文 时间:
2014-08-20 00:08:55
阅读次数:
279
HDU 4960 Another OCD Patient
题目链接
记忆化搜索,由于每个碎片值都是正数,所以每个前缀和后缀都是递增的,就可以利用twopointer去找到每个相等的位置,然后下一个区间相当于一个子问题,用记忆化搜索即可,复杂度接近O(n^2)
代码:
#include
#include
#include
using namespace std;
co...
分类:
其他好文 时间:
2014-08-20 00:06:45
阅读次数:
196