結果
問題 |
No.2922 Rose Garden
|
ユーザー |
|
提出日時 | 2024-10-14 13:35:55 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 23 ms / 3,000 ms |
コード長 | 545 bytes |
コンパイル時間 | 2,023 ms |
コンパイル使用メモリ | 193,528 KB |
最終ジャッジ日時 | 2025-02-24 19:27:40 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 50 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; #include<atcoder/modint> using namespace atcoder; using mint=modint998244353; void solve(){ ll N,S,B; cin>>N>>S>>B; ll H; cin>>H; ll X=H+S*B; for(int i=1;i<N;i++){ cin>>H; if(X<H){ cout<<"No"<<endl; return; } X=max(X,H+S*B); } cout<<"Yes"<<endl; } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); // ll T; // cin>>T; // while(T--) solve(); }