結果

問題 No.1265 Balloon Survival
ユーザー proriboneproribone
提出日時 2020-10-23 23:23:28
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 678 bytes
コンパイル時間 353 ms
コンパイル使用メモリ 87,392 KB
実行使用メモリ 176,220 KB
最終ジャッジ日時 2023-09-28 18:38:18
合計ジャッジ時間 30,819 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 91 ms
72,252 KB
testcase_02 AC 98 ms
72,584 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 105 ms
72,136 KB
testcase_08 AC 98 ms
72,300 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 100 ms
76,416 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 148 ms
80,200 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 365 ms
98,788 KB
testcase_23 WA -
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 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import ceil,sqrt
from random import randrange

N=int(input())
point=[tuple([randrange(-10**8,10**8),randrange(-10**8,10**8)]) 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