摘要:大意:给一个数组,先求出SUM[I],然后动态的求出1-I的SUM[I]的和, 这题得化公式: 树状数组维护两个和:SUM(A[I])(1#include#include#includeusing namespace std;typedef long long ll;const int N=...
阅读全文
摘要:今天居然没参考任何资料解决了这道数位DP,事先只是搞一道数论题练练;思路:求SUM[1]-SUM[N]的二进制的乘积mod1000000007; N#include#include#includeusing namespace std;#define N 10000007typedef long...
阅读全文
摘要:题目:Tuhao and his two small partners participated in the tournament.But in the end, they lost the chance to finish a mathematical problem.After the com...
阅读全文
摘要:居然发现大水题一枚: 好开心。 题解:M-2^0-2^1-2^2-........直到不能减为止,。。。
阅读全文
摘要:浅析竞赛中一类数学期望问题的解决方法http://acm.hdu.edu.cn/showproblem.php?pid=3853HDU 3853本题题解网上太多了,所以就不需要再多说什么了。说说怎么求期望吧!假如一直(I,J)的期望那么DP[I][J+1]的期望从DP[I][J]上得到的是DP[I]...
阅读全文
摘要:题目大意是选出一个其他不选,问问最大概率;刚开始想到DP:F[I][J][0]:表示从 前I个中选出J个的最大值,然后对于F[I][J][1]=MAX(F[I-1][J][1],F[I-1][J-1][0]*A[I]+F[I-1][J-1][1]*(1-A[I]));但是这是错误的因为F[I-1][...
阅读全文
摘要:二维树状数组入门:http://www.java3z.com/cwbwebhome/article/article1/1369.html?id=4804很详细题目:HDOJ 1892 注意点的坐标可以为0所以要细心处理一下 ,然后照着这个题解写,就没问题了:http://blog.csdn....
阅读全文
摘要:感觉不会再爱了,呜呜!A题原来HACK这么多!很多人跟我一样掉坑了!If there is some choice whose description at least twice shorter than all other descriptions, or at least twice long...
阅读全文