21611_Ba

2022-5-16 18:19| 发布者: Hocassian| 查看: 30| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-4-89505688138400-Problem List-采集的数据-后羿采集器.html

Pro.ID

21611

Title

Ball

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=21611

AC

0

Submit

0

Ratio

-

时间&空间限制

  • Time Limit: 2000/1000 MS (Java/Others)     Memory Limit: 65536/65536 K (Java/Others)
  • 描述

    One day, Merlin buys a huge box which has no cover but unlimited height. And then he throws a lot of balls into the box. Then all the balls will fall down and hit each other. After a while, Merlin wants to know the detail of each ball. Can you tell him?

    We suppose that the box is just like the Figure 1, it has no cover and unlimited height, both side of wall and the bottom. The balls hit the wall and bottom will not lose any energy and so as the collision of the balls.

    At last, we call ignore the radium of the balls and consider all the balls are the same and they are running in a 2D box. We assume that the accelerated of gravity is g=10s -1.

    Figure 1   The box and the balls

    输入

    There are multiply test cases in this problem. In each test case, the first line is three integers n, w, t ( n ≤ 10000, t ≤ 100 ), n stands for the number of balls, w is the wide of the box and t is time what Merlin wants to know.

    And then there are n lines of four real numbers, xi, yi, vxi, vyi, ( 0 ≤ xi, yi ≤ 10000, -10000 ≤ vxi, vyi ≤ 10000 ) that means the i-th ball is at (xi, yi) and has the velocity (vxi, vyi). We suppose that the down-left point is (0, 0) and then the down-right point is (0, w).

    The test cases will be terminated by n=0.

    输出

    Description

    One day, Merlin buys a huge box which has no cover but unlimited height. And then he throws a lot of balls into the box. Then all the balls will fall down and hit each other. After a while, Merlin wants to know the detail of each ball. Can you tell him?

    We suppose that the box is just like the Figure 1, it has no cover and unlimited height, both side of wall and the bottom. The balls hit the wall and bottom will not lose any energy and so as the collision of the balls.

    At last, we call ignore the radium of the balls and consider all the balls are the same and they are running in a 2D box. We assume that the accelerated of gravity is g=10s -1.

    Figure 1   The box and the balls

    Input

    There are multiply test cases in this problem. In each test case, the first line is three integers n, w, t ( n ≤ 10000, t ≤ 100 ), n stands for the number of balls, w is the wide of the box and t is time what Merlin wants to know.

    And then there are n lines of four real numbers, xi, yi, vxi, vyi, ( 0 ≤ xi, yi ≤ 10000, -10000 ≤ vxi, vyi ≤ 10000 ) that means the i-th ball is at (xi, yi) and has the velocity (vxi, vyi). We suppose that the down-left point is (0, 0) and then the down-right point is (0, w).

    The test cases will be terminated by n=0.

    Output

    Print the location of each ball at time t in x ascend order and then in y ascend order, round to 3 digits after the decimal point. Print one empty line after each test case.

    Sample Input

    2 10 2
    5.0 0.0 0.0 15.0
    5.0 10.0 0.0 15.0
    0

    Sample Output

    5.000 0.000
    5.000 10.000

    Source

    样例输入

    2 10 2
    5.0 0.0 0.0 15.0
    5.0 10.0 0.0 15.0
    0

    样例输出

    5.000 0.000
    5.000 10.000

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部