結果

問題 No.2196 Pair Bonus
ユーザー とりゐとりゐ
提出日時 2022-02-07 09:40:37
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 223 ms / 2,000 ms
コード長 402 bytes
コンパイル時間 448 ms
コンパイル使用メモリ 86,944 KB
実行使用メモリ 140,896 KB
最終ジャッジ日時 2023-09-02 17:19:19
合計ジャッジ時間 6,518 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
70,904 KB
testcase_01 AC 70 ms
71,172 KB
testcase_02 AC 70 ms
70,912 KB
testcase_03 AC 223 ms
137,372 KB
testcase_04 AC 211 ms
137,076 KB
testcase_05 AC 73 ms
75,708 KB
testcase_06 AC 73 ms
75,700 KB
testcase_07 AC 73 ms
75,528 KB
testcase_08 AC 115 ms
85,088 KB
testcase_09 AC 215 ms
140,896 KB
testcase_10 AC 161 ms
114,364 KB
testcase_11 AC 116 ms
87,984 KB
testcase_12 AC 180 ms
116,868 KB
testcase_13 AC 71 ms
75,592 KB
testcase_14 AC 98 ms
79,300 KB
testcase_15 AC 72 ms
75,632 KB
testcase_16 AC 196 ms
127,640 KB
testcase_17 AC 78 ms
76,340 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
if 1<=n<=10**5:
  pass
else:
  raise Exception
if len(a)==len(b)==2*n and len(x)==len(y)==n:
  pass
else:
  raise Exception
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])
print(ans)
0