結果
問題 | No.512 魔法少女の追いかけっこ |
ユーザー |
![]() |
提出日時 | 2024-08-30 00:15:49 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 588 bytes |
コンパイル時間 | 3,533 ms |
コンパイル使用メモリ | 246,824 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-08-30 00:15:55 |
合計ジャッジ時間 | 5,251 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 49 WA * 4 |
ソースコード
#include <bits/stdc++.h>using namespace std;#ifdef LOCAL#include "settings/debug.cpp"#else#define Debug(...) void(0)#endif#define rep(i, n) for (int i = 0; i < (n); ++i)using ll = long long;using ull = unsigned long long;int main() {int x, y, n;cin >> x >> y >> n;vector<int> a(n);rep(i, n) cin >> a[i];vector<int> sum(n + 1, 0);rep(i, n) sum[i + 1] = sum[i] + a[i];double now = 0;rep(i, n) {now = sum[i] / (double) x;if (y * now > sum[i + 1]) {cout << "NO" << endl;return 0;}}cout << "YES" << endl;return 0;}