結果

問題 No.1265 Balloon Survival
ユーザー _matumo__matumo_
提出日時 2020-11-05 09:09:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 354 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 10,868 KB
実行使用メモリ 100,400 KB
最終ジャッジ日時 2023-09-29 16:44:25
合計ジャッジ時間 24,620 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,772 KB
testcase_01 AC 15 ms
7,852 KB
testcase_02 AC 15 ms
7,916 KB
testcase_03 AC 14 ms
7,796 KB
testcase_04 AC 15 ms
7,712 KB
testcase_05 AC 15 ms
7,856 KB
testcase_06 AC 16 ms
7,772 KB
testcase_07 AC 15 ms
7,868 KB
testcase_08 AC 15 ms
7,752 KB
testcase_09 AC 15 ms
7,792 KB
testcase_10 AC 14 ms
7,816 KB
testcase_11 AC 15 ms
7,932 KB
testcase_12 AC 15 ms
7,792 KB
testcase_13 AC 14 ms
7,756 KB
testcase_14 AC 139 ms
18,236 KB
testcase_15 AC 102 ms
15,184 KB
testcase_16 AC 44 ms
10,676 KB
testcase_17 AC 893 ms
56,088 KB
testcase_18 AC 61 ms
12,152 KB
testcase_19 AC 48 ms
10,924 KB
testcase_20 AC 145 ms
18,044 KB
testcase_21 AC 377 ms
30,976 KB
testcase_22 AC 202 ms
21,896 KB
testcase_23 AC 223 ms
23,448 KB
testcase_24 AC 1,902 ms
99,428 KB
testcase_25 AC 1,923 ms
100,216 KB
testcase_26 AC 1,889 ms
100,368 KB
testcase_27 AC 1,888 ms
100,092 KB
testcase_28 AC 1,968 ms
100,400 KB
testcase_29 TLE -
testcase_30 AC 1,932 ms
100,364 KB
testcase_31 AC 1,932 ms
100,224 KB
testcase_32 AC 1,971 ms
100,296 KB
testcase_33 TLE -
testcase_34 AC 16 ms
7,844 KB
testcase_35 AC 15 ms
7,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N =int(input())
pa=[[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