結果

問題 No.2790 Athena 3
ユーザー Akijin_007Akijin_007
提出日時 2024-06-22 09:14:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 33 ms / 2,000 ms
コード長 443 bytes
コンパイル時間 380 ms
コンパイル使用メモリ 82,260 KB
実行使用メモリ 53,884 KB
最終ジャッジ日時 2024-06-22 09:14:23
合計ジャッジ時間 1,530 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
53,244 KB
testcase_01 AC 33 ms
52,584 KB
testcase_02 AC 33 ms
53,504 KB
testcase_03 AC 32 ms
53,404 KB
testcase_04 AC 31 ms
52,024 KB
testcase_05 AC 31 ms
53,308 KB
testcase_06 AC 31 ms
52,820 KB
testcase_07 AC 33 ms
52,164 KB
testcase_08 AC 32 ms
52,008 KB
testcase_09 AC 32 ms
53,496 KB
testcase_10 AC 33 ms
53,036 KB
testcase_11 AC 32 ms
51,812 KB
testcase_12 AC 32 ms
53,168 KB
testcase_13 AC 31 ms
52,312 KB
testcase_14 AC 32 ms
52,692 KB
testcase_15 AC 33 ms
53,884 KB
testcase_16 AC 33 ms
52,444 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

a = [x1, y1]
b = [x2, y2]
c = [x3, y3]


def f(a1, b1, a2, b2, a3, b3):
    u0 = a2 - a1
    u1 = b2 - b1
    v0 = a3 - a1
    v1 = b3 - b1
    return abs(u1*v0 - v1*u0)

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

ans = 0

for i in range(4):
    for j in range(4):
        for k in range(4):
            ans = max(ans, f(x1+dx[i], y1+dy[i], x2+dx[j], y2+dy[j], x3+dx[k], y3+dy[k]))

print(ans/2)
0