結果

問題 No.512 魔法少女の追いかけっこ
ユーザー akitsu818akitsu818
提出日時 2017-05-05 22:38:49
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 552 bytes
コンパイル時間 1,986 ms
コンパイル使用メモリ 71,400 KB
実行使用メモリ 56,608 KB
最終ジャッジ日時 2023-09-09 12:58:21
合計ジャッジ時間 10,238 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
56,308 KB
testcase_01 AC 122 ms
55,808 KB
testcase_02 AC 128 ms
56,056 KB
testcase_03 AC 121 ms
56,072 KB
testcase_04 AC 129 ms
56,036 KB
testcase_05 AC 124 ms
56,104 KB
testcase_06 AC 122 ms
56,024 KB
testcase_07 WA -
testcase_08 AC 126 ms
55,840 KB
testcase_09 AC 119 ms
53,708 KB
testcase_10 AC 128 ms
55,808 KB
testcase_11 AC 124 ms
56,316 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 119 ms
56,032 KB
testcase_16 AC 118 ms
55,792 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 126 ms
56,404 KB
testcase_20 AC 117 ms
55,760 KB
testcase_21 WA -
testcase_22 AC 119 ms
56,112 KB
testcase_23 AC 119 ms
56,204 KB
testcase_24 AC 129 ms
55,756 KB
testcase_25 AC 120 ms
56,276 KB
testcase_26 AC 118 ms
55,924 KB
testcase_27 WA -
testcase_28 AC 119 ms
56,192 KB
testcase_29 AC 118 ms
56,084 KB
testcase_30 WA -
testcase_31 AC 129 ms
55,908 KB
testcase_32 AC 127 ms
55,860 KB
testcase_33 WA -
testcase_34 AC 119 ms
56,016 KB
testcase_35 AC 124 ms
56,124 KB
testcase_36 AC 119 ms
56,008 KB
testcase_37 AC 121 ms
56,092 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 AC 126 ms
56,408 KB
testcase_41 AC 120 ms
56,104 KB
testcase_42 WA -
testcase_43 AC 118 ms
53,980 KB
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 AC 128 ms
55,632 KB
testcase_48 AC 119 ms
56,288 KB
testcase_49 WA -
testcase_50 AC 119 ms
55,724 KB
testcase_51 AC 119 ms
56,428 KB
testcase_52 AC 128 ms
56,024 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];
		long sum = 0L;
		boolean result = true;
		double rate = (Y-X)/X;

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

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

	}
}
0