結果

問題 No.512 魔法少女の追いかけっこ
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-17 17:09:35
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 528 bytes
コンパイル時間 2,265 ms
コンパイル使用メモリ 71,476 KB
実行使用メモリ 56,188 KB
最終ジャッジ日時 2023-09-09 13:57:38
合計ジャッジ時間 11,871 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 147 ms
55,844 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 145 ms
55,928 KB
testcase_13 AC 149 ms
56,020 KB
testcase_14 AC 149 ms
55,644 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 149 ms
56,068 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 149 ms
55,840 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 152 ms
56,104 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 142 ms
55,820 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 149 ms
56,072 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 147 ms
56,136 KB
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 148 ms
55,612 KB
testcase_43 WA -
testcase_44 AC 152 ms
56,016 KB
testcase_45 WA -
testcase_46 AC 147 ms
55,888 KB
testcase_47 WA -
testcase_48 WA -
testcase_49 AC 145 ms
55,548 KB
testcase_50 WA -
testcase_51 WA -
testcase_52 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		double student = sc.nextDouble()*1000/3600;
		double teacher = sc.nextDouble()*1000/3600;
		int n = sc.nextInt();
		double[] intersection = new double[n];
		for (int i=0; i<n; i++) {
			intersection[i] = sc.nextInt();
		}
		
		boolean F = true;
		for (int i=0; i<n-1; i++) {
			if (intersection[i]*teacher < intersection[i+1]*student) {F = false;}
		}
		System.out.println(F==true?"YES":"NO");
	}
}
0