結果

問題 No.2790 Athena 3
ユーザー 👑 AngrySadEightAngrySadEight
提出日時 2024-06-21 21:35:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 38 ms / 2,000 ms
コード長 405 bytes
コンパイル時間 172 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 53,660 KB
最終ジャッジ日時 2024-06-21 21:35:59
合計ジャッジ時間 1,588 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,660 KB
testcase_01 AC 38 ms
53,056 KB
testcase_02 AC 38 ms
52,376 KB
testcase_03 AC 37 ms
52,068 KB
testcase_04 AC 37 ms
53,100 KB
testcase_05 AC 37 ms
52,128 KB
testcase_06 AC 37 ms
52,524 KB
testcase_07 AC 37 ms
52,200 KB
testcase_08 AC 37 ms
52,460 KB
testcase_09 AC 38 ms
52,696 KB
testcase_10 AC 37 ms
52,788 KB
testcase_11 AC 37 ms
53,204 KB
testcase_12 AC 38 ms
52,828 KB
testcase_13 AC 37 ms
53,352 KB
testcase_14 AC 37 ms
52,760 KB
testcase_15 AC 38 ms
52,608 KB
testcase_16 AC 36 ms
53,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x1,y1,x2,y2,x3,y3=map(float,input().split())

def s(x1,y1,x2,y2):
  ret = x1*y2-x2*y1
  if ret<0:
    ret *= -1
  return ret/2

dx=[1,0,-1,0]
dy=[0,1,0,-1]

ans = 0

for i in range(4):
  for j in range(4):
    for k in range(4):
      x4=x1+dx[i]
      y4=y1+dy[i]
      x5=x2+dx[j]
      y5=y2+dy[j]
      x6=x3+dx[k]
      y6=y3+dy[k]
      ss=s(x5-x4,y5-y4,x6-x4,y6-y4)
      ans=max(ans,ss)
print(ans)
0