2019 Fall KBTU OPEN
Nurdaulet and Zharaskhan are coaching students. To each student they have their own attitudes, it can be expressed as number
ai (for Nurdaulet) and
bi (for Zharaskan) that are called love index of students. Askar asked them to calculate the unfair attitude rate. Unfair attitude rate is the difference between the largest and the smallest love index. In order to not show their possibly large unfair attitude rates, they decided to cheat: each shuffle his array, then form new array
bi and show the rate of new formed array to Askar. What is the minimal possible rate they can achieve?
On the first line you are given single integer n (1 ≤ n ≤ 200000). On the second line you are given n integers
106). On the third line you are given n integers
Output single integer, the answer to the problem.
2 -3 -5 3 5