結果
| 問題 | No.2790 Athena 3 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-21 21:27:06 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 64 ms / 2,000 ms |
| + 992µs | |
| コード長 | 970 bytes |
| 記録 | |
| コンパイル時間 | 242 ms |
| コンパイル使用メモリ | 95,600 KB |
| 実行使用メモリ | 78,976 KB |
| 最終ジャッジ日時 | 2026-07-26 14:54:06 |
| 合計ジャッジ時間 | 2,746 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 |
ソースコード
from sys import stdin
def input(): return stdin.readline()[:-1]
def solve():
x1, y1, x2, y2, x3, y3 = map(int, input().split())
coooor = [[x1, y1], [x2, y2], [x3, y3]]
ans = 0
def dfs(index, coords):
if index == 3:
x1, y1 = coords[0]
x2, y2 = coords[1]
x3, y3 = coords[2]
nonlocal ans
ans = max(ans, abs((x1*(y2-y3) + x2*(y3-y1) + x3*(y1-y2))/2))
return
x, y = coooor[index]
tuple1 = (x + 1, y)
tuple2 = (x - 1, y)
tuple3 = (x, y + 1)
tuple4 = (x, y - 1)
coords.append(tuple1)
dfs(index + 1, coords)
coords.pop()
coords.append(tuple2)
dfs(index + 1, coords)
coords.pop()
coords.append(tuple3)
dfs(index + 1, coords)
coords.pop()
coords.append(tuple4)
dfs(index + 1, coords)
coords.pop()
dfs(0, [])
print(ans)
solve()