#include #include #include #include #include #include using namespace std; const int XY_MAX = 20000; const int R = 10; const int LEN = 2 * R; const int LEN2 = LEN * LEN; vector< vector > board; bool possible(int x, int y) { int dx, dy, nx, ny; for (dx = -LEN; dx <= LEN; dx++) { nx = x + dx; if (nx < 0 || XY_MAX < nx) { continue; } for (dy = -LEN; dy <= LEN; dy++) { ny = y + dy; if (ny < 0 || XY_MAX < ny) { continue; } if (dx * dx + dy * dy >= LEN2) { continue; } if (board[ny][nx]) { return false; } } } return true; } int main() { int n, x, y; board.assign(XY_MAX + 1, vector(XY_MAX + 1, false)); cin >> n; int coin = 0; for (int i = 0; i < n; i++) { cin >> x >> y; if (possible(x, y)) { coin++; board[y][x] = true; } } cout << coin << endl; return 0; }