链接:https://www.nowcoder.com/acm/contest/140/G White Cloud placed n containers in sequence on a axes. The i-th container is located at x[i] and there are a[i] number of products in it. White Rabbit wants to buy some products. The products which are re…
#include<bits/stdc++.h>using namespace std;const long long mod=1000000007,inv=570000004;long long i,j,n,m,a[1010]/*成功几率*/,sum=0,dp[1010][1010]/*动态规划*/,def[1010]//预处理;long long qpow(long long x,long long y,long long mod)//快速幂{ long long ans=1,tmp=…