結果

問題 No.512 魔法少女の追いかけっこ
ユーザー oooooba
提出日時 2021-03-02 20:51:31
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 766 bytes
コンパイル時間 890 ms
コンパイル使用メモリ 112,504 KB
最終ジャッジ日時 2025-01-19 09:32:26
ジャッジサーバーID
(参考情報)
judge3 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 47 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <optional>
#include <queue>
#include <sstream>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std;

int main() {
    int32_t x, y, n;
    cin >> x >> y >> n;
    x *= 1000;
    y *= 1000;
    vector<int32_t> as(n + 1);
    for (auto i = 0; i < n; ++i) {
        cin >> as[i];
    }
    as[n] = numeric_limits<int32_t>::max();
    bool ans = true;
    for (auto i = 0; i < n; ++i) {
        double t = as[i] / double(x);
        if (t * y > as[i + 1]) {
            ans = false;
            break;
        }
    }
    cout << (ans ? "YES" : "NO") << endl;
    return 0;
}
0