题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1155

题目很长,但是很容易理解,就是人从高s的桥上跳下来,手拉着长为l的绳子末端,如果绳子太短那么人将在空中输出Stuck in the air.

如果人落地速度大于10的话就死了,输出Killed by the impact.否则是活的输出James Bond survives.

简单的物理题:假如说人能到地上那么是重力势能转化成动能,其中会有绳子做负功;

G=mgh;

Wf=k*L*L/2;其中L是形变量;k是绳子的劲度系数;

G-Wf = ek = m*v*v/2

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

Bungee Jumping---hdu1155(物理题)的更多相关文章

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

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

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

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

  3. Bungee Jumping[HDU1155]

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

  4. hdu 1155 Bungee Jumping

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

  5. 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 ...

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

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

  7. hdu 5761 Rower Bo 物理题

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

  8. hdu 5066 小球碰撞(物理题)

    http://acm.hdu.edu.cn/showproblem.php?pid=5066 中学物理题 #include <cstdio> #include <cstdlib> ...

  9. hdoj 4445 Crazy Tank 物理题/枚举角度1

    Crazy TankTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total S ...

随机推荐

  1. FusionMap 检测融合基因

    定义:融合基因是指两个或者多个基因联合起来,一起转录形成一个转录本: 检测的意义:融合基因可以作为某些疾病的特异分子标记,比如 bcr/abl融合基因存在于95%以上的慢性粒细胞白血病患者中: AML ...

  2. 基于mvcpager的分页(get请求,刷新页面),提供两种样式(来自bootstrap的样式)

    使用方法:先把mvcpager.dll引用加入mvc项目 下载路径在本文末尾 前台代码 前台: @{ Layout = null; } @using Webdiyer.WebControls.Mvc ...

  3. 单例模式(singleton pattern)--------创造型模式

    缺点: 1.单例模式没有抽象层,单例模式的扩展较困那(开闭原则) 2.单例类的职责过重,既提供了业务方法,又提供了创建对象的方法,将对象的创建和对象本身的功能耦合在一起(违反单一职责原则,但是似乎又无 ...

  4. 【Raspberry Pi】openwrt 路由

    http://blog.sina.com.cn/s/blog_40983e5e0102v6qt.html

  5. ChemDraw教程之怎么连接ChemDraw结构

    将两个独立的ChemDraw结构连接到一起是使用者学习操作ChemDraw绘制窗口内容的基本能力之一.为了进一步了解ChemDraw软件,本教程将具体为您介绍怎么连接ChemDraw结构. 一.化学结 ...

  6. linux下mysql 启动命令

    1,使用service 启动.关闭MySQL服务 service mysql start service mysql stop service mysql restart 运行上面命令,其实是serv ...

  7. python编码问题1

    爬虫,新手很容易遇到编码解码方面的问题.在这里总结下. 如果处理不好编码解码的问题,爬虫轻则显示乱码,重则报错UnicodeDecodeError: 'xxxxxx' codec can't deco ...

  8. python2.7中关于编码,json格式的中文输出显示

    当我们用requests请求一个返回json的接口时候, 语法是 result=requests.post(url,data).content print type(result),result 得到 ...

  9. 【Android开发】如何设计开发一款Android App

    本文从开发工具选择,UI界面.图片模块.网络模块.数据库产品选择.性能.安全性等几个方面讲述了如果开发一个Android应用.现在整理出来分享给广大的Android程序员. 开发工具的选择 开发工具我 ...

  10. Linux环境PHP5.5以上连接SqlServer2008

    linux版本:64位CentOS 6.4 Nginx版本:nginx1.8.0 php版本:php5.5.28 Sqlserver版本:2008 FreeTDS版本:0.95 关于Linux环境安装 ...