#P425. 【例73.2】 数组的距离
【例73.2】 数组的距离
Description
Given two arrays and of lengths and respectively. Take any element from and any element from , their absolute difference is . There are such differences, and the minimum value among them is called the distance between the arrays.
Please write a program to find the distance between the arrays.
Input Format
The first line contains two integers and ().
The next line contains integers representing array .
The next line contains integers representing array .
The absolute values of the array elements are less than or equal to .
Output Format
Output a single integer representing the distance between the two arrays.
Sample
5 5
1 2 3 4 5
6 7 8 9 101