Collapse!!

Candy and his friends found a treasure map. With the help of the map, they successfully found the treasure inside an ancient cave, but just as they took the large treasure box, the cave started to collapse! Candy must find a way out, but the rocks are falling down so quickly that it’s impossible to run out with bare feet. After carefully examined the treasure box, they found a digit panel, a button, and a small piece of paper. “I am not an ordinary treasure box, I am a mini-spaceship, your last hope to escape. Use the digit panel to setup my speed, then press the button to launch. I’ll fly from left to right, until I reach the exit. The trouble is: I am very weak. I’ll explode immediately when hit by any falling rock, but if I’m just touching one, it’s ok. When flying, I burn the treasures inside. The higher my speed is, the more treasures I will burn. Thus, be sure to find an appropriate speed before starting your journey. The last thing you need to know is: don’t be too slow. The exit will be blocked after a while.” A list of rocks that will fall down is enclosed in that piece of paper. All the rocks have the same speed. Each rock continues to fall down until its topmost point reaches the land (i.e. y = 0).You can start your journey at any time, but once you launch the spaceship, it never stops before reaching the exit or being destroyed! Write a program to find the minimal speed that takes you out of the cave. Input The input contains several test cases. The first line of each case contains seven positive integers n, a,b,L,H,V,T (1≤n≤50,1≤a,b≤10,1≤L,H,V,T ≤10000). Thespaceshipisaunits wide and b units high. Its bottom-left corner is initially (i.e. at time 0) at (0, 0). When the bottom- left corner reaches (L,0) before time T, you succeeded. The height of the cave is H. The speed of each rock is V . There are n lines followed. Each of these lines contains three integers xi, ri, ti (1≤ti ≤T,1≤ri ≤200,a+ri ≤xi ≤L−ri,b<H−ri): attimeti,therewillbeafallingrockwitha radius of ri with its center at (xi,H). The descriptions of rocks are sorted in increasing order of falling time. The last test case is followed by a single zero, which should not be processed. Output For each test case, print the case number and the minimal speed to two decimal places. It is always possible to escape. Sample Input 1 2 1 20 12 3 20 525 0 Sample Output Case 1: 1.00 Fig 1. Collision between the spaceship and a rock