結果

問題 No.2790 Athena 3
ユーザー ThetaTheta
提出日時 2024-07-10 14:57:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 2,000 ms
コード長 672 bytes
コンパイル時間 3,049 ms
コンパイル使用メモリ 82,188 KB
実行使用メモリ 53,892 KB
最終ジャッジ日時 2024-07-10 14:57:23
合計ジャッジ時間 3,054 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #


from itertools import product


def main():
    Ax, Ay, Bx, By, Cx, Cy = map(int, input().split())
    max_area = -1
    for a_op, b_op, c_op in product(
            [(1, 0), (-1, 0), (0, 1), (0, -1)], repeat=3):
        Point_A = (Ax + a_op[0], Ay + a_op[1])
        Point_B = (Bx + b_op[0], By + b_op[1])
        Point_C = (Cx + c_op[0], Cy + c_op[1])
        vec_AB = (Point_B[0] - Point_A[0], Point_B[1] - Point_A[1])
        vec_AC = (Point_C[0] - Point_A[0], Point_C[1] - Point_A[1])
        max_area = max(
            max_area, abs(
                vec_AB[0] * vec_AC[1] - vec_AB[1] * vec_AC[0]))
    print(max_area / 2.)


if __name__ == "__main__":
    main()
0