結果
| 問題 |
No.512 魔法少女の追いかけっこ
|
| コンテスト | |
| ユーザー |
Tsukasa_Type
|
| 提出日時 | 2018-02-17 17:11:01 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 510 bytes |
| コンパイル時間 | 1,929 ms |
| コンパイル使用メモリ | 74,508 KB |
| 実行使用メモリ | 54,484 KB |
| 最終ジャッジ日時 | 2024-06-27 06:53:45 |
| 合計ジャッジ時間 | 10,206 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 WA * 19 |
ソースコード
import java.util.*;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int student = sc.nextInt()*1000/3600;
int teacher = sc.nextInt()*1000/3600;
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