結果

問題 No.2628 Shrinkage
ユーザー mutualnsmutualns
提出日時 2024-02-17 02:14:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 491 bytes
コンパイル時間 430 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 53,460 KB
最終ジャッジ日時 2024-02-17 02:14:30
合計ジャッジ時間 2,884 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,460 KB
testcase_01 AC 34 ms
53,460 KB
testcase_02 AC 32 ms
53,460 KB
testcase_03 AC 33 ms
53,460 KB
testcase_04 AC 33 ms
53,460 KB
testcase_05 AC 33 ms
53,460 KB
testcase_06 AC 32 ms
53,460 KB
testcase_07 AC 33 ms
53,460 KB
testcase_08 AC 32 ms
53,460 KB
testcase_09 AC 33 ms
53,460 KB
testcase_10 AC 32 ms
53,460 KB
testcase_11 AC 32 ms
53,460 KB
testcase_12 AC 30 ms
53,460 KB
testcase_13 AC 32 ms
53,456 KB
testcase_14 AC 31 ms
53,460 KB
testcase_15 AC 32 ms
53,460 KB
testcase_16 AC 31 ms
53,460 KB
testcase_17 AC 32 ms
53,460 KB
testcase_18 AC 32 ms
53,460 KB
testcase_19 AC 32 ms
53,460 KB
testcase_20 AC 32 ms
53,460 KB
testcase_21 AC 32 ms
53,460 KB
testcase_22 AC 30 ms
53,460 KB
testcase_23 AC 31 ms
53,460 KB
testcase_24 AC 32 ms
53,460 KB
testcase_25 AC 39 ms
53,460 KB
testcase_26 AC 32 ms
53,460 KB
testcase_27 AC 41 ms
53,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t=int(input())

for _ in range(t):
  a,b,c,d,x,y,z,w=map(int,input().split())
  if [a,b,c,d]==[x,y,z,w]:
    print('Yes')
    continue
  if (c-a)**2+(d-b)**2<=(z-x)**2+(w-y)**2:
    print('No')
    continue
  if (c-a)*(z-x)==0:
    if c-a!=0 or z-x!=0:
      print('No')
      continue
    if (d-b)*(w-y)<0:
      print('No')
    else:
      print('Yes')
    continue
  if (c-a)*(z-x)<0:
    print('No')
    continue
  if (c-a)*(w-y)==(d-b)*(z-x):
    print('Yes')
  else:
    print('No')
  
0