HOJ 2105 Bungee Jumping

本文探讨了在特定物理条件下,绳索强度、人体重量、桥高与安全性的关系,通过数学模型计算得出不同场景下的人体安全状态。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://acm.hit.edu.cn/hoj/problem/view?id=2105

已知绳子劲度系数为k 原长为l 桥高为s某人体重为w

重力加速度g=9.81

剩下是一个物理问题:

 

  原长小于桥高

kΔl>2wgs//劲度系数太大在空中下不来

v=sqrt(2*g*s-((k*(s-l)*(s-l)/w))); //末速度v>10就挂了

  原长大于等于桥高

看末速度

 

#include <stdio.h>
#include <math.h>

int main()
{
    double k, l, s, w, v;
    const double g = 9.81;

    while (scanf("%lf %lf %lf %lf", &k, &l, &s, &w) != EOF)
    {
        if ( (k == 0) && (l == 0) && (s == 0) && (w == 0) )
            break;
        if (l < s)
        {
            if (k * (s - l) * (s - l) > 2 * w * g * s)
            {
                printf("Stuck in the air.\n");
                continue;
            }

            v = sqrt( 2 * g * s - ( (k * (s - l) * (s - l) / w) ) );
            if (v > 10)
            {
                printf("Killed by the impact.\n");
            }
            else
            {
                printf("James Bond survives.\n");
            }
        }
        else if (2 * g * s > 100)
        {
            printf("Killed by the impact.\n");
        }
        else
            printf("James Bond survives.\n");
    }

    return 0;
}


 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值