結果
問題 | No.2602 Real Collider |
ユーザー | Moss_Local |
提出日時 | 2024-01-12 22:27:40 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,458 bytes |
コンパイル時間 | 188 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 47,820 KB |
最終ジャッジ日時 | 2024-09-27 23:01:03 |
合計ジャッジ時間 | 60,519 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 553 ms
47,180 KB |
testcase_01 | AC | 557 ms
47,304 KB |
testcase_02 | AC | 552 ms
47,440 KB |
testcase_03 | AC | 558 ms
47,308 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | AC | 565 ms
47,304 KB |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | AC | 701 ms
47,052 KB |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | AC | 660 ms
47,312 KB |
testcase_16 | AC | 719 ms
47,432 KB |
testcase_17 | AC | 736 ms
47,436 KB |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | AC | 774 ms
47,436 KB |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | AC | 739 ms
47,436 KB |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | WA | - |
testcase_32 | AC | 697 ms
47,308 KB |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | WA | - |
testcase_36 | WA | - |
testcase_37 | AC | 724 ms
47,432 KB |
testcase_38 | AC | 732 ms
47,440 KB |
testcase_39 | AC | 731 ms
47,072 KB |
testcase_40 | WA | - |
testcase_41 | AC | 758 ms
47,040 KB |
testcase_42 | AC | 702 ms
47,436 KB |
testcase_43 | AC | 706 ms
47,176 KB |
testcase_44 | AC | 749 ms
47,060 KB |
testcase_45 | AC | 683 ms
47,700 KB |
testcase_46 | WA | - |
testcase_47 | WA | - |
testcase_48 | WA | - |
testcase_49 | AC | 662 ms
47,432 KB |
testcase_50 | AC | 638 ms
47,168 KB |
testcase_51 | WA | - |
testcase_52 | AC | 610 ms
47,180 KB |
testcase_53 | WA | - |
testcase_54 | AC | 676 ms
47,436 KB |
testcase_55 | AC | 695 ms
47,176 KB |
testcase_56 | WA | - |
testcase_57 | AC | 684 ms
47,440 KB |
testcase_58 | WA | - |
testcase_59 | AC | 692 ms
47,044 KB |
testcase_60 | WA | - |
testcase_61 | AC | 650 ms
47,044 KB |
testcase_62 | AC | 710 ms
47,312 KB |
testcase_63 | AC | 741 ms
47,300 KB |
testcase_64 | AC | 764 ms
47,300 KB |
testcase_65 | AC | 652 ms
47,316 KB |
testcase_66 | AC | 730 ms
47,736 KB |
testcase_67 | AC | 630 ms
47,308 KB |
testcase_68 | AC | 638 ms
47,036 KB |
testcase_69 | WA | - |
testcase_70 | AC | 626 ms
47,308 KB |
testcase_71 | WA | - |
testcase_72 | WA | - |
testcase_73 | AC | 683 ms
47,308 KB |
testcase_74 | AC | 708 ms
47,048 KB |
testcase_75 | AC | 724 ms
47,308 KB |
testcase_76 | WA | - |
testcase_77 | AC | 718 ms
47,436 KB |
testcase_78 | AC | 752 ms
47,432 KB |
testcase_79 | WA | - |
testcase_80 | WA | - |
ソースコード
from itertools import combinations from cgitb import reset from collections import defaultdict from functools import lru_cache from sys import flags, stdin import math import re import queue from tokenize import String import typing import itertools import bisect import statistics import numpy as np # from numpy.core.function_base import _needs_add_docstring # from numpy.core.numeric import outer input = stdin.readline MOD = 1000000007 INF = 122337203685477580 def get_circle_center_and_radius(x1, y1, x2, y2, x3, y3): """ 3点を通る円の中心と半径を取得 """ d = 2 * ((y1 - y3) * (x1 - x2) - (y1 - y2) * (x1 - x3)) # print(d) if d == 0.0: return (0, 0), math.sqrt(x1**2+y1**2) x = ((y1 - y3) * (y1 ** 2 - y2 ** 2 + x1 ** 2 - x2 ** 2) - (y1 - y2) * (y1 ** 2 - y3 ** 2 + x1 ** 2 - x3 ** 2)) / d y = ((x1 - x3) * (x1 ** 2 - x2 ** 2 + y1 ** 2 - y2 ** 2) - (x1 - x2) * (x1 ** 2 - x3 ** 2 + y1 ** 2 - y3 ** 2)) / -d r = math.sqrt((x - x1) ** 2 + (y - y1) ** 2) return (x, y), r def solve(): n = int(input().rstrip()) (x1, y1, x2, y2, x3, y3) = map(int, input().split()) (x, y), r = get_circle_center_and_radius(x1, y1, x2, y2, x3, y3) for i in range(0, n): x4, y4 = map(int, input().split()) if math.sqrt((x4 - x) ** 2 + (y4 - y) ** 2) <= r: print("Yes") else: print("No") if __name__ == '__main__': solve()