正文
增加 5 行删除 5 行
29 行未改动30313233343536373839404142434445464748495051524 行未改动5758596061626364655 行未改动71727374757677787911 行未改动29 行未改动#define LL long long#define MAXN 1000005using namespace std;const double eps=1e-15;int T,R;double A,B,vmax,F;double X[10002],Y[10002],k[10002],len[10002];bool check(double mid) {double lf=0;for(int i=1; i<=R; ++i) {lf+=max(0.0,mid*A+B*k[i])*len[i];if(lf-F>eps)return 0;}if(lf-F<=eps)return 1;return 0;}double cal(double x) {double lf=0;if(x<=eps)return 0;for(int i=1; i<=R; ++i) {4 行未改动}else lf+=len[i]/x;}return lf;}void work() {double l=0,r=vmax;int TYP=0;while(TYP<=100) {5 行未改动double ans=cal(l);if(ans<=eps)printf("IMPOSSIBLE\n");else printf("%.5lf\n",ans);}int main() {scanf("%d",&T);while(T--) {scanf("%lf%lf%lf%lf%d",&A,&B,&vmax,&F,&R);11 行未改动29 行未改动30313233343536373839404142434445464748495051524 行未改动5758596061626364655 行未改动71727374757677787911 行未改动29 行未改动#define LL long long#define MAXN 1000005using namespace std;const double eps=1e-15;int T,R;double A,B,vmax,F;double X[10002],Y[10002],k[10002],len[10002];bool check(double mid) {double lf=0;for(int i=1; i<=R; ++i) {lf+=max(0.0,mid*A+B*k[i])*len[i];if(lf-F>eps)return 0;}if(lf-F<=eps)return 1;return 0;}double cal(double x) {double lf=0;if(x<=eps)return 0;for(int i=1; i<=R; ++i) {4 行未改动}else lf+=len[i]/x;}return lf;}void work() {double l=0,r=vmax;int TYP=0;while(TYP<=100) {5 行未改动double ans=cal(l);if(ans<=eps)printf("IMPOSSIBLE\n");else printf("%.5lf\n",ans);}int main() {scanf("%d",&T);while(T--) {scanf("%lf%lf%lf%lf%d",&A,&B,&vmax,&F,&R);11 行未改动