QOJ.ac

QOJ

Límite de tiempo: 2 s Límite de memoria: 256 MB Puntuación total: 100

#15258. Signal Amplifier

Estadísticas

In an ideal scenario, the effective signal coverage of a wireless network base station is a circle. The power consumption of the base station is proportional to the square of the radius of this circle. You are given the positions of several network users on a plane and need to choose a suitable location to build a wireless base station...

Just as you pick up your keyboard to start coding, your good friend, the inventor SHTSC, suddenly appears. SHTSC has just completed his new invention: the wireless signal amplifier. The amplifier can extend the effective signal coverage in a specific direction by a certain factor without increasing the power consumption of the base station. That is, the coverage area of a base station using the amplifier is an ellipse, and its power consumption is proportional to the square of the length of its semi-minor axis.

Given the positions of several network users on a plane, please choose a suitable location to build the wireless base station such that, with the help of the amplifier, all users can receive the signal, and the power consumption of the base station is minimized.

Note: Because the working principle of the SHTSC amplifier relies on the geomagnetic field, the direction of amplification is constant.

Input

The first line contains an integer $n$, the number of users in the plane.

The following $n$ lines each contain two integers $x, y$, representing the position of a user.

The $(n+2)$-th line contains an integer $a$, representing the amplification direction of the amplifier in degrees. This indicates that the direction of the amplifier is $a$ degrees counter-clockwise from the positive $x$-axis.

The $(n+3)$-th line contains an integer $p$, representing the magnification factor of the amplifier.

Output

Output a single real number representing the length of the semi-minor axis of the smallest ellipse that can cover all users, rounded to three decimal places.

Constraints

  • For 10% of the data, the center of the optimal solution is guaranteed to be at the origin.
  • For 20% of the data, the points are guaranteed to be randomly generated.
  • For 30% of the data, $n \le 100$.
  • For 50% of the data, $n \le 5000$.
  • For 100% of the data, $n \le 50000$, $0 \le a < 180$, $1 \le p \le 100$, $|x|, |y| \le 2 \times 10^8$.

Examples

Input 1

2
1 0
-1 0
0
2

Output 1

0.500

Input 2

3
1 1
-1 -1
0 0
45
7

Output 2

0.202

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.