結果

問題 No.2331 Maximum Quadrilateral
ユーザー rlangevinrlangevin
提出日時 2023-10-12 12:41:43
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 600 bytes
コンパイル時間 356 ms
コンパイル使用メモリ 87,120 KB
実行使用メモリ 76,712 KB
最終ジャッジ日時 2023-10-12 12:41:59
合計ジャッジ時間 14,565 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 525 ms
76,528 KB
testcase_01 AC 370 ms
76,672 KB
testcase_02 AC 413 ms
76,280 KB
testcase_03 AC 504 ms
76,652 KB
testcase_04 AC 534 ms
76,408 KB
testcase_05 AC 559 ms
76,648 KB
testcase_06 AC 506 ms
76,196 KB
testcase_07 AC 449 ms
76,408 KB
testcase_08 AC 348 ms
76,508 KB
testcase_09 AC 331 ms
76,416 KB
testcase_10 AC 301 ms
76,712 KB
testcase_11 AC 340 ms
76,428 KB
testcase_12 AC 322 ms
76,500 KB
testcase_13 AC 339 ms
76,640 KB
testcase_14 AC 575 ms
76,196 KB
testcase_15 AC 122 ms
76,708 KB
testcase_16 AC 254 ms
76,536 KB
testcase_17 AC 94 ms
76,316 KB
testcase_18 AC 134 ms
76,456 KB
testcase_19 AC 98 ms
76,364 KB
testcase_20 AC 624 ms
76,408 KB
testcase_21 AC 649 ms
76,280 KB
testcase_22 AC 581 ms
76,516 KB
testcase_23 AC 649 ms
76,200 KB
testcase_24 AC 621 ms
76,608 KB
testcase_25 AC 72 ms
71,324 KB
testcase_26 AC 71 ms
71,508 KB
testcase_27 AC 71 ms
71,512 KB
testcase_28 AC 71 ms
71,460 KB
testcase_29 AC 71 ms
71,432 KB
testcase_30 WA -
testcase_31 AC 71 ms
71,372 KB
testcase_32 AC 71 ms
71,508 KB
testcase_33 AC 73 ms
71,376 KB
testcase_34 AC 71 ms
71,344 KB
testcase_35 AC 71 ms
71,220 KB
testcase_36 AC 72 ms
71,324 KB
testcase_37 AC 72 ms
71,440 KB
testcase_38 AC 72 ms
71,588 KB
testcase_39 AC 72 ms
71,284 KB
testcase_40 AC 71 ms
71,256 KB
testcase_41 AC 72 ms
71,460 KB
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 AC 71 ms
71,312 KB
testcase_46 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N = int(input())
X, Y = [0] * N, [0] * N
for i in range(N):
    X[i], Y[i] = map(int, input().split())

def f(x1, x2, y1, y2, x, y):
    return (x2 - x1) * (y - y1) - (y2 - y1) * (x - x1)

ans = 0
for i in range(N):
    for j in range(i + 1, N):
        ans1, ans2 = 0, 0
        for k in range(N):
            v = f(X[i], X[j], Y[i], Y[j], X[k], Y[k])
            if v == 0:
                continue
            if v > 0:
                ans1 = max(ans1, v)
            else:
                ans2 = max(ans2, -v)
        ans = max(ans, ans1 + ans2)

print(ans)
0