Mice and Cheese
Recent studies have revealed that when a group of hungry mice searches for cheese, they behave in a specific way: if multiple pieces of cheese are nearby, each mouse selects the closest one. Once all mice have chosen, they simultaneously move towards their selected piece of cheese. If a mouse, or several mice, reach a piece of cheese, they consume it, leaving any mice that arrive later without food. All mice move at the same speed.
In cases where there are multiple equally close pieces of cheese, the mice will choose the option that leaves the fewest mice hungry. To test this behavior, scientists conducted an experiment by placing N mice and M pieces of cheese on a rectangular coordinate plane. All the mice are positioned on a line y = Y_0, and all the cheese pieces are on another line y = Y_1. To validate the experiment's results, the scientists require a program that can simulate the mice's behavior.
Your task is to write a program that determines the number of mice that will end up without cheese.
Input
The first line contains four integers: N (1 ≤ N ≤ 10^5), M (0 ≤ M ≤ 10^5), Y_0 (0 ≤ Y_0 ≤ 10^7), Y_1 (0 ≤ Y_1 ≤ 10^7). The second line lists N increasing integers, representing the x-coordinates of the mice. The third line lists M increasing integers, representing the x-coordinates of the cheese pieces. All x-coordinates are integers and do not exceed 10^7 in absolute value.
Output
Output a single integer: the minimum number of mice that will remain without cheese.