結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,732 KB
testcase_01 AC 123 ms
56,080 KB
testcase_02 AC 128 ms
55,904 KB
testcase_03 AC 119 ms
55,760 KB
testcase_04 AC 125 ms
56,024 KB
testcase_05 AC 121 ms
55,936 KB
testcase_06 AC 118 ms
55,664 KB
testcase_07 AC 123 ms
55,648 KB
testcase_08 AC 123 ms
55,444 KB
testcase_09 AC 118 ms
55,624 KB
testcase_10 AC 126 ms
55,680 KB
testcase_11 AC 123 ms
56,308 KB
testcase_12 AC 122 ms
55,952 KB
testcase_13 AC 125 ms
55,980 KB
testcase_14 WA -
testcase_15 AC 118 ms
55,896 KB
testcase_16 AC 124 ms
55,632 KB
testcase_17 WA -
testcase_18 AC 118 ms
56,272 KB
testcase_19 AC 126 ms
55,448 KB
testcase_20 AC 116 ms
55,868 KB
testcase_21 AC 129 ms
55,672 KB
testcase_22 AC 125 ms
55,580 KB
testcase_23 AC 119 ms
55,696 KB
testcase_24 AC 126 ms
55,848 KB
testcase_25 AC 120 ms
55,928 KB
testcase_26 AC 125 ms
56,512 KB
testcase_27 AC 120 ms
55,864 KB
testcase_28 AC 123 ms
55,660 KB
testcase_29 AC 125 ms
55,928 KB
testcase_30 AC 120 ms
56,536 KB
testcase_31 AC 125 ms
55,792 KB
testcase_32 AC 126 ms
53,876 KB
testcase_33 AC 125 ms
56,092 KB
testcase_34 AC 126 ms
55,732 KB
testcase_35 AC 123 ms
55,712 KB
testcase_36 AC 117 ms
55,900 KB
testcase_37 AC 119 ms
55,844 KB
testcase_38 AC 125 ms
56,456 KB
testcase_39 AC 121 ms
55,996 KB
testcase_40 AC 126 ms
55,732 KB
testcase_41 AC 119 ms
55,896 KB
testcase_42 WA -
testcase_43 AC 118 ms
55,672 KB
testcase_44 AC 124 ms
55,700 KB
testcase_45 AC 120 ms
56,288 KB
testcase_46 WA -
testcase_47 AC 127 ms
55,492 KB
testcase_48 AC 119 ms
55,676 KB
testcase_49 AC 117 ms
56,668 KB
testcase_50 AC 117 ms
56,032 KB
testcase_51 AC 119 ms
55,616 KB
testcase_52 AC 125 ms
55,816 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*Y>next)
			{
				msg="NO";
			}
		}
		System.out.println(msg);
	}

}
0