結果

問題 No.1265 Balloon Survival
ユーザー _matumo__matumo_
提出日時 2020-11-05 20:07:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,220 ms / 2,000 ms
コード長 359 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 10,880 KB
実行使用メモリ 84,620 KB
最終ジャッジ日時 2023-09-29 17:33:15
合計ジャッジ時間 15,356 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,800 KB
testcase_01 AC 16 ms
7,820 KB
testcase_02 AC 16 ms
7,692 KB
testcase_03 AC 16 ms
7,768 KB
testcase_04 AC 17 ms
7,840 KB
testcase_05 AC 15 ms
7,904 KB
testcase_06 AC 15 ms
7,764 KB
testcase_07 AC 15 ms
7,692 KB
testcase_08 AC 15 ms
7,748 KB
testcase_09 AC 15 ms
7,804 KB
testcase_10 AC 15 ms
7,756 KB
testcase_11 AC 15 ms
7,800 KB
testcase_12 AC 15 ms
7,888 KB
testcase_13 AC 14 ms
7,836 KB
testcase_14 AC 119 ms
16,380 KB
testcase_15 AC 85 ms
13,940 KB
testcase_16 AC 40 ms
10,112 KB
testcase_17 AC 594 ms
47,896 KB
testcase_18 AC 53 ms
11,208 KB
testcase_19 AC 43 ms
10,408 KB
testcase_20 AC 112 ms
16,148 KB
testcase_21 AC 265 ms
26,760 KB
testcase_22 AC 152 ms
19,456 KB
testcase_23 AC 177 ms
20,532 KB
testcase_24 AC 1,220 ms
83,628 KB
testcase_25 AC 1,204 ms
84,384 KB
testcase_26 AC 1,216 ms
84,428 KB
testcase_27 AC 1,212 ms
84,560 KB
testcase_28 AC 1,196 ms
84,620 KB
testcase_29 AC 1,139 ms
84,604 KB
testcase_30 AC 1,169 ms
84,504 KB
testcase_31 AC 1,136 ms
84,416 KB
testcase_32 AC 1,136 ms
84,416 KB
testcase_33 AC 1,159 ms
84,504 KB
testcase_34 AC 15 ms
7,744 KB
testcase_35 AC 15 ms
7,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N =int(input())
pa=[tuple(int(a) for a in input().split()) for i in range(N)]
pb=[]
for i,(xi,yi) in enumerate(pa[:-1]):
    for j in range(i+1,N):
        xj,yj=pa[j]
        r=(xi-xj)**2+(yi-yj)**2
        pb.append((r,i,j))
pb.sort()
pc=[0]*N
cn=0
for r,i,j in pb:
    if pc[i] or pc[j]: continue
    pc[j]=1
    if i>0: pc[i]=1
    else:   cn+=1
print(cn)
0