結果
問題 | No.1265 Balloon Survival |
ユーザー | Coki628 |
提出日時 | 2020-12-05 01:51:52 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,221 bytes |
コンパイル時間 | 300 ms |
コンパイル使用メモリ | 87,464 KB |
実行使用メモリ | 148,180 KB |
最終ジャッジ日時 | 2023-10-13 13:03:32 |
合計ジャッジ時間 | 20,386 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 64 ms
71,824 KB |
testcase_01 | AC | 60 ms
71,620 KB |
testcase_02 | AC | 60 ms
71,552 KB |
testcase_03 | AC | 60 ms
71,496 KB |
testcase_04 | AC | 60 ms
71,600 KB |
testcase_05 | AC | 60 ms
71,492 KB |
testcase_06 | AC | 60 ms
71,640 KB |
testcase_07 | AC | 61 ms
71,652 KB |
testcase_08 | AC | 60 ms
71,384 KB |
testcase_09 | AC | 61 ms
71,560 KB |
testcase_10 | AC | 60 ms
71,708 KB |
testcase_11 | AC | 61 ms
71,448 KB |
testcase_12 | AC | 62 ms
71,760 KB |
testcase_13 | AC | 64 ms
71,728 KB |
testcase_14 | AC | 189 ms
84,416 KB |
testcase_15 | AC | 152 ms
84,028 KB |
testcase_16 | AC | 91 ms
76,860 KB |
testcase_17 | AC | 696 ms
109,800 KB |
testcase_18 | AC | 106 ms
77,596 KB |
testcase_19 | AC | 94 ms
76,912 KB |
testcase_20 | AC | 178 ms
84,324 KB |
testcase_21 | AC | 355 ms
98,640 KB |
testcase_22 | AC | 229 ms
85,748 KB |
testcase_23 | AC | 239 ms
86,468 KB |
testcase_24 | AC | 1,522 ms
146,480 KB |
testcase_25 | AC | 1,484 ms
147,424 KB |
testcase_26 | AC | 1,501 ms
148,076 KB |
testcase_27 | AC | 1,496 ms
147,572 KB |
testcase_28 | AC | 1,543 ms
148,120 KB |
testcase_29 | AC | 1,511 ms
148,020 KB |
testcase_30 | AC | 1,496 ms
148,180 KB |
testcase_31 | AC | 1,489 ms
147,504 KB |
testcase_32 | AC | 1,469 ms
147,560 KB |
testcase_33 | AC | 1,456 ms
147,528 KB |
testcase_34 | AC | 62 ms
71,652 KB |
testcase_35 | WA | - |
ソースコード
import sys from math import hypot def input(): return sys.stdin.readline().strip() def list2d(a, b, c): return [[c] * b for i in range(a)] def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)] def list4d(a, b, c, d, e): return [[[[e] * d for k in range(c)] for j in range(b)] for i in range(a)] def ceil(x, y=1): return int(-(-x // y)) def INT(): return int(input()) def MAP(): return map(int, input().split()) def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)] def Yes(): print('Yes') def No(): print('No') def YES(): print('YES') def NO(): print('NO') sys.setrecursionlimit(10**9) INF = 10**19 MOD = 10**9 + 7 EPS = 10**-10 N = INT() XY = [()] * N for i in range(N): x, y = MAP() XY[i] = (x, y) edges = [] for i, (x, y) in enumerate(XY): for j, (x2, y2) in enumerate(XY[i+1:], i+1): dist = hypot(x-x2, y-y2) / 2 edges.append((dist, i, j)) edges.sort() removed = [0] * N ans = 0 for dist, a, b in edges: if removed[a] or removed[b]: continue if a == 0: ans += 1 removed[b] = 1 elif b == 0: ans += 1 removed[a] = 1 else: removed[a] = 1 removed[b] = 1 print(ans)