No tags yet

No tag edit access

The problem statement has recently been changed. View the changes.

×
Time limit per test: 0.25 second(s)

Memory limit: 65536 kilobytes

Memory limit: 65536 kilobytes

input: standard

output: standard

output: standard

You're playing a new game at the shooting range. First, a target is placed on a square board. The target itself is a convex polygon strictly inside the board.

Then, you're allowed to shoot twice. In case at least one of your shots gets inside the target, you win. Moreover, if the segment connecting the points of your shots intersects the target, you still win. If none of the above holds, you lose.

Assuming your aiming is very bad (i.e., the points of your shots are independently uniformly distributed all over the board), compute the probability of you winning.

sample input | sample output |

4 25 25 75 25 75 75 25 75 | 0.7328341830 |

Codeforces (c) Copyright 2010-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jun/13/2021 11:00:08 (h1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|