結果
問題 | No.2602 Real Collider |
ユーザー | Moss_Local |
提出日時 | 2024-01-12 22:28:09 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,471 bytes |
コンパイル時間 | 265 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 47,696 KB |
最終ジャッジ日時 | 2024-09-27 23:02:34 |
合計ジャッジ時間 | 59,826 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 562 ms
47,264 KB |
testcase_01 | AC | 563 ms
47,132 KB |
testcase_02 | AC | 565 ms
47,136 KB |
testcase_03 | AC | 548 ms
47,264 KB |
testcase_04 | WA | - |
testcase_05 | AC | 554 ms
47,388 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | AC | 703 ms
47,136 KB |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | AC | 661 ms
47,136 KB |
testcase_16 | AC | 721 ms
47,268 KB |
testcase_17 | AC | 746 ms
47,516 KB |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | AC | 784 ms
47,136 KB |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | AC | 653 ms
47,136 KB |
testcase_27 | WA | - |
testcase_28 | AC | 729 ms
47,132 KB |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | AC | 727 ms
47,268 KB |
testcase_32 | AC | 687 ms
47,516 KB |
testcase_33 | AC | 724 ms
47,516 KB |
testcase_34 | AC | 705 ms
47,004 KB |
testcase_35 | AC | 659 ms
47,520 KB |
testcase_36 | AC | 657 ms
47,132 KB |
testcase_37 | AC | 734 ms
47,264 KB |
testcase_38 | AC | 734 ms
47,264 KB |
testcase_39 | AC | 741 ms
47,140 KB |
testcase_40 | AC | 642 ms
47,136 KB |
testcase_41 | AC | 762 ms
47,396 KB |
testcase_42 | AC | 718 ms
47,396 KB |
testcase_43 | AC | 718 ms
47,516 KB |
testcase_44 | AC | 763 ms
47,388 KB |
testcase_45 | AC | 685 ms
47,012 KB |
testcase_46 | AC | 705 ms
47,392 KB |
testcase_47 | AC | 739 ms
47,388 KB |
testcase_48 | AC | 693 ms
47,392 KB |
testcase_49 | AC | 673 ms
47,136 KB |
testcase_50 | AC | 643 ms
47,136 KB |
testcase_51 | AC | 646 ms
47,140 KB |
testcase_52 | AC | 624 ms
47,132 KB |
testcase_53 | AC | 726 ms
47,392 KB |
testcase_54 | AC | 683 ms
47,260 KB |
testcase_55 | AC | 704 ms
47,260 KB |
testcase_56 | AC | 692 ms
47,388 KB |
testcase_57 | AC | 685 ms
47,264 KB |
testcase_58 | AC | 611 ms
47,136 KB |
testcase_59 | AC | 723 ms
47,520 KB |
testcase_60 | AC | 701 ms
47,520 KB |
testcase_61 | AC | 668 ms
47,136 KB |
testcase_62 | AC | 722 ms
47,264 KB |
testcase_63 | AC | 755 ms
47,132 KB |
testcase_64 | AC | 774 ms
47,264 KB |
testcase_65 | AC | 667 ms
47,136 KB |
testcase_66 | AC | 730 ms
47,388 KB |
testcase_67 | AC | 641 ms
47,132 KB |
testcase_68 | AC | 647 ms
47,132 KB |
testcase_69 | AC | 636 ms
47,264 KB |
testcase_70 | AC | 624 ms
47,260 KB |
testcase_71 | AC | 649 ms
47,264 KB |
testcase_72 | AC | 720 ms
47,132 KB |
testcase_73 | AC | 689 ms
47,136 KB |
testcase_74 | AC | 716 ms
47,132 KB |
testcase_75 | AC | 738 ms
47,260 KB |
testcase_76 | AC | 723 ms
47,136 KB |
testcase_77 | AC | 723 ms
47,392 KB |
testcase_78 | AC | 760 ms
47,268 KB |
testcase_79 | AC | 732 ms
47,392 KB |
testcase_80 | AC | 761 ms
47,132 KB |
ソースコード
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+0.0000000001: print("Yes") else: print("No") if __name__ == '__main__': solve()