結果

問題 No.512 魔法少女の追いかけっこ
ユーザー akitsu818akitsu818
提出日時 2017-05-05 23:08:02
言語 Java19
(openjdk 21)
結果
WA  
実行時間 -
コード長 539 bytes
コンパイル時間 2,528 ms
コンパイル使用メモリ 71,388 KB
実行使用メモリ 58,260 KB
最終ジャッジ日時 2023-09-09 13:12:44
合計ジャッジ時間 10,941 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
56,004 KB
testcase_01 AC 128 ms
55,748 KB
testcase_02 AC 134 ms
56,084 KB
testcase_03 AC 128 ms
58,228 KB
testcase_04 AC 131 ms
55,712 KB
testcase_05 AC 126 ms
55,636 KB
testcase_06 AC 125 ms
55,728 KB
testcase_07 WA -
testcase_08 AC 134 ms
55,756 KB
testcase_09 WA -
testcase_10 AC 135 ms
55,936 KB
testcase_11 AC 130 ms
55,848 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 127 ms
55,664 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 135 ms
55,712 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 125 ms
55,728 KB
testcase_23 AC 128 ms
55,528 KB
testcase_24 AC 134 ms
55,640 KB
testcase_25 AC 129 ms
56,116 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 127 ms
55,624 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 135 ms
55,756 KB
testcase_32 AC 132 ms
55,864 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 132 ms
55,660 KB
testcase_36 AC 126 ms
55,812 KB
testcase_37 AC 126 ms
55,836 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 AC 134 ms
55,544 KB
testcase_41 AC 128 ms
55,820 KB
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 AC 135 ms
55,940 KB
testcase_48 WA -
testcase_49 WA -
testcase_50 AC 127 ms
56,220 KB
testcase_51 WA -
testcase_52 AC 134 ms
55,836 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String args[]){

		Scanner cin = new Scanner(System.in);

		int X = cin.nextInt();
		int Y = cin.nextInt();
		int N = cin.nextInt();
		int A[] = new int[N];
		boolean result = true;
		double rate = (Y-X)/X;

		for(int i=1;i<=N;i++){
			A[i-1] = cin.nextInt();
			if(i>1){
				if((double)(A[i-1]-A[i-2])*rate>(double)A[i-1]){
					result = false;
					break;
				}
			}
		}

		if(result){
			System.out.println("YES");
		}else{
			System.out.println("NO");
		}

	}
}
0