結果

問題 No.512 魔法少女の追いかけっこ
ユーザー ooooobaoooooba
提出日時 2021-03-02 20:52:36
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 706 bytes
コンパイル時間 1,174 ms
コンパイル使用メモリ 114,936 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-14 04:56:44
合計ジャッジ時間 2,636 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 2 ms
6,940 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 2 ms
6,940 KB
testcase_08 WA -
testcase_09 AC 2 ms
6,944 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 2 ms
6,940 KB
testcase_13 AC 2 ms
6,940 KB
testcase_14 AC 1 ms
6,940 KB
testcase_15 WA -
testcase_16 AC 2 ms
6,940 KB
testcase_17 AC 2 ms
6,944 KB
testcase_18 AC 2 ms
6,944 KB
testcase_19 AC 2 ms
6,944 KB
testcase_20 WA -
testcase_21 AC 2 ms
6,944 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 2 ms
6,940 KB
testcase_26 AC 1 ms
6,944 KB
testcase_27 AC 1 ms
6,944 KB
testcase_28 AC 1 ms
6,944 KB
testcase_29 AC 1 ms
6,940 KB
testcase_30 AC 1 ms
6,940 KB
testcase_31 AC 2 ms
6,940 KB
testcase_32 AC 2 ms
6,944 KB
testcase_33 AC 2 ms
6,940 KB
testcase_34 AC 2 ms
6,944 KB
testcase_35 AC 2 ms
6,944 KB
testcase_36 WA -
testcase_37 AC 2 ms
6,944 KB
testcase_38 AC 2 ms
6,940 KB
testcase_39 AC 2 ms
6,944 KB
testcase_40 AC 2 ms
6,944 KB
testcase_41 AC 2 ms
6,940 KB
testcase_42 AC 2 ms
6,940 KB
testcase_43 WA -
testcase_44 AC 2 ms
6,944 KB
testcase_45 AC 2 ms
6,944 KB
testcase_46 AC 2 ms
6,944 KB
testcase_47 AC 2 ms
6,944 KB
testcase_48 WA -
testcase_49 AC 2 ms
6,940 KB
testcase_50 AC 2 ms
6,940 KB
testcase_51 WA -
testcase_52 WA -
権限があれば一括ダウンロードができます

ソースコード

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