結果

問題 No.512 魔法少女の追いかけっこ
ユーザー fkwnw3_1243fkwnw3_1243
提出日時 2017-05-05 22:30:22
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 1,124 bytes
コンパイル時間 1,974 ms
コンパイル使用メモリ 74,332 KB
実行使用メモリ 49,828 KB
最終ジャッジ日時 2023-09-09 12:50:54
合計ジャッジ時間 5,968 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
49,272 KB
testcase_01 AC 43 ms
49,396 KB
testcase_02 AC 43 ms
49,700 KB
testcase_03 WA -
testcase_04 AC 44 ms
49,236 KB
testcase_05 WA -
testcase_06 AC 42 ms
49,236 KB
testcase_07 AC 42 ms
49,280 KB
testcase_08 AC 43 ms
49,268 KB
testcase_09 WA -
testcase_10 AC 44 ms
49,364 KB
testcase_11 WA -
testcase_12 AC 43 ms
49,336 KB
testcase_13 AC 42 ms
49,240 KB
testcase_14 AC 43 ms
49,284 KB
testcase_15 AC 42 ms
49,356 KB
testcase_16 AC 42 ms
49,352 KB
testcase_17 AC 43 ms
49,336 KB
testcase_18 AC 43 ms
49,312 KB
testcase_19 AC 43 ms
49,500 KB
testcase_20 WA -
testcase_21 AC 43 ms
49,280 KB
testcase_22 AC 43 ms
49,212 KB
testcase_23 WA -
testcase_24 AC 43 ms
49,236 KB
testcase_25 AC 42 ms
49,436 KB
testcase_26 AC 43 ms
49,152 KB
testcase_27 AC 43 ms
49,276 KB
testcase_28 AC 42 ms
49,424 KB
testcase_29 AC 42 ms
49,496 KB
testcase_30 AC 42 ms
49,312 KB
testcase_31 AC 43 ms
49,444 KB
testcase_32 AC 44 ms
49,184 KB
testcase_33 AC 43 ms
49,220 KB
testcase_34 AC 43 ms
49,352 KB
testcase_35 AC 44 ms
49,632 KB
testcase_36 AC 43 ms
49,344 KB
testcase_37 AC 43 ms
49,344 KB
testcase_38 AC 44 ms
49,292 KB
testcase_39 AC 43 ms
49,172 KB
testcase_40 WA -
testcase_41 AC 43 ms
49,144 KB
testcase_42 AC 43 ms
49,368 KB
testcase_43 AC 43 ms
49,388 KB
testcase_44 AC 42 ms
49,468 KB
testcase_45 AC 43 ms
49,388 KB
testcase_46 AC 43 ms
49,492 KB
testcase_47 AC 47 ms
49,284 KB
testcase_48 WA -
testcase_49 AC 42 ms
49,268 KB
testcase_50 AC 43 ms
49,224 KB
testcase_51 AC 43 ms
49,260 KB
testcase_52 AC 44 ms
49,828 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 / 360.0;
        double Y1 = Y * 1000 / 360.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