結果

問題 No.2602 Real Collider
ユーザー ゼット
提出日時 2024-01-12 22:01:32
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 347 bytes
コンパイル時間 367 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 77,140 KB
最終ジャッジ日時 2024-09-27 22:14:34
合計ジャッジ時間 32,897 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 65 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

Q=int(input())
a,b,c,d,e,f=map(int,input().split())
x1=(a**2+b**2)*(d-f)+(c**2+d**2)*(f-b)+(e**2+f**2)*(b-d)
y1=(a**2+b**2)*(e-c)+(c**2+d**2)*(a-e)+(e**2+f**2)*(c-a)
k=2*(a*(d-f)+c*(f-b)+e*(b-d))
r2=(x1-a*k)**2+(y1-b*k)**2
for _ in range(Q):
  x,y=map(int,input().split())
  if (x1-x*k)**2+(y1-y*k)**2<=r2:
    print('Yes')
  else:
    print('No')
0