結果
問題 | No.1265 Balloon Survival |
ユーザー |
|
提出日時 | 2020-10-23 22:16:50 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 664 bytes |
コンパイル時間 | 287 ms |
コンパイル使用メモリ | 82,436 KB |
実行使用メモリ | 68,636 KB |
最終ジャッジ日時 | 2024-07-21 10:52:30 |
合計ジャッジ時間 | 3,110 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 4 WA * 28 |
ソースコード
import sysread = sys.stdin.readlinen = int(input())x = [0] * ny = [0] * nfor i in range(n):x[i], y[i] = map(int, read().split())def dist(i, j):return (x[i] - x[j]) * (x[i] - x[j]) + (y[i] - y[j]) * (y[i] - y[j])# 取り除いた後に、取り除く必要があるやつが出てくる#ds = []for i in range(1, n):ds.append((dist(0, i), i))ds.sort()ans = 0used = [False] * nfor d, i in ds:need = Truefor j in range(1, n):if i == j or used[j]:continuee = dist(i, j)if d > e:need = Falsebreakif need:used[i] = Trueans += 1print(ans)