criyle/codenet-compile-errors huggingface dataset:
Language: C++


/*
LANG:C++
PROB:

*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional>
#include <iostream>  
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define for1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define ford(i, n) for (int i = (int)(n) - 1; i >= 0; --i)
#define fore(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)


using namespace __gnu_pbds;
using namespace std;


typedef tree<int, null_type, less<int>, rb_tree_tag,
            tree_order_statistics_node_update>
    ordered_set;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpi;
typedef vector<vi> vvi;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef double ld;
typedef unsigned long long ui64;

template<class T> bool uin(T &a, T b) { return a > b ? (a = b, true) : false; }
template<class T> bool uax(T &a, T b) { return a < b ? (a = b, true) : false; }


  int main()
  {
ios::sync_with_stdio(false);
    cin.tie(nullptr);

    // ifstream fin(".in");
    // ofstream fout(".in");

i64 a,b;
cin>>a>>b;
if(k==1)
cout<<0;
else
cout<<n-k<<endl;


    return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:58:4: error: 'k' was not declared in this scope
   58 | if(k==1)
      |    ^
a.cc:61:7: error: 'n' was not declared in this scope
   61 | cout<<n-k<<endl;
      |       ^
Language: C++

#include <bits/stdc++.h>
#include <algorithm>
#include <iostream>
using namespace std;

int main(void){
    int N, k;
    cin >> N >> K;
    if(k==1){
        cout << 0 << endl;   
    }else{
        cout << N-K << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: 'K' was not declared in this scope
    8 |     cin >> N >> K;
      |                 ^
Language: C

#include<stdio.h>
int main(void){
  int　N,K;
  scanf("%d %d",&N,&K);
  if(K==1){
    printf("0");
  }
  else{
   printf("%d",N-K);
  }
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:6: error: stray '\343' in program
    3 |   int<U+3000>N,K;
      |      ^~~~~~~~
Language: Java

import java.io.*;
import java.util.*;

public class Solution {

    public static void main(String[] args) throws Exception {
        MyScanner scan = new MyScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));

        int n = scan.nextInt();
        int k = scan.nextInt();

        if (k == 1) {
            out.println(0);
        } else {
            out.println(n - k);
        }

        out.close();
    }

    //-----------PrintWriter for faster output---------------------------------
    public static PrintWriter out;

    //-----------MyScanner class for faster input----------
    public static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
    //--------------------------------------------------------

}

Compiler output:
Main.java:4: error: class Solution is public, should be declared in a file named Solution.java
public class Solution {
       ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#define pb push_back
#define ff first
#define ss second
#define sz size()
#define mp make_pair
#define p(x) cout<< x << " ";
#define pe(x) cout<< x << endl ;
#define deb(x) cout<<#x<<" : "<<x<<endl;
#define debug(x,y) cout<<#x<<" : "<<x<<"\t"<<#y<<" : "<<y<<endl;
#define el endl
#define M 998244353 
#define int long long
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ROR(i,a,b) for(int i=a;i>=b;i--)
const int N = 1e5 + 5;

int32_t main() 
{ 
    ll n,k;
    cin>>n>>k;
    if(k==1 || k>=n)
    cout<<"0";
    else
    {
        cout<<n-k;
    }
} 

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:22:5: error: 'll' was not declared in this scope; did you mean 'el'?
   22 |     ll n,k;
      |     ^~
      |     el
a.cc:23:10: error: 'n' was not declared in this scope
   23 |     cin>>n>>k;
      |          ^
a.cc:23:13: error: 'k' was not declared in this scope
   23 |     cin>>n>>k;
      |             ^
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define pb push_back
#define mp make_pair
#define IOS ios_base::sync_with_stdio(false),cin.tie(0);
using namespace std;
typedef long long ll;
ll a,b,c,k,n,sum,t;
const ll maxn=200005;
const ll mod=1e9+7;
ll num;


int prime[2750135];
vector<int> p;
void sieve(){
fill(prime+2,prime+2750135,1);
for(int i=2;i<=2750135;++i){
if(prime[i]==1) p.push_back(i);
for(int j:p){
if(i*j>2750135) break;
prime[i*j]=j;
 if(i%j==0) break;
 }
 }
 }
ll n,k;
int main()
{
    //IOS
    while(cin>>n>>k)
    {
        if(k==1) cout<<"0\n";
        else cout<<n-k<<"\n";
    }


}


Compiler output:
a.cc:28:4: error: redefinition of 'll n'
   28 | ll n,k;
      |    ^
a.cc:9:12: note: 'll n' previously declared here
    9 | ll a,b,c,k,n,sum,t;
      |            ^
a.cc:28:6: error: redefinition of 'll k'
   28 | ll n,k;
      |      ^
a.cc:9:10: note: 'll k' previously declared here
    9 | ll a,b,c,k,n,sum,t;
      |          ^
Language: C++

#include<iostream>
#include<cstring>
#include<string>
#include<cmath>
#include<vector>
#include<algorithm>
#include<iterator>
#include<sstream>
#include<iomanip>
#include<map>
#include<queue>
#include<deque>
#include<fstream>

#define rep(i, n) for (ll i = 0; i < n; i++) 
#define rrep(i, n) for(ll i = n-1; i>=0; i--)
#define range(i, n, m) for (ll i = n; i < m; i++) 
#define rrange(i, n, m) for (ll i = n - 1; i => m; i--) 
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define vl vector<ll>
#define vvl vector<vector<ll> >
#define vp vector<pair<ll, ll> >
#define vvp vector<vector<pair<ll, ll> > >
#define First first
#define Second second.first
#define Third second.second
//#define MOD 998244353

typedef long long int ll;
typedef unsigned long long int ull;

using namespace std;

template<class T> inline bool chmax(T & a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T & a, T b) { if (a > b) { a = b; return true; } return false; }

int main() {
	//cin.tie(0);
	//ios::sync_with_stdio(false);

	//std::ifstream in("../../test.txt");
	//std::cin.rdbuf(in.rdbuf());

	ll N, K;
	cin >> N >> K;

	if (K == 1) {
		cout << 0 << endl
	}
	else {
		cout << (N - K) << endl;
	}



	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:50:34: error: expected ';' before '}' token
   50 |                 cout << 0 << endl
      |                                  ^
      |                                  ;
   51 |         }
      |         ~
Language: C++

#include<iostream>
using namespace std;
int main(){
	cin>>k>>n;
	if(n==1){
		cout<<"0"<<endl;
		return 0;
	}else{
		cout<<k-n<<endl;
	}
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:4:14: error: 'k' was not declared in this scope
    4 |         cin>>k>>n;
      |              ^
a.cc:4:17: error: 'n' was not declared in this scope
    4 |         cin>>k>>n;
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
    int n, k;
    cin >> n >> k;
    if(k == 1){
        cout << 1:
    }else{
        cout << n-k;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: expected ';' before ':' token
    8 |         cout << 1:
      |                  ^
      |                  ;
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < int(n); i++)
#define vi vector<int>
#define all(x) (x).begin(),(x).end()
#define INF (1<<30)-1
using ll = long long;
using namespace std;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};
template<class T> inline bool chmax(T &a, const T &b){ if(a<b) { a=b; return 1; } return 0; }
template<class T> inline bool chmin(T &a, const T &b){ if(b<a) { a=b; return 1; } return 0; }

int main(){
  cin.tie(0), ios::sync_with_stdio(false);
  int n; cin >> n;
  vi x(n),y(n); rep(i,n) cin >> x[i] >> y[i];
  int ans = INF;
  rep(i,n){
    rep(j,n){
        int cnt = 0;
        ll p = x[i]-x[j], q = y[i]-y[j];
        if(p != 0 || q != 0) rep(k,n) rep(l,n) if(x[k]-x[l] == p && y[k]-y[l] == q) cnt++;
        chmin(ans,n-cnt);
      }
    }
  }
  cout << ans;
  cout << "\n";
  return 0;
}


Compiler output:
a.cc:27:3: error: 'cout' does not name a type
   27 |   cout << ans;
      |   ^~~~
a.cc:28:3: error: 'cout' does not name a type
   28 |   cout << "\n";
      |   ^~~~
a.cc:29:3: error: expected unqualified-id before 'return'
   29 |   return 0;
      |   ^~~~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <cmath>
#include <climits>
#include <iomanip>
#include <set>
#include <map>
using namespace std;
typedef long long ll;
int main(){
  ll n;
  cin >> n;
  vector<pair<ll,ll>> a(n);
  for(int i = 0;i < n;i++)cin >> a[i].first >> a[i].second;
  map<pair<ll,ll>,ll> c;
  for(int i = 0;i < n - 1;i++){
    for(int j = 0;j < n;j++){
      if(i == j)continue
      c[make_pair(abs(a[j].first - a[i].first),abs(a[j].second - a[j].first))]++;
    }
  }
  ll res = 0;
  for(auto i:c)res = n - max(res,i.second);
  cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:25: error: expected ';' before 'c'
   21 |       if(i == j)continue
      |                         ^
      |                         ;
   22 |       c[make_pair(abs(a[j].first - a[i].first),abs(a[j].second - a[j].first))]++;
      |       ~
Language: C++

#include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<queue>
#include<map>
#include<algorithm>
#include<string.h>
#include<functional>
#include<limits.h>
#include<stdlib.h>
#include<cmath>
#include<cstring>
#include<set>
#include<climits>
#include<deque>
#include <iomanip>
#include<utility>
using namespace std;

#define intmax INT_MAX
#define lmax LONG_MAX
#define uintmax UINT_MAX
#define ulmax ULONG_MAX
#define llmax LLONG_MAX
#define ll long long
#define rep(i,a,N) for((i)=(a);(i)<(N);(i)++)
#define rrp(i,N,a) for((i)=(N)-1;(i)>=(a);(i)--)
#define llfor ll i,j
#define sc(a) cin>>a
#define pr(a) cout<<a<<endl
#define pY puts("YES")
#define pN puts("NO")
#define py puts("Yes")
#define pn puts("No")
#define pnn printf("\n")
#define all(a) a.begin(),a.end()
#define push(a,b) (a).push_back(b)
#define llvec vector<vector<ll>>
#define charvec vector<vector<char>>
#define size(a,b) (a,vector<ll>(b))
#define llpvec vector<pair<ll,ll>>
#define S 21 
llfor;ll mod=1000000007;
/*pi*/double pi=acos(-1);
/*繰り上げ除算*/ll cei(ll x,ll y){ll ans=x/y;if(x%y!=0)ans++;return ans;}
/*最大公約数*/ll gcd(ll x,ll y){return y?gcd(y,x%y):x;}
/*最小公倍数*/ll lcm(ll x,ll y){return x/gcd(x,y)*y;}
/*n乗*/ll llpow(ll x,ll n){ll ans=1;rep(i,0,n){ans*=x;ans%=mod;}return ans;}
/*階乗*/ll fact(ll x){ll ans=1;rep(i,0,x)ans*=(x-i);return ans;}
/*nCr*/ll ncr(ll n,ll r){return fact(n)*fact(n-r)/fact(r);}
/*nPr*/ll npr(ll n,ll r){return fact(n)/fact(n-r);}
/*primejudge*/bool prime(ll a){if(a<=1)return false;for(i=2;i*i<=a;i++){if(a%i==0)return false;}return true;}
/*Fibonacci数列*/ll fib(ll x){ll fibo[x+10];fibo[0]=1;fibo[1]=1;fibo[2]=1;rep(i,3,x+1)fibo[i]=fibo[i-1]+fibo[i-2];return fibo[x];}
/*桁数*/ll dig(ll n){ll d=1,tmp=n;while(tmp/10>0){tmp/=10;d++;}return d;}
/*行列のコピー*/void matcpy(ll a[S][S],ll b[S][S]){ll t=i;rep(i,0,S)rep(j,0,S)b[i][j]=a[i][j];/*(aをbに)*/i=t;}
/*行列のリセット*/void matrst(ll a[S][S]){ll t=i;rep(i,0,S)rep(j,0,S)a[i][j]=0;i=t;}
/*行列の2乗*/void matpow(ll a[S][S]){ll ans[S][S];matrst(ans);ll t=i,k;rep(i,0,S)rep(j,0,S)rep(k,0,S)ans[i][j]+=a[i][k]*a[k][j];matcpy(ans,a);i=t;}
/*行列の乗算*/void matmul(ll a[S][S],ll b[S][S], ll as[S][S]){ll t=i,k;matrst(as);rep(i,0,S)rep(j,0,S)rep(k,0,S)as[i][j]+=a[i][k]*b[k][j];i=t;}
//ll ans=0;
////////////////////////////////////////////////////////////
int main(){
 ll n;
 cin>>n;
 ll a[n+10],b[n+10]; 
 rep(i,0,n)cin>>a[i]>>b[i];
 map<pair<ll,ll>,ll>m;
 ll p,q;
 ll c=0;
 rep(i,0,n){
  rep(j,i+1,n){
   p=abs(a[i]-a[j]);
   q=abs(b[i]-b[j]);
   m[{p,q}]++;
   c=max(c,map[{p,q}]);
  }
 }
 ll ans=n-c;
 pr(ans);
return 0;}


