A. Arpa and a research in Mexican wave

本文通过建立数学模型来研究墨西哥浪现象,将个人行为抽象化并寻找规律。分析了三种不同时间段内墨西哥浪的变化特点,并提供了相应的计算公式。

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

**

A. Arpa and a research in Mexican wave

**
分析模型,把每个人抽象出来,找出规律
总时间:n+k,
时间段可以分为t<=k,t>=n,和其他时间。共三段时间;

#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int main()
{
    int n,k,t;
    while(~scanf("%d%d%d",&n,&k,&t))
    {
        if(t<=k)
        {
            printf("%d\n",t);
        }
        else if(t>=n)
        {
            printf("%d\n",n+k-t);
        }
        else printf("%d\n",k);
    }
    return 0;
} 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值