結果
| 問題 |
No.512 魔法少女の追いかけっこ
|
| コンテスト | |
| ユーザー |
Tsukasa_Type
|
| 提出日時 | 2018-02-17 17:02:28 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 627 bytes |
| コンパイル時間 | 2,054 ms |
| コンパイル使用メモリ | 74,484 KB |
| 実行使用メモリ | 56,260 KB |
| 最終ジャッジ日時 | 2024-06-27 06:51:53 |
| 合計ジャッジ時間 | 10,721 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 WA * 17 RE * 2 |
ソースコード
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();
}
double student_pos = 0;
double teacher_pos = 0;
boolean F = true;
for (int i=0; i<n-1; i++) {
student_pos = intersection[i];
teacher_pos = student_pos*(teacher/student);
if (teacher_pos > intersection[i+1]) {F = false;}
}
System.out.println(F==true?"YES":"NO");
}
}
Tsukasa_Type