結果
問題 |
No.512 魔法少女の追いかけっこ
|
ユーザー |
![]() |
提出日時 | 2017-07-19 01:37:13 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 500 bytes |
コンパイル時間 | 3,828 ms |
コンパイル使用メモリ | 77,944 KB |
実行使用メモリ | 42,072 KB |
最終ジャッジ日時 | 2024-06-27 06:38:40 |
合計ジャッジ時間 | 11,739 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 48 WA * 5 |
ソースコード
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]; for(int i=0;i<N;i++) { A[i]=sc.nextInt(); } double xtime=0; double now=0; double next=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); } }