結果

問題 No.2196 Pair Bonus
ユーザー ああいいああいい
提出日時 2023-01-21 14:33:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 208 ms / 2,000 ms
コード長 352 bytes
コンパイル時間 253 ms
コンパイル使用メモリ 86,732 KB
実行使用メモリ 140,920 KB
最終ジャッジ日時 2023-09-06 03:50:21
合計ジャッジ時間 4,937 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,052 KB
testcase_01 AC 66 ms
70,992 KB
testcase_02 AC 68 ms
71,284 KB
testcase_03 AC 208 ms
137,268 KB
testcase_04 AC 204 ms
137,208 KB
testcase_05 AC 72 ms
75,664 KB
testcase_06 AC 70 ms
75,468 KB
testcase_07 AC 70 ms
75,376 KB
testcase_08 AC 107 ms
85,216 KB
testcase_09 AC 204 ms
140,920 KB
testcase_10 AC 161 ms
114,160 KB
testcase_11 AC 116 ms
87,672 KB
testcase_12 AC 176 ms
116,472 KB
testcase_13 AC 71 ms
75,464 KB
testcase_14 AC 102 ms
79,044 KB
testcase_15 AC 73 ms
75,488 KB
testcase_16 AC 190 ms
127,700 KB
testcase_17 AC 77 ms
76,284 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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()))
ans = 0

for i in range(N):
    s = max(A[i * 2] + A[i * 2 + 1],B[i * 2] + B[i * 2 + 1]) + X[i]
    t = max(A[i * 2] + B[i * 2 + 1],B[i * 2] + A[i * 2 + 1]) + Y[i]
    ans += max(s,t)
print(ans)
0