結果
| 問題 |
No.512 魔法少女の追いかけっこ
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-09 21:02:54 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 696 bytes |
| コンパイル時間 | 174 ms |
| コンパイル使用メモリ | 82,184 KB |
| 実行使用メモリ | 54,428 KB |
| 最終ジャッジ日時 | 2025-04-09 21:05:06 |
| 合計ジャッジ時間 | 3,817 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 44 WA * 9 |
ソースコード
X, Y = map(int, input().split())
N = int(input())
A = list(map(int, input().split()))
# Calculate the master's arrival times at each checkpoint
sensei_times = [0.0] * (N + 1)
for i in range(1, N + 1):
prev = A[i-2] if i >= 2 else 0
distance = A[i-1] - prev
time = distance / (Y * 1000)
sensei_times[i] = sensei_times[i-1] + time
# Check each checkpoint for the losing condition
lose = False
for i in range(N - 1):
koba_time = A[i] / (X * 1000)
# The master's arrival time at the next checkpoint (i+2 in 0-based sensei_times)
sensei_next_time = sensei_times[i + 2]
if sensei_next_time < koba_time:
lose = True
break
print("NO" if lose else "YES")
lam6er