結果
| 問題 |
No.2922 Rose Garden
|
| コンテスト | |
| ユーザー |
startcpp
|
| 提出日時 | 2024-10-12 16:36:02 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 70 ms / 3,000 ms |
| コード長 | 702 bytes |
| コンパイル時間 | 696 ms |
| コンパイル使用メモリ | 83,040 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-12 16:36:10 |
| 合計ジャッジ時間 | 3,954 ms |
|
ジャッジサーバーID (参考情報) |
judge / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 50 |
ソースコード
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <tuple>
#include <cstdio>
#include <cmath>
#include <cassert>
#define rep(i, n) for(i = 0; i < n; i++)
#define int long long
using namespace std;
int n, s, b;
int h[200000];
signed main() {
int i;
cin >> n >> s >> b;
rep(i, n) cin >> h[i];
int maxH = h[0];
rep(i, n - 1) {
if (h[i + 1] <= maxH) continue;
if (h[i + 1] - maxH > b * s) {
cout << "No" << endl;
return 0;
}
maxH = max(maxH, h[i + 1]);
}
cout << "Yes" << endl;
return 0;
}
startcpp