結果

問題 No.2196 Pair Bonus
ユーザー ShirotsumeShirotsume
提出日時 2022-02-06 12:01:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 217 ms / 2,000 ms
コード長 409 bytes
コンパイル時間 271 ms
コンパイル使用メモリ 86,928 KB
実行使用メモリ 140,472 KB
最終ジャッジ日時 2023-09-02 07:03:37
合計ジャッジ時間 3,739 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,400 KB
testcase_01 AC 73 ms
71,084 KB
testcase_02 AC 73 ms
71,128 KB
testcase_03 AC 217 ms
136,932 KB
testcase_04 AC 212 ms
137,180 KB
testcase_05 AC 75 ms
75,496 KB
testcase_06 AC 76 ms
75,596 KB
testcase_07 AC 75 ms
75,576 KB
testcase_08 AC 114 ms
85,028 KB
testcase_09 AC 212 ms
140,472 KB
testcase_10 AC 172 ms
114,208 KB
testcase_11 AC 121 ms
87,988 KB
testcase_12 AC 186 ms
116,724 KB
testcase_13 AC 77 ms
75,796 KB
testcase_14 AC 98 ms
78,628 KB
testcase_15 AC 77 ms
75,596 KB
testcase_16 AC 196 ms
127,344 KB
testcase_17 AC 79 ms
76,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve(n, a, b, x, y):
    ans = 0
    for i in range(n):
        ans += max(a[2 * i] + a[2 * i + 1] + x[i], a[2 * i] + b[2 * i + 1] + y[i], b[2 * i] + a[2 * i + 1] + y[i], b[2 * i] + b[2 * i + 1] + x[i])
    return ans

n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
x = list(map(int,input().split()))
y = list(map(int,input().split()))

print(solve(n, a, b, x, y))
0