|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||128 MB||6||1||1||20.000%|
In a well-known online game you play a yeti whose goal it is to hit a cute and cuddly penguin in such a way that it flies as far as possible. The game is set in sunny Antarctica, where the ground is littered with obstacles left by human and robotic expeditions. The most dangerous obstacles are sharp, pointy, metal objects, known as spikes. These spikes are most definitely not safe for penguins and children under three years of age.
Besides the occasional expedition, there have also been many wars in Antarctica. The result is that besides spikes, penguins (and yetis), one is also likely to encounter mines on the Antarctic surface. While they are not good for the health of a penguin, the explosions do improve the distance he will travel.
The best way to get a high score in this game is by figuring out the optimal strategy in advance. To be able to do this you need to know the following facts:
On the first line of the input is a positive integer, the number of test cases. Then for each test case:
For each test case:
3 0 1 64.7 spike 2 63.9 mine 64.7 spike
6829 44 6466 34 7022 39