Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include<iostream>#include<cstdio>#include<cstring>#include<string>#include<cmath>#include<algorithm>using namespace std;const int maxn = 100000+10;const double eps =0.0000001;int n,m,k;double l,r,mid;int i,j;int a[maxn];double ans;bool check(double x){int t=k;for (int i=1;i<=n;i++){double b=(a[i]-a[i-1])/x;int a=floor(b);if (a>0&&abs(b-a)<eps) a--;t-=a;if (t<0) return 0;}return 1;}int main()