How to solve this?

Revision en2, by NikitaMikhaylov, 2017-08-28 03:24:05

Hello, codeforces!

Recently I came up with a task, but I couldn't solve it.

You are given a two arrays a and b of size n (1 ≤ n ≤ 105). You should answer q (1 ≤ q ≤ 105) queries:

• for given integer k (1 ≤ k ≤ n) you need to find maximal value ai + bk - i.

#### History

Revisions

Rev. Lang. By When Δ Comment
en2 NikitaMikhaylov 2017-08-28 03:24:05 1 Tiny change: 'two arraysу $a$ and $' -> 'two arrays$a$and$'
en1 NikitaMikhaylov 2017-08-27 22:55:57 342 Initial revision (published)