結果

問題 No.512 魔法少女の追いかけっこ
ユーザー tsunabittsunabit
提出日時 2019-06-13 01:26:36
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 686 bytes
コンパイル時間 4,484 ms
コンパイル使用メモリ 71,784 KB
実行使用メモリ 58,116 KB
最終ジャッジ日時 2023-08-02 10:42:31
合計ジャッジ時間 14,569 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 146 ms
55,520 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 141 ms
55,780 KB
testcase_07 AC 145 ms
55,824 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 144 ms
55,960 KB
testcase_11 WA -
testcase_12 AC 142 ms
56,160 KB
testcase_13 AC 144 ms
55,956 KB
testcase_14 AC 144 ms
56,044 KB
testcase_15 WA -
testcase_16 AC 136 ms
56,444 KB
testcase_17 AC 140 ms
56,264 KB
testcase_18 AC 136 ms
56,180 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 144 ms
56,320 KB
testcase_22 AC 136 ms
56,200 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 142 ms
55,796 KB
testcase_27 AC 136 ms
55,820 KB
testcase_28 AC 135 ms
55,788 KB
testcase_29 AC 142 ms
56,256 KB
testcase_30 AC 139 ms
55,500 KB
testcase_31 AC 141 ms
56,444 KB
testcase_32 AC 141 ms
56,360 KB
testcase_33 AC 141 ms
56,500 KB
testcase_34 AC 142 ms
55,640 KB
testcase_35 AC 140 ms
56,060 KB
testcase_36 WA -
testcase_37 AC 137 ms
56,524 KB
testcase_38 AC 143 ms
56,168 KB
testcase_39 AC 138 ms
55,752 KB
testcase_40 AC 146 ms
56,272 KB
testcase_41 AC 135 ms
56,372 KB
testcase_42 AC 139 ms
56,032 KB
testcase_43 WA -
testcase_44 AC 144 ms
56,536 KB
testcase_45 AC 141 ms
55,892 KB
testcase_46 AC 143 ms
56,352 KB
testcase_47 WA -
testcase_48 AC 139 ms
55,948 KB
testcase_49 AC 139 ms
55,728 KB
testcase_50 AC 139 ms
55,868 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