結果
| 問題 | No.2922 Rose Garden |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-10-22 17:01:07 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 10 ms / 3,000 ms |
| コード長 | 473 bytes |
| 記録 | |
| コンパイル時間 | 345 ms |
| コンパイル使用メモリ | 91,640 KB |
| 実行使用メモリ | 9,280 KB |
| 最終ジャッジ日時 | 2026-07-06 01:04:55 |
| 合計ジャッジ時間 | 2,991 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 50 |
ソースコード
#include <iostream>
#include <cstdint>
#include <vector>
using namespace std;
int main()
{
cin.tie(nullptr);
ios::sync_with_stdio(false);
uint32_t N, S, B, i;
cin >> N >> S >> B;
vector<uint32_t> H(N);
for (i = 0; i != N; ++i)
cin >> H[i];
uint32_t highest = H[0];
for (i = 1; i != N; ++i)
{
if (highest + S * static_cast<uint64_t>(B) < H[i])
{
cout << "No\n";
return 0;
}
if (highest < H[i]) highest = H[i];
}
cout << "Yes\n";
return 0;
}