A. Pieces of Parentheses 将括号串排序,先处理会使左括号数增加的串,这里面先处理减少的值少的串;再处理会使左括号数减少的串,这里面先处理差值较大的串。确定顺序之后就可以DP了。 时间复杂度$O(n^3)$。 B. Stars in a Can 求出三维凸包,枚举一个面,求出距 ...
分类:
其他好文 时间:
2017-05-02 00:39:28
阅读次数:
351
感谢:http://blog.csdn.net/mirror58229/article/details/63685884 题意:x+y=a lcm(x,y)=b 求x,y 12WCases + b 10^9 + a 10^4 所以肯定不是枚举……肯定是公式题 接下来就是转化 x+y=a x*y/gc ...
分类:
其他好文 时间:
2017-05-01 19:01:14
阅读次数:
192
<span style="color:#330099;">/* E - E Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status Practice UVA 10474 Description Wher ...
分类:
其他好文 时间:
2017-05-01 11:08:33
阅读次数:
221
DNA Consensus String Time Limit: 3000MS Memory Limit: Unknown 64bit IO Format: %lld & %llu Submit Status Description Figure 1. DNA (Deoxyribonucleic A ...
分类:
其他好文 时间:
2017-04-29 23:40:52
阅读次数:
441
CSU - 1542 Flipping Parentheses Time Limit: 5000MS Memory Limit: 262144KB 64bit IO Format: %lld & %llu Submit Status Description Input Output Sample I ...
分类:
其他好文 时间:
2017-04-29 20:01:14
阅读次数:
181
http://www.lydsy.com/JudgeOnline/problem.php?id=4870 矩阵快速幂。。。 人话题意:从nk个物品里选模k余r个物品,问方案数模P 那么我们有方程 f[i][j]=f[i-1][j]+f[i-1][j-1] 跟组合数一个样子 j∈(0,k) 这个物品选 ...
分类:
其他好文 时间:
2017-04-27 23:16:41
阅读次数:
162
就是找素数。非常水的题。模糊搜索一道题搜到的。 可是却 TLE 2次。把全部的 long long 改成 int ,%lld 改成 %d 就奇妙的过了。 简直不可思议。 #include<cstdio> #include<cstring> #include<string> #include<queu ...
分类:
其他好文 时间:
2017-04-27 23:15:05
阅读次数:
177