結果

問題 No.512 魔法少女の追いかけっこ
ユーザー fkwnw3_1243fkwnw3_1243
提出日時 2017-05-05 22:32:56
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 1,125 bytes
コンパイル時間 2,118 ms
コンパイル使用メモリ 73,756 KB
実行使用メモリ 49,764 KB
最終ジャッジ日時 2023-09-09 12:54:28
合計ジャッジ時間 6,187 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
49,312 KB
testcase_01 AC 44 ms
49,084 KB
testcase_02 AC 46 ms
49,384 KB
testcase_03 AC 46 ms
49,384 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 46 ms
49,556 KB
testcase_07 AC 47 ms
49,384 KB
testcase_08 AC 45 ms
49,412 KB
testcase_09 WA -
testcase_10 AC 46 ms
49,444 KB
testcase_11 AC 45 ms
49,328 KB
testcase_12 AC 44 ms
49,420 KB
testcase_13 AC 43 ms
49,424 KB
testcase_14 AC 43 ms
49,544 KB
testcase_15 AC 45 ms
49,392 KB
testcase_16 AC 44 ms
49,420 KB
testcase_17 AC 44 ms
49,520 KB
testcase_18 AC 44 ms
49,328 KB
testcase_19 WA -
testcase_20 AC 45 ms
49,456 KB
testcase_21 AC 44 ms
49,296 KB
testcase_22 AC 45 ms
49,532 KB
testcase_23 AC 44 ms
49,080 KB
testcase_24 AC 45 ms
49,568 KB
testcase_25 AC 45 ms
49,084 KB
testcase_26 AC 44 ms
49,748 KB
testcase_27 AC 43 ms
49,284 KB
testcase_28 AC 45 ms
49,172 KB
testcase_29 AC 45 ms
49,168 KB
testcase_30 AC 44 ms
49,164 KB
testcase_31 AC 45 ms
49,320 KB
testcase_32 AC 46 ms
49,308 KB
testcase_33 AC 46 ms
49,440 KB
testcase_34 AC 45 ms
49,300 KB
testcase_35 AC 46 ms
49,308 KB
testcase_36 AC 46 ms
49,400 KB
testcase_37 AC 45 ms
49,416 KB
testcase_38 AC 44 ms
49,348 KB
testcase_39 AC 44 ms
49,440 KB
testcase_40 AC 46 ms
47,232 KB
testcase_41 AC 45 ms
49,160 KB
testcase_42 AC 43 ms
49,640 KB
testcase_43 AC 44 ms
49,460 KB
testcase_44 AC 45 ms
49,456 KB
testcase_45 AC 45 ms
49,724 KB
testcase_46 AC 44 ms
49,428 KB
testcase_47 WA -
testcase_48 AC 44 ms
49,764 KB
testcase_49 AC 44 ms
49,396 KB
testcase_50 AC 44 ms
49,416 KB
testcase_51 WA -
testcase_52 AC 46 ms
49,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

import static java.lang.System.in;

public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
        String[] inputs = reader.readLine().split(" ");
        int X = Integer.parseInt(inputs[0]);
        int Y = Integer.parseInt(inputs[1]);
        double X1 = X * 1000 / 3600.0;
        double Y1 = Y * 1000 / 3600.0;


        int N = Integer.parseInt(reader.readLine());
        inputs = reader.readLine().split(" ");
        boolean result = true;
        for (int i = 0; i < N - 1; i++) {
            int first = Integer.parseInt(inputs[i]);
            int second = Integer.parseInt(inputs[i + 1]);

            double tmp = (double) first / X1;
            if (tmp * Y1 > second) {
                result = false;
                break;
            }
        }
        if(result) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }

}
0