結果

問題 No.512 魔法少女の追いかけっこ
ユーザー fjafjafjafjafjafja
提出日時 2017-07-19 01:15:42
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 522 bytes
コンパイル時間 3,481 ms
コンパイル使用メモリ 72,448 KB
実行使用メモリ 57,756 KB
最終ジャッジ日時 2023-09-09 13:39:58
合計ジャッジ時間 11,701 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,972 KB
testcase_01 AC 121 ms
55,676 KB
testcase_02 AC 128 ms
55,788 KB
testcase_03 AC 124 ms
56,152 KB
testcase_04 AC 127 ms
55,908 KB
testcase_05 AC 121 ms
56,372 KB
testcase_06 AC 118 ms
55,852 KB
testcase_07 WA -
testcase_08 AC 125 ms
53,640 KB
testcase_09 AC 118 ms
55,620 KB
testcase_10 AC 131 ms
55,588 KB
testcase_11 AC 122 ms
55,988 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 121 ms
55,800 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 125 ms
56,164 KB
testcase_20 AC 118 ms
55,780 KB
testcase_21 WA -
testcase_22 AC 117 ms
56,136 KB
testcase_23 AC 119 ms
55,944 KB
testcase_24 AC 126 ms
55,852 KB
testcase_25 AC 120 ms
55,476 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 119 ms
56,064 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 125 ms
56,004 KB
testcase_32 AC 126 ms
55,696 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 123 ms
55,716 KB
testcase_36 AC 118 ms
55,880 KB
testcase_37 AC 119 ms
55,796 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 AC 126 ms
55,700 KB
testcase_41 AC 119 ms
55,844 KB
testcase_42 WA -
testcase_43 AC 120 ms
55,796 KB
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 AC 127 ms
55,644 KB
testcase_48 AC 118 ms
55,996 KB
testcase_49 WA -
testcase_50 WA -
testcase_51 AC 118 ms
55,668 KB
testcase_52 AC 127 ms
55,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class N512
{
	public static void main(String[] args)
	{
		Scanner sc =new Scanner (System.in);
		double X=sc.nextInt();
		double Y=sc.nextInt();
		int N=sc.nextInt();
		int[] A=new int[N];
		double D=Y-X;
		for(int i=0;i<N;i++)
		{
			A[i]=sc.nextInt();
		}
		double xtime=0;
		double now=0;
		double next=A[0];
		String msg="YES";
		for(int i=0;i<N-1;i++)
		{
			now+=A[i];
			next+=A[i+1];
			xtime=now/X;
			if(xtime*X>next)
			{
				msg="NO";
			}
		}
		System.out.println(msg);
	}

}
0