結果

問題 No.2790 Athena 3
ユーザー nouka28
提出日時 2024-06-21 22:31:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 486 bytes
コンパイル時間 169 ms
コンパイル使用メモリ 82,500 KB
実行使用メモリ 53,780 KB
最終ジャッジ日時 2024-06-21 22:31:03
合計ジャッジ時間 1,464 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

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