結果
| 問題 |
No.512 魔法少女の追いかけっこ
|
| コンテスト | |
| ユーザー |
fal_rnd
|
| 提出日時 | 2017-08-29 15:15:18 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 760 bytes |
| コンパイル時間 | 2,528 ms |
| コンパイル使用メモリ | 84,324 KB |
| 実行使用メモリ | 56,324 KB |
| 最終ジャッジ日時 | 2024-06-27 06:46:05 |
| 合計ジャッジ時間 | 11,221 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 52 WA * 1 |
ソースコード
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");
}
}
fal_rnd