結果
| 問題 |
No.2922 Rose Garden
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-10-12 17:18:24 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 25 ms / 3,000 ms |
| コード長 | 467 bytes |
| コンパイル時間 | 1,956 ms |
| コンパイル使用メモリ | 193,912 KB |
| 最終ジャッジ日時 | 2025-02-24 18:49:28 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 50 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
using namespace std;
using ll = long long;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
ll n,s,b;
cin >> n >> s >> b;
vector<ll> h(n);
rep(i,n) cin >> h[i];
ll now = h[0]+s*b;
rep(i,n-1){
if(now<h[i+1]) {
cout << "No" << endl;
return 0;
}
now = max(now, h[i+1]+s*b);
}
cout << "Yes" << endl;
}