結果
問題 |
No.2922 Rose Garden
|
ユーザー |
![]() |
提出日時 | 2024-10-14 23:49:10 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 40 ms / 3,000 ms |
コード長 | 432 bytes |
コンパイル時間 | 2,089 ms |
コンパイル使用メモリ | 192,056 KB |
最終ジャッジ日時 | 2025-02-24 19:39:30 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 50 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); ll N, S, B, H, mx; cin >> N >> S >> B; cin >> H; mx = H; for (int i=2; i<=N; i++){ cin >> H; if (H > mx + B*S){ cout << "No" << endl; return 0; } mx = max(mx, H); } cout << "Yes" << endl; return 0; }