結果

問題 No.512 魔法少女の追いかけっこ
ユーザー Maeda
提出日時 2025-09-08 15:53:57
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 582 bytes
コンパイル時間 2,000 ms
コンパイル使用メモリ 76,340 KB
実行使用メモリ 46,912 KB
最終ジャッジ日時 2025-09-08 15:54:09
合計ジャッジ時間 9,967 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 53
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
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[] list = new int[n];
        boolean flg = true;
        for(int i = 0 ; i < n ; i++ ){
        	list[i] = scan.nextInt();
        	if(flg && i > 0 && list[i-1]*y > list[i]*x){
        		flg = false;
        	}
        }
        if(flg){
        	System.out.println("Yes");
        }else{
        	System.out.println("No");
        }
    }
}
0