#include #include #include using namespace std; int dist(paira, pairb) { return (a.first - b.first)*(a.first - b.first) + (a.second - b.second)*(a.second - b.second); } int main() { int n;cin >> n; vector, int>>sorted_pos; vector>pos; for (int i = 0;i < n;i++) { int x, y;cin >> x >> y; pos.push_back(make_pair(x, y)); sorted_pos.push_back(make_pair(make_pair(x, y), i)); } sort(sorted_pos.begin(), sorted_pos.end()); vectorsorted_index(n); for (int i = 0;i < n;i++) { sorted_index[sorted_pos[i].second] = i; } vectorexist(n, true); for (int i = 0;i < n;i++) { int pos = sorted_index[i]; if (exist[pos] == false)continue; for (int j = pos + 1;j < sorted_pos.size();j++) { if (dist(sorted_pos[j].first, sorted_pos[pos].first) >= 400) { if (sorted_pos[j].first.first - sorted_pos[pos].first.first > 20)break; continue; } else exist[j] = false; } for (int j = pos - 1;j >= 0;j--) { if (dist(sorted_pos[j].first, sorted_pos[pos].first) >= 400) { if (sorted_pos[pos].first.first - sorted_pos[j].first.first > 20)break; continue; } else exist[j] = false; } } int cnt = 0; for (int i = 0;i < n;i++) { if (exist[i])cnt++; } cout << cnt << endl; return 0; }