Answer to Question #53961 in C++ for sindhuja
• N represents the total number of zombies
• D defines the Euclidean distance the player can move
• P represents the initial energy level a player starts with
• (X, Y) represents the position of the player
• Ei defines the energy of the i-th zombie
• (Xi, Yi) represents the position of the i-th zombie
If player's energy is equal to or greater than a zombie's energy AND the zombie is reachable in the 2D-space measured by the Euclidean distance, then the player is said to be capable of defeating the zombie.
Your task is to find out how many zombies a player can defeat.
First line of input comprises of number of test cases (T).
Each test case consists of three parts:
1. The first line contains (X, Y, P)
2. Second line contains N and D
3. N-lines in the format (Xi, Yi, Ei) in that test case.
Need a fast expert's response?Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!