結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,840 KB
testcase_01 AC 16 ms
7,844 KB
testcase_02 AC 17 ms
7,824 KB
testcase_03 AC 17 ms
7,868 KB
testcase_04 AC 16 ms
7,932 KB
testcase_05 AC 16 ms
7,780 KB
testcase_06 AC 17 ms
7,840 KB
testcase_07 AC 16 ms
7,928 KB
testcase_08 AC 16 ms
7,808 KB
testcase_09 AC 285 ms
25,876 KB
testcase_10 AC 287 ms
25,860 KB
testcase_11 AC 295 ms
27,320 KB
testcase_12 AC 290 ms
25,868 KB
testcase_13 AC 235 ms
26,532 KB
testcase_14 AC 288 ms
25,976 KB
testcase_15 AC 293 ms
27,272 KB
testcase_16 AC 289 ms
25,752 KB
testcase_17 AC 241 ms
26,424 KB
testcase_18 AC 237 ms
25,920 KB
testcase_19 AC 289 ms
25,872 KB
testcase_20 AC 289 ms
25,872 KB
testcase_21 AC 289 ms
26,048 KB
testcase_22 AC 286 ms
25,768 KB
testcase_23 AC 242 ms
26,376 KB
testcase_24 AC 244 ms
26,400 KB
testcase_25 AC 290 ms
25,764 KB
testcase_26 AC 287 ms
25,888 KB
testcase_27 AC 16 ms
7,868 KB
testcase_28 WA -
testcase_29 AC 16 ms
7,840 KB
testcase_30 WA -
testcase_31 AC 181 ms
26,772 KB
testcase_32 AC 188 ms
26,756 KB
testcase_33 AC 16 ms
7,828 KB
testcase_34 AC 158 ms
21,876 KB
testcase_35 AC 162 ms
21,900 KB
testcase_36 AC 182 ms
26,092 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:])))
0