結果

問題 No.2790 Athena 3
コンテスト
ユーザー nouka28
提出日時 2024-06-21 22:31:00
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 486 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 145 ms
コンパイル使用メモリ 85,480 KB
実行使用メモリ 53,552 KB
最終ジャッジ日時 2026-03-06 05:01:43
合計ジャッジ時間 1,295 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

t=list(map(int,input().split()))

def calc(t):
    t[2]-=t[0]
    t[4]-=t[0]
    t[3]-=t[1]
    t[5]-=t[1]
    t[0]=0
    t[1]=0
    return abs(t[2]*t[5]-t[3]*t[4])/2

ans=0
di=[1,0,-1,0]
dj=[0,1,0,-1]

for i in range(4):
    for j in range(4):
        for k in range(4):
            nt=t[:]
            nt[0]+=di[i]
            nt[1]+=dj[i]
            nt[2]+=di[j]
            nt[3]+=dj[j]
            nt[4]+=di[k]
            nt[5]+=dj[k]
            ans=max(ans,calc(nt))
print(ans)
0