結果
問題 | No.2790 Athena 3 |
ユーザー |
![]() |
提出日時 | 2024-06-21 21:38:45 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 38 ms / 2,000 ms |
コード長 | 545 bytes |
コンパイル時間 | 168 ms |
コンパイル使用メモリ | 82,328 KB |
実行使用メモリ | 53,848 KB |
最終ジャッジ日時 | 2024-06-21 21:38:47 |
合計ジャッジ時間 | 1,446 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 |
ソースコード
x1, y1, x2, y2, x3, y3 = map(int, input().split()) def calc_area(x1, y1, x2, y2, x3, y3): return abs((x1 - x3) * (y2 - y3) - (x2 - x3) * (y1 - y3)) / 2 directions = (-1, 0), (1, 0), (0, -1), (0, 1) max_area = 0 for dx1, dy1 in directions: nx1 = x1 + dx1 ny1 = y1 + dy1 for dx2, dy2 in directions: nx2 = x2 + dx2 ny2 = y2 + dy2 for dx3, dy3 in directions: nx3 = x3 + dx3 ny3 = y3 + dy3 max_area = max(max_area, calc_area(nx1, ny1, nx2, ny2, nx3, ny3)) print(max_area)