Siru's Walk
Time limit1sMemory limit1024 MB
Given pillars on a plane and circular smell zones from other dogs, count the most pillars Siru can mark with its own smell of radius R0.
- Level
Medium5 of 10
- Topics
- Geometry, Brute force
- Solved
- No attempts yet
Problem
Marking is the act of a dog marking its territory with urine.
Siru, a cute dog, walks on a two-dimensional plane. While walking, Siru marks the pillars it passes. Because Siru is afraid of other dogs, it does not mark a pillar where the smell of another dog's urine is present.
Specifically, there are pillars along the walking path, and other dogs have already made marks. The -th mark () is on pillar , and its smell spreads up to a distance of from that pillar.
Siru marks a pillar that has no smell of another dog, and its smell spreads up to a distance of from that pillar. If Siru's smell covers a pillar that had another dog's smell, Siru can mark that pillar.
Find the maximum number of pillars Siru can mark.
The distance between two pillars and is defined as .
Input
The first line contains and , separated by a space.
From line 2 to line , line contains the coordinates of pillar , separated by a space.
Line contains , separated by spaces.
Line contains , separated by spaces.
Output
Print the number of pillars Siru can mark.
Constraints
- , and all , , are integers