HDU-4969 Just a Joke (数学 - 积分)
来源:互联网 发布:织梦cms后台演示地址 编辑:程序博客网 时间:2024/05/22 17:23
Just a Joke
http://acm.hdu.edu.cn/showproblem.php?pid=4969
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.
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
21 1 1 111904 41076 3561 3613
Sample Output
Why give up treatmentWake up to code
一眼就能看出来时微积分,奈何高数远离我太久,化了好久,在离答案只差一个积分时放弃了去吃饭,悔恨不已。。。
推到过程如下:
#include <cstdio>#include <cmath>using namespace std;int main() { int T,v1,v2,r,d; scanf("%d",&T); while(T-->0) { scanf("%d%d%d%d",&v1,&v2,&r,&d); printf("%s\n",1.0*v2*r/v1*asin(1.0*v1/v2)<d?"Wake up to code":"Why give up treatment"); } return 0;}
0 0
- HDU-4969 Just a Joke (数学 - 积分)
- HDU 4969 Just a Joke(积分)
- hdu 4969 Just a Joke(积分)
- Hdu 4969 Just a Joke (简单积分)
- HDU多校赛9 HDU4969 Just a Joke 【数学积分】
- hdu 4969 Just a Joke(数学)
- HDU 4969 Just a Joke
- hdu 4968 Just a Joke 数学(积分) 2014 Multi-University Training Contest 9-1010
- [HDOJ 4969] Just a Joke [数学]
- HDU 4969 Just a Joke (数学题)
- hdu 4969 ( Just a Joke )数学题
- HDU 4969 Just a Joke 物理
- HDU 4969 Just a Joke(简短神代码)计算几何,物理题(数据超弱)
- HDU多校赛9 HDU4969 Just a Joke
- HDU4969 物理 Just a Joke
- Just a joke? 高考零分作文(1)
- Just a joke? 高考零分作文(2)
- Just a joke? 高考零分作文(3)
- 第5讲 类和对象的高级应用-对象数组
- BitMap的用法
- 51nod 算法马拉松12 逛街(treap)
- 【c++程序】inline一般用法
- 【MFC】:MFC中如何查看并且修改tab order
- HDU-4969 Just a Joke (数学 - 积分)
- fmdb 存储字典模型
- 1008. 数组元素循环右移问题 (20)——做题纪录
- C语言-冒泡,选择排序
- 堆的实现
- NS3回调问题补充
- LeetCode OJ刷题历程——Move Zeroes
- 闭上眼睛安装 debian + apache2.4 + usvn + svn
- cmake 学习笔记