| UTPC Contest 11-20-24 Div. 1 (Advanced) |
|---|
| Закончено |
Due to popular demand, Torchy's is opening up a new location in Austin!
Many people living all over the city now eagerly anticipate getting easy access to delicious tacos. The city of Austin can be represented as a 2D plane containing $$$n$$$ residents who are taco enjoyers, with the $$$i$$$th person located at point $$$(x_i, y_i)$$$. The mayor, being a big taco fan himself, has given Torchy's free reign for where to build their new store, so the Torchy's location may be placed at any point in Austin with real-valued coordinates. However, there is a limited service range to the store, meaning only customers within distance $$$r$$$ will be able to visit the store.
What is the most number of people that Torchy's can service if they place their new store optimally?
The first line of input contains two integers $$$n\ (1\leq n \leq 2\cdot10^3)$$$ and $$$r\ (1\leq r\leq 10^6)$$$ — the number of taco enjoyers in Austin and the radius of service of the store.
The next $$$n$$$ lines contain two integers $$$x_i, y_i\ (|x_i|, |y_i|\leq 10^6)$$$ — denoting the location of the $$$i$$$th person to be at $$$(x_i, y_i)$$$.
It is guaranteed that all locations are distinct.
Output a single integer, the maximum number of people that can be in range of the store with optimal placement.
4 10 1-1 01 00 -1
4
For the first sample, Torchy's can service all four people by placing their store at (0,0).
| Название |
|---|


