Given two sorted arrays of integers, find the k-th smallest element in their merged sorted sequence. (Simpler version of median-of-two-sorted-arrays.)
Example 1:
Input: 1 3 5 2 4 6 k: 4 Output: 4
Example 2:
Input: 1 2 3 4 k: 3 Output: 3
Input format: Line 1: sorted array A. Line 2: sorted array B. Line 3: k.
Output format: k-th smallest element.