結果

問題 No.2602 Real Collider
ユーザー ゼットゼット
提出日時 2024-01-12 22:50:20
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 802 bytes
コンパイル時間 677 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 76,680 KB
最終ジャッジ日時 2024-01-12 22:51:05
合計ジャッジ時間 32,964 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,588 KB
testcase_01 AC 38 ms
53,588 KB
testcase_02 AC 37 ms
53,588 KB
testcase_03 AC 39 ms
53,588 KB
testcase_04 AC 36 ms
53,588 KB
testcase_05 AC 38 ms
53,588 KB
testcase_06 AC 37 ms
53,588 KB
testcase_07 AC 36 ms
53,588 KB
testcase_08 AC 37 ms
53,588 KB
testcase_09 AC 37 ms
53,588 KB
testcase_10 AC 934 ms
76,680 KB
testcase_11 AC 387 ms
76,424 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 304 ms
76,296 KB
testcase_16 AC 455 ms
76,424 KB
testcase_17 AC 472 ms
76,424 KB
testcase_18 AC 354 ms
76,296 KB
testcase_19 WA -
testcase_20 AC 551 ms
76,424 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 311 ms
76,296 KB
testcase_27 WA -
testcase_28 AC 463 ms
76,424 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 464 ms
76,424 KB
testcase_32 AC 388 ms
76,424 KB
testcase_33 AC 440 ms
76,424 KB
testcase_34 AC 442 ms
76,424 KB
testcase_35 AC 301 ms
76,296 KB
testcase_36 AC 312 ms
76,296 KB
testcase_37 AC 468 ms
76,424 KB
testcase_38 AC 474 ms
76,424 KB
testcase_39 AC 459 ms
76,424 KB
testcase_40 AC 273 ms
76,296 KB
testcase_41 AC 525 ms
76,424 KB
testcase_42 AC 420 ms
76,424 KB
testcase_43 AC 438 ms
76,424 KB
testcase_44 AC 556 ms
76,424 KB
testcase_45 AC 362 ms
76,424 KB
testcase_46 AC 346 ms
76,424 KB
testcase_47 AC 480 ms
76,424 KB
testcase_48 AC 381 ms
76,424 KB
testcase_49 AC 349 ms
76,296 KB
testcase_50 AC 279 ms
76,296 KB
testcase_51 AC 291 ms
76,424 KB
testcase_52 AC 234 ms
76,296 KB
testcase_53 AC 441 ms
76,424 KB
testcase_54 AC 355 ms
76,424 KB
testcase_55 AC 402 ms
76,424 KB
testcase_56 AC 391 ms
76,424 KB
testcase_57 AC 365 ms
76,424 KB
testcase_58 AC 193 ms
76,296 KB
testcase_59 AC 425 ms
76,424 KB
testcase_60 AC 402 ms
76,424 KB
testcase_61 AC 319 ms
76,296 KB
testcase_62 AC 453 ms
76,424 KB
testcase_63 AC 499 ms
76,424 KB
testcase_64 AC 569 ms
76,552 KB
testcase_65 AC 322 ms
76,296 KB
testcase_66 AC 479 ms
76,424 KB
testcase_67 AC 268 ms
76,296 KB
testcase_68 AC 292 ms
76,296 KB
testcase_69 AC 234 ms
76,296 KB
testcase_70 AC 270 ms
76,296 KB
testcase_71 AC 316 ms
76,296 KB
testcase_72 AC 429 ms
76,424 KB
testcase_73 AC 367 ms
76,424 KB
testcase_74 AC 433 ms
76,424 KB
testcase_75 AC 482 ms
76,424 KB
testcase_76 AC 414 ms
76,424 KB
testcase_77 AC 433 ms
76,424 KB
testcase_78 AC 517 ms
76,424 KB
testcase_79 AC 458 ms
76,424 KB
testcase_80 AC 511 ms
76,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

Q=int(input())
a,b,c,d,e,f=map(int,input().split())
v=[2*a,2*b,2*c,2*d,2*e,2*f]
for i in range(3):
  x1=1
  y1=1
  for j in range(3):
    if i==j:
      continue
    x1*=(v[2*j]-v[2*i])
    y1*=(v[2*j+1]-v[2*i+1])
  if x1+y1<0:
    rx,ry=0,0
    for j in range(3):
      if j==i:
        continue
      rx+=v[2*j]
      ry+=v[2*j+1]
      dx=v[2*j]-v[2*i]
      dy=v[2*j+1]-v[2*i+1]
    rx//=2
    ry//=2
    v[2*i],v[2*i+1]=rx-dy,ry+dx
    break
a,b,c,d,e,f=v[:]
if a==c:
  c,d,e,f=e,f,c,d
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())
  x=2*x
  y=2*y
  if (x1-x*k)**2+(y1-y*k)**2<=r2:
    print('Yes')
  else:
    print('No')
0