結果
| 問題 | No.1265 Balloon Survival |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-12-03 22:49:45 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 514 bytes |
| 記録 | |
| コンパイル時間 | 892 ms |
| コンパイル使用メモリ | 20,664 KB |
| 実行使用メモリ | 15,360 KB |
| 最終ジャッジ日時 | 2026-04-04 11:23:49 |
| 合計ジャッジ時間 | 5,501 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 4 WA * 28 |
ソースコード
def distance(X, Y):
return abs(X[0] - Y[0]) + abs(X[1] - Y[1])
n = int(input())
f = list(map(int, input().split()))
xy = [list(map(int, input().split())) for _ in range(n-1)]
delete = set()
for i in range(n-1):
fd = distance(f, xy[i])
explotion = False
for g in range(n-1):
if g in delete or g == i:
continue
d = distance(xy[i], xy[g])
if fd > d:
explotion = True
break
if not explotion:
delete.add(i)
print(len(delete))