链接:

http://acm.hdu.edu.cn/showproblem.php?pid=1155

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 793    Accepted Submission(s): 342

Problem Description
Once again, James Bond is fleeing from some evil people who want to see him dead. Fortunately, he has left a bungee rope on a nearby highway bridge which he can use to escape from his enemies. His plan is to attach one end of the rope to the bridge, the other end of the rope to his body and jump off the bridge. At the moment he reaches the ground, he will cut the rope, jump into his car and be gone.

Unfortunately, he had not had enough time to calculate whether the bungee rope has the right length, so it is not clear at all what is going to happen when he jumps off the bridge. There are three possible scenarios: 
The rope is too short (or too strong), and James Bond will never reach the ground. 
The rope is too long (or too weak), and James Bond will be going too fast when he touches the ground. Even for a special agent, this can be very dangerous. You may assume that if he collides at a speed of more than 10 m/s, he will not survive the impact. 
The rope's length and strength are good. James Bond touches the ground at a comfortable speed and can escape. 
As his employer, you would like to know whether James Bond survives or whether you should place a job ad for the soon-to-be vacant position in the local newspaper. Your physicists claim that: 
The force with which James is pulled towards the earth is 
9.81 * w, 
where w is his weight in kilograms and 9.81 is the Earth acceleration in meters over squared seconds. 
Mr. Bond falls freely until the rope tautens. Then the force with which the bungee rope pulls him back into the sky depends on the current length of the rope and is 
k * Δl, 
where Δl is the difference between the rope's current length and its nominal, unexpanded length, and k is a rope-specific constant. 
Given the rope's strength k, the nominal length of the rope l in meters, the height of the bridge s in meters, and James Bond's body weight w, you have to determine what is going to happen to our hero. For all your calculations, you may assume that James Bond is a point at the end of the rope and the rope has no mass. You may further assume that k, l, s, and w are non-negative and that s < 200.

The input contains several test cases, one test case per line. Each test case consists of four floating-point numbers (k, l, s, and w) that describe the situation. Depending on what is going to happen, your program must print "Stuck in the air.", "Killed by the impact.", or "James Bond survives.". Input is terminated by a line containing four 0s, this line should not be processed.

 
Sample Input
350 20 30 75
375 20 30 75
400 20 30 75
425 20 30 75
450 20 30 75
400 20 30 50
400 20 30 80
400 20 30 85
0 0 0 0
 
Sample Output
Killed by the impact.
James Bond survives.
James Bond survives.
James Bond survives.
Stuck in the air.
Stuck in the air.
James Bond survives.
Killed by the impact.
用的动能定理~~~~~~~
 
Ep=mgh,Ek=k*x*x/2;

代码:

#include<stdio.h>
#include<math.h>
const double G=9.81;
int main()
{
double k,l,s,w;
while(scanf("%lf%lf%lf%lf",&k,&l,&s,&w))
{
if(k==&&l==&&s==&&w==)break;
double e=w*G*s;
if(s>l)e-=k*(s-l)*(s-l)/;
if(e<)
{
printf("Stuck in the air.\n");
continue;
}
double v=sqrt(e*/w);
if(v>) printf("Killed by the impact.\n");
else printf("James Bond survives.\n");
}
return ;
}

(简单的物理题)Bungee Jumping的更多相关文章

  1. Bungee Jumping---hdu1155(物理题)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1155 题目很长,但是很容易理解,就是人从高s的桥上跳下来,手拉着长为l的绳子末端,如果绳子太短那么人将 ...

  2. HDU 1155 Bungee Jumping(物理题,动能公式,弹性势能公式,重力势能公式)

    传送门: Bungee Jumping Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Othe ...

  3. 杭电 1155 Bungee Jumping(物理题)

    Problem Description Once again, James Bond is fleeing from some evil people who want to see him dead ...

  4. hdu 1155 Bungee Jumping

    http://acm.hdu.edu.cn/showproblem.php?pid=1155 Bungee Jumping Time Limit: 2000/1000 MS (Java/Others) ...

  5. Bungee Jumping[HDU1155]

    Bungee JumpingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total ...

  6. 简单的算法题, Find Minimum in Rotated Sorted Array 的Python实现。

    简单的算法题, Find Minimum in Rotated Sorted Array 的Python实现. 题目: Suppose a sorted array is rotated at som ...

  7. Codeforces Round #114 (Div. 1) A. Wizards and Trolleybuses 物理题

    A. Wizards and Trolleybuses Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/conte ...

  8. HDOJ 1330 Deck(叠木块-物理题啊!贪心算法用到了一点)

    Problem Description A single playing card can be placed on a table, carefully, so that the short edg ...

  9. hdu 5761 Rower Bo 物理题

    Rower Bo 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5761 Description There is a river on the Ca ...

随机推荐

  1. AHK按键转载

    AHK按键一个顶三个 需求: 我想要,用win键代替3个键,代替了之后, 以后用win+任意键,例如: 就是win+1就是ctrl+alt+shift+1 其中1是可以变的. 解决:考虑到win键比较 ...

  2. PAT 甲级 1011 World Cup Betting (20)(20 分)(水题,不用特别在乎精度)

    1011 World Cup Betting (20)(20 分) With the 2010 FIFA World Cup running, football fans the world over ...

  3. 最小化安装CentOS7,没有ifconfig命令---yum search command_name搜索未知包名

    新安装的CentOS7系统,想查询ip的时候,发现没有ifconfig这个命令: -bash: ifconfig: 未找到命令 yum安装: 没有可用软件包 ifconfig 既然知道命令,搜索一下命 ...

  4. js复制URL链接

    html: <div style="height:0px; text-indent:-10000px;"><span id="hdcopyurl&quo ...

  5. MySql-5.7.17 -winx64的安装配置

    一.下载软件 1. 进入mysql官网,登陆自己的Oracle账号(没有账号的自己注册一个),下载Mysql-5.7.17,下载地址:http://dev.mysql.com/downloads/my ...

  6. 蓝桥杯历届试题-垒色子(DP+矩阵快速幂)

    一.题目 垒骰子 赌圣atm晚年迷恋上了垒骰子,就是把骰子一个垒在另一个上边,不能歪歪扭扭,要垒成方柱体.经过长期观察,atm 发现了稳定骰子的奥秘:有些数字的面贴着会互相排斥!我们先来规范一下骰子: ...

  7. javascript中 关于eval的那些事

    javascript中的eval是一个非常灵活,但是灵活是伴随着风险的. 一.下面我们来看看那使用eval声明变量的问题. function test(x){ eval("var a=x;& ...

  8. 前端开发中常用的CSS选择器解析(一)

    你也许已经掌握了id.class.后台选择器这些基本的css选择器.但这远远不是css的全部.下面向大家系统的介绍css中最常用的选择器,包括我们最头痛的浏览器兼容性问题.掌握了它们,才能真正领略cs ...

  9. [jOOQ中文]3. 数据库版本管理工具Flyway

    https://segmentfault.com/a/1190000010526452 在执行数据库迁移时,我们推荐使用jOOQ与Flyway - 数据库迁移轻松. 在本章中,我们将简单的来使用这两个 ...

  10. FastJson bean序列化属性顺序问题

    fastjson序列化一个java bean,默认是根据fieldName的字母序进行序列化的,你可以通过ordinal指定字段的顺序,这个特性需要1.1.42以上版本.示例如下. import co ...