Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Jambaxx did some bad things and ended up in a black hole that teleported him into an unknown planet. In front of him are N obstacles he can step on, but he can't climb them due to the electric fence. After the obstacles Jambaxx can find a white hole that teleports him back to Earth. The obstacles are described by numbers W(width, in metres), D(distance from the start, in metres) and H(height, in centimetres). Jambaxx is constantly going forward at a speed of 1 m/s, he can jump at a speed of K m/s and the gravity of the planet is G m/s^2. In order for the white hole to be activated, Jambaxx must step on all the obstacles. He could also use some instructions, so for each obstacle tell him the leftmost x-coordinate where he can step on the obstacle. If he can't activate the white hole, tell him how many times does he need to use his magic powers to remove the rightmost obstacle.
- Input: N(<=100), K(<=10^7), G(<=10^7), N times:
- W, H, D(<=10^9)
- Output: written in the statement.
- Note 1300 test cases, judging could take a long time.
Add Comment
Please, Sign In to add comment