結果
問題 | No.2602 Real Collider |
ユーザー | fuppy_kyopro |
提出日時 | 2024-01-12 21:37:34 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 907 bytes |
コンパイル時間 | 364 ms |
コンパイル使用メモリ | 12,032 KB |
実行使用メモリ | 10,240 KB |
最終ジャッジ日時 | 2024-01-12 21:38:16 |
合計ジャッジ時間 | 37,559 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 30 ms
10,112 KB |
testcase_01 | AC | 30 ms
10,112 KB |
testcase_02 | AC | 30 ms
10,112 KB |
testcase_03 | AC | 30 ms
10,112 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | AC | 28 ms
10,112 KB |
testcase_07 | AC | 28 ms
10,112 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 510 ms
10,240 KB |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | AC | 657 ms
10,240 KB |
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 | AC | 437 ms
10,240 KB |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | AC | 326 ms
10,240 KB |
testcase_36 | AC | 338 ms
10,240 KB |
testcase_37 | AC | 597 ms
10,240 KB |
testcase_38 | AC | 570 ms
10,240 KB |
testcase_39 | AC | 585 ms
10,240 KB |
testcase_40 | AC | 278 ms
10,240 KB |
testcase_41 | AC | 621 ms
10,240 KB |
testcase_42 | AC | 505 ms
10,240 KB |
testcase_43 | AC | 503 ms
10,240 KB |
testcase_44 | WA | - |
testcase_45 | AC | 403 ms
10,240 KB |
testcase_46 | WA | - |
testcase_47 | WA | - |
testcase_48 | WA | - |
testcase_49 | AC | 374 ms
10,240 KB |
testcase_50 | AC | 317 ms
10,240 KB |
testcase_51 | AC | 314 ms
10,240 KB |
testcase_52 | AC | 223 ms
10,240 KB |
testcase_53 | AC | 550 ms
10,240 KB |
testcase_54 | AC | 408 ms
10,240 KB |
testcase_55 | AC | 452 ms
10,240 KB |
testcase_56 | WA | - |
testcase_57 | AC | 412 ms
10,240 KB |
testcase_58 | WA | - |
testcase_59 | AC | 492 ms
10,240 KB |
testcase_60 | AC | 449 ms
10,240 KB |
testcase_61 | AC | 370 ms
10,240 KB |
testcase_62 | AC | 526 ms
10,240 KB |
testcase_63 | AC | 590 ms
10,240 KB |
testcase_64 | AC | 683 ms
10,240 KB |
testcase_65 | AC | 349 ms
10,240 KB |
testcase_66 | AC | 579 ms
10,240 KB |
testcase_67 | WA | - |
testcase_68 | WA | - |
testcase_69 | AC | 229 ms
10,240 KB |
testcase_70 | WA | - |
testcase_71 | AC | 362 ms
10,240 KB |
testcase_72 | AC | 511 ms
10,240 KB |
testcase_73 | AC | 415 ms
10,240 KB |
testcase_74 | AC | 535 ms
10,240 KB |
testcase_75 | WA | - |
testcase_76 | WA | - |
testcase_77 | WA | - |
testcase_78 | AC | 644 ms
10,240 KB |
testcase_79 | AC | 541 ms
10,240 KB |
testcase_80 | WA | - |
ソースコード
import math EPS = 1e-8 n = int(input()) points = list(map(float, input().split())) a = points[0] b = points[1] c = points[2] d = points[3] e = points[4] f = points[5] aa = a * a bb = b * b cc = c * c dd = d * d ee = e * e ff = f * f try: py = ((e - a) * (aa + bb - cc - dd) - (c - a) * (aa + bb - ee- ff)) / (2 * (e - a)*(b - d) - 2 * (c - a) * (b - f)) px = (2 * (b - f) * py - aa - bb + ee + ff) / (2 * (e - a)) \ if (c == a) else (2 * (b - d) * py - aa - bb + cc + dd) / (2 * (c - a)) except ZeroDivisionError: mx = min([a, c, e]) MX = max([a, c, e]) my = min([b, d, f]) MY = max([b, d, f]) px = (mx + MX) / 2 py = (my + MY) / 2 # print(px, py) r = math.hypot(px - a, py - b) for i in range(n): x, y = list(map(float, input().split())) if (x - px) * (x - px) + (y - py) * (y - py) - r * r < EPS: print("Yes") else: print("No")