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.

The task is:

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.
Tags help

History

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