結果

問題 No.2094 Symmetry
ユーザー 👑 p-adicp-adic
提出日時 2023-05-22 15:02:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 331 ms / 2,000 ms
コード長 290 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 10,940 KB
実行使用メモリ 27,004 KB
最終ジャッジ日時 2023-08-23 23:33:41
合計ジャッジ時間 9,586 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,784 KB
testcase_01 AC 16 ms
7,808 KB
testcase_02 AC 17 ms
7,916 KB
testcase_03 AC 16 ms
7,948 KB
testcase_04 AC 16 ms
7,828 KB
testcase_05 AC 16 ms
7,888 KB
testcase_06 AC 17 ms
7,892 KB
testcase_07 AC 16 ms
7,908 KB
testcase_08 AC 15 ms
7,868 KB
testcase_09 AC 326 ms
25,880 KB
testcase_10 AC 323 ms
25,848 KB
testcase_11 AC 328 ms
26,536 KB
testcase_12 AC 327 ms
26,020 KB
testcase_13 AC 273 ms
26,388 KB
testcase_14 AC 325 ms
26,340 KB
testcase_15 AC 328 ms
26,120 KB
testcase_16 AC 331 ms
26,356 KB
testcase_17 AC 278 ms
26,456 KB
testcase_18 AC 280 ms
25,776 KB
testcase_19 AC 325 ms
26,412 KB
testcase_20 AC 330 ms
26,372 KB
testcase_21 AC 326 ms
26,404 KB
testcase_22 AC 328 ms
26,052 KB
testcase_23 AC 280 ms
26,504 KB
testcase_24 AC 280 ms
26,452 KB
testcase_25 AC 326 ms
26,316 KB
testcase_26 AC 325 ms
26,452 KB
testcase_27 AC 16 ms
7,888 KB
testcase_28 AC 193 ms
25,116 KB
testcase_29 AC 16 ms
7,808 KB
testcase_30 AC 200 ms
25,120 KB
testcase_31 AC 205 ms
26,820 KB
testcase_32 AC 209 ms
27,004 KB
testcase_33 AC 16 ms
7,760 KB
testcase_34 AC 192 ms
22,124 KB
testcase_35 AC 201 ms
22,000 KB
testcase_36 AC 209 ms
25,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

I=input
def J():
	return map(int,I().split())
N,K=J()
M=N*2
R=range(M)
b=0
for i in R:
	for c in I():b+=c=="#"
D,E=[],[]
for i in R:
	C=list(J())
	for i in R:
		D.append(C[i])
		if i<N:E.append(C[i]+C[M-i-1])
a=sum(sorted(D)[M*M-b:])
if b%2<1:a=max(a,K+sum(sorted(E)[(M*M-b)//2:]))
print(a)
0