結果

問題 No.2196 Pair Bonus
ユーザー ニックネームニックネーム
提出日時 2023-01-20 21:53:06
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 379 ms / 2,000 ms
コード長 314 bytes
コンパイル時間 115 ms
コンパイル使用メモリ 10,844 KB
実行使用メモリ 39,764 KB
最終ジャッジ日時 2023-09-05 14:09:34
合計ジャッジ時間 3,710 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,804 KB
testcase_01 AC 16 ms
7,860 KB
testcase_02 AC 16 ms
7,852 KB
testcase_03 AC 377 ms
39,764 KB
testcase_04 AC 379 ms
39,760 KB
testcase_05 AC 18 ms
8,236 KB
testcase_06 AC 17 ms
7,776 KB
testcase_07 AC 18 ms
8,344 KB
testcase_08 AC 74 ms
14,100 KB
testcase_09 AC 357 ms
37,384 KB
testcase_10 AC 233 ms
28,032 KB
testcase_11 AC 92 ms
15,548 KB
testcase_12 AC 306 ms
33,412 KB
testcase_13 AC 18 ms
8,324 KB
testcase_14 AC 48 ms
10,784 KB
testcase_15 AC 20 ms
8,360 KB
testcase_16 AC 354 ms
38,160 KB
testcase_17 AC 22 ms
8,652 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):
    p = max(a[2*i]+a[2*i+1],b[2*i]+b[2*i+1])+x[i]
    q = max(a[2*i]+b[2*i+1],b[2*i]+a[2*i+1])+y[i]
    ans += max(p,q)
print(ans)
0