| ||||||||||
| 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:18 > 谁还能再总结一下?
#include<stdio.h>
#include<cmath>
#include<algorithm>
using namespace std;
double H,R,D1,h1,D2,h2,D,n,ans,pi=acos(-1.);
int main()
{
scanf("%lf%lf%lf%lf%lf%lf%lf%lf",&H,&R,&D1,&h1,&D2,&h2,&D,&n);
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)),(D*n*n*n-(D2-D1)*n*n*pi*R*R*h2/(pi*R*R-n*n))/D1)/(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