結果
問題 | No.2790 Athena 3 |
ユーザー |
![]() |
提出日時 | 2024-06-21 21:58:35 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 39 ms / 2,000 ms |
コード長 | 787 bytes |
コンパイル時間 | 170 ms |
コンパイル使用メモリ | 82,892 KB |
実行使用メモリ | 54,444 KB |
最終ジャッジ日時 | 2024-09-20 14:22:18 |
合計ジャッジ時間 | 1,748 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 |
ソースコード
def heron(a, b, c):s = (a + b + c) / 2return (s * (s - a) * (s - b) * (s - c)) ** 0.5def dist(a, b):return ((a[0]-b[0]) ** 2 + (a[1]-b[1]) ** 2) ** 0.5def dists(a, b, c):return dist(a, b), dist(b, c), dist(c, a)def space(a, b, c):return heron(*dists(a, b, c))*data, = map(int, input().split())points = [data[i*2:i*2+2] for i in range(3)]dpos = [(-1, 0), (1, 0), (0, -1), (0, 1)]ans = 0for dax, day in dpos:points[0][0] += daxpoints[0][1] += dayfor dbx, dby in dpos:points[1][0] += dbxpoints[1][1] += dbyfor dcx, dcy in dpos:points[2][0] += dcxpoints[2][1] += dcyans = max(ans, space(*points))points[2][0] -= dcxpoints[2][1] -= dcypoints[1][0] -= dbxpoints[1][1] -= dbypoints[0][0] -= daxpoints[0][1] -= dayprint(ans)