3 条题解
-
0VIJOS管理员----AFOer_LBW (超级牛逼卢本伟1号) LV 10 @ 2021-07-21 09:10:24
前面的基本都能A 最后一个点tle,稍微加点优化就行了
```cpp
#include<iostream>
#include<cstring>
#include<cstdio>
#define N 500010
#define inf 100000008
using namespace std;int n;
double k[N],s[N],u[N],Eu,v[N];bool check(double a,double b,int i){
return 2.0*a*k[i]*b*b*(b-u[i])<=1.0?true:false;
}double TwoPoint(int i,double lambda){
double l=max(u[i],0.0),r=inf,mid;
for(int j=1;j<=100;++j){
mid=(l+r)/2;
if(check(lambda,mid,i))l=mid;
else r=mid;
}
return mid;
}bool Check(double mid){
double E=0;
for(int i=1;i<=n;++i)v[i]=TwoPoint(i,mid);
for(int i=1;i<=n;++i)E+=k[i]*s[i]*(v[i]-u[i])*(v[i]-u[i]);
return E>=Eu;
}int main(){
scanf("%d",&n);
scanf("%lf",&Eu);
for(int i=1;i<=n;++i)
scanf("%lf%lf%lf",&s[i],&k[i],&u[i]);
double l=0.0,r=inf,mid;
for(int j=1;j<=100;++j){
mid=(l+r)/2;
if(Check(mid))l=mid;
else r=mid;
}
double ans=0;
for(int i=1;i<=n;++i)
ans+=s[i]/v[i];
printf("%.8f\n",ans);
return 0;
}
``` -
-32016-11-16 12:25:12@
逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼
逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼牛牛牛牛逼逼逼逼逼
逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼牛牛牛牛牛牛牛牛牛逼逼逼逼
逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛逼逼逼逼
逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼牛牛牛牛牛牛牛牛牛牛牛牛牛牛牛逼逼逼逼逼逼
逼逼逼逼逼逼逼逼逼逼逼牛牛牛牛逼牛牛牛牛牛牛牛牛牛牛牛逼逼逼逼逼逼逼逼逼逼
逼逼逼逼逼逼逼逼牛牛牛牛牛牛牛逼牛牛牛逼逼牛牛牛牛牛逼逼逼逼逼逼逼逼逼逼逼
逼逼逼牛牛牛牛牛牛牛牛牛牛牛牛逼逼逼逼逼逼牛牛牛牛逼逼逼逼逼逼逼逼逼逼逼逼
逼牛牛牛牛牛牛牛牛牛牛牛牛牛牛逼逼逼逼逼逼牛牛牛牛逼逼逼逼逼逼逼逼逼逼逼逼
逼牛牛牛牛牛牛牛牛牛牛牛牛逼逼逼逼逼逼逼牛牛牛牛牛牛牛牛牛牛牛逼逼逼逼逼逼
逼牛牛牛牛牛牛牛牛牛牛牛牛逼逼逼逼逼逼牛牛牛牛牛牛牛牛牛牛牛牛牛牛逼逼逼逼
逼逼牛牛牛牛牛牛牛牛牛牛逼逼逼逼逼牛牛牛牛牛牛逼逼逼牛牛牛牛牛牛牛逼逼逼逼
逼逼逼逼逼逼逼逼牛牛牛牛逼逼逼逼逼牛牛牛牛逼逼逼逼逼逼牛牛牛牛牛逼逼逼逼逼
逼逼逼逼逼逼逼逼牛牛牛牛逼逼逼逼牛牛牛牛逼逼牛牛逼逼逼牛牛牛牛牛逼逼逼逼逼
逼逼逼逼逼逼逼逼牛牛牛牛逼逼逼逼牛牛牛牛逼逼牛牛牛牛逼牛牛牛牛牛逼逼逼逼逼
逼逼逼逼逼逼逼逼牛牛牛牛逼逼逼逼牛牛牛牛逼逼牛牛牛牛逼牛牛牛牛牛逼逼逼逼逼
逼逼逼逼逼逼逼逼牛牛牛牛逼逼逼逼牛牛牛牛逼逼牛牛牛逼逼牛牛牛牛牛逼逼逼逼逼
逼逼逼逼逼逼逼逼牛牛牛牛逼逼逼逼牛牛牛牛逼逼牛牛牛逼逼牛牛牛牛牛逼逼逼逼逼
逼逼逼逼逼逼逼逼牛牛牛牛逼逼逼逼牛牛牛牛逼牛牛牛牛逼逼牛牛牛牛牛逼逼逼逼逼
逼逼逼逼逼逼逼逼牛牛牛牛逼逼逼逼牛牛牛牛逼牛牛牛牛逼逼牛牛牛牛牛逼逼逼逼逼
逼逼逼逼逼逼逼逼牛牛牛牛逼逼逼逼牛牛牛牛逼牛牛牛牛逼逼牛牛牛牛牛逼逼逼逼逼
逼逼逼逼逼逼逼逼牛牛牛牛逼逼逼逼牛牛牛牛逼牛牛牛牛逼逼牛牛牛牛牛逼逼逼逼逼
逼逼逼逼逼逼逼逼牛牛牛牛逼逼逼逼牛牛牛逼逼牛牛牛牛逼逼牛牛牛牛牛逼逼逼逼逼
逼逼牛牛逼逼逼牛牛牛牛牛逼逼逼逼牛牛牛逼逼牛牛牛逼逼逼牛牛牛牛牛逼逼逼逼逼
逼逼牛牛牛牛牛牛牛牛牛牛逼逼逼逼逼牛牛逼逼牛牛逼逼逼逼牛牛牛牛牛逼逼逼逼逼
逼逼逼牛牛牛牛牛牛牛牛牛逼逼逼逼逼逼逼逼牛牛牛逼逼逼逼牛牛牛牛逼逼逼逼逼逼
逼逼逼逼逼牛牛牛牛牛牛牛逼逼逼逼逼逼逼逼牛牛牛逼牛牛牛牛逼逼逼逼逼逼逼逼逼
逼逼逼逼逼逼牛牛牛牛牛牛逼逼逼逼逼逼逼牛牛牛牛逼逼牛牛牛牛逼逼逼逼逼逼逼逼
逼逼逼逼逼逼逼逼逼牛牛牛逼逼逼逼逼逼牛牛牛牛牛逼逼逼牛牛牛牛牛牛牛逼逼逼逼
逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼牛牛牛牛牛牛逼逼逼逼逼牛牛牛牛牛牛逼逼逼逼
逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼牛牛牛牛牛牛逼逼逼逼逼逼牛牛牛牛牛牛牛逼逼逼
逼逼逼逼逼逼逼逼逼逼逼逼逼逼牛牛牛牛牛逼逼逼逼逼逼逼逼逼牛牛牛牛牛牛逼逼逼
逼逼逼逼逼逼逼逼逼逼逼逼逼牛牛牛牛牛逼逼逼逼逼逼逼逼逼逼逼牛牛牛牛逼逼逼逼
逼逼逼逼逼逼逼逼逼逼逼逼牛牛牛逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼牛牛牛逼逼逼逼
逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼逼 -
-32014-11-07 09:15:42@
题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题
题题题题题题题题题题题题题题题题题题题题题题题题题题题题水水水水题题题题题
题题题题题题题题题题题题题题题题题题题题题题题题水水水水水水水水水题题题题
题题题题题题题题题题题题题题题题题题水水水水水水水水水水水水水水水题题题题
题题题题题题题题题题题题题题题题水水水水水水水水水水水水水水水题题题题题题
题题题题题题题题题题题水水水水题水水水水水水水水水水水题题题题题题题题题题
题题题题题题题题水水水水水水水题水水水题题水水水水水题题题题题题题题题题题
题题题水水水水水水水水水水水水题题题题题题水水水水题题题题题题题题题题题题
题水水水水水水水水水水水水水水题题题题题题水水水水题题题题题题题题题题题题
题水水水水水水水水水水水水题题题题题题题水水水水水水水水水水水题题题题题题
题水水水水水水水水水水水水题题题题题题水水水水水水水水水水水水水水题题题题
题题水水水水水水水水水水题题题题题水水水水水水题题题水水水水水水水题题题题
题题题题题题题题水水水水题题题题题水水水水题题题题题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题题水水题题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题题水水水水题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题题水水水水题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题题水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题题水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题水水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题水水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题水水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水水题水水水水题题水水水水水题题题题题
题题题题题题题题水水水水题题题题水水水题题水水水水题题水水水水水题题题题题
题题水水题题题水水水水水题题题题水水水题题水水水题题题水水水水水题题题题题
题题水水水水水水水水水水题题题题题水水题题水水题题题题水水水水水题题题题题
题题题水水水水水水水水水题题题题题题题题水水水题题题题水水水水题题题题题题
题题题题题水水水水水水水题题题题题题题题水水水题水水水水题题题题题题题题题
题题题题题题水水水水水水题题题题题题题水水水水题题水水水水题题题题题题题题
题题题题题题题题题水水水题题题题题题水水水水水题题题水水水水水水水题题题题
题题题题题题题题题题题题题题题题水水水水水水题题题题题水水水水水水题题题题
题题题题题题题题题题题题题题题水水水水水水题题题题题题水水水水水水水题题题
题题题题题题题题题题题题题题水水水水水题题题题题题题题题水水水水水水题题题
题题题题题题题题题题题题题水水水水水题题题题题题题题题题题水水水水题题题题
题题题题题题题题题题题题水水水题题题题题题题题题题题题题题题水水水题题题题
题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题题
- 1
信息
- ID
- 1805
- 难度
- 8
- 分类
- (无)
- 标签
- 递交数
- 173
- 已通过
- 16
- 通过率
- 9%
- 被复制
- 2
- 上传者