結果
| 問題 | No.512 魔法少女の追いかけっこ |
| コンテスト | |
| ユーザー |
Tsukasa_Type
|
| 提出日時 | 2018-02-17 17:11:43 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 140 ms / 2,000 ms |
| コード長 | 490 bytes |
| 記録 | |
| コンパイル時間 | 2,229 ms |
| コンパイル使用メモリ | 74,816 KB |
| 実行使用メモリ | 41,636 KB |
| 最終ジャッジ日時 | 2024-06-27 06:53:57 |
| 合計ジャッジ時間 | 10,307 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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