cf1009E:求到第i段期望和的比较困难,但是单独求每段的期望是比较容易的,所以单独对每段求和,然后累计总和 E[i]=1/2*a1+1/4*a2+...+1/2^(i-1)*ai-1+1/2^(i-1)*ai,E[1-n]是可以递推的 #include<bits/stdc++.h> using namespace std; #define ll long long ; ; int n; ll a[maxn],dp[maxn],P[maxn]; int main(){ cin>>…
题目:http://acm.hdu.edu.cn/showproblem.php?pid=5036 Explosion Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 879 Accepted Submission(s): 309 Problem Description Everyone knows Matt enjoys pl…