当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3834:Where am I

题目描述
I am a ball on a circle table. The table's surface is so smooth that I can move without energy lost.
Now you are to give me a hit vector, I want to know where I will be after T seconds. Collisions between me and the edge of the table satisfy Conservation of Momentum Theorem , also my speed after collision is as fast as before. Look for the figure below to know it more clearly:
输入解释
The first line contains a number N, the number of test cases you have to proceed.
Each test case has three lines.First line has three numbers, x1,y1,r1, the center and radius of the table. Second line has x2,y2,r2, the parameters of me (the ball). The third line consists of dx, dy, T: (dx,dy) is the hit vector, T is the time I have moved since you hit me. To explain hit vector: if I am at position (x0,y0) now ,next second I will be at position (x0+dx,y0+dy) without conllision. All input numbers are non-negative integer and less than 10^6.Also you can assume the ball must be in the table.
输出解释
Please output two float number x , y,which mean the center position of the ball after T seconds and round to just one decimal places.
输入样例
2
5 5 10
5 5 1
1 0 30
1 1 10
1 0 2
1 1 100
输出样例
-1.0 5.0
3.4 -0.5
来自杭电HDUOJ的附加信息
Recommend xubiao

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-3834

最后修改于 2020-10-25T23:07:24+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)