結果
| 問題 | No.512 魔法少女の追いかけっこ |
| コンテスト | |
| ユーザー |
Tsukasa_Type
|
| 提出日時 | 2018-02-17 17:11:43 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
AC
|
| 実行時間 | 61 ms / 2,000 ms |
| コード長 | 490 bytes |
| 記録 | |
| コンパイル時間 | 1,834 ms |
| コンパイル使用メモリ | 81,896 KB |
| 実行使用メモリ | 41,984 KB |
| 最終ジャッジ日時 | 2026-03-14 17:01:21 |
| 合計ジャッジ時間 | 6,309 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 53 |
ソースコード
import java.util.*;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int student = sc.nextInt();
int teacher = sc.nextInt();
int n = sc.nextInt();
int[] intersection = new int[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");
}
}
Tsukasa_Type