結果

問題 No.2790 Athena 3
ユーザー ニックネームニックネーム
提出日時 2024-06-21 21:31:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 29 ms / 2,000 ms
コード長 438 bytes
コンパイル時間 184 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-21 21:31:38
合計ジャッジ時間 1,280 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
10,752 KB
testcase_01 AC 29 ms
10,752 KB
testcase_02 AC 29 ms
10,752 KB
testcase_03 AC 28 ms
10,752 KB
testcase_04 AC 28 ms
10,752 KB
testcase_05 AC 28 ms
10,752 KB
testcase_06 AC 28 ms
10,752 KB
testcase_07 AC 28 ms
10,752 KB
testcase_08 AC 28 ms
10,752 KB
testcase_09 AC 26 ms
10,880 KB
testcase_10 AC 26 ms
10,880 KB
testcase_11 AC 24 ms
10,752 KB
testcase_12 AC 26 ms
10,752 KB
testcase_13 AC 29 ms
10,752 KB
testcase_14 AC 26 ms
10,752 KB
testcase_15 AC 26 ms
10,752 KB
testcase_16 AC 25 ms
10,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x1,y1,x2,y2,x3,y3 = map(int,input().split())
s = 0
def f(x,y,z):
    if z==0: x -= 1
    if z==1: x += 1
    if z==2: y -= 1
    if z==3: y += 1
    return x,y
def g(x1,y1,x2,y2,x3,y3):
    return abs((x2-x1)*(y3-y1)-(x3-x1)*(y2-y1))/2
for i in range(4):
    x4,y4 = f(x1,y1,i)
    for j in range(4):
        x5,y5 = f(x2,y2,j)
        for k in range(4):
            x6,y6 = f(x3,y3,k)
            s = max(s,g(x4,y4,x5,y5,x6,y6))
print(s)
0