結果
| 問題 |
No.512 魔法少女の追いかけっこ
|
| コンテスト | |
| ユーザー |
YamaKasa
|
| 提出日時 | 2018-06-01 17:59:57 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 521 bytes |
| コンパイル時間 | 2,167 ms |
| コンパイル使用メモリ | 74,640 KB |
| 実行使用メモリ | 54,720 KB |
| 最終ジャッジ日時 | 2024-06-30 08:51:44 |
| 合計ジャッジ時間 | 10,751 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 48 WA * 5 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int X = scan.nextInt();
int Y = scan.nextInt();
int N = scan.nextInt();
int []A = new int[N];
for(int i = 0; i < N; i++) {
A[i] = scan.nextInt();
}
scan.close();
for(int i = 0; i < N - 1; i++) {
double t = (double)A[i] / X;
double l = (double)Y * t;
if(l > A[i + 1]) {
System.out.println("NO");
System.exit(0);
}
}
System.out.println("YES");
}
}
YamaKasa