链接:http://acm.hdu.edu.cn/showproblem.php?pid=4969
Just a Joke
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)
Total Submission(s): 332 Accepted Submission(s): 135
Problem Description
Here is just a joke, and do not take it too seriously.
Guizeyanhua is the president of ACMM, and people call him President Guizeyanhua. When Guizeyanhua is walking on the road, everyone eyes on him with admiration. Recently, Guizeyanhua has fallen in love with an unknown girl who runs along the circular race track on the playground every evening. One evening, Guizeyanhua stood in the center of the circular race track and stared the girl soulfully again. But this time he decided to catch up with the girl because of his lovesickness. He rushed to the girl and intended to show her his love heart. However, he could not run too far since he had taken an arrow in the knee.
Now your task is coming. Given the maximum distance Guizeyanhua can run, you are asked to check whether he can catch up with the girl. Assume that the values of Guizeyanhua‘s and the girl‘s velocity are both constants, and Guizeyanhua, the girl, and the center of the circular race track always form a straight line during the process. Note that the girl and Guizeyanhua can be considered as two points.
Input
The input begins with a line containing an integer T (T<=100000), which indicates the number of test cases. The following T lines each contain four integers V1, V2, R, and D (0<V1, V2, R, D<=10^9, V1<=V2). V1 is the velocity of the girl. V2 is the velocity of Guizeyanhua. R is the radius of the race track. D is the maximum distance President Guizeyanhua can run.
Output
For each case, output "Wake up to code" in a line if Guizeyanhua can catch up with the girl; otherwise output "Why give up treatment" in a line.
Sample Input
2
1 1 1 1
11904 41076 3561 3613
Sample Output
Why give up treatment
Wake up to code
Author
SYSU
、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、
------------------------------------------------------------------------------------------------------------
第九场多校,居然出了这样一道题,纯物理+纯数学,表示很无语啊
题目意思就是圆中间一个人,喜欢在圆环上匀速圆周运动的女孩,现在他要去追那个女孩,向她表白
在任意时刻,圆心,这两个人都在一条直线上,并且那个男的只能走长度为D的距离
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
题解就不想写了,这里很详细:http://blog.csdn.net/u011775691/article/details/38691623
1 #include <stdio.h> 2 #include <string.h> 3 #include <stdlib.h> 4 #include <math.h> 5 6 int main() 7 { 8 int T; 9 scanf("%d",&T); 10 while(T--) 11 { 12 double V1,V2,R,D; 13 scanf("%lf%lf%lf%lf",&V1,&V2,&R,&D); 14 double ans=R/V1*asin(V1/V2); 15 if(ans*V2 > D) 16 { 17 printf("Why give up treatment\n"); 18 } 19 else printf("Wake up to code\n"); 20 } 21 return 0; 22 }
hdu 4946 Just a Joke(数学+物理)