← 返回 amazon 的题目列表Closest Pair Sum Not Exceeding Target From Two Arrays
类型:online_judge
amazon
Given two arrays, select one number from each array to form a pair such that their sum is closest to but not greater than a given target value. Design a program to return this sum.
Example
Input
[1, 3, 5, 11]
[2, 4, 6, 8]
10