#include<iostream> #include<cmath> #include<vector> #include<cstring> #include<algorithm> using namespace std; typedef long long LL; const int maxn=1e5+10; LL y[maxn]; LL sum[maxn]; ////有重复的要取最右边的,所以是l=mid; LL bsearch(LL l,LL r,double x) { while(l<r) { LL mid=(l+r+1...