Pro.ID22132 TitleEmergent escape Title链接http://10.20.2.8/oj/exercise/problem?problem_id=22132 AC15 Submit169 Ratio8.88% 时间&空间限制描述In the year 23XX, spaceship is very popular used in transmission of the universe. People live not only on the earth, but also on many other planets. I am an astronaut, professionally speaking, a captain. I have my own spaceship, which names "ZEPHYR". My job is that exploring the galaxy, detecting the mines and gas, collecting the swatch and bringing them to the earth. I love my job. It is so excited that traveling through the stars. I'm always accidentally meeting many graceful things I have never seen before, but sometimes it is not so good when bad lucks fall off. One day, when I am driving my spaceship, dangers happened. I find that I have gone a wrong way, there are lots of aerolites in my frontage, and they are gonna to strike my spaceship within a few seconds. I try to control the ship to avoid hitting, but there are really too much aerolites. Finally, my spaceship is badly damaged. Oh, my "ZEPHYR"! But there is no time to be sad. I hear the warning of the computer: "Emergency! The spaceship is going to explode!" I have to escape immediately! There is a life-ship in a comer of the spaceship. Now I am in the controlling room, another side of the spaceship. Do I have chance to get away? Seeing from frontward to backward, "ZEPHYR" is shaped as a circle, we defined the coordinates of the center of the circle is (0, 0), the radius is R, and the angle of the East is 0° , the angle of the North is 90° . My computer has detected out there are N aerolites stroke my spaceship. Each aerolite is also shaped as a circle, with location coordinates (xi, yi), and radius ri. If it hits my spaceship, it leaves a hole as its shape, so I cannot get through it. The controlling room and the life-ship are all on the circumference (Compared with the huge spaceship, you could assume both of them as a point), with their angles d1 and d2, anti-clockwise from East. Tell me whether I can get to the life-ship. I can go to everywhere in my spaceship, except the hole hit by the aerolites (Even the edge of the hole). 输入The first line of input there is one integer T ( T ≤ 100 ), giving the number of test cases in the input. Each test case starts with a line containing three real number R, d1, d2 ( 0 < R ≤ 10000, 0 ≤ d1, d2 < 360, d1 ≠ d2 ), representing the radius of the spaceship, and the degree of the two place on the circumference. Next line is a positive integer N ( 0 < N ≤ 1000 ), the number of the aerolites. Then N lines each line comes with a coordinate ( xi, yi ), and radius ri, all of them are real number, ( -10000 ≤ xi, yi ≤ 10000, 0 < ri ≤ 10000). There is a blank line between each test case. Note that some aerolites may not strike on the spaceship, and some aerolites may directly strike on the controlling room or life-ship, even the edge of the aerolites (How poor! Then you die hard!). 输出Description In the year 23XX, spaceship is very popular used in transmission of the universe. People live not only on the earth, but also on many other planets. I am an astronaut, professionally speaking, a captain. I have my own spaceship, which names "ZEPHYR". My job is that exploring the galaxy, detecting the mines and gas, collecting the swatch and bringing them to the earth. I love my job. It is so excited that traveling through the stars. I'm always accidentally meeting many graceful things I have never seen before, but sometimes it is not so good when bad lucks fall off. One day, when I am driving my spaceship, dangers happened. I find that I have gone a wrong way, there are lots of aerolites in my frontage, and they are gonna to strike my spaceship within a few seconds. I try to control the ship to avoid hitting, but there are really too much aerolites. Finally, my spaceship is badly damaged. Oh, my "ZEPHYR"! But there is no time to be sad. I hear the warning of the computer: "Emergency! The spaceship is going to explode!" I have to escape immediately! There is a life-ship in a comer of the spaceship. Now I am in the controlling room, another side of the spaceship. Do I have chance to get away? Seeing from frontward to backward, "ZEPHYR" is shaped as a circle, we defined the coordinates of the center of the circle is (0, 0), the radius is R, and the angle of the East is 0° , the angle of the North is 90° . My computer has detected out there are N aerolites stroke my spaceship. Each aerolite is also shaped as a circle, with location coordinates (xi, yi), and radius ri. If it hits my spaceship, it leaves a hole as its shape, so I cannot get through it. The controlling room and the life-ship are all on the circumference (Compared with the huge spaceship, you could assume both of them as a point), with their angles d1 and d2, anti-clockwise from East. Tell me whether I can get to the life-ship. I can go to everywhere in my spaceship, except the hole hit by the aerolites (Even the edge of the hole). Input The first line of input there is one integer T ( T ≤ 100 ), giving the number of test cases in the input. Each test case starts with a line containing three real number R, d1, d2 ( 0 < R ≤ 10000, 0 ≤ d1, d2 < 360, d1 ≠ d2 ), representing the radius of the spaceship, and the degree of the two place on the circumference. Next line is a positive integer N ( 0 < N ≤ 1000 ), the number of the aerolites. Then N lines each line comes with a coordinate ( xi, yi ), and radius ri, all of them are real number, ( -10000 ≤ xi, yi ≤ 10000, 0 < ri ≤ 10000). There is a blank line between each test case. Note that some aerolites may not strike on the spaceship, and some aerolites may directly strike on the controlling room or life-ship, even the edge of the aerolites (How poor! Then you die hard!). Output For each test case, output a string: "Escape!", if you could reach the life-ship. "Die hard!", if you fail to reach the life-ship, or the controlling room or life-ship is directly struck by some aerolites. Sample Input 2 Sample Output Escape! Hint Figure 1 shows the first sample case. You can escape in this situation. Figure 1 The first sample case Source 样例输入2 样例输出Escape! 提示Figure 1 shows the first sample case. You can escape in this situation. Figure 1 The first sample case |