Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:我的代码长度竟然排第一了。。。

Posted by tasty at 2016-12-09 14:56:32 on Problem 3555
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator