H-fishfloss and cat's food 利用前缀和 #include <iostream> #include <cstring> using namespace std; const int N = 1e5+10; double ans[N]; //记录到0-i的总价值 long long n,k,l,r; double x; int main() { ans[0]=0; scanf("%lld%lld",&n,&k); for(long long i=1;i<=n;i++) { ...