結果

問題 No.512 魔法少女の追いかけっこ
ユーザー tenten
提出日時 2020-10-02 18:35:29
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 546 bytes
コンパイル時間 1,815 ms
コンパイル使用メモリ 74,388 KB
実行使用メモリ 54,388 KB
最終ジャッジ日時 2024-07-16 00:39:02
合計ジャッジ時間 9,649 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 46 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double x = sc.nextInt() / 1000.0;
        double y = sc.nextInt() / 1000.0;
        int n = sc.nextInt();
        int prev = sc.nextInt();
        for (int i = 1; i < n; i++) {
            int cur = sc.nextInt();
            if (cur / y < prev / x) {
                System.out.println("NO");
                return;
            }
            prev = cur;
        }
        System.out.println("YES");
    }
}
0