結果
問題 |
No.2602 Real Collider
|
ユーザー |
👑 |
提出日時 | 2024-01-13 01:23:18 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 610 bytes |
コンパイル時間 | 269 ms |
コンパイル使用メモリ | 82,088 KB |
実行使用メモリ | 69,376 KB |
最終ジャッジ日時 | 2024-09-28 00:59:04 |
合計ジャッジ時間 | 7,729 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 78 |
ソースコード
I,R=input,range J=lambda:map(int,I().split()) Q=int(I()) a,b,c,d,e,f=J() V=[[a,b],[c,d],[e,f]]*2 def A(v): return v[0]**2+v[1]**2 def D(v): return A([px-v[0]*qx*qy,(py-v[1]*qy)*qx]) for i in R(3): py,qy=V[i][1]+V[i+1][1],2 px,qx=V[i][0]+V[i+1][0],1 r=D(V[i]) if D(V[i+2])<=r:break else: #https://qiita.com/tatesuke/items/59133758ec25146766c3 L=[A(V[i])for i in R(3)] L=[L[0]-L[1],L[2]-L[0]] py,qy=(e-a)*L[0]+(c-a)*L[1],2*((e-a)*(b-d)-(c-a)*(b-f)) px=((2*(b-f)*py+L[1]*qy)if(c==a)else(2*(b-d)*py-L[0]*qy)) qx=2*(e-a if c==a else c-a) r=D(V[0]) for q in R(Q): v=list[J()] print("YNeos"[D(v)>r::2])