結果

問題 No.2094 Symmetry
ユーザー 👑 p-adicp-adic
提出日時 2023-05-22 14:59:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 288 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 10,984 KB
実行使用メモリ 26,672 KB
最終ジャッジ日時 2023-08-23 23:31:46
合計ジャッジ時間 9,735 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 16 ms
7,892 KB
testcase_02 AC 16 ms
7,872 KB
testcase_03 AC 16 ms
7,768 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 16 ms
7,876 KB
testcase_28 WA -
testcase_29 AC 16 ms
7,836 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 196 ms
21,476 KB
testcase_36 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

I=input
def J():
	return map(int,I().split())
N,K=J()
R=range(N*2)
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[N*2-i-1])
a=sum(sorted(D)[N*N-b:])
if b%2<1:a=max(a,K+sum(sorted(E)[(N*N-b)//2:]))
print(a)
0