結果
問題 | No.2790 Athena 3 |
ユーザー |
![]() |
提出日時 | 2024-06-21 21:25:16 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 28 ms / 2,000 ms |
コード長 | 783 bytes |
コンパイル時間 | 85 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-06-21 21:25:17 |
合計ジャッジ時間 | 1,357 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 27 ms
10,880 KB |
testcase_01 | AC | 28 ms
10,752 KB |
testcase_02 | AC | 27 ms
10,880 KB |
testcase_03 | AC | 27 ms
10,752 KB |
testcase_04 | AC | 26 ms
10,752 KB |
testcase_05 | AC | 27 ms
10,880 KB |
testcase_06 | AC | 26 ms
10,752 KB |
testcase_07 | AC | 26 ms
10,880 KB |
testcase_08 | AC | 27 ms
10,752 KB |
testcase_09 | AC | 27 ms
10,752 KB |
testcase_10 | AC | 26 ms
10,880 KB |
testcase_11 | AC | 26 ms
10,752 KB |
testcase_12 | AC | 26 ms
10,752 KB |
testcase_13 | AC | 27 ms
10,752 KB |
testcase_14 | AC | 26 ms
10,752 KB |
testcase_15 | AC | 26 ms
10,752 KB |
testcase_16 | AC | 26 ms
10,752 KB |
ソースコード
import itertools def triangle_area(A, B, C): x1, y1 = A x2, y2 = B x3, y3 = C return abs((x1*(y2-y3) + x2*(y3-y1) + x3*(y1-y2)) / 2) def max_triangle_area(A, B, C): max_area = 0 operations = [(1, 0), (-1, 0), (0, 1), (0, -1)] for op_A in operations: new_A = (A[0] + op_A[0], A[1] + op_A[1]) for op_B in operations: new_B = (B[0] + op_B[0], B[1] + op_B[1]) for op_C in operations: new_C = (C[0] + op_C[0], C[1] + op_C[1]) area = triangle_area(new_A, new_B, new_C) if area > max_area: max_area = area return max_area a,aa,b,bb,c,cc = list(map(int, input().split(' '))) A = (a,aa) B = (b,bb) C = (c,cc) print(max_triangle_area(A, B, C))