結果

問題 No.512 魔法少女の追いかけっこ
ユーザー samplelpmas
提出日時 2017-05-06 18:54:07
言語 Java
(openjdk 23)
結果
AC  
実行時間 139 ms / 2,000 ms
コード長 619 bytes
コンパイル時間 2,017 ms
コンパイル使用メモリ 74,916 KB
実行使用メモリ 41,620 KB
最終ジャッジ日時 2024-06-27 06:21:34
合計ジャッジ時間 10,322 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 53
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int kobaSpeed = sc.nextInt();
        int masterSpeed = sc.nextInt();
        int N = sc.nextInt();

        int[] times = new int[N];

        for (int i = 0; i < N; i++) {
            times[i] = sc.nextInt();
        }

        for (int i = 0; i < N - 1; i++) {

            if (times[i] * masterSpeed > times[i + 1] * kobaSpeed) {
                System.out.println("NO");
                return;
            }

        }

        System.out.println("YES");

    }

}
0