F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Dave

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65768/65768 K (Java/Others)
Total Submission(s): 4604    Accepted Submission(s): 1573


Problem Description
Recently, Dave is boring, so he often walks around. He finds that some places are too crowded, for example, the ground. He couldn't help to think of the disasters happening recently. Crowded place is not safe. He knows there are N (1<=N<=1000) people on the ground. Now he wants to know how many people will be in a square with the length of R (1<=R<=1000000000). (Including boundary).
 

Input
The input contains several cases. For each case there are two positive integers N and R, and then N lines follow. Each gives the (x, y) (1<=x, y<=1000000000) coordinates of people.
 

Output
Output the largest number of people in a square with the length of R.
 

Sample Input
3 2 1 1 2 2 3 3
 

Sample Output
3
 

Hint
If two people stand in one place, they are embracing.
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-04-20 07:10:21, Gzip enabled