結果
問題 |
No.1265 Balloon Survival
|
ユーザー |
|
提出日時 | 2020-12-03 22:49:45 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 514 bytes |
コンパイル時間 | 214 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-14 08:09:51 |
合計ジャッジ時間 | 2,831 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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))