結果

問題 No.512 魔法少女の追いかけっこ
ユーザー tsunabittsunabit
提出日時 2019-06-13 01:26:36
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 686 bytes
コンパイル時間 3,700 ms
コンパイル使用メモリ 74,492 KB
実行使用メモリ 54,716 KB
最終ジャッジ日時 2024-04-20 10:05:40
合計ジャッジ時間 13,088 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 145 ms
54,236 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 143 ms
53,976 KB
testcase_07 AC 144 ms
54,216 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 150 ms
54,260 KB
testcase_11 WA -
testcase_12 AC 146 ms
54,112 KB
testcase_13 AC 147 ms
54,244 KB
testcase_14 AC 139 ms
54,376 KB
testcase_15 WA -
testcase_16 AC 139 ms
54,372 KB
testcase_17 AC 147 ms
54,316 KB
testcase_18 AC 140 ms
54,128 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 157 ms
54,020 KB
testcase_22 AC 142 ms
54,112 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 144 ms
54,572 KB
testcase_27 AC 145 ms
54,696 KB
testcase_28 AC 144 ms
54,508 KB
testcase_29 AC 155 ms
54,516 KB
testcase_30 AC 143 ms
54,224 KB
testcase_31 AC 147 ms
54,112 KB
testcase_32 AC 146 ms
54,624 KB
testcase_33 AC 143 ms
54,368 KB
testcase_34 AC 157 ms
54,456 KB
testcase_35 AC 146 ms
54,152 KB
testcase_36 WA -
testcase_37 AC 144 ms
54,552 KB
testcase_38 AC 149 ms
54,128 KB
testcase_39 AC 143 ms
54,404 KB
testcase_40 AC 150 ms
54,268 KB
testcase_41 AC 148 ms
54,212 KB
testcase_42 AC 143 ms
54,420 KB
testcase_43 WA -
testcase_44 AC 153 ms
54,524 KB
testcase_45 AC 151 ms
54,508 KB
testcase_46 AC 143 ms
54,368 KB
testcase_47 WA -
testcase_48 AC 129 ms
53,664 KB
testcase_49 AC 142 ms
54,108 KB
testcase_50 AC 140 ms
54,492 KB
testcase_51 WA -
testcase_52 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.math.*;

public class No512 {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	double x = sc.nextDouble() * 1000 / 3600, y = sc.nextDouble() * 1000 / 3600;
    	int n = sc.nextInt();
    	int[] a = new int[n];
    	
    	for(int i = 0; i < n; i++) {
    		a[i] = sc.nextInt();
    	}
    	for(int i = 0; i < n - 1; i++) {
    		double j = a[i] / x;
//    		System.out.println("i = " + (i + 1) + " a[i + 1] = " + a[i + 1] + ": j * y = " + (int)(j * y));
    		if((int)(y * j) >= a[i + 1]) {
    			System.out.println("NO");
    			return;
    		}
    	}
    	System.out.println("YES");
    }
}
0