結果

問題 No.2331 Maximum Quadrilateral
ユーザー 👑 p-adicp-adic
提出日時 2023-07-17 18:53:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,926 ms / 2,000 ms
コード長 409 bytes
コンパイル時間 177 ms
コンパイル使用メモリ 81,612 KB
実行使用メモリ 348,628 KB
最終ジャッジ日時 2023-10-18 00:34:15
合計ジャッジ時間 33,934 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,704 ms
318,028 KB
testcase_01 AC 1,043 ms
223,172 KB
testcase_02 AC 1,250 ms
252,576 KB
testcase_03 AC 1,244 ms
252,576 KB
testcase_04 AC 1,597 ms
303,772 KB
testcase_05 AC 1,679 ms
315,628 KB
testcase_06 AC 1,582 ms
301,464 KB
testcase_07 AC 1,500 ms
277,924 KB
testcase_08 AC 1,023 ms
218,920 KB
testcase_09 AC 956 ms
208,924 KB
testcase_10 AC 879 ms
197,116 KB
testcase_11 AC 949 ms
206,464 KB
testcase_12 AC 877 ms
196,220 KB
testcase_13 AC 930 ms
204,144 KB
testcase_14 AC 1,757 ms
326,584 KB
testcase_15 AC 205 ms
96,144 KB
testcase_16 AC 641 ms
161,484 KB
testcase_17 AC 105 ms
81,024 KB
testcase_18 AC 241 ms
101,320 KB
testcase_19 AC 117 ms
83,168 KB
testcase_20 AC 1,926 ms
348,628 KB
testcase_21 AC 1,911 ms
348,628 KB
testcase_22 AC 1,912 ms
348,628 KB
testcase_23 AC 1,925 ms
348,628 KB
testcase_24 AC 1,916 ms
348,628 KB
testcase_25 AC 38 ms
53,404 KB
testcase_26 AC 39 ms
53,404 KB
testcase_27 AC 38 ms
53,404 KB
testcase_28 AC 39 ms
53,404 KB
testcase_29 AC 38 ms
53,404 KB
testcase_30 AC 38 ms
53,404 KB
testcase_31 AC 38 ms
53,404 KB
testcase_32 AC 39 ms
53,404 KB
testcase_33 AC 38 ms
53,404 KB
testcase_34 AC 38 ms
53,404 KB
testcase_35 AC 38 ms
53,404 KB
testcase_36 AC 38 ms
53,404 KB
testcase_37 AC 37 ms
53,404 KB
testcase_38 AC 38 ms
53,404 KB
testcase_39 AC 37 ms
53,404 KB
testcase_40 AC 37 ms
53,404 KB
testcase_41 AC 37 ms
53,404 KB
testcase_42 AC 38 ms
53,404 KB
testcase_43 AC 37 ms
53,404 KB
testcase_44 AC 37 ms
53,404 KB
testcase_45 AC 37 ms
53,404 KB
testcase_46 AC 37 ms
53,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

I,R=input,range
N=int(I())
X=[0]*N
Y=[0]*N
M=R(N)
for i in M:X[i],Y[i]=map(int,I().split())
S=[0]*N*N
for i in M:
	for j in R(i+1,N):S[i*N+j]=[(X[j]-X[i])*(Y[k]-Y[i])-(Y[j]-Y[i])*(X[k]-X[i])for k in M]
F=[[-10**8,-10**8]for v in R(N*N)]
a=0
for i in M:
	for j in R(i+1,N):
		v=i*N+j
		for k in M:
			if k!=i and k!=j:
				for c in R(2):F[v][c]=max(F[v][c],S[v][k]*[1,-1][c])
		a=max(a,abs(sum(F[v])))
print(a)
0