結果

問題 No.512 魔法少女の追いかけっこ
ユーザー fal_rndfal_rnd
提出日時 2017-08-29 15:15:18
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 760 bytes
コンパイル時間 3,416 ms
コンパイル使用メモリ 80,292 KB
実行使用メモリ 56,380 KB
最終ジャッジ日時 2023-09-09 13:50:06
合計ジャッジ時間 12,751 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
55,604 KB
testcase_01 AC 132 ms
54,012 KB
testcase_02 AC 138 ms
55,844 KB
testcase_03 AC 135 ms
55,612 KB
testcase_04 AC 139 ms
55,956 KB
testcase_05 AC 133 ms
55,828 KB
testcase_06 AC 130 ms
55,984 KB
testcase_07 AC 138 ms
55,964 KB
testcase_08 AC 137 ms
55,668 KB
testcase_09 AC 133 ms
55,716 KB
testcase_10 AC 136 ms
55,464 KB
testcase_11 AC 135 ms
55,820 KB
testcase_12 AC 136 ms
55,700 KB
testcase_13 AC 140 ms
55,884 KB
testcase_14 AC 137 ms
56,032 KB
testcase_15 AC 134 ms
55,456 KB
testcase_16 AC 131 ms
55,920 KB
testcase_17 AC 139 ms
55,912 KB
testcase_18 AC 133 ms
55,796 KB
testcase_19 AC 147 ms
55,752 KB
testcase_20 AC 133 ms
55,612 KB
testcase_21 AC 140 ms
55,828 KB
testcase_22 AC 134 ms
55,816 KB
testcase_23 AC 135 ms
55,724 KB
testcase_24 AC 139 ms
55,608 KB
testcase_25 AC 132 ms
56,256 KB
testcase_26 AC 142 ms
55,960 KB
testcase_27 AC 138 ms
55,444 KB
testcase_28 AC 133 ms
55,996 KB
testcase_29 AC 140 ms
55,656 KB
testcase_30 AC 138 ms
55,984 KB
testcase_31 AC 139 ms
55,920 KB
testcase_32 AC 140 ms
55,592 KB
testcase_33 AC 138 ms
55,944 KB
testcase_34 AC 141 ms
55,980 KB
testcase_35 AC 139 ms
55,732 KB
testcase_36 AC 132 ms
55,712 KB
testcase_37 AC 130 ms
53,920 KB
testcase_38 AC 138 ms
55,768 KB
testcase_39 AC 136 ms
55,584 KB
testcase_40 AC 140 ms
55,640 KB
testcase_41 AC 130 ms
55,992 KB
testcase_42 AC 134 ms
55,864 KB
testcase_43 AC 130 ms
55,480 KB
testcase_44 AC 137 ms
55,596 KB
testcase_45 AC 133 ms
55,500 KB
testcase_46 AC 135 ms
55,700 KB
testcase_47 AC 139 ms
55,908 KB
testcase_48 AC 127 ms
56,204 KB
testcase_49 AC 127 ms
55,500 KB
testcase_50 AC 129 ms
56,164 KB
testcase_51 WA -
testcase_52 AC 138 ms
56,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.TreeSet;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

public class Main{
	static IntStream REPS(int v){return IntStream.range(0,v);}
	static IntStream REPS(int l,int r){return IntStream.rangeClosed(l,r);}
	static IntStream INS(int n) {return REPS(n).map(i->getInt());}
	static Scanner s=new Scanner(System.in);
	static int getInt(){return Integer.parseInt(s.next());}

	public static void main(String[]$){
		int x=getInt(),y=getInt();
		TreeSet<Integer> ts=INS(getInt()).boxed().collect(Collectors.toCollection(TreeSet::new));

		for(int i:ts) {
			if(ts.subSet((int)(i*1.0/y*x),false,i,true).size()>=2) {
				System.out.println("NO");
				return;
			}
		}
		System.out.println("YES");
	}
}
0