結果
問題 | No.2602 Real Collider |
ユーザー | Shirotsume |
提出日時 | 2024-01-12 23:56:22 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,667 bytes |
コンパイル時間 | 408 ms |
コンパイル使用メモリ | 82,284 KB |
実行使用メモリ | 77,732 KB |
最終ジャッジ日時 | 2024-09-28 00:28:34 |
合計ジャッジ時間 | 11,414 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 45 ms
56,212 KB |
testcase_01 | AC | 44 ms
56,116 KB |
testcase_02 | AC | 44 ms
56,024 KB |
testcase_03 | AC | 44 ms
56,184 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | AC | 98 ms
77,548 KB |
testcase_12 | AC | 106 ms
77,104 KB |
testcase_13 | AC | 92 ms
77,056 KB |
testcase_14 | AC | 118 ms
77,056 KB |
testcase_15 | AC | 101 ms
77,176 KB |
testcase_16 | AC | 110 ms
77,184 KB |
testcase_17 | AC | 110 ms
77,440 KB |
testcase_18 | AC | 96 ms
77,184 KB |
testcase_19 | AC | 108 ms
77,056 KB |
testcase_20 | AC | 117 ms
77,056 KB |
testcase_21 | AC | 103 ms
77,184 KB |
testcase_22 | AC | 103 ms
77,312 KB |
testcase_23 | AC | 95 ms
77,568 KB |
testcase_24 | AC | 103 ms
77,440 KB |
testcase_25 | AC | 95 ms
77,100 KB |
testcase_26 | AC | 96 ms
77,260 KB |
testcase_27 | AC | 108 ms
77,184 KB |
testcase_28 | AC | 107 ms
77,440 KB |
testcase_29 | AC | 103 ms
77,056 KB |
testcase_30 | AC | 107 ms
77,440 KB |
testcase_31 | AC | 108 ms
77,184 KB |
testcase_32 | AC | 100 ms
77,268 KB |
testcase_33 | AC | 105 ms
77,056 KB |
testcase_34 | AC | 107 ms
77,496 KB |
testcase_35 | AC | 99 ms
77,056 KB |
testcase_36 | AC | 96 ms
77,440 KB |
testcase_37 | AC | 109 ms
77,184 KB |
testcase_38 | AC | 106 ms
77,184 KB |
testcase_39 | AC | 105 ms
77,440 KB |
testcase_40 | AC | 93 ms
77,056 KB |
testcase_41 | AC | 110 ms
77,056 KB |
testcase_42 | AC | 103 ms
77,196 KB |
testcase_43 | AC | 109 ms
77,172 KB |
testcase_44 | AC | 117 ms
76,928 KB |
testcase_45 | AC | 102 ms
77,108 KB |
testcase_46 | AC | 102 ms
77,164 KB |
testcase_47 | AC | 112 ms
77,184 KB |
testcase_48 | AC | 104 ms
77,440 KB |
testcase_49 | AC | 101 ms
77,332 KB |
testcase_50 | AC | 95 ms
77,312 KB |
testcase_51 | AC | 96 ms
77,056 KB |
testcase_52 | AC | 92 ms
77,296 KB |
testcase_53 | AC | 106 ms
77,056 KB |
testcase_54 | AC | 102 ms
77,148 KB |
testcase_55 | AC | 105 ms
77,568 KB |
testcase_56 | AC | 102 ms
77,056 KB |
testcase_57 | AC | 100 ms
77,480 KB |
testcase_58 | AC | 90 ms
77,440 KB |
testcase_59 | AC | 103 ms
77,184 KB |
testcase_60 | AC | 103 ms
77,156 KB |
testcase_61 | AC | 101 ms
77,416 KB |
testcase_62 | AC | 106 ms
77,628 KB |
testcase_63 | AC | 106 ms
77,440 KB |
testcase_64 | AC | 111 ms
77,184 KB |
testcase_65 | AC | 99 ms
77,184 KB |
testcase_66 | AC | 108 ms
77,184 KB |
testcase_67 | AC | 93 ms
77,440 KB |
testcase_68 | AC | 97 ms
77,056 KB |
testcase_69 | AC | 91 ms
77,440 KB |
testcase_70 | AC | 94 ms
77,232 KB |
testcase_71 | AC | 98 ms
77,440 KB |
testcase_72 | AC | 103 ms
77,056 KB |
testcase_73 | AC | 101 ms
77,312 KB |
testcase_74 | AC | 105 ms
77,440 KB |
testcase_75 | AC | 105 ms
76,928 KB |
testcase_76 | AC | 105 ms
77,296 KB |
testcase_77 | AC | 109 ms
77,056 KB |
testcase_78 | AC | 112 ms
77,056 KB |
testcase_79 | AC | 103 ms
77,056 KB |
testcase_80 | AC | 110 ms
77,404 KB |
ソースコード
import sys, time, random from collections import deque, Counter, defaultdict input = lambda: sys.stdin.readline().rstrip() ii = lambda: int(input()) mi = lambda: map(int, input().split()) li = lambda: list(mi()) inf = 2 ** 63 - 1 mod = 998244353 n = 3 q = ii() x1, y1, x2, y2, x3, y3 = mi() xy = [[x1, y1], [x2, y2], [x3, y3]] #三角形 ans = inf for i in range(n): for j in range(i + 1, n): for k in range(j + 1, n): a, b = xy[i] c, d = xy[j] e, f = xy[k] if a == c == e or b == d == f: continue py = ((e - a) * (a * a + b * b - c * c - d * d) - (c - a) * (a * a + b * b - e * e - f * f)) / (2 * (e - a) * (b - d) - 2 * (c - a) * (b - f) + 0.000000001) if c == a: px = (2 * (b - f) * py - a * a - b * b + e * e + f * f) / (2 * (e - a)) else: px = (2 * (b - d) * py - a * a - b * b + c * c + d * d) / (2 * (c - a)) r = 0 for to in range(n): r = max(r, (px - xy[to][0]) ** 2 + (py - xy[to][1]) ** 2) if ans > r: X, Y = px, py ans = min(ans, r) for i in range(n): for j in range(i + 1, n): a, b = xy[i] c, d = xy[j] px = (a + c) / 2 py = (b + d) / 2 r = 0 for to in range(n): r = max(r, (px - xy[to][0]) ** 2 + (py - xy[to][1]) ** 2) if ans > r: X, Y = px, py ans = min(ans, r) r = ans for _ in range(q): x, y = mi() if (X - x) ** 2 + (Y - y) ** 2 <= r + 0.0001: print('Yes') else: print('No')