結果
問題 |
No.512 魔法少女の追いかけっこ
|
ユーザー |
![]() |
提出日時 | 2017-05-15 07:02:39 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 824 bytes |
コンパイル時間 | 3,455 ms |
コンパイル使用メモリ | 75,656 KB |
実行使用メモリ | 54,132 KB |
最終ジャッジ日時 | 2024-06-27 06:26:28 |
合計ジャッジ時間 | 11,516 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 52 WA * 1 |
ソースコード
/*No.512 魔法少女の追いかけっこ*/ import java.util.*; public class No512 { public static void main(String[] args) { try(Scanner input =new Scanner(System.in)){ float speed[]=new float[2]; float rapTime,rapPoint; boolean chase=true; for(int i=0;i<speed.length;i++){ speed[i]=input.nextByte()*1000f/3600f; } byte Intersection=input.nextByte(); int interval[]=new int[Intersection]; for(int i=0;i<Intersection;i++){ interval[i]=input.nextInt(); } for(int i=0;i<interval.length-1;i++){ rapTime=interval[i]/speed[0]; rapPoint=(int)(speed[1]*rapTime); if(rapPoint>interval[i+1]){ chase=false; break; } } if(chase){ System.out.println("YES"); }else{ System.out.println("NO"); } }catch(Exception e){ e.printStackTrace(); } } }