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

没错了啊 自我感觉物理学的还可以啊!求求大家了,给个数据吧

Posted by 444444 at 2006-08-10 16:41:08 on Problem 2463
#include <iostream>
#include <cmath>

using namespace std;

int main()
{
	double k,l,s,w;
	double v;
	const double g=9.81;
	while(cin>>k>>l>>s>>w)
	{
		if(w==0)
			break;
		if(k==0&&s>l)
		{
			cout<<"Stuck in the air."<<endl;
			continue;
		}
		if(s<=l||l==0)
		{
			v=sqrt(2*g*s);
			if(v>10)
				cout<<"Killed by the impact.";
			else
				cout<<"James Bond survives.";
			cout<<endl;
			continue;
		}
		double G=w*g;
		double h=(G+sqrt(G*G+2*l*k*G))/k;
		if(s>l+h)
			cout<<"Stuck in the air."<<endl;
		else
		{
			double hh=s-l;
			v=sqrt(2*g*s-k*hh*hh/w);
			if(v>10)
				cout<<"Killed by the impact.";
			else
				cout<<"James Bond survives.";
			cout<<endl;
		}
	}
	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