////////////////////////////// // Check before you submit. // #define _ATCODER_LIBRARY const long long MOD = 1e9+7; // const long long MOD = 998244353; ///////////////////////////// #include using namespace std; #include using namespace boost::multiprecision; #ifdef _ATCODER_LIBRARY #include using namespace atcoder; #endif // _ATCODER_LIBRARY const long long INF = 1LL << 60; using ll = long long; using P = pair; #define FOR(i,a,b) for (ll i=(a);i<(ll)(b);++i) #define REP(i,n) FOR(i,0,n) #define ALL(v) (v).begin(),(v).end() #define SUM(v) accumulate(ALL(v),0ll) templateistream& operator>>(istream&i,vector&v){REP(j,v.size())i>>v[j];return i;} templatestring join(vector&v){stringstream s;REP(i,v.size())s<<' '<ostream& operator<<(ostream&o,vector&v){if(v.size())o<string join(vector>&vv){string s="\n";REP(i,vv.size())s+=join(vv[i])+"\n";return s;} templateostream& operator<<(ostream&o,vector>&vv){if(vv.size())o<istream& operator>>(istream&i,pair&v){return i>>v.first>>v.second;} templateostream& operator<<(ostream&o,pair&v){return o<T up(T a, T b){assert(b);return (a+b-1)/b;} templatebool eq(A const&... a){auto t={a...};assert(t.size());auto tar=*t.begin();for(const auto&e:t)if(tar!=e)return false;return true;} templatebool chmin(T &a, T b){if(a>b){a=b;return false;}return true;} templatebool chmax(T &a, T b){if(abool chmax(T &a, initializer_listl){return chmax(a,max(l));} templatebool chmin(T &a, initializer_listl){return chmin(a,min(l));} ////////////////////////////////////////////////////////////////// // My Library ////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// // Contest Code ////////////////////////////////////////////////////////////////// int main(int argc, char **argv) { init_init_init(); ll N; cin >> N; vector x(N), y(N); REP(i, N) cin >> x[i] >> y[i]; ll res{0}; auto f = [](ll x1, ll x2, ll y1, ll y2) { return sqrt(pow(x1-x2, 2) + pow(y1-y2, 2)); }; set is; set del; while (true) { ll j{-1}; double ma{INF}; REP(i, N) { if (del.count(i)) continue; if (is.count(i)) continue; if (i == 0) continue; long double t = f(x[0], x[i], y[0], y[i]); if (ma >= t) { j = i; ma = t; } DEBUG(ma); } if (j == -1) break; double mmi{INF}; REP(i, N) { if (del.count(i)) continue; if (i == 0) continue; if (i == j) continue; chmin(mmi, f(x[j], x[i], y[j], y[i])); DEBUG(mmi); } if (ma <= mmi) del.insert(j); is.insert(j); } std::cout << del.size() << std::endl; }