結果

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

ソースコード

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;
    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) {
        if (as[i] * y > as[i + 1] * x) {
            ans = false;
            break;
        }
    }
    cout << (ans ? "YES" : "NO") << endl;
    return 0;
}
0