A Plus B
시간 제한1초메모리 제한1024 MB
정렬된 두 배열의 모든 짝 합 N^2개 중에서 가장 작은 N개를 찾는다.
문제
Borcsa has two arrays, each of them containing non-negative integers.
The numbers in the first array are and the numbers in the second array are . The numbers in both arrays are in increasing order, that is,
- , and
- .
Borcsa really likes arithmetical addition, so for each from to and for each from to , inclusive, she computed the sum .
Let array contain all sums computed by Borcsa, sorted in increasing order. Your task is to find the first values in .
제한
- (for each such that )
- (for each such that )
- and are sorted in increasing order.
예제
이 문제는 공개된 예제가 없습니다.