結果

問題 No.1265 Balloon Survival
ユーザー proriboneproribone
提出日時 2020-10-23 23:24:52
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 653 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 87,196 KB
実行使用メモリ 175,120 KB
最終ジャッジ日時 2023-09-28 18:41:25
合計ジャッジ時間 32,030 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
71,996 KB
testcase_01 AC 95 ms
72,092 KB
testcase_02 AC 95 ms
71,984 KB
testcase_03 AC 97 ms
71,760 KB
testcase_04 AC 97 ms
72,248 KB
testcase_05 AC 100 ms
75,544 KB
testcase_06 AC 97 ms
71,992 KB
testcase_07 WA -
testcase_08 AC 97 ms
72,276 KB
testcase_09 AC 97 ms
71,872 KB
testcase_10 AC 95 ms
72,320 KB
testcase_11 WA -
testcase_12 AC 95 ms
75,852 KB
testcase_13 AC 93 ms
72,236 KB
testcase_14 AC 295 ms
94,392 KB
testcase_15 AC 230 ms
85,084 KB
testcase_16 AC 149 ms
79,764 KB
testcase_17 AC 1,217 ms
123,772 KB
testcase_18 AC 172 ms
81,424 KB
testcase_19 AC 156 ms
80,248 KB
testcase_20 AC 303 ms
94,404 KB
testcase_21 AC 559 ms
103,268 KB
testcase_22 AC 369 ms
98,236 KB
testcase_23 AC 393 ms
99,820 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 100 ms
75,952 KB
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import ceil,sqrt
from random import randrange

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

d=set()
res=0

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((ceil(dist)//2,min(i,j),max(i,j)))
d=sorted(d)

delete=set()

for t,i,j in d:
    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