結果

問題 No.512 魔法少女の追いかけっこ
ユーザー tentententen
提出日時 2020-10-02 18:35:29
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 546 bytes
コンパイル時間 2,035 ms
コンパイル使用メモリ 71,772 KB
実行使用メモリ 56,336 KB
最終ジャッジ日時 2023-09-23 00:06:32
合計ジャッジ時間 10,988 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,980 KB
testcase_01 WA -
testcase_02 AC 130 ms
55,808 KB
testcase_03 AC 125 ms
55,968 KB
testcase_04 AC 135 ms
55,952 KB
testcase_05 AC 128 ms
55,848 KB
testcase_06 AC 123 ms
55,432 KB
testcase_07 AC 126 ms
55,912 KB
testcase_08 AC 127 ms
55,872 KB
testcase_09 WA -
testcase_10 AC 135 ms
55,912 KB
testcase_11 AC 132 ms
56,072 KB
testcase_12 AC 127 ms
55,652 KB
testcase_13 AC 127 ms
55,748 KB
testcase_14 AC 128 ms
55,960 KB
testcase_15 AC 125 ms
55,876 KB
testcase_16 AC 125 ms
55,932 KB
testcase_17 AC 123 ms
56,216 KB
testcase_18 AC 124 ms
55,720 KB
testcase_19 WA -
testcase_20 AC 123 ms
56,120 KB
testcase_21 AC 126 ms
56,336 KB
testcase_22 AC 124 ms
55,852 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 124 ms
55,732 KB
testcase_27 AC 124 ms
56,188 KB
testcase_28 AC 126 ms
56,300 KB
testcase_29 AC 125 ms
55,708 KB
testcase_30 AC 124 ms
55,880 KB
testcase_31 AC 132 ms
55,688 KB
testcase_32 AC 135 ms
55,908 KB
testcase_33 AC 126 ms
55,680 KB
testcase_34 AC 125 ms
55,740 KB
testcase_35 AC 129 ms
55,812 KB
testcase_36 AC 125 ms
56,000 KB
testcase_37 AC 127 ms
55,672 KB
testcase_38 AC 123 ms
55,800 KB
testcase_39 AC 125 ms
56,036 KB
testcase_40 AC 135 ms
56,148 KB
testcase_41 AC 125 ms
56,236 KB
testcase_42 AC 126 ms
55,888 KB
testcase_43 AC 125 ms
55,832 KB
testcase_44 AC 124 ms
56,012 KB
testcase_45 AC 124 ms
55,960 KB
testcase_46 AC 124 ms
56,260 KB
testcase_47 AC 131 ms
56,292 KB
testcase_48 AC 127 ms
55,948 KB
testcase_49 AC 128 ms
55,788 KB
testcase_50 AC 127 ms
55,680 KB
testcase_51 WA -
testcase_52 AC 135 ms
55,616 KB
権限があれば一括ダウンロードができます

ソースコード

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