There's a crisis in Hawaii! The great volcano "Mauna Loa" is about to erupt! The Mauna Loa is located in the middle of the largest island in Hawaii, with almost
As a responsible dictator, Joey quickly pulled out a map containing the locations of all
Input Specification
The first line will contain
The next
The next
Output Specification
For each scenario, print a single integer on a line, denoting the number of houses that will be destroyed in that scenario.
Constraints
At least
Sample Input 1
4 3
2 2
-4 0
0 -5
5 -5
2
4
6
Sample Output 1
0
2
3
Sample Explanation 1
The island's houses are distributed roughly as described in the image. The
In the scenario with the smallest eruption, no houses are destroyed.
In the scenario with the medium eruption,
In the scenario with the largest eruption,
Note
You may want to use fast I/O in your program.
Comments