結果
| 問題 |
No.1265 Balloon Survival
|
| コンテスト | |
| ユーザー |
proribone
|
| 提出日時 | 2020-10-23 22:43:54 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 449 bytes |
| コンパイル時間 | 383 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 79,872 KB |
| 最終ジャッジ日時 | 2024-07-21 11:43:41 |
| 合計ジャッジ時間 | 6,765 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 3 WA * 29 |
ソースコード
from heapq import *
N=int(input())
point=[tuple(map(int,input().split())) for _ in range(N)]
d=set()
res=0
for i in range(1,N):
que=[]
heapify(que)
for j in range(N):
if i==j:
continue
xi,yi=point[i]
xj,yj=point[j]
dist=((xi-xj)**2+(yi-yj)**2)**0.5
heappush(que,(dist,j))
while(que[0][1] in d):
heappop(que)
if que[0][1]==0:
d.add(i)
res+=1
print(res)
proribone