結果

問題 No.512 魔法少女の追いかけっこ
ユーザー htensaihtensai
提出日時 2019-11-17 18:53:59
言語 Java21
(openjdk 21)
結果
AC  
実行時間 147 ms / 2,000 ms
コード長 449 bytes
コンパイル時間 2,343 ms
コンパイル使用メモリ 74,284 KB
実行使用メモリ 57,828 KB
最終ジャッジ日時 2023-10-25 21:21:09
合計ジャッジ時間 11,860 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 139 ms
57,488 KB
testcase_01 AC 139 ms
57,736 KB
testcase_02 AC 144 ms
57,712 KB
testcase_03 AC 140 ms
57,668 KB
testcase_04 AC 147 ms
55,832 KB
testcase_05 AC 138 ms
57,584 KB
testcase_06 AC 139 ms
57,320 KB
testcase_07 AC 137 ms
57,648 KB
testcase_08 AC 140 ms
57,776 KB
testcase_09 AC 137 ms
57,548 KB
testcase_10 AC 143 ms
57,704 KB
testcase_11 AC 141 ms
57,548 KB
testcase_12 AC 135 ms
57,556 KB
testcase_13 AC 137 ms
57,584 KB
testcase_14 AC 138 ms
57,548 KB
testcase_15 AC 137 ms
57,568 KB
testcase_16 AC 136 ms
57,508 KB
testcase_17 AC 136 ms
57,500 KB
testcase_18 AC 138 ms
57,548 KB
testcase_19 AC 146 ms
57,792 KB
testcase_20 AC 135 ms
57,756 KB
testcase_21 AC 137 ms
57,580 KB
testcase_22 AC 137 ms
57,544 KB
testcase_23 AC 138 ms
57,512 KB
testcase_24 AC 145 ms
57,780 KB
testcase_25 AC 138 ms
57,732 KB
testcase_26 AC 135 ms
55,552 KB
testcase_27 AC 136 ms
57,544 KB
testcase_28 AC 136 ms
57,540 KB
testcase_29 AC 137 ms
57,624 KB
testcase_30 AC 137 ms
57,540 KB
testcase_31 AC 144 ms
57,700 KB
testcase_32 AC 142 ms
57,828 KB
testcase_33 AC 134 ms
57,536 KB
testcase_34 AC 134 ms
57,540 KB
testcase_35 AC 139 ms
57,708 KB
testcase_36 AC 137 ms
57,716 KB
testcase_37 AC 137 ms
57,568 KB
testcase_38 AC 135 ms
57,612 KB
testcase_39 AC 138 ms
57,572 KB
testcase_40 AC 144 ms
57,680 KB
testcase_41 AC 136 ms
55,720 KB
testcase_42 AC 135 ms
57,532 KB
testcase_43 AC 136 ms
57,536 KB
testcase_44 AC 135 ms
57,656 KB
testcase_45 AC 135 ms
57,540 KB
testcase_46 AC 135 ms
57,656 KB
testcase_47 AC 144 ms
57,772 KB
testcase_48 AC 136 ms
57,764 KB
testcase_49 AC 134 ms
57,548 KB
testcase_50 AC 138 ms
57,240 KB
testcase_51 AC 137 ms
57,700 KB
testcase_52 AC 144 ms
57,816 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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


0