結果
| 問題 |
No.512 魔法少女の追いかけっこ
|
| コンテスト | |
| ユーザー |
fjafjafja
|
| 提出日時 | 2017-07-19 01:54:28 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 142 ms / 2,000 ms |
| コード長 | 682 bytes |
| コンパイル時間 | 3,376 ms |
| コンパイル使用メモリ | 76,020 KB |
| 実行使用メモリ | 41,704 KB |
| 最終ジャッジ日時 | 2024-06-27 06:39:28 |
| 合計ジャッジ時間 | 11,708 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 53 |
ソースコード
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+0.1)
{
msg="NO";
//emsg="now:"+now+"next"+next+"Y:"+(xtime*Y);
}
}
//System.out.println("");
//System.out.println(emsg);
System.out.println(msg);
}
}
fjafjafja