Can we solve this problem faster then O(n^2)?

Revision en1, by plagues, 2022-01-31 19:02:40

You are given two arrays: a, b

We need to calculate for each x: c[x] = max(a[j] + b[x — j]), for each 0 <= j < x

a, b are sorted

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
ru2 Russian plagues 2022-01-31 19:03:08 4
en1 English plagues 2022-01-31 19:02:40 185 Initial revision for English translation
ru1 Russian plagues 2022-01-31 18:59:59 198 Первая редакция (опубликовано)