Problem H
Easter Eggs
Languages
en
ja

Easter is coming and the Easter Bunny decided to organise a chocolate egg hunt for the children. He will hide two types of eggs: blue milk chocolate and red dark chocolate. In the field there are some redberry and some blueberry plants where the Easter Bunny could hide the eggs. Red eggs should be hidden in a redberry plant and blue eggs in a blueberry plant.
The local government has issued a permit for the event,
under the condition that exactly
According to the yearly tradition, there is a big reward for the first child to find both a red and a blue egg. In order to make the hunt as challenging as possible, the Easter Bunny wants to maximise the minimum distance between a red and a blue egg. To keep things fair, he will hide at most one egg in each plant. Your task is to write a program to help him accomplish his goal.
Input
The input consists of the following:
-
one line containing three integers
, the number of eggs to hide , the number of blueberry plants and the number of redberry plants ; -
lines, each containing two integers , indicating the coordinates of a blueberry plant; -
lines, each containing two integers , indicating the coordinates of a redberry plant.
The
Output
Output a single line containing a floating point number,
![\includegraphics[width=.3\textwidth ]{./sample-testcase2.pdf}](/problems/eastereggs/file/statement/en/img-0002.png)
Sample Input 1 | Sample Output 1 |
---|---|
3 2 2 0 0 1 0 2 0 3 0 |
2.000000000000000 |
Sample Input 2 | Sample Output 2 |
---|---|
4 3 3 0 0 1 2 -1 2 0 1 -1 -1 1 -1 |
3.000000000000000 |