結果
問題 | No.2790 Athena 3 |
ユーザー |
![]() |
提出日時 | 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 = Pres = []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 resdef area(P, Q, R):x, y = Pa, b = Qc, d = Ra, b = a-x, b-yc, d = c-x, d-yreturn 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) / 2print(ans)