結果

問題 No.512 魔法少女の追いかけっこ
ユーザー aitdccdaitdccd
提出日時 2018-01-28 20:26:00
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 438 bytes
コンパイル時間 1,496 ms
コンパイル使用メモリ 168,004 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-27 06:50:33
合計ジャッジ時間 2,807 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 53
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

#define REP(i, n) for(int i = 0; i < n; i++)

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int x, y, n;
    cin >> x >> y >> n;
    vector<int> a(n);
    REP(i, n) cin >> a[i];
    REP(i, n - 1) {
        if (a[i] * y > a[i + 1] * x) {
            cout << "NO" << endl;
            return 0;
        }
    }
    cout << "YES" << endl;
    return 0;
}
0