結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
56,376 KB
testcase_01 AC 134 ms
55,960 KB
testcase_02 AC 149 ms
56,372 KB
testcase_03 AC 134 ms
55,668 KB
testcase_04 WA -
testcase_05 AC 140 ms
56,160 KB
testcase_06 AC 134 ms
56,544 KB
testcase_07 AC 138 ms
57,016 KB
testcase_08 AC 142 ms
56,152 KB
testcase_09 AC 138 ms
56,124 KB
testcase_10 AC 141 ms
56,180 KB
testcase_11 AC 139 ms
55,864 KB
testcase_12 AC 138 ms
57,816 KB
testcase_13 AC 141 ms
56,256 KB
testcase_14 AC 138 ms
56,044 KB
testcase_15 AC 136 ms
56,052 KB
testcase_16 AC 137 ms
56,088 KB
testcase_17 AC 141 ms
56,324 KB
testcase_18 AC 135 ms
56,116 KB
testcase_19 AC 141 ms
55,832 KB
testcase_20 AC 134 ms
55,836 KB
testcase_21 AC 148 ms
56,044 KB
testcase_22 AC 135 ms
56,024 KB
testcase_23 AC 134 ms
55,600 KB
testcase_24 AC 146 ms
55,896 KB
testcase_25 AC 138 ms
55,824 KB
testcase_26 AC 137 ms
56,524 KB
testcase_27 AC 134 ms
55,752 KB
testcase_28 AC 134 ms
55,884 KB
testcase_29 AC 138 ms
55,984 KB
testcase_30 AC 137 ms
55,612 KB
testcase_31 AC 139 ms
56,028 KB
testcase_32 AC 140 ms
56,368 KB
testcase_33 AC 136 ms
55,952 KB
testcase_34 AC 148 ms
56,432 KB
testcase_35 AC 136 ms
55,980 KB
testcase_36 AC 133 ms
56,024 KB
testcase_37 AC 134 ms
56,000 KB
testcase_38 AC 140 ms
56,100 KB
testcase_39 AC 137 ms
56,508 KB
testcase_40 AC 138 ms
55,692 KB
testcase_41 AC 135 ms
55,856 KB
testcase_42 AC 136 ms
55,892 KB
testcase_43 AC 134 ms
56,660 KB
testcase_44 AC 138 ms
55,936 KB
testcase_45 AC 134 ms
56,328 KB
testcase_46 AC 136 ms
56,184 KB
testcase_47 AC 140 ms
55,912 KB
testcase_48 AC 133 ms
55,556 KB
testcase_49 AC 133 ms
55,856 KB
testcase_50 AC 134 ms
56,128 KB
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();
		}
		
		double student_pos = 0;
		double teacher_pos = 0;
		boolean F = true;
		for (int i=0; i<n-1; i++) {
			student_pos = intersection[i];
			teacher_pos = student_pos*(teacher/student);
			if (teacher_pos > intersection[i+1]) {F = false;}
		}
		
		System.out.println(F==true?"YES":"NO");
	}
}
0