Wiskey's Power+数学题
2013-04-25 13:38
495 查看
Wiskey's Power
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 326 Accepted Submission(s): 153
[align=left]Problem Description[/align]
Come back school from the 33rdACM / ICPC Asia ChenDu, everyone is exhausted, in particular the captain Wiskey. As saying that night, Wiskey drink a lot of wine, just as he blurred, fall to sleep. All of a sudden, Wiskey
felt a slight discomfort in the chest, and then vomiting, vomitted all over. The next day, Wiskey is extremely sluggish, vomit still on the train.
Your task is to calculate the coordinates of vomit.
We assume that the quality of vomit is m, and its size can be ignored.
As the figure below:
The vomit start from the blue point A, whose speed is V, and its angle with X-axis is a. If the vomit hit the ceiling, then its value of the speed don't changed and if before the collision the angle of the speed with X-axis is b, then after the collision the
angle of the speed with X-axis is b , too.
Ignore air resistance, acceleration due to gravity g = 9.87m/s2, calculate and output Q.
(you can assume that the vomit will not fall to the higher berth)
[align=left]Input[/align]
Each line will contain three numbers V , m and a (0 <= a < 90)described above.
Process to end of file.
[align=left]Output[/align]
For each case, output Q in one line, accurate up to 3 decimal places.
[align=left]Sample Input[/align]
100 100 45
[align=left]Sample Output[/align]
3.992 [code]#include<stdio.h> #include<math.h> #define g 9.87 #define s0 3 #define s1 0.5 #define s2 3.5 void main() { double v,a,vx,vy,q,m; while(scanf("%lf %lf %lf",&v,&m,&a)!=EOF) { vy=sin(a*3.1415926/(180))*v; vx=cos(a*3.1415926/(180))*v; if(vy*vy/(2*g)>s1) q=(sqrt(2*g*(s2-s1)+vy*vy)+vy-2*sqrt(vy*vy-2*g*s1))/g*vx; else q=(vy+sqrt(2*g*s0+vy*vy))/g*vx; printf("%.3f\n",q); } }
[/code]
相关文章推荐
- hdu 2603 Wiskey's Power(数学题),待改正
- hdu 5187 zhx's contest ( 数学+java)
- debug00:详解Genymotion模拟器“Could not open '/sys/class/power_supply/genymotion_fake_path/present'”原因及破解
- POJ 2645 Boastin' Red Socks(组合数学)
- hdu——2603——Wiskey's Power
- hdu 1165 Eddy's research II(数学:等差 等比公式)
- [hdu 5051]2014上海网络赛 Fraction 数学 Benford's law/打表找规律
- hdu 2603 && 比赛 D - Wiskey's Power
- SDK编译数学函数出错:"undefined reference to 'cos/sin'
- HDOJ 2200 Eddy's AC难题(数学组合概率题)
- poj 1631 Painter's Problem(数学:高斯消元)
- Khan公开课 - 概率学习笔记(二)无顺序独立事件、数学符号、Bayes's Law、非公平概率计算
- cvc-complex-type.2.4.d: Invalid content was found starting with element 'cim:Powersupply'.
- HDU 4791 & ZOJ 3726 Alice's Print Service (数学 打表)
- Codeforces #319(Div.2) C. Vasya and Petya's Game(数学题)
- 数据库 'BPowercs' 的日志不可用。有关相应错误消息,请查看事件日志
- UVa 11038 - How Many O's? (组合数学 数位统计)
- Codeforces Round #327 (Div. 1) B题: Chip 'n Dale Rescue Rangers [数学题]
- powerdesigner(2) __概念'powerdesigner concept model physical model'
- Hdu 5187 zhx's contest(数学)