結果
問題 | 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 |
コンパイル時間 | 271 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-09-27 21:34:21 |
合計ジャッジ時間 | 42,942 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 32 ms
10,880 KB |
testcase_01 | AC | 32 ms
11,008 KB |
testcase_02 | AC | 31 ms
10,880 KB |
testcase_03 | AC | 33 ms
10,880 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | AC | 32 ms
10,752 KB |
testcase_07 | AC | 32 ms
10,880 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 | 611 ms
10,880 KB |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | AC | 769 ms
11,008 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 | 529 ms
10,880 KB |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | AC | 386 ms
10,880 KB |
testcase_36 | AC | 385 ms
10,880 KB |
testcase_37 | AC | 670 ms
10,880 KB |
testcase_38 | AC | 670 ms
11,008 KB |
testcase_39 | AC | 655 ms
11,008 KB |
testcase_40 | AC | 326 ms
10,880 KB |
testcase_41 | AC | 740 ms
11,008 KB |
testcase_42 | AC | 574 ms
10,880 KB |
testcase_43 | AC | 593 ms
10,752 KB |
testcase_44 | WA | - |
testcase_45 | AC | 483 ms
10,880 KB |
testcase_46 | WA | - |
testcase_47 | WA | - |
testcase_48 | WA | - |
testcase_49 | AC | 434 ms
10,880 KB |
testcase_50 | AC | 346 ms
10,752 KB |
testcase_51 | AC | 371 ms
10,880 KB |
testcase_52 | AC | 264 ms
10,880 KB |
testcase_53 | AC | 617 ms
10,880 KB |
testcase_54 | AC | 483 ms
10,880 KB |
testcase_55 | AC | 541 ms
10,880 KB |
testcase_56 | WA | - |
testcase_57 | AC | 490 ms
10,880 KB |
testcase_58 | WA | - |
testcase_59 | AC | 587 ms
10,880 KB |
testcase_60 | AC | 544 ms
11,008 KB |
testcase_61 | AC | 425 ms
10,880 KB |
testcase_62 | AC | 622 ms
11,008 KB |
testcase_63 | AC | 696 ms
10,880 KB |
testcase_64 | AC | 809 ms
10,880 KB |
testcase_65 | AC | 411 ms
10,880 KB |
testcase_66 | AC | 667 ms
10,880 KB |
testcase_67 | WA | - |
testcase_68 | WA | - |
testcase_69 | AC | 275 ms
11,008 KB |
testcase_70 | WA | - |
testcase_71 | AC | 402 ms
10,880 KB |
testcase_72 | AC | 599 ms
11,008 KB |
testcase_73 | AC | 501 ms
10,880 KB |
testcase_74 | AC | 612 ms
11,008 KB |
testcase_75 | WA | - |
testcase_76 | WA | - |
testcase_77 | WA | - |
testcase_78 | AC | 733 ms
11,008 KB |
testcase_79 | AC | 639 ms
11,008 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")