Help with problem

Revision en1, by szawinis, 2017-08-18 16:42:24

You are given two arrays of integers a, b both with length n <= 10^5. For each 0 <= x <= n print the sum of a[i]*b[x-i] for all 0 <= i <= x.

It's obvious this can be done in quadratic time, but can we do any better?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English szawinis 2017-08-18 16:42:24 236 Initial revision (published)