Language: C++

#include<bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define int long long
#define vec(a,n) vector<int> (a)((n));
#define Vec(a,n) vector<string> (a)((n));
#define twovec(a,n,m) vector<vector<int>> a(n,vector<int>(m,0));
#define Twovec(a,n,m) vector<vector<double>> a(n,vector<double>(m,0));
#define P pair<int,int>
#define All(a) (a).begin(),(a).end()
#define Sort(a) sort(All(a));
#define Reverse(a) sort((a).rbegin(),(a).rend());
#define PQ(n) priority_queue<P,vector<P>,greater<P>> (n)
#define pq(n) priority_queue<int> (n)
#define print(a) cout << (a) << endl;
#define printD(a) cout << setprecision(10) << ans << endl;
using namespace std;
int max_int = 1000000007;
void Debug(auto a);
int nibul(auto a,auto b);
int nibuu(auto a,auto b);
void input(vector<int>& a,int n);

int n,m;


struct UnionFind {
    vector<int> par; // 親ノード
    vector<int> rank; // ランク

    UnionFind(int n = 1) {
        init(n);
    }

    void init(int n = 1) {
        par.resize(n); rank.resize(n);
        for (int i = 0; i < n; ++i) par[i] = i, rank[i] = 0;
    }

    int root(int x) {
        if (par[x] == x) {
            return x;
        }
        else {
            int r = root(par[x]);
            return par[x] = r;
        }
    }

    bool issame(int x, int y) {
        return root(x) == root(y);
    }

    bool merge(int x, int y) {
        x = root(x); y = root(y);
        if (x == y) return false;
        if (rank[x] < rank[y]) swap(x, y);
        if (rank[x] == rank[y]) ++rank[x];
        par[y] = x;
        return true;
    }
};





signed main(){
    cin >> n;
    vector<P> a(n);
    REP(i,n){
        int s,t;
        cin >> s >> t;
        a[i] = make_pair(s,t);
    }
    int ans = 1;
    Sort(a);
    REP(i,n-2){
        FOR(j,i+1,n-1){
            int x = a[j].first - a[i].first;
            int y = a[j].second - a[i].second;
            int count = 0;
            FOR(k,0,n-1){
                FOR(l,k+1,n){
                    if(a[l].first-a[k].first == x && a[l].second - a[k].second == y){
                        count++;
                    }
                }
            }
            ans = max(ans,count);
        }
    }
    
    cout << max(n-ans,1) << endl;

    return 0;
}

void Debug(auto a){
    cout << "{ ";
    for(auto b: a){
        cout << b << " ";
    }
    cout << "}" << endl;
}
int nibul(auto a,auto b){
    int x = lower_bound(All(a),b) - a.begin();
    //key以上の初めてのitr
    return x;
}
int nibuu(auto a,auto b){
    int x = upper_bound(All(a),b) - a.begin();
    //key以下の最後のitr
    return x-1;
}

void input(vector<int>& a,int n){
    REP(i,n){
        cin >> a[i];
    }
}


Compiler output:
a.cc:19:12: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   19 | void Debug(auto a);
      |            ^~~~
a.cc:20:11: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   20 | int nibul(auto a,auto b);
      |           ^~~~
a.cc:20:18: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   20 | int nibul(auto a,auto b);
      |                  ^~~~
a.cc:21:11: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   21 | int nibuu(auto a,auto b);
      |           ^~~~
a.cc:21:18: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   21 | int nibuu(auto a,auto b);
      |                  ^~~~
a.cc: In function 'int main()':
a.cc:94:16: error: no matching function for call to 'max(long long int, int)'
   94 |     cout << max(n-ans,1) << endl;
      |             ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:94:16: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   94 |     cout << max(n-ans,1) << endl;
      |             ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:94:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   94 |     cout << max(n-ans,1) << endl;
      |             ~~~^~~~~~~~~
a.cc: At global scope:
a.cc:99:12: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   99 | void Debug(auto a){
      |            ^~~~
a.cc:106:11: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
  106 | int nibul(auto a,auto b){
      |           ^~~~
a.cc:106:18: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
  106 | int nibul(auto a,auto b){
      |                  ^~~~
a.cc:111:11: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
  111 | int nibuu(auto a,auto b){
      |           ^~~~
a.cc:111:18: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
  111 | int nibuu(auto a,auto b){
      |                  ^~~~