QOJ.ac

QOJ

Limite de temps : 1 s Limite de mémoire : 512 MB Points totaux : 100

#4145. Save Princess Xiaoyun

Statistiques

The hero is about to embark on the road to save the princess again... This time, the rescue target is the princess of love and justice, Princess Xiaoyun. The hero arrives at the entrance of the boss's cave and is stunned, because there is not just one boss in front of him, but thousands of them. When the hero realizes that he is still at level 1, he understands that this is an impossible mission. But he does not give up; he wonders if he can avoid the bosses to save the princess, hehe. The boss's cave can be viewed as a rectangle. The hero is at the bottom-left corner $(1, 1)$, and the princess is at the top-right corner $(\text{row}, \text{line})$. To avoid the bosses, the hero naturally wants to stay as far away from them as possible, so he decides to find a path that maximizes the minimum distance to any boss. Ps: The hero can move in any direction. Can you help him? When the hero finds the beautiful Princess Xiaoyun, he is immediately surrounded by bosses!!! The hero slowly closes his eyes, waves his hand lightly, and after a flash of white light, he uses a town portal scroll to return to the castle, but only Princess Xiaoyun returns... because the hero forgot to enter the teleportation circle.

Input

The first line contains three integers: $n$, representing the number of bosses, and $\text{row}, \text{line}$, representing the dimensions of the rectangle. The next $n$ lines each contain two integers representing the coordinates of a boss.

Output

Output a decimal number representing the maximum possible minimum distance from the hero's path to any boss, rounded to two decimal places.

Examples

Input 1

1 3 3
2 2

Output 1

1.00

Input 2

1 3 3
3 1

Output 2

2.00

Constraints

20% of the data: boss coordinate range $\le 50$; 60% of the data: $n \le 1500$; 100% of the data: $n \le 3000$;

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.