服了,一个we
帮我看看哪里不对
#include<bits/stdc++.h>
using namespace std;
struct node{
double x,y;
}a[1005];
bool cmp(node n1,node n2){
return n1.y<n2.y;
}
double cal(int p,int q){
int dx=a[p].x-a[q].x;
int dy=a[p].y-a[q].y;
return sqrt(dxdx+dydy);
}
int main(){
int n,d,x,y;
cin>>n>>d;
for(int i=1;i<=n;i++){
cin>>x>>y;
a[i].x=x-sqrt(dd-yy);
a[i].y=x+sqrt(dd-yy);
}
sort(a+1,a+n+1,cmp);
int cnt=1,p=a[1].y;
for(int i=2;i<=n;i++){
if(a[i].x>p){
cnt++;
p=a[i].y;
}
}
cout<<cnt;
return 0;
}