結果

問題 No.2196 Pair Bonus
ユーザー kohakoha11301kohakoha11301
提出日時 2023-03-02 13:43:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 183 ms / 2,000 ms
コード長 409 bytes
コンパイル時間 890 ms
コンパイル使用メモリ 81,416 KB
実行使用メモリ 138,500 KB
最終ジャッジ日時 2023-10-17 10:52:34
合計ジャッジ時間 4,629 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,136 KB
testcase_01 AC 36 ms
53,136 KB
testcase_02 AC 36 ms
53,136 KB
testcase_03 AC 183 ms
138,496 KB
testcase_04 AC 179 ms
138,500 KB
testcase_05 AC 41 ms
59,136 KB
testcase_06 AC 40 ms
59,136 KB
testcase_07 AC 40 ms
59,136 KB
testcase_08 AC 83 ms
83,820 KB
testcase_09 AC 171 ms
122,656 KB
testcase_10 AC 139 ms
115,032 KB
testcase_11 AC 87 ms
86,652 KB
testcase_12 AC 152 ms
117,160 KB
testcase_13 AC 40 ms
59,136 KB
testcase_14 AC 66 ms
76,972 KB
testcase_15 AC 41 ms
59,136 KB
testcase_16 AC 164 ms
126,948 KB
testcase_17 AC 45 ms
63,648 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