摘要: 首先得了解,期望是线性的。。。但是期望的平方和立放却不是emmmmm 我们求的是x^3的期望,明摆着就是求E[X^3]的期望但是。。。E[X^3]!=E[X]^3 不如这样!!! E[(X+1)^3]=E(X)^3+3*E[X]^2+3E[X]+1 E[(X+1)^2]=E[X]^2+2*E[X]+ 阅读全文
posted @ 2018-08-18 16:05 bluefly-hrbust 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 我们知道不满足的肯定是两边大中间小的,这样就用RMQ查询两个相同等值的区间内部最小值即可,注意边界条件 阅读全文
posted @ 2018-08-18 14:57 bluefly-hrbust 阅读(233) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include using namespace std; char s[200005]; int main(){ int k,n; int zk; int yk; while(~scanf("%d%d",&n,&k)){ zk=0; yk=0; scanf("%s",s); int lens=... 阅读全文
posted @ 2018-08-18 09:23 bluefly-hrbust 阅读(167) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include using namespace std; char a[200006]; char b[200006]; int main() { int n,m; int lena; int lenb; while(~scanf("%d%d",&n,&m)) { scanf("%s"... 阅读全文
posted @ 2018-08-18 09:22 bluefly-hrbust 阅读(325) 评论(0) 推荐(0) 编辑