Does anyone have a solution of this

Revision en2, by TooruQuyetCoVOI, 2024-01-26 17:31:34

Find the sum of k distinct quadruples ai + aj + bx + by where the sum is maximized (i, j can be equal)? Four sets i, j, x, y are considered distinct if at least one of the four numbers is different from the corresponding number in the other set.

The first line contains 3 positive integers: n, m, k (n <= 1000, m <= 1000, k ≤ n^2 * m^2).

The second line contains n positive integers: A1, A2, ..., An.

The last line contains m positive integers: B1, B2, ..., Bm (Ai, Bi ≤ 10^6).

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English TooruQuyetCoVOI 2024-01-26 17:31:34 241
en1 English TooruQuyetCoVOI 2024-01-26 17:30:05 280 Initial revision (published)