結果

問題 No.512 魔法少女の追いかけっこ
ユーザー YamaKasaYamaKasa
提出日時 2018-06-01 17:59:57
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 521 bytes
コンパイル時間 2,218 ms
コンパイル使用メモリ 71,788 KB
実行使用メモリ 57,828 KB
最終ジャッジ日時 2023-09-12 21:20:13
合計ジャッジ時間 11,459 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,684 KB
testcase_01 AC 124 ms
55,740 KB
testcase_02 WA -
testcase_03 AC 127 ms
55,604 KB
testcase_04 WA -
testcase_05 AC 128 ms
55,832 KB
testcase_06 AC 124 ms
55,452 KB
testcase_07 AC 130 ms
55,620 KB
testcase_08 AC 131 ms
55,648 KB
testcase_09 WA -
testcase_10 AC 133 ms
56,024 KB
testcase_11 AC 129 ms
55,884 KB
testcase_12 AC 129 ms
55,784 KB
testcase_13 AC 130 ms
55,680 KB
testcase_14 AC 127 ms
55,352 KB
testcase_15 AC 124 ms
55,828 KB
testcase_16 AC 126 ms
55,732 KB
testcase_17 AC 127 ms
55,300 KB
testcase_18 AC 119 ms
55,648 KB
testcase_19 AC 128 ms
55,396 KB
testcase_20 AC 123 ms
56,104 KB
testcase_21 AC 131 ms
55,324 KB
testcase_22 AC 124 ms
55,664 KB
testcase_23 AC 123 ms
56,172 KB
testcase_24 WA -
testcase_25 AC 125 ms
56,044 KB
testcase_26 AC 134 ms
55,724 KB
testcase_27 AC 125 ms
55,608 KB
testcase_28 AC 123 ms
55,708 KB
testcase_29 AC 130 ms
55,384 KB
testcase_30 AC 126 ms
57,420 KB
testcase_31 AC 130 ms
55,972 KB
testcase_32 AC 131 ms
56,032 KB
testcase_33 AC 129 ms
55,324 KB
testcase_34 AC 132 ms
55,408 KB
testcase_35 AC 125 ms
55,960 KB
testcase_36 AC 124 ms
56,112 KB
testcase_37 AC 125 ms
55,984 KB
testcase_38 AC 129 ms
55,832 KB
testcase_39 AC 126 ms
55,140 KB
testcase_40 AC 131 ms
55,904 KB
testcase_41 AC 124 ms
55,840 KB
testcase_42 AC 124 ms
55,132 KB
testcase_43 AC 122 ms
55,988 KB
testcase_44 AC 129 ms
55,452 KB
testcase_45 AC 125 ms
55,548 KB
testcase_46 AC 127 ms
55,860 KB
testcase_47 WA -
testcase_48 AC 123 ms
56,260 KB
testcase_49 AC 123 ms
55,684 KB
testcase_50 AC 121 ms
55,652 KB
testcase_51 AC 122 ms
55,756 KB
testcase_52 AC 130 ms
55,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int X = scan.nextInt();
		int Y = scan.nextInt();
		int N = scan.nextInt();
		int []A = new int[N];
		for(int i = 0; i < N; i++) {
			A[i] = scan.nextInt();
		}
		scan.close();
		for(int i = 0; i < N - 1; i++) {
			double t = (double)A[i] / X;
			double l = (double)Y * t;

			if(l > A[i + 1]) {
				System.out.println("NO");
				System.exit(0);
			}
		}
		System.out.println("YES");

	}
}
0