121 字
1 分钟
题解:P12609 [CCC 2025 Junior] Roller Coaster Ride

P12609 [CCC 2025 Junior] Roller Coaster Ride 题解#

题目传送门

思路#

简单语法题。

过山车的每节车厢可容纳一定数量的乘客,且每班过山车的所有车厢都会满载。计算下一班过山车总共能容纳的乘客数,即 C×PC \times P,然后判断队伍中的位置是否小于或等于这个总数即可。

Code#

#include<bits/stdc++.h>
using namespace std;
#define int long long
int n,c,p;
signed main() {
ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
cin>>n>>c>>p;
cout<<(n<=c*p ? "yes" : "no");
return 0;
}
题解:P12609 [CCC 2025 Junior] Roller Coaster Ride
https://banglee13.github.io/posts/p12609/
作者
banglee
发布于
2025-05-26
许可协议
CC BY-NC-SA 4.0

分享文章

生成精美分享图或复制链接,与更多人分享本文。

继续阅读

沿着主题读

基于共同的标签与分类

换条路线

从其他文章中稳定抽取

最后更新于 ,距今已过 548 天

部分内容可能已过时