結果

問題 No.1265 Balloon Survival
ユーザー proriboneproribone
提出日時 2020-10-23 23:35:29
言語 PyPy3
(7.3.13)
結果
WA  
実行時間 -
コード長 798 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 87,168 KB
実行使用メモリ 184,084 KB
最終ジャッジ日時 2023-09-28 18:51:27
合計ジャッジ時間 29,487 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
71,248 KB
testcase_01 AC 81 ms
71,536 KB
testcase_02 AC 80 ms
71,380 KB
testcase_03 AC 86 ms
71,820 KB
testcase_04 AC 80 ms
71,568 KB
testcase_05 AC 81 ms
71,368 KB
testcase_06 AC 78 ms
71,580 KB
testcase_07 WA -
testcase_08 AC 77 ms
71,428 KB
testcase_09 AC 79 ms
71,536 KB
testcase_10 AC 79 ms
71,488 KB
testcase_11 AC 79 ms
71,692 KB
testcase_12 AC 80 ms
71,584 KB
testcase_13 AC 79 ms
71,612 KB
testcase_14 AC 290 ms
89,728 KB
testcase_15 AC 231 ms
87,484 KB
testcase_16 AC 138 ms
79,736 KB
testcase_17 AC 1,127 ms
124,004 KB
testcase_18 AC 172 ms
82,412 KB
testcase_19 AC 147 ms
80,140 KB
testcase_20 AC 285 ms
89,896 KB
testcase_21 AC 552 ms
98,372 KB
testcase_22 AC 367 ms
91,716 KB
testcase_23 AC 401 ms
93,064 KB
testcase_24 TLE -
testcase_25 TLE -
testcase_26 TLE -
testcase_27 TLE -
testcase_28 TLE -
testcase_29 TLE -
testcase_30 TLE -
testcase_31 TLE -
testcase_32 TLE -
testcase_33 TLE -
testcase_34 AC 82 ms
71,524 KB
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import ceil,sqrt
from heapq import *

N=int(input())
point=[tuple(map(int,input().split())) for _ in range(N)]

d=set()
res=0

def off(a,b,c):
    return a*10**19+b*10**9+c
def get(x):
    a=x//10**19
    x%=10**19
    b=x//10**9
    x%=10**9
    return a,b,x

G=[]
for i in range(N):
    que=[]
    for j in range(N):
        if i==j:
            continue
        xi,yi=point[i]
        xj,yj=point[j]
        dist=sqrt((xi-xj)**2+(yi-yj)**2)
        d.add(off((ceil(dist)+1)//2,min(i,j),max(i,j)))
d=sorted(d)

delete=set()

for x in d:
    t,i,j=get(x)
    if i in delete or j in delete:
        continue
    if i!=0 and j!=0:
        delete.add(i)
        delete.add(j)
    elif i==0:
        delete.add(j)
        res+=1
    elif j==0:
        delete.add(i)
        res+=1
print(res)
0