121 字
1 分钟
题解:P12609 [CCC 2025 Junior] Roller Coaster Ride
P12609 [CCC 2025 Junior] Roller Coaster Ride 题解
思路
简单语法题。
过山车的每节车厢可容纳一定数量的乘客,且每班过山车的所有车厢都会满载。计算下一班过山车总共能容纳的乘客数,即 ,然后判断队伍中的位置是否小于或等于这个总数即可。
Code
#include<bits/stdc++.h>using namespace std;#define int long longint 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/分享文章
生成精美分享图或复制链接,与更多人分享本文。
继续阅读
最后更新于 ,距今已过 548 天
部分内容可能已过时