F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Crisis

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 380    Accepted Submission(s): 106
Special Judge


Problem Description
Warning! Warning! The new round of sunspot radiation is now coming and that put the life of all creatures on the earth in great danger. In order to protect our mother earth, the Association of Cosmos Monitoring(ACM) has decided to build a huge barrier floating in the sky to block the radiation. Since the earth is extremely large and the barrier may not be able to cover the whole planet, the ACM wants to know how many areas will still be under the radiation so that they could evacuate the people in those areas.

To simplify the problem, you may assume the earth, the barrier and the sun are in the same 2D plane. The sun is considered as a point radiation source. The barrier is a simple polygon which has N endpoints and the earth is a circle. As we all know, to keep a huge barrier on the sky against the gravity, the barrier has to do uniform circular motion surround the earth. Also the barrier itself rotates surround its gravity center at a certain speed.

You need pay attention to the next points:

The revolution and rotation are both anticlockwise.

There is always a line dividing the plane into two half-plane, making the barrier in one, and the earth in the other.

The sun is exactly out of the barrier and the earth at any time.

The revolution is translational motion.

To calculate the movement of the huge barrier is very difficult, so the ACM needs you to write a program to calculate this problem and heal the world. Given the current location of the sun, the earth and the barrier, the periods of the barrier traveling around the earth and its rotation, and the time when the radiation outbreak from now, the ACM wants you to tell them the arc length of the areas which are under radiation.
 

Input
Input contains several test cases (¡Ü1000). The first line of each case contains 5 integer numbers Xs, Ys, Xe, Ye, Re. (Xs, Ys) is the coordinate of the sun (-10000 ¡Ü x, y, r ¡Ü 10000, similarly hereinafter), (Xe, Ye) is the coordinate of the earth's core, Re indicate the radius of the earth.

The second line of the input contains 4 integer numbers N (¡Ü100), T1, T2, T. N indicate the number of the barrier's endpoints, T1 is the barrier's period of revolution, T2 is the barrier's rotation period, T is the time when the radiation outbreak from now. The next N lines, each line consists of two integers xi and yi indicate the coordinate of the i-th endpoint of the barrier, and the endpoints will be given by the clockwise or anticlockwise order.
 

Output
For each case, print the the arc length of the areas which are under radiation when the radiation outbreak. Any answer with absolute error smaller than 0.01 is acceptable.
 

Sample Input
-11 -6 9 7 9 7 100 120 0 -5 -3 -3 -4 -1 -3 -1 -2 -2 -1 -3 0 -4 -1 -11 -6 9 7 9 7 100 120 95 -5 -3 -3 -4 -1 -3 -1 -2 -2 -1 -3 0 -4 -1
 

Sample Output
13.93 13.45
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-26 06:05:41, Gzip enabled