結果
問題 | No.1265 Balloon Survival |
ユーザー | brthyyjp |
提出日時 | 2020-10-23 22:23:37 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 608 bytes |
コンパイル時間 | 747 ms |
コンパイル使用メモリ | 87,104 KB |
実行使用メモリ | 85,628 KB |
最終ジャッジ日時 | 2023-09-28 16:19:58 |
合計ジャッジ時間 | 6,020 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 77 ms
71,496 KB |
testcase_01 | AC | 77 ms
71,308 KB |
testcase_02 | AC | 75 ms
71,012 KB |
testcase_03 | AC | 79 ms
71,312 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 76 ms
71,760 KB |
testcase_08 | WA | - |
testcase_09 | AC | 74 ms
71,328 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 | 77 ms
71,356 KB |
testcase_35 | WA | - |
ソースコード
n = int(input()) XY = [] for i in range(n): x, y = map(int, input().split()) XY.append((x, y)) if n == 1: print(0) exit() import math INF = float('inf') D = [[INF]*n for _ in range(n)] for i in range(n-1): x1, y1=XY[i] for j in range(i+1, n): x2,y2 = XY[j] d = math.hypot(x1-x2, y1-y2)/2 D[i][j] = d D[j][i] = d #print(D) ans = 0 used = set() for i in range(1, n): p = D[i][0] for j in range(1, n): if j in used: continue if D[i][j] < p: break else: ans += 1 used.add(i) print(ans)