結果
問題 | No.1265 Balloon Survival |
ユーザー | NatsubiSogan |
提出日時 | 2020-10-23 22:21:01 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 510 bytes |
コンパイル時間 | 426 ms |
コンパイル使用メモリ | 87,016 KB |
実行使用メモリ | 77,316 KB |
最終ジャッジ日時 | 2023-09-28 16:15:14 |
合計ジャッジ時間 | 5,467 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 74 ms
71,440 KB |
testcase_01 | AC | 73 ms
71,308 KB |
testcase_02 | AC | 71 ms
71,488 KB |
testcase_03 | AC | 71 ms
71,496 KB |
testcase_04 | WA | - |
testcase_05 | AC | 72 ms
71,436 KB |
testcase_06 | WA | - |
testcase_07 | AC | 71 ms
71,196 KB |
testcase_08 | AC | 74 ms
71,604 KB |
testcase_09 | AC | 73 ms
71,180 KB |
testcase_10 | AC | 74 ms
71,416 KB |
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 | AC | 84 ms
76,248 KB |
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
71,352 KB |
testcase_35 | AC | 73 ms
71,512 KB |
ソースコード
n = int(input()) xy = [list(map(int, input().split())) for i in range(n)] ans = n - 1 sx, sy = xy.pop(0) xy.sort() visited = [False] * (n - 1) for i in range(n - 1): cur = (sx - xy[i][0]) ** 2 + (sy - xy[i][1]) ** 2 for j in range(i, n - 1): if i != j: if (xy[i][0] - xy[j][0]) ** 2 + (xy[i][1] - xy[j][1]) ** 2 < cur and not visited[i] and not visited[j]: ans -= 2 visited[i] = True visited[j] = True break print(ans)