結果

問題 No.2094 Symmetry
ユーザー ニックネームニックネーム
提出日時 2022-10-07 21:51:25
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 354 bytes
コンパイル時間 452 ms
コンパイル使用メモリ 10,804 KB
実行使用メモリ 27,272 KB
最終ジャッジ日時 2023-09-03 01:32:41
合計ジャッジ時間 8,808 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,792 KB
testcase_01 AC 15 ms
7,828 KB
testcase_02 AC 16 ms
7,784 KB
testcase_03 AC 16 ms
7,788 KB
testcase_04 AC 17 ms
7,792 KB
testcase_05 AC 16 ms
7,776 KB
testcase_06 AC 16 ms
7,788 KB
testcase_07 AC 16 ms
7,804 KB
testcase_08 AC 15 ms
7,856 KB
testcase_09 AC 290 ms
25,784 KB
testcase_10 AC 290 ms
25,708 KB
testcase_11 AC 298 ms
27,272 KB
testcase_12 AC 291 ms
25,888 KB
testcase_13 AC 240 ms
26,460 KB
testcase_14 AC 291 ms
25,848 KB
testcase_15 AC 297 ms
27,072 KB
testcase_16 AC 292 ms
25,824 KB
testcase_17 AC 237 ms
26,368 KB
testcase_18 AC 242 ms
26,012 KB
testcase_19 AC 293 ms
25,820 KB
testcase_20 AC 287 ms
25,972 KB
testcase_21 AC 287 ms
25,896 KB
testcase_22 AC 280 ms
25,820 KB
testcase_23 AC 242 ms
26,412 KB
testcase_24 AC 235 ms
26,468 KB
testcase_25 AC 281 ms
25,876 KB
testcase_26 AC 283 ms
25,780 KB
testcase_27 AC 16 ms
7,920 KB
testcase_28 AC 154 ms
25,052 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 183 ms
26,908 KB
testcase_32 AC 184 ms
26,708 KB
testcase_33 AC 16 ms
7,800 KB
testcase_34 AC 154 ms
21,920 KB
testcase_35 AC 163 ms
21,888 KB
testcase_36 AC 175 ms
25,988 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
x = 0; a = []; b = []
for _ in range(2*n):
    for v in input():
        if v == "#": x += 1
for _ in range(2*n):
    c = list(map(int, input().split()))
    for v in c: a.append(v)
    for i in range(n): b.append(c[i]+c[-1-i])
ans = 0 if x%2 else sum(sorted(b)[-x//2:])+k
print(max(ans, sum(sorted(a)[-x:])) if x else 0)
0