結果

問題 No.512 魔法少女の追いかけっこ
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-17 17:11:43
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 490 bytes
コンパイル時間 1,952 ms
コンパイル使用メモリ 72,600 KB
実行使用メモリ 56,416 KB
最終ジャッジ日時 2023-09-09 13:58:21
合計ジャッジ時間 10,525 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,740 KB
testcase_01 AC 123 ms
55,680 KB
testcase_02 AC 128 ms
55,624 KB
testcase_03 AC 121 ms
55,908 KB
testcase_04 AC 129 ms
55,884 KB
testcase_05 AC 122 ms
55,444 KB
testcase_06 AC 120 ms
55,864 KB
testcase_07 AC 126 ms
55,912 KB
testcase_08 AC 125 ms
55,944 KB
testcase_09 AC 120 ms
55,908 KB
testcase_10 AC 128 ms
55,552 KB
testcase_11 AC 123 ms
55,876 KB
testcase_12 AC 123 ms
55,452 KB
testcase_13 AC 126 ms
55,688 KB
testcase_14 AC 125 ms
55,624 KB
testcase_15 AC 121 ms
55,736 KB
testcase_16 AC 122 ms
55,512 KB
testcase_17 AC 126 ms
55,776 KB
testcase_18 AC 119 ms
55,436 KB
testcase_19 AC 129 ms
55,820 KB
testcase_20 AC 121 ms
55,624 KB
testcase_21 AC 129 ms
56,148 KB
testcase_22 AC 119 ms
55,400 KB
testcase_23 AC 121 ms
55,572 KB
testcase_24 AC 127 ms
55,396 KB
testcase_25 AC 120 ms
55,584 KB
testcase_26 AC 125 ms
55,948 KB
testcase_27 AC 121 ms
55,856 KB
testcase_28 AC 119 ms
55,720 KB
testcase_29 AC 125 ms
55,628 KB
testcase_30 AC 124 ms
55,396 KB
testcase_31 AC 129 ms
55,740 KB
testcase_32 AC 128 ms
55,728 KB
testcase_33 AC 127 ms
56,112 KB
testcase_34 AC 129 ms
56,416 KB
testcase_35 AC 125 ms
55,748 KB
testcase_36 AC 121 ms
55,856 KB
testcase_37 AC 123 ms
55,568 KB
testcase_38 AC 129 ms
55,716 KB
testcase_39 AC 124 ms
55,624 KB
testcase_40 AC 129 ms
55,584 KB
testcase_41 AC 123 ms
55,428 KB
testcase_42 AC 125 ms
55,524 KB
testcase_43 AC 122 ms
55,528 KB
testcase_44 AC 127 ms
55,844 KB
testcase_45 AC 123 ms
55,520 KB
testcase_46 AC 124 ms
55,924 KB
testcase_47 AC 129 ms
55,724 KB
testcase_48 AC 121 ms
55,652 KB
testcase_49 AC 120 ms
55,608 KB
testcase_50 AC 120 ms
55,668 KB
testcase_51 AC 119 ms
55,444 KB
testcase_52 AC 130 ms
55,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int student = sc.nextInt();
		int teacher = sc.nextInt();
		int n = sc.nextInt();
		int[] intersection = new int[n];
		for (int i=0; i<n; i++) {
			intersection[i] = sc.nextInt();
		}
		
		boolean F = true;
		for (int i=0; i<n-1; i++) {
			if (intersection[i]*teacher > intersection[i+1]*student) {F = false;}
		}
		System.out.println(F==true?"YES":"NO");
	}
}
0