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

建议使用的浏览器:

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

3684:Physics Experiment

Special Judge 特殊评判
题目描述

Simon is doing a physics experiment with N identical balls with the same radius of R centimeters. Before the experiment, all N balls are fastened within a vertical tube one by one and the lowest point of the lowest ball is H meters above the ground. At beginning of the experiment, (at second 0), the first ball is released and falls down due to the gravity. After that, the balls are released one by one in every second until all balls have been released. When a ball hits the ground, it will bounce back with the same speed as it hits the ground. When two balls hit each other, they with exchange their velocities (both speed and direction).

Simon wants to know where are the N balls after T seconds. Can you help him?

In this problem, you can assume that the gravity is constant: g = 10 m/s2.

输入解释

The first line of the input contains one integer C (C ≤ 20) indicating the number of test cases. Each of the following lines contains four integers N, H, R, T.
1≤ N ≤ 100.
1≤ H ≤ 10000
1≤ R ≤ 100
1≤ T ≤ 10000

输出解释

For each test case, your program should output N real numbers indicating the height in meters of the lowest point of each ball separated by a single space in a single line. Each number should be rounded to 2 digit after the decimal point.

输入样例
2
1 10 10 100
2 10 10 100
输出样例
4.95
4.95 10.20

该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-3684

最后修改于 2020-10-29T07:08:07+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
1000 65536