結果

問題 No.2196 Pair Bonus
ユーザー ntudantuda
提出日時 2023-01-22 12:29:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 206 ms / 2,000 ms
コード長 386 bytes
コンパイル時間 308 ms
コンパイル使用メモリ 87,152 KB
実行使用メモリ 141,880 KB
最終ジャッジ日時 2023-09-06 23:18:01
合計ジャッジ時間 5,381 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,280 KB
testcase_01 AC 69 ms
71,384 KB
testcase_02 AC 69 ms
71,564 KB
testcase_03 AC 206 ms
137,672 KB
testcase_04 AC 205 ms
137,636 KB
testcase_05 AC 80 ms
76,704 KB
testcase_06 AC 80 ms
76,472 KB
testcase_07 AC 80 ms
76,704 KB
testcase_08 AC 102 ms
85,428 KB
testcase_09 AC 204 ms
141,880 KB
testcase_10 AC 154 ms
114,460 KB
testcase_11 AC 104 ms
88,168 KB
testcase_12 AC 174 ms
116,964 KB
testcase_13 AC 79 ms
76,608 KB
testcase_14 AC 90 ms
79,184 KB
testcase_15 AC 81 ms
76,724 KB
testcase_16 AC 192 ms
128,084 KB
testcase_17 AC 81 ms
76,976 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
AB = [list(map(int, input().split())) for _ in range(2)]
XY = [list(map(int, input().split())) for _ in range(2)]
ans = 0
for i in range(N):
    tmp1 = 0
    for j in range(2):
        for k in range(2):
            tmp = AB[j][2 * i]
            tmp += AB[k][2 * i + 1]
            tmp += XY[abs(j - k)][i]
            tmp1 = max(tmp1, tmp)
    ans += tmp1
print(ans)
0