結果
問題 |
No.2196 Pair Bonus
|
ユーザー |
![]() |
提出日時 | 2025-03-20 21:04:51 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 175 ms / 2,000 ms |
コード長 | 436 bytes |
コンパイル時間 | 211 ms |
コンパイル使用メモリ | 82,532 KB |
実行使用メモリ | 139,680 KB |
最終ジャッジ日時 | 2025-03-20 21:05:07 |
合計ジャッジ時間 | 3,100 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 |
ソースコード
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())) total = 0 for i in range(n): a = 2 * i b = 2 * i + 1 same_a = A[a] + A[b] same_b = B[a] + B[b] same = max(same_a, same_b) + X[i] diff1 = A[a] + B[b] diff2 = B[a] + A[b] diff = max(diff1, diff2) + Y[i] total += max(same, diff) print(total)