Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:我的代码长度竟然排第一了。。。In Reply To:Re:我的代码长度竟然排第一了。。。 Posted by:tasty at 2016-12-09 14:53:00 > #include<stdio.h> > #include<cmath> > #include<algorithm> > using namespace std; > double H,R,D1,h1,D2,h2,D,n,ans,v1,v2,pi=acos(-1.); > int main() > { > scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&H,&R,&D1,&h1,&D2,&h2,&D,&n); > v2=n*n*pi*R*R*h2/(pi*R*R-n*n); > v1=(D*n*n*n-D2*v2)/D1; > printf("%f\n",min(H,h1+h2+min(min(D*n*n*n/D2,n*n*min(pi*R*R*(h1+h2)/(pi*R*R-n*n),n)),v1+v2)/(pi*R*R))); > return 0; > } 谁还能再总结一下? Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator