#include using namespace std; typedef long long ll; const double pi = 3.141592653589793; typedef unsigned long long ull; typedef long double ldouble; const ll INF = 1e18; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define rep2(i, s, n) for (ll i = (s); i < (ll)(n); i++) template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } typedef pair P; typedef pair PL; ll dis (pair a, pair b) { return (ll)(a.first - b.first) * (ll)(a.first - b.first) + (ll)(a.second - b.second) * (ll)(a.second - b.second); } int main() { ll n; cin >> n; vector

xy(n); rep(i, n) { cin >> xy[i].first >> xy[i].second; } vector > > kn; vector used(n, false); rep2(i, 0, n-1) { ll this_dis = INF, ind = -1; rep2(j, i+1, n) { if(i == j) continue; ll dis_y = dis(xy[i], xy[j]); pair > k; k.first = floor(sqrt(dis_y) + 0.999999999); k.second.first = i; k.second.second = j; kn.emplace_back(k); } } sort(kn.begin(), kn.end()); int ans = 0; rep(i, kn.size()) { int a = kn[i].second.first; int b = kn[i].second.second; if(used[a] == false && used[b] == false ) { // cout << kn[i].first << " a:" << a << " b:" << b << endl; if(a == 0) { used[b] = true; ans++; } else if(b == 0) { used[a] = true; ans++; } else { used[a] = true; used[b] = true; } } } cout << ans << endl; }