結果
問題 | No.2602 Real Collider |
ユーザー | fuppy_kyopro |
提出日時 | 2024-01-12 21:40:31 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 907 bytes |
コンパイル時間 | 234 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-09-27 21:39:10 |
合計ジャッジ時間 | 41,160 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 32 ms
10,880 KB |
testcase_01 | AC | 32 ms
11,008 KB |
testcase_02 | AC | 31 ms
10,752 KB |
testcase_03 | AC | 31 ms
10,752 KB |
testcase_04 | WA | - |
testcase_05 | AC | 30 ms
10,880 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | AC | 503 ms
10,752 KB |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | AC | 384 ms
10,752 KB |
testcase_16 | AC | 582 ms
10,880 KB |
testcase_17 | AC | 640 ms
10,880 KB |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | AC | 759 ms
10,880 KB |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | AC | 387 ms
10,880 KB |
testcase_27 | WA | - |
testcase_28 | AC | 605 ms
10,752 KB |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | AC | 579 ms
10,880 KB |
testcase_32 | AC | 505 ms
10,880 KB |
testcase_33 | AC | 584 ms
10,880 KB |
testcase_34 | AC | 593 ms
10,880 KB |
testcase_35 | AC | 365 ms
10,880 KB |
testcase_36 | AC | 364 ms
10,752 KB |
testcase_37 | AC | 619 ms
10,752 KB |
testcase_38 | AC | 634 ms
10,880 KB |
testcase_39 | AC | 648 ms
10,880 KB |
testcase_40 | AC | 315 ms
10,880 KB |
testcase_41 | AC | 701 ms
10,752 KB |
testcase_42 | AC | 560 ms
10,880 KB |
testcase_43 | AC | 559 ms
10,880 KB |
testcase_44 | AC | 730 ms
10,880 KB |
testcase_45 | AC | 458 ms
11,008 KB |
testcase_46 | AC | 429 ms
11,008 KB |
testcase_47 | AC | 657 ms
11,008 KB |
testcase_48 | AC | 507 ms
10,880 KB |
testcase_49 | AC | 421 ms
10,752 KB |
testcase_50 | AC | 341 ms
10,752 KB |
testcase_51 | AC | 353 ms
10,880 KB |
testcase_52 | AC | 259 ms
10,752 KB |
testcase_53 | AC | 592 ms
11,008 KB |
testcase_54 | AC | 462 ms
10,880 KB |
testcase_55 | AC | 514 ms
10,880 KB |
testcase_56 | AC | 521 ms
11,008 KB |
testcase_57 | AC | 476 ms
10,752 KB |
testcase_58 | AC | 220 ms
10,880 KB |
testcase_59 | AC | 581 ms
10,880 KB |
testcase_60 | AC | 529 ms
10,752 KB |
testcase_61 | AC | 407 ms
11,008 KB |
testcase_62 | AC | 595 ms
10,880 KB |
testcase_63 | AC | 668 ms
10,752 KB |
testcase_64 | AC | 767 ms
10,880 KB |
testcase_65 | AC | 388 ms
10,880 KB |
testcase_66 | AC | 618 ms
10,880 KB |
testcase_67 | AC | 313 ms
10,752 KB |
testcase_68 | AC | 361 ms
10,752 KB |
testcase_69 | AC | 260 ms
11,008 KB |
testcase_70 | AC | 300 ms
11,008 KB |
testcase_71 | AC | 380 ms
10,880 KB |
testcase_72 | AC | 565 ms
11,008 KB |
testcase_73 | AC | 476 ms
10,752 KB |
testcase_74 | AC | 565 ms
10,880 KB |
testcase_75 | AC | 637 ms
10,880 KB |
testcase_76 | AC | 528 ms
10,880 KB |
testcase_77 | AC | 557 ms
10,752 KB |
testcase_78 | AC | 709 ms
11,008 KB |
testcase_79 | AC | 600 ms
10,880 KB |
testcase_80 | AC | 716 ms
10,752 KB |
ソースコード
import math EPS = 1e-5 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")