結果
問題 |
No.512 魔法少女の追いかけっこ
|
ユーザー |
![]() |
提出日時 | 2025-09-08 15:55:34 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 149 ms / 2,000 ms |
コード長 | 582 bytes |
コンパイル時間 | 2,100 ms |
コンパイル使用メモリ | 76,428 KB |
実行使用メモリ | 46,616 KB |
最終ジャッジ日時 | 2025-09-08 15:55:47 |
合計ジャッジ時間 | 10,159 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 53 |
ソースコード
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"); } } }