結果
問題 | No.1265 Balloon Survival |
ユーザー | tikitaka1201 |
提出日時 | 2020-10-31 10:07:51 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 586 bytes |
コンパイル時間 | 282 ms |
コンパイル使用メモリ | 87,252 KB |
実行使用メモリ | 110,008 KB |
最終ジャッジ日時 | 2023-09-29 10:11:36 |
合計ジャッジ時間 | 18,441 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 71 ms
70,636 KB |
testcase_01 | AC | 71 ms
70,784 KB |
testcase_02 | AC | 72 ms
70,872 KB |
testcase_03 | AC | 71 ms
71,108 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 71 ms
71,016 KB |
testcase_08 | WA | - |
testcase_09 | AC | 73 ms
71,092 KB |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | AC | 76 ms
70,988 KB |
testcase_35 | AC | 77 ms
71,212 KB |
ソースコード
n=int(input()) coord=[] for i in range(n): x,y=map(int,input().split()) coord.append((x,y,i)) dist=[] for i in range(n): tmp=[] for j in range(n): if i==j: continue d=(coord[i][0]-coord[j][0])**2+(coord[i][1]-coord[j][1])**2 tmp.append((d, j)) tmp=sorted(tmp) dist.append(tmp) cnt=0 removed=set([]) for i in range(1,n): for j in range(n-1): x=dist[i][j][1] if x in removed: continue elif x==0: removed.add(i) cnt+=1 else: break print(cnt)