結果
問題 | No.2602 Real Collider |
ユーザー | kmjp |
提出日時 | 2024-01-13 00:11:49 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 1,787 ms / 2,000 ms |
コード長 | 757 bytes |
コンパイル時間 | 320 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 92,092 KB |
最終ジャッジ日時 | 2024-09-28 00:32:46 |
合計ジャッジ時間 | 66,564 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 130 ms
88,448 KB |
testcase_01 | AC | 125 ms
88,448 KB |
testcase_02 | AC | 129 ms
88,576 KB |
testcase_03 | AC | 142 ms
89,088 KB |
testcase_04 | AC | 133 ms
88,448 KB |
testcase_05 | AC | 127 ms
88,140 KB |
testcase_06 | AC | 127 ms
88,192 KB |
testcase_07 | AC | 129 ms
88,320 KB |
testcase_08 | AC | 127 ms
88,428 KB |
testcase_09 | AC | 126 ms
88,064 KB |
testcase_10 | AC | 1,787 ms
92,092 KB |
testcase_11 | AC | 875 ms
90,880 KB |
testcase_12 | AC | 834 ms
91,904 KB |
testcase_13 | AC | 543 ms
91,164 KB |
testcase_14 | AC | 874 ms
91,776 KB |
testcase_15 | AC | 726 ms
91,008 KB |
testcase_16 | AC | 953 ms
91,056 KB |
testcase_17 | AC | 1,030 ms
91,376 KB |
testcase_18 | AC | 685 ms
91,808 KB |
testcase_19 | AC | 782 ms
91,520 KB |
testcase_20 | AC | 1,117 ms
91,616 KB |
testcase_21 | AC | 659 ms
91,904 KB |
testcase_22 | AC | 735 ms
91,776 KB |
testcase_23 | AC | 565 ms
91,136 KB |
testcase_24 | AC | 707 ms
91,136 KB |
testcase_25 | AC | 751 ms
91,904 KB |
testcase_26 | AC | 674 ms
91,136 KB |
testcase_27 | AC | 804 ms
92,032 KB |
testcase_28 | AC | 896 ms
91,520 KB |
testcase_29 | AC | 724 ms
92,032 KB |
testcase_30 | AC | 779 ms
91,316 KB |
testcase_31 | AC | 983 ms
90,928 KB |
testcase_32 | AC | 857 ms
91,288 KB |
testcase_33 | AC | 966 ms
90,788 KB |
testcase_34 | AC | 971 ms
90,884 KB |
testcase_35 | AC | 704 ms
90,976 KB |
testcase_36 | AC | 636 ms
91,312 KB |
testcase_37 | AC | 1,041 ms
91,228 KB |
testcase_38 | AC | 1,040 ms
91,256 KB |
testcase_39 | AC | 1,060 ms
91,092 KB |
testcase_40 | AC | 652 ms
90,880 KB |
testcase_41 | AC | 1,118 ms
90,940 KB |
testcase_42 | AC | 953 ms
90,752 KB |
testcase_43 | AC | 976 ms
91,224 KB |
testcase_44 | AC | 1,148 ms
90,752 KB |
testcase_45 | AC | 806 ms
90,752 KB |
testcase_46 | AC | 787 ms
90,952 KB |
testcase_47 | AC | 1,047 ms
91,268 KB |
testcase_48 | AC | 846 ms
90,752 KB |
testcase_49 | AC | 803 ms
91,136 KB |
testcase_50 | AC | 670 ms
90,752 KB |
testcase_51 | AC | 699 ms
91,008 KB |
testcase_52 | AC | 583 ms
91,008 KB |
testcase_53 | AC | 991 ms
91,224 KB |
testcase_54 | AC | 835 ms
90,880 KB |
testcase_55 | AC | 888 ms
90,880 KB |
testcase_56 | AC | 887 ms
91,008 KB |
testcase_57 | AC | 823 ms
91,096 KB |
testcase_58 | AC | 494 ms
91,136 KB |
testcase_59 | AC | 922 ms
91,072 KB |
testcase_60 | AC | 875 ms
91,232 KB |
testcase_61 | AC | 763 ms
91,008 KB |
testcase_62 | AC | 970 ms
91,148 KB |
testcase_63 | AC | 1,026 ms
91,264 KB |
testcase_64 | AC | 1,232 ms
91,000 KB |
testcase_65 | AC | 725 ms
90,880 KB |
testcase_66 | AC | 1,013 ms
91,640 KB |
testcase_67 | AC | 621 ms
91,008 KB |
testcase_68 | AC | 733 ms
90,880 KB |
testcase_69 | AC | 570 ms
91,264 KB |
testcase_70 | AC | 615 ms
91,008 KB |
testcase_71 | AC | 711 ms
91,392 KB |
testcase_72 | AC | 966 ms
90,992 KB |
testcase_73 | AC | 835 ms
90,624 KB |
testcase_74 | AC | 966 ms
91,480 KB |
testcase_75 | AC | 1,061 ms
91,304 KB |
testcase_76 | AC | 917 ms
91,008 KB |
testcase_77 | AC | 938 ms
90,868 KB |
testcase_78 | AC | 1,094 ms
90,880 KB |
testcase_79 | AC | 1,023 ms
90,880 KB |
testcase_80 | AC | 1,085 ms
90,892 KB |
ソースコード
from fractions import Fraction import sys import math Q=int(input()) X1,Y1,X2,Y2,X3,Y3=map(Fraction,input().strip().split(" ")) CX=-100000 for i in range(3) : if (Y2-Y1)*(Y2-Y1)+(X2-X1)*(X2-X1)+(Y3-Y1)*(Y3-Y1)+(X3-X1)*(X3-X1) <= (Y3-Y2)*(Y3-Y2)+(X3-X2)*(X3-X2): CX=(X2+X3)/2 CY=(Y2+Y3)/2 break X1,X2,X3=X2,X3,X1 Y1,Y2,Y3=Y2,Y3,Y1 if CX == -100000: CX = ((X1*X1+Y1*Y1)*(Y2-Y3)+(X2*X2+Y2*Y2)*(Y3-Y1)+(X3*X3+Y3*Y3)*(Y1-Y2))/(2*((Y2-Y3)*(X1-X2)-(Y1-Y2)*(X2-X3))) CY = ((X1*X1+Y1*Y1)*(X2-X3)+(X2*X2+Y2*Y2)*(X3-X1)+(X3*X3+Y3*Y3)*(X1-X2))/(2*((X2-X3)*(Y1-Y2)-(X1-X2)*(Y2-Y3))) for i in range(Q): X,Y=map(Fraction,input().strip().split(" ")) if (X-CX)*(X-CX)+(Y-CY)*(Y-CY) <= (X2-CX)*(X2-CX)+(Y2-CY)*(Y2-CY): print("Yes") else: print("No")