結果

問題 No.512 魔法少女の追いかけっこ
ユーザー supro
提出日時 2017-05-24 19:01:27
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 546 bytes
コンパイル時間 2,723 ms
コンパイル使用メモリ 74,484 KB
実行使用メモリ 41,804 KB
最終ジャッジ日時 2024-06-27 06:30:01
合計ジャッジ時間 10,836 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 48 WA * 5
権限があれば一括ダウンロードができます

ソースコード

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