#include #include #include #include #include #include using namespace std; #define rep(i,n) for(int i=0;i<(n);i++) //TLE int main(void){ int n; cin >> n; set > center; //(n^2*logn)でout? rep(i, n){ int cx, cy; cin >> cx >> cy; if(center.size() != 0){ // sort(center.begin(), center.end());//(nlogn) int xl = cx - 20, xr = cx + 20; int yl = cy - 20, yr = cy + 20; //(logn) auto it1 = lower_bound(center.begin(), center.end(), make_pair(xl, yl)); auto it2 = upper_bound(center.begin(), center.end(), make_pair(xr, yr)); bool flag = true; //(n) for(auto itr = it1; itr != it2; ++itr) { auto p = *itr; int nx = p.first, ny = p.second; double len = sqrt((nx - cx) * (nx - cx) + (ny - cy) * (ny - cy)); if(len < 20){ flag = false; break; } } if(flag)center.insert(make_pair(cx, cy)); }else{ center.insert(make_pair(cx, cy)); } } printf("%d\n", (int)center.size()); return 0; }