結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
53,676 KB
testcase_01 AC 130 ms
53,932 KB
testcase_02 AC 139 ms
53,972 KB
testcase_03 AC 125 ms
54,092 KB
testcase_04 AC 138 ms
54,248 KB
testcase_05 AC 111 ms
53,408 KB
testcase_06 AC 125 ms
54,472 KB
testcase_07 AC 135 ms
54,236 KB
testcase_08 AC 132 ms
54,492 KB
testcase_09 AC 113 ms
53,220 KB
testcase_10 AC 142 ms
54,348 KB
testcase_11 AC 126 ms
54,372 KB
testcase_12 AC 133 ms
54,272 KB
testcase_13 AC 142 ms
54,736 KB
testcase_14 AC 131 ms
54,376 KB
testcase_15 AC 130 ms
54,544 KB
testcase_16 AC 131 ms
54,380 KB
testcase_17 AC 136 ms
54,388 KB
testcase_18 AC 128 ms
54,096 KB
testcase_19 AC 141 ms
54,348 KB
testcase_20 AC 135 ms
54,120 KB
testcase_21 AC 139 ms
54,032 KB
testcase_22 AC 120 ms
53,628 KB
testcase_23 AC 128 ms
54,084 KB
testcase_24 AC 140 ms
54,396 KB
testcase_25 AC 126 ms
54,204 KB
testcase_26 AC 115 ms
53,604 KB
testcase_27 AC 122 ms
53,392 KB
testcase_28 AC 128 ms
54,240 KB
testcase_29 AC 135 ms
54,404 KB
testcase_30 AC 119 ms
53,732 KB
testcase_31 AC 130 ms
54,368 KB
testcase_32 AC 137 ms
54,280 KB
testcase_33 AC 124 ms
53,816 KB
testcase_34 AC 133 ms
54,436 KB
testcase_35 AC 127 ms
54,372 KB
testcase_36 AC 124 ms
53,968 KB
testcase_37 AC 125 ms
53,592 KB
testcase_38 AC 128 ms
54,008 KB
testcase_39 AC 131 ms
54,308 KB
testcase_40 AC 129 ms
54,276 KB
testcase_41 AC 129 ms
54,376 KB
testcase_42 AC 127 ms
54,452 KB
testcase_43 AC 113 ms
53,616 KB
testcase_44 AC 130 ms
54,380 KB
testcase_45 AC 112 ms
53,680 KB
testcase_46 WA -
testcase_47 AC 134 ms
54,400 KB
testcase_48 AC 126 ms
54,136 KB
testcase_49 AC 113 ms
53,684 KB
testcase_50 AC 114 ms
53,332 KB
testcase_51 AC 126 ms
54,164 KB
testcase_52 AC 133 ms
54,108 KB
権限があれば一括ダウンロードができます

ソースコード

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("j = " + j + ": j * y = " + (j * y));
    		if((int)(y * j) > a[i + 1]) {
    			System.out.println("NO");
    			return;
    		}
    	}
    	System.out.println("YES");
    }
}
0