結果

問題 No.512 魔法少女の追いかけっこ
ユーザー shinwisteriashinwisteria
提出日時 2018-03-14 14:19:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 500 bytes
コンパイル時間 5,104 ms
コンパイル使用メモリ 71,872 KB
実行使用メモリ 56,504 KB
最終ジャッジ日時 2023-09-09 14:01:12
合計ジャッジ時間 11,557 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,480 KB
testcase_01 AC 122 ms
55,696 KB
testcase_02 AC 130 ms
55,696 KB
testcase_03 AC 123 ms
55,584 KB
testcase_04 AC 133 ms
55,356 KB
testcase_05 AC 126 ms
55,680 KB
testcase_06 AC 123 ms
55,664 KB
testcase_07 AC 129 ms
55,676 KB
testcase_08 AC 127 ms
55,556 KB
testcase_09 AC 124 ms
55,816 KB
testcase_10 AC 129 ms
55,540 KB
testcase_11 AC 126 ms
55,692 KB
testcase_12 AC 126 ms
55,540 KB
testcase_13 AC 133 ms
56,008 KB
testcase_14 AC 126 ms
55,672 KB
testcase_15 AC 123 ms
55,664 KB
testcase_16 AC 123 ms
56,020 KB
testcase_17 AC 127 ms
55,824 KB
testcase_18 AC 124 ms
55,540 KB
testcase_19 AC 129 ms
55,692 KB
testcase_20 AC 121 ms
56,504 KB
testcase_21 AC 129 ms
55,508 KB
testcase_22 AC 122 ms
56,216 KB
testcase_23 AC 122 ms
55,660 KB
testcase_24 AC 130 ms
56,016 KB
testcase_25 AC 121 ms
56,164 KB
testcase_26 AC 127 ms
55,980 KB
testcase_27 AC 121 ms
55,920 KB
testcase_28 AC 119 ms
55,616 KB
testcase_29 AC 126 ms
55,832 KB
testcase_30 AC 121 ms
56,300 KB
testcase_31 AC 127 ms
55,868 KB
testcase_32 AC 127 ms
55,504 KB
testcase_33 AC 126 ms
55,320 KB
testcase_34 AC 126 ms
55,732 KB
testcase_35 AC 125 ms
55,868 KB
testcase_36 AC 119 ms
55,988 KB
testcase_37 AC 121 ms
55,504 KB
testcase_38 AC 126 ms
55,508 KB
testcase_39 AC 122 ms
55,768 KB
testcase_40 AC 131 ms
55,644 KB
testcase_41 AC 122 ms
55,876 KB
testcase_42 AC 124 ms
55,548 KB
testcase_43 AC 119 ms
55,620 KB
testcase_44 AC 125 ms
56,012 KB
testcase_45 AC 122 ms
55,428 KB
testcase_46 AC 124 ms
55,652 KB
testcase_47 AC 130 ms
55,664 KB
testcase_48 AC 121 ms
55,760 KB
testcase_49 AC 120 ms
56,284 KB
testcase_50 AC 120 ms
55,596 KB
testcase_51 AC 120 ms
55,824 KB
testcase_52 AC 128 ms
56,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.Scanner;
public class Con512 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int x = s.nextInt() , y = s.nextInt();
		int n = s.nextInt();
		int[] a = new int[n];
		for(int i = 0;i < n;i++){
			a[i] = s.nextInt();
		}
		s.close();

		boolean ft = true;
		for(int i = 0;i < n-1;i++){
			if(a[i] * y > a[i+1] * x){
				System.out.println("NO");
				ft = false;
				break;
			}
		}
		if(ft){
			System.out.println("YES");
		}

	}

}
0