必然卡在一个点上 然后剩余每个点对应极角区间
#include<iostream>
#include<fstream>
#include<iomanip>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<cmath>
using namespace std;
const int N=200005;
struct Point{
double x,y;
Point(double x=0,double y=0):x(x),y(y){ }
friend double dist(Point p1,Point p2){
return sqrt((p1.x-p2.x)*(p1.x-p2.x)+(p1.y-p2.y)*(p1.y-p2.y));
}
}p[N];
struct event{
double x; int f;
bool operator < (const event &B) const {
return x==B.x?f>B.f:x<B.x;
}
}eve[N];
int n,tot,ans;
int main(){
freopen("t.in","r",stdin);
freopen("t.out","w",stdout);
while(scanf("%d",&n) && n){
for(int i=0;i<n;i++)
scanf("%lf%lf",&p[i].x,&p[i].y);
ans=1;
for(int i=0;i<n;i++){
tot=0;
for(int j=0;j<n;j++){
if(i==j) continue;
if(dist(p[i],p[j])>2.0) continue;
double x=atan2(p[i].y-p[j].y,p[i].x-p[j].x);
double phi=acos(dist(p[i],p[j])/2);
eve[tot].x=x-phi; eve[tot++].f=1;
eve[tot].x=x+phi; eve[tot++].f=-1;
}
sort(eve,eve+tot);
int tmp=1;
for(int i=0;i<tot;i++){
tmp+=eve[i].f;
ans=max(ans,tmp);
}
}
printf("%d\n",ans);
}
return 0;
}