結果

問題 No.512 魔法少女の追いかけっこ
ユーザー YamaKasa
提出日時 2018-06-01 18:26:01
言語 Java
(openjdk 23)
結果
AC  
実行時間 147 ms / 2,000 ms
コード長 615 bytes
コンパイル時間 2,136 ms
コンパイル使用メモリ 74,780 KB
実行使用メモリ 56,260 KB
最終ジャッジ日時 2024-06-30 08:53:41
合計ジャッジ時間 10,524 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 53
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int X = scan.nextInt();
		int Y = scan.nextInt();
		int N = scan.nextInt();
		int []A = new int[N];
		for(int i = 0; i < N; i++) {
			A[i] = scan.nextInt();
		}
		scan.close();
		for(int i = 0; i < N - 1; i++) {
			//double t = (double)A[i] / X;
			double l = (double)Y * A[i] / X;
			//System.out.print(l + " ");
			if(l > A[i + 1]) {
				System.out.println("NO");
				System.exit(0);
			}
		}
//		double t1 = (double)A[N - 1] / X;
//		double l1 =
		System.out.println("YES");

	}
}
0