結果
問題 | No.1265 Balloon Survival |
ユーザー | kotatsuinu5 |
提出日時 | 2020-10-23 23:59:09 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 801 bytes |
コンパイル時間 | 98 ms |
コンパイル使用メモリ | 10,848 KB |
実行使用メモリ | 54,328 KB |
最終ジャッジ日時 | 2023-09-28 19:19:28 |
合計ジャッジ時間 | 14,715 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 139 ms
36,880 KB |
testcase_01 | AC | 143 ms
29,776 KB |
testcase_02 | AC | 136 ms
29,528 KB |
testcase_03 | AC | 136 ms
29,608 KB |
testcase_04 | AC | 140 ms
29,776 KB |
testcase_05 | AC | 140 ms
29,852 KB |
testcase_06 | AC | 137 ms
29,688 KB |
testcase_07 | AC | 135 ms
29,736 KB |
testcase_08 | AC | 138 ms
29,612 KB |
testcase_09 | AC | 142 ms
29,700 KB |
testcase_10 | AC | 140 ms
29,724 KB |
testcase_11 | WA | - |
testcase_12 | AC | 138 ms
29,784 KB |
testcase_13 | WA | - |
testcase_14 | AC | 439 ms
35,288 KB |
testcase_15 | AC | 334 ms
33,652 KB |
testcase_16 | AC | 193 ms
31,172 KB |
testcase_17 | TLE | - |
testcase_18 | AC | 220 ms
31,792 KB |
testcase_19 | AC | 196 ms
31,388 KB |
testcase_20 | AC | 423 ms
35,092 KB |
testcase_21 | AC | 1,072 ms
41,484 KB |
testcase_22 | AC | 584 ms
36,956 KB |
testcase_23 | AC | 649 ms
37,836 KB |
testcase_24 | TLE | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
ソースコード
import numpy as np N=int(input()) S=np.full((N,2),0) for i in range(N): A,B=map(int,input().split()) S[i][0]=A S[i][1]=B count=0 while N!=1: all_diffs = np.expand_dims(S, axis=1) - np.expand_dims(S, axis=0) degree_distance = np.sqrt(np.sum(all_diffs ** 2, axis=-1)) tmp=np.where(degree_distance==degree_distance[degree_distance>0].min()) tmp1=tmp[0][0] tmp2=tmp[0][1] if tmp1==0: N-=1 S=np.delete(S,tmp2,0) count+=1 elif tmp2==0: N-=1 S=np.delete(S,tmp1,0) count+=1 else: N-=2 #print("mohu2") S=np.delete(S,max(tmp1,tmp2),0) S=np.delete(S,min(tmp1,tmp2),0) #print(S) #print("mohu") #print("mohu") print(count)