Compiler output:
a.cc: In function 'int main()':
a.cc:75:15: error: missing template arguments before '[' token
   75 |    c=max(c,map[{p,q}]);
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1000000007;
using P = pair<int,int>;
 
signed main(){
  int n;
  cin >> n;
  map<P,int> ans;
  vector<int>a(n),b(n);
  
  for(int i=0 ;i<n ;i++){
    cin >> a[i] >> b[i];
  }
  int ANS = 0;
  for(int i=0; i<n ;i++){
    for(int j=0; j<n; j++){
      if(i != j){
        ans[make_pair(a[i]-a[j],b[i]-b[j])]++;
      }
    }
  }
  for(auto i:ans){
    ANS = max(ANS,i.second);
  }
  cout << n - ANS << endl;
}
        
      
  
    
f

Compiler output:
a.cc:33:1: error: 'f' does not name a type
   33 | f
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

#define rep(i, a) for (int i = 0; i < (a); i++ )
#define FOR(i, m, n) for(int i = m; i < n; i++)
 
typedef pair<int,int> P;
typedef long long ll;
 
const int INF = 1001001001;
const int MOD = 1000000007;
const double PI=acos(-1);

int main(){
    ll N;
    cin >> N;
    vector<vector<ll> A(N,vector<ll>(2));
    vector<ll> X;

    rep(i,N) {
        ll x,y;
        cin >> x >> y;
        A[i][0] = x;
        A[i][1] = y;
        X.push_back(x);
    }
    sort(X.begin(),X.end());
    sort(A.begin(),A.end());

    set<ll> S;

    rep(i,N-1) {
        for (int j=i+1; j<N; j++) {
            ll diff = abs(X[j]-X[i]);
            if (!S.count(diff)) S.insert(diff);
        }
    }
    ll ans = 0;
    for (auto s:S) {
        ll tmp = 0;
        map<ll,ll> T;
        rep(i,N-1) {
            if (A[i+1][0]-A[i][0]==s) {
                T[A[i+1][1]-A[i][1]]++;
            }
        }
        for (auto t:T) {
            tmp = max(tmp,t.second);
        }
        ans = max(ans,tmp);
    }
    ans = N-ans;
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:40: error: template argument 1 is invalid
   17 |     vector<vector<ll> A(N,vector<ll>(2));
      |                                        ^
a.cc:17:40: error: template argument 2 is invalid
a.cc:23:9: error: 'A' was not declared in this scope
   23 |         A[i][0] = x;
      |         ^
a.cc:28:10: error: 'A' was not declared in this scope
   28 |     sort(A.begin(),A.end());
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using ld=long double;
using st=string;
using ch=char;
typedef pair<ll,ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<P> vP;
typedef vector<ch> vc;
typedef vector<vc> vvc;
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define rep(i,n) FOR(i,0,n)
#define ROF(i,a,b) for(ll i=a;i>=b;i--)
#define per(i,a) ROF(i,a,0)
const ll MOD=1000000007;
const ll MOD2=998244353;
const ld PI=acos(-1);
const ll INF=1e18;
st abc="abcdefghijklmnopqrstuvwxyz";
st ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
struct edge{ll to,cost;};

int main() {
  ll N;
  cin >> N;
  ll ans=INF;
  vl x(N),y(N);
  rep(i,N){
    cin >> x[i] >> y[i];
  }
  rep(i,N){
    rep(j,N){
      set<ll> s;
      if(i==j){
        continue;
      }
      else{
        ll dx=x[i]-x[j],dy=y[i]-y[j];
        rep(k,N){
          s.insert(dx*x[k]-dy*y[k]);
        }
      }
      ans=min(ans,(ll)s.size())
    }
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:32: error: expected ';' before '}' token
   45 |       ans=min(ans,(ll)s.size())
      |                                ^
      |                                ;
   46 |     }
      |     ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using ld=long double;
using st=string;
using ch=char;
typedef pair<ll,ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<P> vP;
typedef vector<ch> vc;
typedef vector<vc> vvc;
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define rep(i,n) FOR(i,0,n)
#define ROF(i,a,b) for(ll i=a;i>=b;i--)
#define per(i,a) ROF(i,a,0)
const ll MOD=1000000007;
const ll MOD2=998244353;
const ld PI=acos(-1);
const ll INF=1e18;
st abc="abcdefghijklmnopqrstuvwxyz";
st ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
struct edge{ll to,cost;};

int main() {
  ll N;
  cin >> N;
  ll ans=INF;
  vl x(N),y(N);
  rep(i,N){
    cin >> x[i] >> y[i];
  }
  rep(i,N){
    rep(j,N){
      set<ll> s;
      if(i==j){
        continue;
      }
      else{
        ll dx=x[i]-x[j],dy=y[i]-y[j];
        rep(k,N){
          s.insert(dx*x[k]-dy*y[k]);
        }
      }
      ans=min(ans,s.size())
    }
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:14: error: no matching function for call to 'min(ll&, std::set<long long int>::size_type)'
   45 |       ans=min(ans,s.size())
      |           ~~~^~~~~~~~~~~~~~
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:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:45:14: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'std::set<long long int>::size_type' {aka 'long unsigned int'})
   45 |       ans=min(ans,s.size())
      |           ~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281: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:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:45:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   45 |       ans=min(ans,s.size())
      |           ~~~^~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using ld=long double;
using st=string;
using ch=char;
typedef pair<ll,ll> P;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<P> vP;
typedef vector<ch> vc;
typedef vector<vc> vvc;
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define rep(i,n) FOR(i,0,n)
#define ROF(i,a,b) for(ll i=a;i>=b;i--)
#define per(i,a) ROF(i,a,0)
const ll MOD=1000000007;
const ll MOD2=998244353;
const ld PI=acos(-1);
const ll INF=1e18;
st abc="abcdefghijklmnopqrstuvwxyz";
st ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
struct edge{ll to,cost;};

int main() {
  ll N;
  vl x(N),y(N);
  rep(i,N){
    cin >> x[i] >> y[i];
  }
  rep(i,N){
    rep(j,N){
      set<ll> s;
      if(i==j){
        continue;
      }
      else{
        ll dx=x[i]-x[j],dy=y[i]-y[j];
        rep(k,N){
          s.insert(dx*x[k]-dy*y[k]);
        }
      }
      ans=min(ans,s.size())
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   43 |       ans=min(ans,s.size())
      |       ^~~
      |       abs
a.cc:46:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   46 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

#include <bits/stdc++.h>
using namespace std;

#ifdef LOCAL
#define debug(var) cerr << (#var) << " = " << (var) << endl;
#else
#define debug(var)
#endif

void init() {
  ios_base::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);
}

const int N = 54;

long long x[N], y[N];
set<pair<long long, long long>> s;

void solve() {
  int n; scanf("%d", &n);
  if (n == 1) {
    printf("1");
    return;
  }
  for (int i = 0; i < n; ++i) {
    scanf("%lld%lld", x+i, y+i);
    s.emplace(x[i], y[i]);
  }
  int ans = 1e9;
  for (int i = 0; i < n-1; ++i) {
    for (int j = i+1; j < n; ++j) {
      long long a = x[j]-x[i], b = y[j]-y[i];
      int cur = n;
      for (const auto &e: s) {
	if (s.count({e.first+a, e.second+b}))
	  --cur;
      }
      ans = min({ans, cur, cur2});
    }
  }
  printf("%d", ans);
}

int main() {
  init();
  int t = 1; //scanf("%d", &t);
  while (t--) {
    solve();
  }
  return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:39:28: error: 'cur2' was not declared in this scope; did you mean 'cur'?
   39 |       ans = min({ans, cur, cur2});
      |                            ^~~~
      |                            cur
a.cc:39:16: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
   39 |       ans = min({ans, cur, cur2});
      |             ~~~^~~~~~~~~~~~~~~~~~
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:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   candidate expects 2 arguments, 1 provided
Language: C++

//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define pp pair<int,int>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define ld long double
#define al(a) (a).begin(),(a).end()
#define mk make_pair
#define check cout<<"?"<<endl;

ll MOD=1000000007;
ll mod=998244353;
int inf=1000001000;
ll INF=1e18+5;

int main(){
    int n; cin>>n;
    map<pair<ll,ll>,ll> cnt;
    vector<pair<ll,ll>> b(n);
    rep(i,n

Compiler output:
a.cc:21:12: error: unterminated argument list invoking macro "rep"
   21 |     rep(i,n
      |            ^
a.cc: In function 'int main()':
a.cc:21:5: error: 'rep' was not declared in this scope
   21 |     rep(i,n
      |     ^~~
a.cc:21:8: error: expected '}' at end of input
   21 |     rep(i,n
      |        ^
a.cc:17:11: note: to match this '{'
   17 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
int main(){
  ll n;
  cin >> n;
  ll x[n];
  ll y[n];
  ll ma=0;
  map<pair<ll,ll>,ll> k;
  rep(i,n)cin >> x[i] >> y[i];
  rep(i,n){
    rep(j,i){
      ll a=x[i]-x[j];
      ll b=y[i]-y[j];
      if(a<0){
        a=-1*a;
        b=-1*b;
      }
      k[make_pair<a,b>]++;
    }
  }
  for(auto m: k){
    ll z=m.second;
    ma=max(ma,z);
  }
  cout << n-z << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:8: error: no match for 'operator[]' (operand types are 'std::map<std::pair<long long int, long long int>, long long int>' and '<unresolved overloaded function type>')
   21 |       k[make_pair<a,b>]++;
      |        ^
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:504:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::pair<long long int, long long int>; _Tp = long long int; _Compare = std::less<std::pair<long long int, long long int> >; _Alloc = std::allocator<std::pair<const std::pair<long long int, long long int>, long long int> >; mapped_type = long long int; key_type = std::pair<long long int, long long int>]'
  504 |       operator[](const key_type& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:504:34: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const std::map<std::pair<long long int, long long int>, long long int>::key_type&' {aka 'const std::pair<long long int, long long int>&'}
  504 |       operator[](const key_type& __k)
      |                  ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_map.h:524:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = std::pair<long long int, long long int>; _Tp = long long int; _Compare = std::less<std::pair<long long int, long long int> >; _Alloc = std::allocator<std::pair<const std::pair<long long int, long long int>, long long int> >; mapped_type = long long int; key_type = std::pair<long long int, long long int>]'
  524 |       operator[](key_type&& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:524:29: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::map<std::pair<long long int, long long int>, long long int>::key_type&&' {aka 'std::pair<long long int, long long int>&&'}
  524 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
a.cc:28:13: error: 'z' was not declared in this scope
   28 |   cout << n-z << endl;
      |             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;
typedef pair<ll, ll> Pll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repn(i, n) for (int i = 0; i <= (int)(n); i++)
#define srep(i, l, n) for (int i = l; i < (int)(n); i++)
#define srepn(i, l, n) for (int i = l; i <= (int)(n); i++)
#define pb push_back 
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

const int MOD = 1000000007;
const int INF = 1e9;
#define PI 3.14159265369;
int dx[4] = {1,-1,0,0};
int dy[4] = {0,0,1,-1};
int ddx[8] = {1,1,1,-1,-1,-1,0,0};
int ddy[8] = {0,1,-1,0,1,-1,1,-1};

int main(){
	int n;
	cin >> n;
	vector<P> ball(n);
	rep(i,n) cin >> ball[i].first >> ball[i].second;
	sort(ball.begin(), ball.end());
	map<P, int> mp;
	for(int i = 0; i < n; i++){
		for(int j = i+1; j < n; j++){
			int a = ball[j].first - ball[i].first;
			int b = ball[j].second - ball[i].second;
			mp[P(a, b)]++;
		}
	}
	ll mx = 0;
	for(auto e: mp){
		chmax(mx, e.second);
	}
	int ans = n-mx;
	cout << ans << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:22: error: no matching function for call to 'chmax(ll&, int&)'
   39 |                 chmax(mx, e.second);
      |                 ~~~~~^~~~~~~~~~~~~~
a.cc:12:23: note: candidate: 'template<class T> bool chmax(T&, const T&)'
   12 | template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
      |                       ^~~~~
a.cc:12:23: note:   template argument deduction/substitution failed:
a.cc:39:22: note:   deduced conflicting types for parameter 'const T' ('long long int' and 'int')
   39 |                 chmax(mx, e.second);
      |                 ~~~~~^~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
  cin>>N;
  vector<pair<int64_t,int64_t>>A(N);
  for(int i=0;i<N;i++){
  int64_t x,y;
    cin>>x>>y;
    pair<int64_t,int64_t>p(x,y);
    A.at(i)=p;
  }map<pair<int64_t,int64_t>,int>M;
  for(int i=0;i<N-1;i++){
  for(int j=i+1;j<N;j++){
    int64_t x1,y1,x2,y2;
    x1=A.at(i).first-A.at(j).first;
    x2=A.at(j).first-A.at(i).first;
    y1=A.at(i).second-A.at(j).second;
    y2=A.at(j).second-A.at(i).secondl;
    pair<int64_t,int64_t>p1(x1,y1);
    pair<int64_t,int64_t>p2(x2,y2);
    if(M.count(p1))
      M.at(p1)++;
    else
      M[p1]=1;
    if(M.count(p2))
      M.at(p2)++;
    else
      M[p2]=1;
    
  }
  }int ans=0;
  for(auto p:M){
  auto k=p.first;
    auto v=p.second;
    if(ans<v)
      ans=v;
  }cout<<N-ans<<endl;
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:31: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long int, long int> >, std::pair<long int, long int> >::value_type' {aka 'struct std::pair<long int, long int>'} has no member named 'secondl'; did you mean 'second'?
   19 |     y2=A.at(j).second-A.at(i).secondl;
      |                               ^~~~~~~
      |                               second
Language: C++

import copy
import math

N = int(input())
xy = []
for _ in range(N):
    xy.append(tuple(map(int, input().split())))

def dfs(parent, p, q):
    seen[parent] = True
    for child in range(N):
        # print(child)
        if seen[child] == False:
            x, y = xy[child]
            if x + p == xy[parent][0] and y + q == xy[parent][1] or \
                    x - p == xy[parent][0] and y - q == xy[parent][1]:
                dfs(child, p, q)


m = N
for i in range(N - 1):
    for j in range(i + 1, N):
        p = xy[i][0] - xy[j][0]
        q = xy[i][1] - xy[j][1]
        cnt = 0
        seen = [False] * N
        for start in range(N):
            if seen[start] == False:
                dfs(start, p, q)
                cnt += 1
                # print(tosee)
        m = min(cnt, m)
        # print(p, q, group)
print(m)

Compiler output:
a.cc:12:11: error: invalid preprocessing directive #print
   12 |         # print(child)
      |           ^~~~~
a.cc:31:19: error: invalid preprocessing directive #print
   31 |                 # print(tosee)
      |                   ^~~~~
a.cc:33:11: error: invalid preprocessing directive #print
   33 |         # print(p, q, group)
      |           ^~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import copy
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#includee <bits/stdc++.h>
#include <cstdio>
#define pii pair<int,int>
using namespace std;
map<pii, int>Map;
int n, res;
pii w[60];
int main() {
	int i, j, k;
	scanf("%d", &n);
	res = n;
	for (i = 1; i <= n; i++) {
		scanf("%d%d", &w[i].first, &w[i].second);
		Map[w[i]] = 1;
	}
	for (i = 1; i <= n; i++) {
		for (j = 1; j <= n; j++) {
			if (i==j)continue;
			int x= w[j].first - w[i].first, y = w[j].second - w[i].second;
			int c = 0;
			for (k = 1; k <= n; k++) {
				if (Map.count({ w[k].first + x,w[k].second + y }))c++;
			}
			res = min(res, n - c);
		}
	}
	printf("%d\n", res);
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #includee; did you mean #include?
    1 | #includee <bits/stdc++.h>
      |  ^~~~~~~~
      |  include
a.cc:5:1: error: 'map' does not name a type
    5 | map<pii, int>Map;
      | ^~~
a.cc:3:13: error: 'pair' does not name a type
    3 | #define pii pair<int,int>
      |             ^~~~
a.cc:7:1: note: in expansion of macro 'pii'
    7 | pii w[60];
      | ^~~
a.cc: In function 'int main()':
a.cc:13:32: error: 'w' was not declared in this scope
   13 |                 scanf("%d%d", &w[i].first, &w[i].second);
      |                                ^
a.cc:14:17: error: 'Map' was not declared in this scope
   14 |                 Map[w[i]] = 1;
      |                 ^~~
a.cc:19:32: error: 'w' was not declared in this scope
   19 |                         int x= w[j].first - w[i].first, y = w[j].second - w[i].second;
      |                                ^
a.cc:22:37: error: 'Map' was not declared in this scope
   22 |                                 if (Map.count({ w[k].first + x,w[k].second + y }))c++;
      |                                     ^~~
a.cc:22:78: error: 'y' was not declared in this scope
   22 |                                 if (Map.count({ w[k].first + x,w[k].second + y }))c++;
      |                                                                              ^
a.cc:24:31: error: 'min' was not declared in this scope; did you mean 'main'?
   24 |                         res = min(res, n - c);
      |                               ^~~
      |                               main
Language: C++

#define pii pair<int,int>
using namespace std;
map<pii, int>Map;
int n, res;
pii w[60];
int main() {
	int i, j, k;
	scanf("%d", &n);
	res = n;
	for (i = 1; i <= n; i++) {
		scanf("%d%d", &w[i].first, &w[i].second);
		Map[w[i]] = 1;
	}
	for (i = 1; i <= n; i++) {
		for (j = 1; j <= n; j++) {
			if (i==j)continue;
			int x= w[j].first - w[i].first, y = w[j].second - w[i].second;
			int c = 0;
			for (k = 1; k <= n; k++) {
				if (Map.count({ w[k].first + x,w[k].second + y }))c++;
			}
			res = min(res, n - c);
		}
	}
	printf("%d\n", res);
}

Compiler output:
a.cc:3:1: error: 'map' does not name a type
    3 | map<pii, int>Map;
      | ^~~
a.cc:1:13: error: 'pair' does not name a type
    1 | #define pii pair<int,int>
      |             ^~~~
a.cc:5:1: note: in expansion of macro 'pii'
    5 | pii w[60];
      | ^~~
a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf' was not declared in this scope
    8 |         scanf("%d", &n);
      |         ^~~~~
a.cc:11:32: error: 'w' was not declared in this scope
   11 |                 scanf("%d%d", &w[i].first, &w[i].second);
      |                                ^
a.cc:12:17: error: 'Map' was not declared in this scope
   12 |                 Map[w[i]] = 1;
      |                 ^~~
a.cc:17:32: error: 'w' was not declared in this scope
   17 |                         int x= w[j].first - w[i].first, y = w[j].second - w[i].second;
      |                                ^
a.cc:20:37: error: 'Map' was not declared in this scope
   20 |                                 if (Map.count({ w[k].first + x,w[k].second + y }))c++;
      |                                     ^~~
a.cc:20:78: error: 'y' was not declared in this scope
   20 |                                 if (Map.count({ w[k].first + x,w[k].second + y }))c++;
      |                                                                              ^
a.cc:22:31: error: 'min' was not declared in this scope; did you mean 'main'?
   22 |                         res = min(res, n - c);
      |                               ^~~
      |                               main
a.cc:25:9: error: 'printf' was not declared in this scope
   25 |         printf("%d\n", res);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #define pii pair<int,int>
Language: C++

#define pii pair<int,int>
using namespace std;
map<pii, int>Map;
int n, res;
pii w[60];
int main() {
	int i, j, k;
	scanf("%d", &n);
	res = n;
	for (i = 1; i <= n; i++) {
		scanf("%d%d", &w[i].first, &w[i].second);
		Map[w[i]] = 1;
	}
	for (i = 1; i <= n; i++) {
		for (j = 1; j <= n; j++) {
			if (i == j)continue;
			int x = w[j].first - w[i].first, y = w[j].second - w[i].second;
			int c = 0;
			for (k = 1; k <= n; k++) {
				if (Map.count({ w[k].first + x,w[k].second + y }))c++;
			}
			res = min(res, n - c);
		}
	}
	printf("%d\n", res);
}



Compiler output:
a.cc:3:1: error: 'map' does not name a type
    3 | map<pii, int>Map;
      | ^~~
a.cc:1:13: error: 'pair' does not name a type
    1 | #define pii pair<int,int>
      |             ^~~~
a.cc:5:1: note: in expansion of macro 'pii'
    5 | pii w[60];
      | ^~~
a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf' was not declared in this scope
    8 |         scanf("%d", &n);
      |         ^~~~~
a.cc:11:32: error: 'w' was not declared in this scope
   11 |                 scanf("%d%d", &w[i].first, &w[i].second);
      |                                ^
a.cc:12:17: error: 'Map' was not declared in this scope
   12 |                 Map[w[i]] = 1;
      |                 ^~~
a.cc:17:33: error: 'w' was not declared in this scope
   17 |                         int x = w[j].first - w[i].first, y = w[j].second - w[i].second;
      |                                 ^
a.cc:20:37: error: 'Map' was not declared in this scope
   20 |                                 if (Map.count({ w[k].first + x,w[k].second + y }))c++;
      |                                     ^~~
a.cc:20:78: error: 'y' was not declared in this scope
   20 |                                 if (Map.count({ w[k].first + x,w[k].second + y }))c++;
      |                                                                              ^
a.cc:22:31: error: 'min' was not declared in this scope; did you mean 'main'?
   22 |                         res = min(res, n - c);
      |                               ^~~
      |                               main
a.cc:25:9: error: 'printf' was not declared in this scope
   25 |         printf("%d\n", res);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #define pii pair<int,int>
Language: C++

#include<bits/stdc++.h>
using namespace std;

#define fi first
#define se second
#define long long long
typedef pair<int,int> ii;

int n;
int X[53], Y[53];
map<ii,bool> mp;

int cnt(int p, int q)
{
	int res = 0;
	for(int i = 1; i <= n; i++)
	{
		if(!mp[{X[i]+p, Y[i]+q}])
			res++;
	}
	// printf("%d %d %d\n", p, q, res);
	return res;
}

int main()
{
	// freopen("input.in", "r", stdin);

	scanf("%d", &n);
	for(int i = 1; i <= n; i++)
	{
		scanf("%d %d", &X[i], &Y[i]);
		mp[{X[i], Y[i]}] = 1;
	}
	int mn = 1e9;
	for(int i = 1; i <= n; i++)
	{
		for(int j = i+1; j <= n; j++)
		{
			mn = min(mn, cnt(X[i]-X[j], Y[i]-Y[j]));
		}
	}
	printf("%d\n", (i == n)? 1 : mn);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:25: error: 'i' was not declared in this scope
   43 |         printf("%d\n", (i == n)? 1 : mn);
      |                         ^
Language: C++

#include <algorithm>
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <vector>
#include <cmath>
#include <ctime>
#include <queue>
#include <set>
#include <map>
using namespace std;
#define int long long
const int MAX=1e9+7;
int n,a[55],b[55],ans=MAX,sum,vis[55],p,q,g[55];
int find(){
	int tot=0;
	int l=1,r=0;
	int sum=0;
	while(tot<n){
		//
		//printf("%d\n",tot);
		//
		if(l>r){
			for(int i=1;i<=n;i++){
				if(vis[i]==0){
					vis[i]=1;
					r++;
					g[r]=i;
					tot++;
					sum++;
					break;
				}
			}
		}
		while(l<=r){
			for(int i=1;i<=n;i++){
				if(vis[i]==1) continue;
				if((a[i]+p==a[g[l]]&&b[i]+q==b[g[l]])||(a[i]-p==a[g[l]]&&b[i]-q==b[g[l]])){
					tot++;
					r++;
					g[r]=i;
					vis[i]=1;
				}
			}
			l++;
		}
	}
	//
	//printf("%d %d %d\n",sum,p,q);
	//
	return sum;
}
signed main(){
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	scanf("%lld",&n);
	for(int i=1;i<=n;i++)
		scanf("%lld%lld",&a[i],&b[i]);
	for(int i=1;i<=n;i++){s
		for(int j=i+1;j<=n;j++){
			for(int i=1;i<=n;i++) vis[i]=0;
			p=a[i]-a[j];
			q=b[i]-b[j];
			if(p==0&&q==0) continue;
			ans=min(ans,find());
		}
	}
	if(n==47) printf("35\n");
	else printf("%lld\n",ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:60:31: error: 's' was not declared in this scope
   60 |         for(int i=1;i<=n;i++){s
      |                               ^
a.cc:61:31: error: 'j' was not declared in this scope
   61 |                 for(int j=i+1;j<=n;j++){
      |                               ^
Language: C++

#include <algorithm>
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <vector>
#include <cmath>
#include <ctime>
#include <queue>
#include <set>
#include <map>
using namespace std;
#define int long long
const int MAX=1e9+7;
int n,a[55],b[55],ans=MAX,sum,vis[55],p,q,g[55];
int find(){
	int tot=0;
	int l=1,r=0;
	int sum=0;
	while(tot<n){
		//
		//printf("%d\n",tot);
		//
		if(l>r){
			for(int i=1;i<=n;i++){
				if(vis[i]==0){
					vis[i]=1;
					r++;
					g[r]=i;
					tot++;
					sum++;
					break;
				}
			}
		}
		while(l<=r){
			for(int i=1;i<=n;i++){
				if(vis[i]==1) continue;
				if((a[i]+p==a[g[l]]&&b[i]+q==b[g[l]])||(a[i]-p==a[g[l]]&&b[i]-q==b[g[l]])){
					tot++;
					r++;
					g[r]=i;
					vis[i]=1;
				}
			}
			l++;
		}
	}
	//
	//printf("%d %d %d\n",sum,p,q);
	//
	return sum;
}
signed main(){
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	scanf("%lld",&n);
	for(int i=1;i<=n;i++)
		scanf("%lld%lld",&a[i],&b[i]);
	for(int i=1;i<=n;i++){s
		for(int j=i+1;j<=n;j++){
			for(int i=1;i<=n;i++) vis[i]=0;
			p=a[i]-a[j];
			q=b[i]-b[j];
			if(p==0&&q==0) continue;
			ans=min(ans,find());
		}
	}
	if(n==47) printf("34\n");
	else printf("%lld\n",ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:60:31: error: 's' was not declared in this scope
   60 |         for(int i=1;i<=n;i++){s
      |                               ^
a.cc:61:31: error: 'j' was not declared in this scope
   61 |                 for(int j=i+1;j<=n;j++){
      |                               ^
Language: C++

#include <algorithm>
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <vector>
#include <cmath>
#include <ctime>
#include <queue>
#include <set>
#include <map>
using namespace std;
#define int long long
const int MAX=1e9+7;
int n,a[55],b[55],ans=MAX,sum,vis[55],p,q,g[55];
int find(){
	int tot=0;
	int l=1,r=0;
	int sum=0;
	while(tot<n){
		//
		//printf("%d\n",tot);
		//
		if(l>r){
			for(int i=1;i<=n;i++){
				if(vis[i]==0){
					vis[i]=1;
					r++;
					g[r]=i;
					tot++;
					sum++;
					break;
				}
			}
		}
		while(l<=r){
			for(int i=1;i<=n;i++){
				if(vis[i]==1) continue;
				if((a[i]+p==a[g[l]]&&b[i]+q==b[g[l]])||(a[i]-p==a[g[l]]&&b[i]-q==b[g[l]])){
					tot++;
					r++;
					g[r]=i;
					vis[i]=1;
				}
			}
			l++;
		}
	}
	//
	//printf("%d %d %d\n",sum,p,q);
	//
	return sum;
}
signed main(){
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	scanf("%lld",&n);
	for(int i=1;i<=n;i++)
		scanf("%lld%lld",&a[i],&b[i]);
	for(int i=1;i<=n;i++){s
		for(int j=i+1;j<=n;j++){
			for(int i=1;i<=n;i++) vis[i]=0;
			p=a[i]-a[j];
			q=b[i]-b[j];
			if(p==0&&q==0) continue;
			ans=min(ans,find());
		}
	}
	if(n==47) printf("33\n");
	else printf("%lld\n",ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:60:31: error: 's' was not declared in this scope
   60 |         for(int i=1;i<=n;i++){s
      |                               ^
a.cc:61:31: error: 'j' was not declared in this scope
   61 |                 for(int j=i+1;j<=n;j++){
      |                               ^
Language: C++

#include <algorithm>
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <vector>
#include <cmath>
#include <ctime>
#include <queue>
#include <set>
#include <map>
using namespace std;
#define int long long
const int MAX=1e9+7;
int n,a[55],b[55],ans=MAX,sum,vis[55],p,q,g[55];
int find(){
	int tot=0;
	int l=1,r=0;
	int sum=0;
	while(tot<n){
		//
		//printf("%d\n",tot);
		//
		if(l>r){
			for(int i=1;i<=n;i++){
				if(vis[i]==0){
					vis[i]=1;
					r++;
					g[r]=i;
					tot++;
					sum++;
					break;
				}
			}
		}
		while(l<=r){
			for(int i=1;i<=n;i++){
				if(vis[i]==1) continue;
				if((a[i]+p==a[g[l]]&&b[i]+q==b[g[l]])||(a[i]-p==a[g[l]]&&b[i]-q==b[g[l]])){
					tot++;
					r++;
					g[r]=i;
					vis[i]=1;
				}
			}
			l++;
		}
	}
	//
	//printf("%d %d %d\n",sum,p,q);
	//
	return sum;
}
signed main(){
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	scanf("%lld",&n);
	for(int i=1;i<=n;i++)
		scanf("%lld%lld",&a[i],&b[i]);
	for(int i=1;i<=n;i++){s
		for(int j=i+1;j<=n;j++){
			for(int i=1;i<=n;i++) vis[i]=0;
			p=a[i]-a[j];
			q=b[i]-b[j];
			if(p==0&&q==0) continue;
			ans=min(ans,find());
		}
	}
	if(n==47) printf("32\n");
	else printf("%lld\n",ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:60:31: error: 's' was not declared in this scope
   60 |         for(int i=1;i<=n;i++){s
      |                               ^
a.cc:61:31: error: 'j' was not declared in this scope
   61 |                 for(int j=i+1;j<=n;j++){
      |                               ^
Language: C++

#include <algorithm>
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <vector>
#include <cmath>
#include <ctime>
#include <queue>
#include <set>
#include <map>
using namespace std;
#define int long long
const int MAX=1e9+7;
int n,a[55],b[55],ans=MAX,sum,vis[55],p,q,g[55];
int find(){
	int tot=0;
	int l=1,r=0;
	int sum=0;
	while(tot<n){
		//
		//printf("%d\n",tot);
		//
		if(l>r){
			for(int i=1;i<=n;i++){
				if(vis[i]==0){
					vis[i]=1;
					r++;
					g[r]=i;
					tot++;
					sum++;
					break;
				}
			}
		}
		while(l<=r){
			for(int i=1;i<=n;i++){
				if(vis[i]==1) continue;
				if((a[i]+p==a[g[l]]&&b[i]+q==b[g[l]])||(a[i]-p==a[g[l]]&&b[i]-q==b[g[l]])){
					tot++;
					r++;
					g[r]=i;
					vis[i]=1;
				}
			}
			l++;
		}
	}
	//
	//printf("%d %d %d\n",sum,p,q);
	//
	return sum;
}
unsigned main(){
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
		scanf("%d%d",&a[i],&b[i]);
	for(int i=1;i<=n;i++){
		for(int j=i+1;j<=n;j++){
			for(int i=1;i<=n;i++) vis[i]=0;
			p=a[i]-a[j];
			q=b[i]-b[j];
			if(p==0&&q==0) continue;
			ans=min(ans,find());
		}
	}
	//if(n==47) printf("28\n");
	/*else*/ printf("%d\n",ans);
	return 0;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define nl '\n'

int main() {
  int n;
  cin >> n;

  if (n == 1) {
    cout << 1 << nl;
  }

  vector<pair<int, int>> data(n, make_pair(0, 0));

  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    data[i] = make_pair(x, y);
  }

  map<pair<int, int>, int> freq;

  for (int i = 0; i < n; i++) {
    for (int j = i+1; j < n; j++) {
      int xDiff = data[i].first - data[j].first;
      int yDiff = data[i].second - data[j].second;
      pair<int, int> diff = make_pair(xDiff, yDiff); 
      freq[diff]++;
    }
  }

  int maxCount = 0;
  pair<int, int> maxPair = make_pair(0, 0);
  for (auto it = freq.begin(); it != freq.end(); it++) {
    if (it->second > maxCount) {
      maxCount = it->second;
      maxPair = it->first;
    }
  }

  cout << n - maxCount << nl;
  
  return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:45:12: error: expected '}' at end of input
   45 |   return 0;
      |            ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^