結果

問題 No.512 魔法少女の追いかけっこ
ユーザー suprosupro
提出日時 2017-05-24 19:01:27
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 546 bytes
コンパイル時間 1,895 ms
コンパイル使用メモリ 71,780 KB
実行使用メモリ 56,404 KB
最終ジャッジ日時 2023-09-09 13:31:48
合計ジャッジ時間 10,299 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,508 KB
testcase_01 AC 122 ms
55,732 KB
testcase_02 WA -
testcase_03 AC 123 ms
55,452 KB
testcase_04 WA -
testcase_05 AC 122 ms
55,704 KB
testcase_06 AC 122 ms
55,624 KB
testcase_07 AC 125 ms
55,352 KB
testcase_08 AC 126 ms
55,524 KB
testcase_09 WA -
testcase_10 AC 128 ms
55,388 KB
testcase_11 AC 125 ms
55,500 KB
testcase_12 AC 126 ms
55,676 KB
testcase_13 AC 129 ms
55,492 KB
testcase_14 AC 125 ms
55,424 KB
testcase_15 AC 122 ms
55,440 KB
testcase_16 AC 122 ms
55,632 KB
testcase_17 AC 125 ms
55,488 KB
testcase_18 AC 121 ms
56,084 KB
testcase_19 AC 127 ms
55,940 KB
testcase_20 AC 119 ms
55,408 KB
testcase_21 AC 127 ms
55,300 KB
testcase_22 AC 118 ms
55,712 KB
testcase_23 AC 127 ms
55,396 KB
testcase_24 WA -
testcase_25 AC 121 ms
55,436 KB
testcase_26 AC 127 ms
55,620 KB
testcase_27 AC 122 ms
55,532 KB
testcase_28 AC 120 ms
55,728 KB
testcase_29 AC 128 ms
55,520 KB
testcase_30 AC 122 ms
55,608 KB
testcase_31 AC 128 ms
56,180 KB
testcase_32 AC 128 ms
55,744 KB
testcase_33 AC 126 ms
55,584 KB
testcase_34 AC 127 ms
56,324 KB
testcase_35 AC 126 ms
55,700 KB
testcase_36 AC 121 ms
55,660 KB
testcase_37 AC 120 ms
55,428 KB
testcase_38 AC 127 ms
55,528 KB
testcase_39 AC 123 ms
55,596 KB
testcase_40 AC 127 ms
56,200 KB
testcase_41 AC 121 ms
55,720 KB
testcase_42 AC 123 ms
55,532 KB
testcase_43 AC 120 ms
55,688 KB
testcase_44 AC 127 ms
55,312 KB
testcase_45 AC 120 ms
55,752 KB
testcase_46 AC 123 ms
55,652 KB
testcase_47 WA -
testcase_48 AC 121 ms
55,388 KB
testcase_49 AC 119 ms
55,780 KB
testcase_50 AC 119 ms
55,424 KB
testcase_51 AC 121 ms
55,704 KB
testcase_52 AC 128 ms
55,592 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package y1;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int X,Y;
		int N;
		int[] A = new int[80];
		X = s.nextInt();
		Y = s.nextInt();
		N = s.nextInt();
		for(int i=0;i<N;i++){
			A[i] = s.nextInt();
		}

		////

		boolean fail = false;

		for(int i=0;i<N-1;i++){
			double t = (double)A[i]/X;
			double yx = t*Y;
			if(yx > A[i+1]){
				fail=true;
			}
		}

		if(fail == true){
			System.out.println("NO");
		}else{
			System.out.println("YES");
		}

	}

}
0