結果
| 問題 |
No.2790 Athena 3
|
| コンテスト | |
| ユーザー |
dp_ijk
|
| 提出日時 | 2024-06-21 21:30:00 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 39 ms / 2,000 ms |
| コード長 | 536 bytes |
| コンパイル時間 | 128 ms |
| コンパイル使用メモリ | 82,292 KB |
| 実行使用メモリ | 53,556 KB |
| 最終ジャッジ日時 | 2024-06-21 21:30:03 |
| 合計ジャッジ時間 | 1,443 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 |
ソースコード
x1, y1, x2, y2, x3, y3 = map(int, input().split())
P1, P2, P3 = (x1, y1), (x2, y2), (x3, y3)
def adj(P):
x, y = P
res = []
for dx in -1, 0, 1:
for dy in -1, 0, 1:
if dx*dy == 0 and dx+dy != 0:
res.append((x+dx, y+dy))
return res
def area(P, Q, R):
x, y = P
a, b = Q
c, d = R
a, b = a-x, b-y
c, d = c-x, d-y
return abs(a*d - b*c)
cands = []
for P in adj(P1):
for Q in adj(P2):
for R in adj(P3):
cands.append(area(P, Q, R))
ans = max(cands) / 2
print(ans)
dp_ijk