結果

問題 No.512 魔法少女の追いかけっこ
ユーザー tentententen
提出日時 2021-05-17 15:25:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 59 ms / 2,000 ms
コード長 1,180 bytes
コンパイル時間 2,410 ms
コンパイル使用メモリ 77,176 KB
実行使用メモリ 37,336 KB
最終ジャッジ日時 2024-04-16 03:55:05
合計ジャッジ時間 6,778 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
36,980 KB
testcase_01 AC 52 ms
36,976 KB
testcase_02 AC 54 ms
37,224 KB
testcase_03 AC 53 ms
37,012 KB
testcase_04 AC 54 ms
36,756 KB
testcase_05 AC 53 ms
37,128 KB
testcase_06 AC 55 ms
37,132 KB
testcase_07 AC 55 ms
37,016 KB
testcase_08 AC 54 ms
37,080 KB
testcase_09 AC 52 ms
37,068 KB
testcase_10 AC 54 ms
37,068 KB
testcase_11 AC 53 ms
37,072 KB
testcase_12 AC 54 ms
37,148 KB
testcase_13 AC 56 ms
36,708 KB
testcase_14 AC 56 ms
36,616 KB
testcase_15 AC 54 ms
37,020 KB
testcase_16 AC 56 ms
36,732 KB
testcase_17 AC 55 ms
36,740 KB
testcase_18 AC 55 ms
37,192 KB
testcase_19 AC 56 ms
37,036 KB
testcase_20 AC 55 ms
37,336 KB
testcase_21 AC 55 ms
37,252 KB
testcase_22 AC 55 ms
37,152 KB
testcase_23 AC 55 ms
36,616 KB
testcase_24 AC 59 ms
36,852 KB
testcase_25 AC 54 ms
37,156 KB
testcase_26 AC 55 ms
37,188 KB
testcase_27 AC 55 ms
36,852 KB
testcase_28 AC 53 ms
37,184 KB
testcase_29 AC 54 ms
37,036 KB
testcase_30 AC 55 ms
36,852 KB
testcase_31 AC 54 ms
36,752 KB
testcase_32 AC 55 ms
37,012 KB
testcase_33 AC 56 ms
36,880 KB
testcase_34 AC 54 ms
37,072 KB
testcase_35 AC 55 ms
37,136 KB
testcase_36 AC 57 ms
37,072 KB
testcase_37 AC 56 ms
37,128 KB
testcase_38 AC 54 ms
36,880 KB
testcase_39 AC 53 ms
36,848 KB
testcase_40 AC 54 ms
37,060 KB
testcase_41 AC 54 ms
36,748 KB
testcase_42 AC 55 ms
36,992 KB
testcase_43 AC 54 ms
36,832 KB
testcase_44 AC 55 ms
37,080 KB
testcase_45 AC 57 ms
36,868 KB
testcase_46 AC 54 ms
37,136 KB
testcase_47 AC 54 ms
37,116 KB
testcase_48 AC 55 ms
37,024 KB
testcase_49 AC 54 ms
36,748 KB
testcase_50 AC 55 ms
37,076 KB
testcase_51 AC 54 ms
36,616 KB
testcase_52 AC 53 ms
36,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;

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

class Scanner {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st = new StringTokenizer("");
    
    public Scanner() throws Exception {
        
    }
    
    public int nextInt() throws Exception {
        return Integer.parseInt(next());
    }
    
    public long nextLong() throws Exception {
        return Long.parseLong(next());
    }
    
    public String next() throws Exception {
        if (!st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }
}
0