結果
問題 |
No.2922 Rose Garden
|
ユーザー |
|
提出日時 | 2024-10-12 14:44:51 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 78 ms / 3,000 ms |
コード長 | 524 bytes |
コンパイル時間 | 3,065 ms |
コンパイル使用メモリ | 246,068 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 14:44:59 |
合計ジャッジ時間 | 6,623 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 50 |
ソースコード
typedef long long ll; typedef long double ld; #include <bits/stdc++.h> using namespace std; signed main() { ll n,s,b; std::cin >> n>>s>>b; vector<ll> h(n); for (int i = 0; i < n; i++) { std::cin >> h[i]; } bool out = false; ll now = h[0]+s*b; for (int i = 1; i < n; i++) { if(now<h[i]){ out= true; } now = max(now, h[i]+s*b); } if(out){ std::cout << "No" << std::endl; }else{ std::cout << "Yes" << std::endl; } };