結果

問題 No.2790 Athena 3
ユーザー june19312june19312
提出日時 2024-06-21 21:45:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 410 bytes
コンパイル時間 368 ms
コンパイル使用メモリ 82,316 KB
実行使用メモリ 53,504 KB
最終ジャッジ日時 2024-06-21 21:45:12
合計ジャッジ時間 2,213 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,824 KB
testcase_01 AC 39 ms
53,024 KB
testcase_02 AC 37 ms
53,104 KB
testcase_03 AC 38 ms
52,876 KB
testcase_04 AC 38 ms
52,612 KB
testcase_05 AC 39 ms
52,268 KB
testcase_06 AC 38 ms
52,744 KB
testcase_07 AC 39 ms
52,556 KB
testcase_08 AC 38 ms
52,696 KB
testcase_09 AC 45 ms
53,476 KB
testcase_10 AC 40 ms
52,820 KB
testcase_11 AC 38 ms
53,120 KB
testcase_12 AC 38 ms
52,472 KB
testcase_13 AC 39 ms
53,504 KB
testcase_14 AC 38 ms
52,888 KB
testcase_15 AC 38 ms
52,416 KB
testcase_16 AC 37 ms
53,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def menseki_triangle(a,b,c):
    x1,y1 = a[0],a[1]
    x2,y2 = b[0],b[1]
    x3,y3 = c[0],c[1]

    return abs((x1-x3)*(y2-y3)-(x2-x3)*(y1-y3))/2

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

t = [[1,0],[-1,0],[0,1],[0,-1]]

ans = -1
for a,b in t:
    for c,d in t:
        for e,f in t:
            tmpans = menseki_triangle([x1+a,y1+b],[x2+c,y2+d],[x3+e,y3+f])
            ans = max(ans,tmpans)

print(ans)
0