题目大意:给出k:绳子的劲度系数,l:绳长,s:桥高,w:邦德的质量,g取9.81。绳子弹力=形变量*劲度系数。如果落地速度大于10 则摔死,小于0则飘着空中。

题目思路:根据能量守恒得知:落地的动能=重力势能减少量-绳子弹力做功。如果l>s,则绳子不做功。

#include<cstdio>
#include<stdio.h>
#include<cstdlib>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<vector>
#include<queue>
#define INF 0x3f3f3f3f
#define MAX 1000005 using namespace std; int main()
{
double k,l,s,w,we,g=9.81,v;//we为落地式的动能
while(scanf("%lf%lf%lf%lf",&k,&l,&s,&w),k+l+s+w)
{
if(l > s)//如果绳子大于桥的高度绳子的弹力不会做功,落地时动能增量等于重力势能的减少量
{
v=sqrt(*g*s);
}
else//否则,落地时的动能等于重力势能的减少量-绳子弹力做功。绳子的平均弹力=平均形变量*k
{
we=w*g*s - ((s-l)/2.0)*(s-l)*k;
if(we < )//若果落地动能小于0,肯定在落地前速度就为0了,也就飘着了半空中
{
printf("Stuck in the air.\n");
continue;
}
v=sqrt((we*)/w);
} if(v > )
printf("Killed by the impact.\n");
else
printf("James Bond survives.\n");
}
return ;
}

HDU 1155 Bungee Jumping 物理的更多相关文章

  1. hdu 1155 Bungee Jumping

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

  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. Bungee Jumping[HDU1155]

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

  5. HDU 5826 physics(物理)

     physics(物理) Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)   D ...

  6. HDU 1087 Super Jumping! Jumping! Jumping

    HDU 1087 题目大意:给定一个序列,只能走比当前位置大的位置,不可回头,求能得到的和的最大值.(其实就是求最大上升(可不连续)子序列和) 解题思路:可以定义状态dp[i]表示以a[i]为结尾的上 ...

  7. (简单的物理题)Bungee Jumping

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

  8. UVa 10868 (物理) Bungee Jumping

    题意: 有个人在蹦极,给出悬崖的高度,绳子的长度,弹簧绳的胡克系数 以及 人的质量. 判断人是否能够着地,能的话是否能安全着地.所谓安全着地就是到达地面的速度不超过10m/s. 分析: 学过一点高中物 ...

  9. DP专题训练之HDU 1087 Super Jumping!

    Description Nowadays, a kind of chess game called "Super Jumping! Jumping! Jumping!" is ve ...

随机推荐

  1. JVM基础02-class文件

    一.class文件结构 介绍之前,请下载一个Bytecode工具,例如byte code viewer或者Java Bytecode Editor,我用的是后者Java Bytecode Editor ...

  2. HDU 2614 Beat(DFS)

    题目链接 Problem Description Zty is a man that always full of enthusiasm. He wants to solve every kind o ...

  3. chapter 13_3 table访问的元方法

    前两节的算术类.关系类运算符的元方法都为各种错误情况定义了行为,它们不会改变语言的常规行为. 但是Lua还提供了两种可以改变table行为的方法: 一种是查询table中不存在的字段.一种是修改tab ...

  4. NOIP2012-普及组复赛-第一题-质因数分解

    题目描述 Description 已知正整数n是两个不同的质数的乘积,试求出两者中较大的那个质数.  输入输出格式 Input/output 输入格式:输入只有一行,包含一个正整数n.输出格式:输出只 ...

  5. 对AppStore中的项目进行评分(转载)

    在ios6.0前跳转到appstore评分一般是直接跳转到appstore评分NSString *evaluateString = [NSString stringWithFormat:@" ...

  6. 一把刀终极配置Win7/8版 v2.0 绿色版

    软件名称: 一把刀终极配置Win7/8版 软件语言: 简体中文 授权方式: 免费软件 运行环境: Win8 / Win7 软件大小: 1.3MB 图片预览: 软件简介: 一把刀终极配置 For Win ...

  7. VMware 下的Linux系统远程连接putty

    ifconfig查看ip地址 虚拟网卡需要自己新建  nat8 putty不能显示中文的解决办法 http://jingyan.baidu.com/article/5552ef47df8a97518f ...

  8. D - 小晴天老师系列——晴天的后花园

    D - 小晴天老师系列——晴天的后花园 Time Limit: 10000/5000MS (Java/Others)    Memory Limit: 128000/64000KB (Java/Oth ...

  9. 比较全的 C# 操作 Word的代码

    using System;using System.Collections.Generic;using System.Text;using Microsoft.Office.Interop.Word; ...

  10. 浅析js模板引擎

    js模板引擎越来越多的得到应用,如今已经出现了几十种js模板引擎,国内各大互联网公司也都开发了自己的js模板引擎(淘宝的kissy template,腾讯的artTemplate,百度的baiduTe ...