結果
| 問題 |
No.512 魔法少女の追いかけっこ
|
| コンテスト | |
| ユーザー |
fjafjafja
|
| 提出日時 | 2017-07-19 01:51:27 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 680 bytes |
| コンパイル時間 | 3,247 ms |
| コンパイル使用メモリ | 74,264 KB |
| 実行使用メモリ | 54,084 KB |
| 最終ジャッジ日時 | 2024-06-27 06:39:13 |
| 合計ジャッジ時間 | 11,788 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 52 WA * 1 |
ソースコード
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];
int buf=0;
for(int i=0;i<N;i++)
{
A[i]=sc.nextInt();
}
double xtime=0;
double now=0;
double next=0;
String msg="YES";
String emsg="";
for(int i=0;i<N-1;i++)
{
now=A[i];
next=A[i+1];
xtime=now/X;
//System.out.print(xtime*Y+" ");
if(xtime*Y>=next+1)
{
msg="NO";
//emsg="now:"+now+"next"+next+"Y:"+(xtime*Y);
}
}
//System.out.println("");
//System.out.println(emsg);
System.out.println(msg);
}
}
fjafjafja