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

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

int main() {
  int N, b, c;
  c = N * ( N - 1 ) / 2;
  vector<int> xx(N);
  vector<int> yy(N);
  vector<double> a(c);
  for ( int i = 0; i < N; i++ ) {
    cin >> xx(i) >> yy(i);
  }
  for ( int k = 0; k < N; k++ ) {
    for ( int j = k + 1; k < N; j++ ) {
      a(b) = ( yy(j) - yy(k) ) / ( xx(j) - xx(k) ) * -1 * xx(k) + yy(k);
      b++;
    }
  }
  int d, e, f;
  d = b * ( b - 1 ) / 2;
  for ( int m = 0; m < d; m++ ) {
    for ( int l = m + 1; m < d; l++ ) {
      if ( a(m) == b(l) )
        e++;
    }
    if ( e != 0 )
      f++;
  }
  cout << f << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: no match for call to '(std::vector<int>) (int&)'
   11 |     cin >> xx(i) >> yy(i);
      |            ~~^~~
a.cc:11:23: error: no match for call to '(std::vector<int>) (int&)'
   11 |     cin >> xx(i) >> yy(i);
      |                     ~~^~~
a.cc:15:8: error: no match for call to '(std::vector<double>) (int&)'
   15 |       a(b) = ( yy(j) - yy(k) ) / ( xx(j) - xx(k) ) * -1 * xx(k) + yy(k);
      |       ~^~~
a.cc:15:18: error: no match for call to '(std::vector<int>) (int&)'
   15 |       a(b) = ( yy(j) - yy(k) ) / ( xx(j) - xx(k) ) * -1 * xx(k) + yy(k);
      |                ~~^~~
a.cc:15:26: error: no match for call to '(std::vector<int>) (int&)'
   15 |       a(b) = ( yy(j) - yy(k) ) / ( xx(j) - xx(k) ) * -1 * xx(k) + yy(k);
      |                        ~~^~~
a.cc:15:38: error: no match for call to '(std::vector<int>) (int&)'
   15 |       a(b) = ( yy(j) - yy(k) ) / ( xx(j) - xx(k) ) * -1 * xx(k) + yy(k);
      |                                    ~~^~~
a.cc:15:46: error: no match for call to '(std::vector<int>) (int&)'
   15 |       a(b) = ( yy(j) - yy(k) ) / ( xx(j) - xx(k) ) * -1 * xx(k) + yy(k);
      |                                            ~~^~~
a.cc:15:61: error: no match for call to '(std::vector<int>) (int&)'
   15 |       a(b) = ( yy(j) - yy(k) ) / ( xx(j) - xx(k) ) * -1 * xx(k) + yy(k);
      |                                                           ~~^~~
a.cc:15:69: error: no match for call to '(std::vector<int>) (int&)'
   15 |       a(b) = ( yy(j) - yy(k) ) / ( xx(j) - xx(k) ) * -1 * xx(k) + yy(k);
      |                                                                   ~~^~~
a.cc:23:13: error: no match for call to '(std::vector<double>) (int&)'
   23 |       if ( a(m) == b(l) )
      |            ~^~~
a.cc:23:21: error: 'b' cannot be used as a function
   23 |       if ( a(m) == b(l) )
      |                    ~^~~
Language: C++

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

int main(){
  int N;
  cin>>N;
  long long int X[N+1],Y[N+1];
  for(int i=1; i<=N; ++i) cin>>X[i]>>Y[i];
  
  vector<int> A;
  for(int i=1; i<N; ++i){
    for(int j=1; j<N; ++j){
      int p=X[j]-X[i],q=Y[j]-Y[i],cnt=1;
      for(int k=1; k<N; ++k){
        for(int h=1; h<N; ++h){
          if(X[h]-X[k]==p && Y[h]-Y[k]==q) cnt++;
        }
      }
    }
    A.push_back(cnt);
  }
  
  sort(A.begin(),A.end());
  reverse(A.begin(),A.end());
  
  cout<<A.at(0)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:17: error: 'cnt' was not declared in this scope; did you mean 'int'?
   26 |     A.push_back(cnt);
      |                 ^~~
      |                 int
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <algorithm>

using namespace std;

int main(void) {
	int num, i = 0, j, sum = 0;
	cin >> num;
	vector<int> x(num), y(num);
	map<pair<int, int>, int> mp;
	for (; i < num; i++)
		scanf_s("%d%d", &x[i], &y[i]);
	for (i = 0; i < num - 1; i++) {
		for (j = i + 1; j < num; j++) {
			if (x[i] < x[j])
				sum = max(sum, ++mp[make_pair(x[j] - x[i], y[j] - y[i])]);
			else
				sum = max(sum, ++mp[make_pair(x[i] - x[j], y[i] - y[j])]);
		}
	}
	cout << num - sum << "\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   14 |                 scanf_s("%d%d", &x[i], &y[i]);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include <iostream>
#include <vector>
#include <utility>
using namespace std;

int main(void){
    int n;
    int x, y;
    int res = 1;
    vector<pair<int, int> > vec;

    cin >> n;
    
    for(int i = 0; i < n; i++){
        cin >> x >> y;
        vec.push_back(make_pair(x, y));
    }

    sort(vec.begin(), vec.end());
    
    int a, b;
    a = vec[0].first;
    b = vec[0].second;

    int p, q, px, qy;
    vector<pair<int, int> > vec2;
    for(int i = 1; i < n; i++){
        p = a - vec[i].first;
        q = b - vec[i].second;
        vec2.push_back(make_pair(p, q));
        a = vec[i].first;
        b = vec[i].second;
	}

    sort(vec2.begin(), vec2.end());
    px = vec2[0].first;
    qy = vec2[0].second;

    for(int i = 1; i < n - 1; i++){
        if(px == vec2[i].first && qy == vec2[i].second){
            res += 0;
        } else {
            res += 1;
        }
        px = vec2[i].first;
        qy = vec2[i].second;
	}    
    cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   19 |     sort(vec.begin(), vec.end());
      |     ^~~~
      |     short
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<map>
#include<set>
#include<queue>
#include<cmath>
const double EPS=1e-10;

using namespace std;
long long n, x[55], y[55];

void solve(){
    set<double> coef;
    for(int i=0;i<n-1;i++){
        for(int j=i+1;j<n;j++){
            if(x[i]!=x[j]){
                coef.insert(double(y[i]-y[j])/double(x[i]-x[j]));
            }
        }
    }
    int mn=55;
    for(auto itr=coef.begin(); itr!=coef.end(); ++itr){
        set<double> point;
        for(int i=0;i<n;i++){
            bool equal=false;
            for(auto pitr=point.begin();pitr!=point.end();++pitr){
                if(abs(*itr * double((-1.0)*x[i]) + double(y[i])-*pitr)<EPS){
                    equal=true;
                }
            }
            if(!equal){
                point.insert(*itr * double((-1.0)*x[i]) + double(y[i]));
            }
        }
        mn = min(mn, int(point.size()));
    }
    set<int> point;
    for(int i=0;i<n;i++){
        point.insert(x[i]);
    }
    mn = min(mn, int(point.size()));
    set<int> point;
    for(int i=0;i<n;i++){
        point.insert(y[i]);
    }
    mn = min(mn, int(point.size()));
    cout << mn << endl;
}

int main(){
    cin >> n;
    for(int i=0;i<n;i++){
        cin >> x[i] >> y[i];
    }
    solve();
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:44:14: error: redeclaration of 'std::set<int> point'
   44 |     set<int> point;
      |              ^~~~~
a.cc:39:14: note: 'std::set<int> point' previously declared here
   39 |     set<int> point;
      |              ^~~~~
Language: C++

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

int main() {
    ll N,x[50],y[50];
    cin>>N;
    for (int i(0);i<N;i++){
      cin>>x[i]>>y[i];
    }
    for (int i(0);i<N-1;i++){
      if (x[i]!=x[i+1]) break;
      if (i==N-2) {
        cout<<N;
        return 0;
      }
    }
    for (int i(0);i<N-1;i++){
      if (y[i]!=y[i+1]) break;
      if (i==N-2) {
        cout<<N;
        return 0;
      }
    }
    cout<<rd()/1500000000<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:11: error: 'rd' was not declared in this scope
   25 |     cout<<rd()/1500000000<<endl;
      |           ^~
Language: C++

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

int main(){
  int N;
  cin>>N;
  vector<pair<int,int>> X;
  for(int i=1; i<=N; ++i){
    int a,b;
    cin>>a>>b;
    X.push_back(make_pair(a,b));
  }
  
  sort(X.begin(),X.end());
  
  vector<int> A;
  for(int i=1; i<N; ++i){
    int p=X[i+1].first-X[i].first,q=Y[i+1].second-Y[i].second,cnt=1;
    for(int j=i+1; j<N; ++j){
      if(X[i+1].first-X[i].first==p && Y[i+1].second-Y[i].second==q) cnt++;
    }
    A.push_back(cnt);
  }
  
  sort(A.begin(),A.end());
  reverse(A.begin(),A.end());
  
  cout<<A.at(0)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:37: error: 'Y' was not declared in this scope
   24 |     int p=X[i+1].first-X[i].first,q=Y[i+1].second-Y[i].second,cnt=1;
      |                                     ^
a.cc:26:70: error: 'cnt' was not declared in this scope; did you mean 'int'?
   26 |       if(X[i+1].first-X[i].first==p && Y[i+1].second-Y[i].second==q) cnt++;
      |                                                                      ^~~
      |                                                                      int
a.cc:28:17: error: 'cnt' was not declared in this scope; did you mean 'int'?
   28 |     A.push_back(cnt);
      |                 ^~~
      |                 int
Language: C++

#include <iostream>
#include <vector>
#include <utility>
using namespace std;

int main(void){
    int n;
    int x, y;
    int res = 1;
    vector<pair<int, int> > vec;

    cin >> n;
    
    for(int i = 0; i < n; i++){
        cin >> x >> y;
        vec.push_back(make_pair(x, y));
    }

    sort(vec.begin(), vec.end(), greater<pair<int, int> >());
    
    int a, b;
    a = vec[0].first;
    b = vec[0].second;

    int p, q, px, qy;
    vector<pair<int, int> > vec2;
    for(int i = 1; i < n; i++){
        p = a - vec[i].first;
        q = b - vec[i].second;
        vec2.push_back(make_pair(p, q));
        a = vec[i].first;
        b = vec[i].second;
	}

    sort(vec2.begin(), vec2.end());
    px = vec2[0].first;
    qy = vec2[0].second;

    for(int i = 1; i < n - 1; i++){
        if(px == vec2[i].first && qy == vec2[i].second){
            res += 0;
        } else {
            res += 1;
        }
        px = vec2[i].first;
        qy = vec2[i].second;
	}    
    cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   19 |     sort(vec.begin(), vec.end(), greater<pair<int, int> >());
      |     ^~~~
      |     short
Language: C++

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

int main(){
  int N;
  cin>>N;
  int X[N+1],Y[N+1];
  for(int i=1; i<=N; ++i) cin>>X[i]>>Y[i];
  
  vector<int> A;
  for(int i=1; i<N ++i){
    int p=X[i+1]-X[i],q=Y[i+1]-Y[i],cnt=1;
    for(int j=i+1; j<N; ++j){
      if(X[j+1]-X[j]==p && Y[j+1]-Y[j]==q) cnt++;
    }
    A.push_back(cnt);
  }
  
  sort(A.begin(),A.end());
  reverse(A.begin(),A.end());
  
  cout<<A.at(0)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:22: error: expected ';' before 'i'
   17 |   for(int i=1; i<N ++i){
      |                      ^
      |                      ;
Language: C++

#include <iostream>
#include <vector>
#include <utility>
using namespace std;

int main(void){
    int n;
    int x, y;
    int res = 1;
    vector<pair<int, int> > vec;

    cin >> n;
    
    for(int i = 0; i < n; i++){
        cin >> x >> y;
        vec.push_back(make_pair(x, y));
    }

    sort(vec.begin(), vec.end(), greater<pair<int,int> >() );
    
    int a, b;
    a = vec[0].first;
    b = vec[0].second;

    int p, q, px, qy;
    vector<pair<int, int> > vec2;
    for(int i = 1; i < n; i++){
        p = a - vec[i].first;
        q = b - vec[i].second;
        vec2.push_back(make_pair(p, q));
        a = vec[i].first;
        b = vec[i].second;
	}

    sort(vec2.begin(), vec2.end());
    px = vec2[0].first;
    qy = vec2[0].second;

    for(int i = 1; i < n - 1; i++){
        if(px == vec2[i].first && qy == vec2[i].second){
            res += 0;
        } else {
            res += 1;
        }
        px = vec2[i].first;
        qy = vec2[i].second;
	}    
    cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   19 |     sort(vec.begin(), vec.end(), greater<pair<int,int> >() );
      |     ^~~~
      |     short
Language: C++

#include <iostream>
#include <vector>
#include <utility>
using namespace std;

int main(void){
    int n;
    int x, y;
    int res = 1;
    vector<pair<int, int> > vec;

    cin >> n;
    
    for(int i = 0; i < n; i++){
        cin >> x >> y;
        vec.push_back(make_pair(x, y));
    }

    sort(vec.begin(), vec.end(), greater<pair<int,int> >());
    
    int a, b;
    a = vec[0].first;
    b = vec[0].second;

    int p, q, px, qy;
    vector<pair<int, int> > vec2;
    for(int i = 1; i < n; i++){
        p = a - vec[i].first;
        q = b - vec[i].second;
        vec2.push_back(make_pair(p, q));
        a = vec[i].first;
        b = vec[i].second;
	}

    sort(vec2.begin(), vec2.end());
    px = vec2[0].first;
    qy = vec2[0].second;

    for(int i = 1; i < n - 1; i++){
        if(px == vec2[i].first && qy == vec2[i].second){
            res += 0;
        } else {
            res += 1;
        }
        px = vec2[i].first;
        qy = vec2[i].second;
	}    
    cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   19 |     sort(vec.begin(), vec.end(), greater<pair<int,int> >());
      |     ^~~~
      |     short
Language: C++


#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <bitset>
#include <iostream>
#include <deque>
#include <functional>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <string>
#include <vector>
#include <vector>

using namespace std;

#define int long long
struct Fast
{
  Fast()
  {
    std::cin.tie(0);
    std::cout.tie(0);
    ios::sync_with_stdio(false);
  }
} fast;

#define ALL(v) begin(v), end(v)
#define RALL(v) rbegin(v), rend(v)

#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)

#define debug(x) cerr << #x << ": " << x << endl;

const int MOD = 1e9 + 7;

int num;
int n;
// vector<int> p; // 順番
// vector<int> x;
// vector<int> y;
vector<pair<int, int>> xy;

int f() {

  map<pair<int, int>, int> dxys;
  // map<pair<int, int>, int> dyxs;
  for (int i = 0; i + 1 < n; ++i) {
    int dx = xy[i].first - xy[i + 1].first;
    int dy = xy[i].first - xy[i + 1].first;
    // int dx = x[i] - x[i + 1];
    // int dy = y[i] - y[i + 1];
    ++dxys[make_pair(dx, dy)];
    // ++dyxs[make_pair(dy, dx)];
  }

  int Mdxy;
  for (auto it = dxys.cbegin(); it != dxys.cend(); ++it) {
    if (it == dxys.cbegin() || Mdxy < (*it).second) {
      Mdxy = (*it).second;
    }
  }

  return n - Mdxy;
  // int Mdyx;
  // for (auto it = dyxs.cbegin(); it != dyxs.cend(); ++it) {
  //   if (it == dyxs.cbegin() || Mdyx < (*it).second) {
  //     Mdyx = (*it).second;
  //   }
  // }

  // return min(n - Mdxy, n - Mdyx);
}


signed main(void)
{
  
  cin >> n;
  // p = vector<int>(n);
  // x = vector<int>(n);
  // y = vector<int>(n);
  // for (int i = 0; i < n; ++i) {
  //   p[i] = i;
  //   cin >> x[i] >> y[i];
  // }
  
  xy = vector<pair<int, int>>(n);
  for(auto it = xy.begin();it!=xy.end();++it) {
    *it = make_pair(0, 0);
    cin >> (*it).first >> (*it).second;
  }

  num = n;
  sort(xy.begin(), xy.end());
  num = min(num, f());
  sort(xy.begin(),
       xy.end(),
       [](const pair<int, int> &a, const pair<int, int> & b)
       { if (a.second == b.second) return a.first < b.first; else return a.second < b.second;})
  num = min(num, f());

  // do {

  // } while(next_permutation(p.begin(), p.end()));
  
  // do {
  //   num = min(num, f());

  // } while(next_permutation(xy.begin(), xy.end()));

  // cout << endl;
  cout << num << endl;
  

}


Compiler output:
a.cc: In function 'int main()':
a.cc:103:96: error: expected ';' before 'num'
  103 |        { if (a.second == b.second) return a.first < b.first; else return a.second < b.second;})
      |                                                                                                ^
      |                                                                                                ;
  104 |   num = min(num, f());
      |   ~~~
Language: C++

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

int main(){
    int n,a,b,c=0;
    cin >> n;
    vector<int> x(n),y(n),a(n),b(n);
    for(int i=0;i<n;i++) cin >> x[i] >> y[i];
    for(int i=0;i<n-1;i++){
        a[i]=x[i+1]-x[i];
        b[i]=y[i+1]-y[i];
        if(a[i]!=a[i+1]||b[i]!=b[i+1]) c++;
    }
    cout << c << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:27: error: conflicting declaration 'std::vector<int> a'
   11 |     vector<int> x(n),y(n),a(n),b(n);
      |                           ^
a.cc:9:11: note: previous declaration as 'int a'
    9 |     int n,a,b,c=0;
      |           ^
a.cc:11:32: error: conflicting declaration 'std::vector<int> b'
   11 |     vector<int> x(n),y(n),a(n),b(n);
      |                                ^
a.cc:9:13: note: previous declaration as 'int b'
    9 |     int n,a,b,c=0;
      |             ^
a.cc:14:10: error: invalid types 'int[int]' for array subscript
   14 |         a[i]=x[i+1]-x[i];
      |          ^
a.cc:15:10: error: invalid types 'int[int]' for array subscript
   15 |         b[i]=y[i+1]-y[i];
      |          ^
a.cc:16:13: error: invalid types 'int[int]' for array subscript
   16 |         if(a[i]!=a[i+1]||b[i]!=b[i+1]) c++;
      |             ^
a.cc:16:19: error: invalid types 'int[int]' for array subscript
   16 |         if(a[i]!=a[i+1]||b[i]!=b[i+1]) c++;
      |                   ^
a.cc:16:27: error: invalid types 'int[int]' for array subscript
   16 |         if(a[i]!=a[i+1]||b[i]!=b[i+1]) c++;
      |                           ^
a.cc:16:33: error: invalid types 'int[int]' for array subscript
   16 |         if(a[i]!=a[i+1]||b[i]!=b[i+1]) c++;
      |                                 ^
Language: C++

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

template < typename T > std::string to_string( const T& n )
{
    std::ostringstream stm ;
    stm << n ;
    return stm.str() ;
}

int main() {
    
    int N;
    cin >> N;
    vector<int> x(N);
    vector<int> y(N);
    for(int i=0;i<N;i++){
        cin >> x.at(i) >> y.at(i);
    }
    map<string, int> pq;
    int max = 0;
    for(int i=0;i<N-1;i++){
        for(int j=i+1;j<N;j++){
            long long p = x.at(i)-x.at(j);
            long long q = y.at(i)-y.at(j);
            string key = to_string(p) + "_" + to_string(q);
            if(pq.count(key) == 0){
                pq[key] = 1;
            }
            else{
                pq[key] += 1;
            }
            if(max < pq[key]){
                max = pq[key];
            }
            long long p = x.at(j)-x.at(i);
            long long q = y.at(j)-y.at(i);
            string key = to_string(p) + "_" + to_string(q);
            if(pq.count(key) == 0){
                pq[key] = 1;
            }
            else{
                pq[key] += 1;
            }
            if(max < pq[key]){
                max = pq[key];
            }
        }
    }
    cout << N - max << endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:36:23: error: redeclaration of 'long long int p'
   36 |             long long p = x.at(j)-x.at(i);
      |                       ^
a.cc:24:23: note: 'long long int p' previously declared here
   24 |             long long p = x.at(i)-x.at(j);
      |                       ^
a.cc:37:23: error: redeclaration of 'long long int q'
   37 |             long long q = y.at(j)-y.at(i);
      |                       ^
a.cc:25:23: note: 'long long int q' previously declared here
   25 |             long long q = y.at(i)-y.at(j);
      |                       ^
a.cc:38:20: error: redeclaration of 'std::string key'
   38 |             string key = to_string(p) + "_" + to_string(q);
      |                    ^~~
a.cc:26:20: note: 'std::string key' previously declared here
   26 |             string key = to_string(p) + "_" + to_string(q);
      |                    ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
    ll n;
    cin >> n;
    ll x[n], y[n];
    for(ll i = 0; i < n; i++) cin >> x[i] >> y[i];
    ll c = 0, d = 1;
    for(ll i = 1; i < n - 1; i++) {
        if(x[i] - x[i - 1] != x[i + 1] - x[i] || y[i] - y[i - 1] != y[i + 1] - y[i]) c++;
    }
    cout << max(c, 1);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: no matching function for call to 'max(long long int&, int)'
   13 |     cout << max(c, 1);
      |             ~~~^~~~~~
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:13:16: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   13 |     cout << max(c, 1);
      |             ~~~^~~~~~
/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:13:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   13 |     cout << max(c, 1);
      |             ~~~^~~~~~
Language: Java

import java.util.Scanner;

public class Main2 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[][] oohako = new int[n][2];
		for (int i = 0; i < n; i++) {
			int[] hako = new int[2];
			hako[0] = sc.nextInt();
			hako[1] = sc.nextInt();
			oohako[i] = hako;
		}
		int min = 99;
		for (int i = 0; i < n - 1; i++) {
			for (int j = i + 1; j < n; j++) {
				int p = oohako[i][0] - oohako[j][0];
				int q = oohako[i][1] - oohako[j][1];
				int[][] oohakoSub = new int[n][2];
				oohakoSub = oohako;
				int nakama = 0;
				for (int m = 0; m < n - 1; m++) {
					if (oohakoSub[m][0] != -1) {
						for (int l = m + 1; l < n; l++) {
							if (oohakoSub[l][0] != -1) {
								int amariX = 0;
								if (p == 0) {
									amariX = oohakoSub[m][0] - oohakoSub[l][0];
								} else {
									amariX = (oohakoSub[m][0] - oohakoSub[l][0]) % p;
								}

								int amariY = 0;
								if (q == 0) {
									amariY = oohakoSub[m][1] - oohakoSub[l][1];
								} else {
									amariY = (oohakoSub[m][1] - oohakoSub[l][1]) % q;
								}
								if (amariX == 0 && amariY == 0) {
									oohakoSub[l] = new int[] { -1, -1 };
									nakama++;
								}
							}

						}
					}
					oohakoSub[m] = new int[] { -1, -1 };

				}
				if (min > n - nakama) {
					min = n - nakama;
				}
			}
		}
		System.out.println(min);

	}
}

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

//
//  main.cpp
//  c++test
//


#include <iostream>
#include <string>
#include <vector>
using namespace std;

typedef struct {
    int x;
    int y;
}Vector2;

typedef struct {
    int x;
    int y;
    int z;
}Vector3;

bool checkAns(vector<Vector3> &ans, Vector2 val)
{
    for (int i = 0; i < ans.size(); i++) {
        if ((ans[i].x == val.x) &&
            (ans[i].y == val.y)) {
            ans[i].z += 1;
            return true;
        }
    }
    
    Vector3 v;
    v.x = val.x;
    v.y = val.y;
    v.z = 1;
    ans.push_back(v);
    return false;
}


void CalcVecSub(vector<Vector3> &ans, Vector2 v0, Vector2 *v1, int n)
{
    for (int i = 0; i < n; i++) {
        Vector2 tmp;
        if (v0.x > v1[i].x) {
            tmp.x = v0.x - v1[i].x;
            tmp.y = v0.y - v1[i].y;
        }else {
            tmp.x = v1[i].x - v0.x;
            tmp.y = v1[i].y - v0.y;
        }
        
        checkAns(ans, tmp);
    }
}

int main(int argc, const char * argv[]) {
#if 0
    // insert code here...
    std::cout << "Hello, World!\n";
    
    int a, b, c;
    string s;
    cin >> a;
    cin >> b;
    cin >> c;
    cin >> s;
    
    cout << a + b + c << " " << s << endl;
#endif
#if 0
    int N, K;
    cin >> N;
    cin >> K;
    
    if (K < 2) {
        cout << 0 << endl;
        return 0;
    }
    
    cout << N - K << endl;
#endif
    
    
    int N;
    cin >> N;
    Vector2 *v = new Vector2[N];
    for (int i = 0; i < N; i++) {
        cin >> v[i].x;
        cin >> v[i].y;
    }
    
    int ans_num = 0;
    for (int n = N - 1; n > 0; n++) {
        ans_num += n;
    }
    
    std::vector<Vector3> ans;
    for (int i = 0; i < N; i++) {
        CalcVecSub(ans, v[i], &v[i+1], N - 1 - i);
    }
    
    Vector2 pq;
    memset(&pq, 0, sizeof(Vector2));
    int c = 0;
    for (Vector3 a : ans) {
        if (c < a.z) {
            c = a.z;
            pq.x = a.x;
            pq.y = a.y;
        }
    }
    
    cout << N - c << endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:105:5: error: 'memset' was not declared in this scope
  105 |     memset(&pq, 0, sizeof(Vector2));
      |     ^~~~~~
a.cc:10:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    9 | #include <vector>
  +++ |+#include <cstring>
   10 | using namespace std;
Language: C++

#include<iostream>
#include<vector>
#include<math.h>
#include<string>

typedef long long ll;
typedef unsigned short int unsi;
typedef unsigned int uni;
typedef unsigned long int unli;

using namespace std;

int main(){
	int N;
	int x[50];
	int y[50];
	int Cost = 50;
	int c = 0;

	int dx, dy;
	int t;
	


	cin >> N;

	for (int i = 1; i <= N; i++) {
		cin >> x[i - 1] >> y[i - 1];
	}
	
	for (int i = 1; i <= N; i++) {
		for (int j = 1; j <= N; j++) {
			if (j != i) {
				dx = x[i - 1] - x[j - 1];
				dy = y[i - 1] - y[j - 1];
				vector<int> f;
				for (int k = 1; k <= N; k++) {
					t = dx * y[k - 1] - dy * x[k - 1];
					if (k != 1) {
						auto result = find(f.begin(), f.end(), t);
						if (result == f.end()) {
							c++;
							f.push_back(t);
						}
					}else {
						c++;
						f.push_back(t);
					}
					
				}

				if (Cost > c) {
					Cost = c;
				}
				c = 0;
			}
		}
	}

	cout << Cost << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:67: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   40 |                                                 auto result = find(f.begin(), f.end(), t);
      |                                                               ~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:40:67: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   40 |                                                 auto result = find(f.begin(), f.end(), t);
      |                                                               ~~~~^~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

pair<int,int> hikizan(pair<int,int> a,pair<int,int> b){
  pair<int,int> are;
  are.first=a.first-b.first;
  are.second=a.second-b.second;
  return are;
}

int main(){
  int n;cin>>n;
  vector<pair<int,int> > c(n);
  for(int i=0;i<n;i++){
    cin>>c.at(i).first>>c.at(i).second;
	}//definition
  if(n==1){
    cout<<1<<;return 0;
  }

  vector<pair<int,int> > sub;
  int cost=0;
  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++){
      if(i!=j){
        sub.push_back(hikizan(c.at(i),c.at(j)));
      }
    }
  }
sort(sub.begin(),sub.end());
pair<int,int> freq,bef(0,0);
int coun=0,counmax=1;
for(int i=0;i<int(sub.size());i++){
	if(bef!=sub.at(i)){
		bef=sub.at(i);
		coun=1;
	}else{
		++coun;
		if(counmax<coun){
			counmax=coun;
		}
	}
}
cout<<n-counmax<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: expected primary-expression before ';' token
   18 |     cout<<1<<;return 0;
      |              ^
Language: Java

import java.util.*;
public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int n = scan.nextInt();
      	int[] a = new int[n];
      	int[] b = new int[n];
      	for(int i = 0; i < n;i++){
        	a[i] = scan.nextInt();
          	b[i] = scan.nextInt();
        }
      	int cost = n;
      	if(n== 1){
        	System.out.print(cost);
        }
      	else{
      	for(int j = 0; j < n; j++){
        	for(int i = 0; i< n-1;i++){
            	if(a[k+1]-a[k]==a[j] && b[k+1]-b[k] == b[j]){
                	cost--;
                }
              	int sabunx = a[j+1] - a[j];
              	int sabuny = b[j+1] -b[j];
              	if(sabunx == a[k+1] - a[k] && sabuny == b[k+1]- b[k]){
                	cost--;
                }
            }
        }
      	System.out.print(cost);
        }
    }
}	

Compiler output:
Main.java:19: error: cannot find symbol
            	if(a[k+1]-a[k]==a[j] && b[k+1]-b[k] == b[j]){
            	     ^
  symbol:   variable k
  location: class Main
Main.java:19: error: cannot find symbol
            	if(a[k+1]-a[k]==a[j] && b[k+1]-b[k] == b[j]){
            	            ^
  symbol:   variable k
  location: class Main
Main.java:19: error: cannot find symbol
            	if(a[k+1]-a[k]==a[j] && b[k+1]-b[k] == b[j]){
            	                          ^
  symbol:   variable k
  location: class Main
Main.java:19: error: cannot find symbol
            	if(a[k+1]-a[k]==a[j] && b[k+1]-b[k] == b[j]){
            	                                 ^
  symbol:   variable k
  location: class Main
Main.java:24: error: cannot find symbol
              	if(sabunx == a[k+1] - a[k] && sabuny == b[k+1]- b[k]){
              	               ^
  symbol:   variable k
  location: class Main
Main.java:24: error: cannot find symbol
              	if(sabunx == a[k+1] - a[k] && sabuny == b[k+1]- b[k]){
              	                        ^
  symbol:   variable k
  location: class Main
Main.java:24: error: cannot find symbol
              	if(sabunx == a[k+1] - a[k] && sabuny == b[k+1]- b[k]){
              	                                          ^
  symbol:   variable k
  location: class Main
Main.java:24: error: cannot find symbol
              	if(sabunx == a[k+1] - a[k] && sabuny == b[k+1]- b[k]){
              	                                                  ^
  symbol:   variable k
  location: class Main
8 errors
Language: Java

import java.util.*;
public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int n = scan.nextInt();
      	int[] a = new int[n];
      	int[] b = new int[n];
      	for(int i = 0; i < n;i++){
        	a[i] = scan.nextInt();
          	b[i] = scan.nextInt();
        }
      	int cost = n;
      	if(n== 1){
        	System.out.print(cost);
        }
      	else{
      	for(int j = 0; j < n; j++){
        	for(int i = 0; i< n-1;i++){
            	if(a[k+1]-a[k]==a[j] && b[k+1]-b[k] == b[j]){
                	cost--;
                }
              	int sabunx = a[j+1] - a[j];
              	int sabuny = b[j+1] -b[j];
              	if(sabunx == a[i+1] - a[i] && sabuny == b[i+1]- b[i]){
                	cost--;
                }
            }
        }
      	System.out.print(cost);
        }
    }
}	

Compiler output:
Main.java:19: error: cannot find symbol
            	if(a[k+1]-a[k]==a[j] && b[k+1]-b[k] == b[j]){
            	     ^
  symbol:   variable k
  location: class Main
Main.java:19: error: cannot find symbol
            	if(a[k+1]-a[k]==a[j] && b[k+1]-b[k] == b[j]){
            	            ^
  symbol:   variable k
  location: class Main
Main.java:19: error: cannot find symbol
            	if(a[k+1]-a[k]==a[j] && b[k+1]-b[k] == b[j]){
            	                          ^
  symbol:   variable k
  location: class Main
Main.java:19: error: cannot find symbol
            	if(a[k+1]-a[k]==a[j] && b[k+1]-b[k] == b[j]){
            	                                 ^
  symbol:   variable k
  location: class Main
4 errors
Language: C++

#include <bits/stdc++.h>

using namespace std;

int n, ans = 0x3f3f3f3f;
long long x[100], y[100];
bool vis[100];

int gcd(int x, int y) {
	if (!y) return x;
	else return gcd(y, x % y);
}

int work(int p, int q) {
	int res = 0, g =  gcd(abs(p), abs(q));
	p /= g, q /= g;
	memset(vis, 0, sizeof vis);
	for (int i = 1; i <= n; ++i) if (!vis[i]) {
		++res;
		for (int j = 1; j <= n; ++j) {
			if (!p && x[j] - x[i]) continue;
			if (!q && y[j] - y[i]) continue;
			if ((x[j] - x[i]) * q == (y[j] - y[i]) * p) vis[j] = 1;
	}
	return res;
}

int main() {
//	freopen("in", "r", stdin);
//	freopen("out", "w", stdout);
	scanf("%d", &n);
	for (int i = 1; i <= n; ++i) scanf("%lld%lld", x + i, y + i);
	for (int i = 1; i <= n; ++i)
		for (int j = i + 1; j <= n; ++j)
			ans = min(ans, work(x[i] - x[j], y[i] - y[j]));
	printf("%d\n", ans);
	return 0;
}


Compiler output:
a.cc: In function 'int work(int, int)':
a.cc:28:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   28 | int main() {
      |         ^~
a.cc:28:9: note: remove parentheses to default-initialize a variable
   28 | int main() {
      |         ^~
      |         --
a.cc:28:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:28:12: error: a function-definition is not allowed here before '{' token
   28 | int main() {
      |            ^
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:14:24: note: to match this '{'
   14 | int work(int p, int q) {
      |                        ^
a.cc:38:2: warning: control reaches end of non-void function [-Wreturn-type]
   38 | }
      |  ^
Language: Java

import java.util.*;
public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int n = scan.nextInt();
      	int[] a = new int[n];
      	int[] b = new int[n];
      	for(int i = 0; i < n;i++){
        	a[i] = scan.nextInt();
          	b[i] = scan.nextInt();
        }
      	int cost = n;
      	if(n== 1){
        	System.out.print(cost);
        }
      	else{
      	for(int j = 0; j < n; j++){
        	for(int k = 0; k< n-1;k++){
            	if(a[k+1]-a[k]==a[j] && b[k+1]-b[k] == b[j]){
                	cost--;
                }
              	int sabunx = a[j+1] - a[j];
              	int sabuny = b[j+1] -b[j];
              	if(sabunx == a[i+1] - a[i] && sabuny == b[i+1]- b[i]){
                	cost--;
                }
            }
        }
      	System.out.print(cost);
        }
    }
}	

Compiler output:
Main.java:24: error: cannot find symbol
              	if(sabunx == a[i+1] - a[i] && sabuny == b[i+1]- b[i]){
              	               ^
  symbol:   variable i
  location: class Main
Main.java:24: error: cannot find symbol
              	if(sabunx == a[i+1] - a[i] && sabuny == b[i+1]- b[i]){
              	                        ^
  symbol:   variable i
  location: class Main
Main.java:24: error: cannot find symbol
              	if(sabunx == a[i+1] - a[i] && sabuny == b[i+1]- b[i]){
              	                                          ^
  symbol:   variable i
  location: class Main
Main.java:24: error: cannot find symbol
              	if(sabunx == a[i+1] - a[i] && sabuny == b[i+1]- b[i]){
              	                                                  ^
  symbol:   variable i
  location: class Main
4 errors
Language: C++

N = gets.to_i
x = N.times.map{gets.split.map(&:to_i)}

k1 = x.sort{|a,b| a[1] <=> b[1]}.combination(2)
k2 = []
k1.to_a.each do |k|
    k2.push([k[1][0]-k[0][0], k[1][1]-k[0][1]])
end
max_n = k2.group_by(&:itself).max_by{|_,v| v.size}[1].length
p N-max_n

Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N = gets.to_i
      | ^
a.cc:4:1: error: 'k1' does not name a type
    4 | k1 = x.sort{|a,b| a[1] <=> b[1]}.combination(2)
      | ^~
a.cc:4:33: error: expected unqualified-id before '.' token
    4 | k1 = x.sort{|a,b| a[1] <=> b[1]}.combination(2)
      |                                 ^
a.cc:9:51: error: expected unqualified-id before '[' token
    9 | max_n = k2.group_by(&:itself).max_by{|_,v| v.size}[1].length
      |                                                   ^
Language: Java

import java.util.*;
public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
      	int n = scan.nextInt();
      	int[] a = new int[n];
      	int[] b = new int[n];
      	for(int i = 0; i < n;i++){
        	a[i] = scan.nextInt();
          	b[i] = scan.nextInt();
        }
      	if(n== 1){
        	System.out.print(1);
        }
      	int cost = n;
      	else{
      	for(int j = 0; j < n; j++){
        	for(int k = 0; k< n-1;k++){
            	if(a[k+1]-a[k]==a[j] && b[k+1]-b[k] == b[j]){
                	cost--;
                }
              	int sabunx = a[j+1] - a[j];
              	int sabuny = b[j+1] -b[j];
              	if(sabunx == a[i+1] - a[i] && sabuny == b[i+1]- b[i]){
                	cost--;
                }
            }
        }
      	System.out.print(cost);
        }
    }
}	

Compiler output:
Main.java:16: error: 'else' without 'if'
      	else{
      	^
1 error
Language: C++

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


vector<bool>ge(55);
int p;
int q;
vector<int>x;
vector<int>y;
int n;
int ans=1<<30;

void dfs(int j,int su,int sum){
  if(su==n){
    ans=min(ans,sum);
    return ;
  }
  for(int i=0;i<n;i++){
    if(sum >ans){
      continue;
    }
    if(ge.at(i)){
      continue;
    }
    ge.at(i)=true;
    if(x.at(i)-x.at(j)==p&&y.at(i)-y.at(j)==q){
    }
    else{
      sum++;
    }
    dfs(i,su+1,sum);
    ge.at(i)=false;
  }
}
      
    

int main(){
  cin>>n;
  for(int i=0;i<n;i++){
    int a,b;
    cin>>a>>b;
    x.push_back(a);
    y.push_back(b);
  }
  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++){
      if(i==j){
        coutinue;
      }
      p=x.at(j)-x.at(i);
      q=y.at(j)-y.at(i);
      ge.at(i)=ge.at(j)=true;
      dfs(j,2,1);
      ge.at(i)=ge.at(j)=false;
    }
  }
  cout <<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:49:9: error: 'coutinue' was not declared in this scope
   49 |         coutinue;
      |         ^~~~~~~~
Language: C++

//#include<bits/stdc++.h>

#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

using namespace std;

int main()
{
	int n; cin >> n;
	vector < pair < long long , long long > > a;
	for (int i = 1; i <= n; i++) 
	{
		long long x, y; cin >> x >> y;
		a.push_back({x, y});
	}
	//sort(a.begin(), a.end());

	int answer = 1293132;
	for (int i = 0; i < (int)a.size(); i++)
	{
		for (int j = 0; j < (int)a.size(); j++)
		{
			if (i == j) continue;

			long long d1 = a[j].first - a[i].first, d2 = a[j].second - a[i].second;

			if (d1 == 0 && d2 == 0) continue;

			if (p < 0)
			{
				d1 *= -1;
				d2 *= -1;
			}

			set < pair < long long , long long > > s;
			int ans = 0;
			for (int g = 0; g < (int)a.size(); g++)
			{
				if (s.find({a[g].first - d1, a[g].second - d2}) == s.end()) ans++;
				s.insert(a[g]);
			}

			answer = min(answer, ans);
		}
	}

	cout << answer;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:82:29: error: 'p' was not declared in this scope
   82 |                         if (p < 0)
      |                             ^
Language: Java


import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class aMain {
    public static void main(String[] args) {
        new Main().run();
    }

    private void run(){
        final Scanner scanner = new Scanner(System.in);
        final int count = scanner.nextInt();
        if(count == 1){
            System.out.println(1);
            return;
        }
        final long[][] table = new long[count][2];

        for (int i = 0; i < count; i++) {
            table[i][0] = scanner.nextLong();
            table[i][1] = scanner.nextLong();
        }

        List<Len> lens = new ArrayList<>();
        List<MyInteger> counts = new ArrayList<>();

        for (int i = 0; i < count; i++) {
            for (int j = i + 1; j < count; j++) {
                if (table[i][0] > table[j][0]) {
                    extracted(table, lens, counts, j, i);
                } else {
                    extracted(table, lens, counts, i, j);
                }
            }
        }
        Collections.sort(counts);
        System.out.println(count - counts.get(0).getInteger());
    }

    private void extracted(final long[][] table, final List<Len> lens, final List<MyInteger> counts, final int i, final int j) {
        final Len len = new Len(table[j][0] - table[i][0], table[j][1] - table[i][1]);
        int index;
        if ((index = lens.indexOf(len)) != -1) {
            counts.get(index).increment();
        } else {
            lens.add(len);
            counts.add(new MyInteger());
        }
    }

    class MyInteger implements Comparable {
        private int integer = 1;

        void increment() {
            this.integer++;
        }

        public int getInteger() {
            return integer;
        }

        @Override
        public int compareTo(final Object o) {
            return ((MyInteger) o).getInteger() - this.integer;
        }
    }

    class Len {
        private final long x;
        private final long y;

        Len(final long x, final long y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public boolean equals(final Object obj) {
            return ((Len) obj).getX() == this.getX() && ((Len) obj).getY() == this.getY();
        }

        public long getX() {
            return x;
        }

        long getY() {
            return y;
        }
    }
}


Compiler output:
Main.java:7: error: class aMain is public, should be declared in a file named aMain.java
public class aMain {
       ^
Main.java:9: error: cannot access Main
        new Main().run();
            ^
  bad source file: ./Main.java
    file does not contain class Main
    Please remove or make sure it appears in the correct subdirectory of the sourcepath.
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
Language: C++

#include<iostream>
#include<vector>
using namespace std;

int main(){
  int n;
  	cin >> n;
  	vector<int> x(n);
  	vector<int> y(n);
  	for(int i=0;i<n;i++){
      cin >> x[i] >> y[i];
    }
  	int p,q;
  	int cost=1;
  	vector<int> c;
  for(int i=0;i<n-1;i++){
    p=x[i+1]-x[i];
    q=y[i+1]-y[i];
    for(int j=0;j<n-1;j++){
      if( p!=(x[j+1]-x[j]) && q!=(y[j+1]-y[j]) ){
        cost++;
      }
    }
    	c.bush_back(cost);
  }
  int m=c[0];
  	for(size_t i=0;i<c.size();i++){
      m=min(m,c[i]);
    }
  
  cout << m << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:11: error: 'class std::vector<int>' has no member named 'bush_back'; did you mean 'push_back'?
   24 |         c.bush_back(cost);
      |           ^~~~~~~~~
      |           push_back
Language: C++

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

int main(){
  int n;
  	cin >> n;
  	vector<int> x(n);
  	vector<int> y(n);
  	for(int i=0;i<n;i++){
      cin >> x[i] >> y[i];
    }
  	int p,q;
  	int cost=1;
  	vector<int> c;
  for(int i=0;i<n-1;i++){
    p=x[i+1]-x[i];
    q=y[i+1]-y[i];
    for(int j=0;j<n-1;j++){
      if( p!=(x[j+1]-x[j]) && q!=(y[j+1]-y[j]) ){
        cost++;
      }
    }
    	c.bush_back(cost);
  }
  int m=c[0];
  	for(size_t i=0;i<c.size();i++){
      m=min(m,c[i]);
    }
  
  cout << m << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:11: error: 'class std::vector<int>' has no member named 'bush_back'; did you mean 'push_back'?
   24 |         c.bush_back(cost);
      |           ^~~~~~~~~
      |           push_back
Language: C++

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

int main(){
  int n;
  	cin >> n;
  	vector<int> x(n);
  	vector<int> y(n);
  	for(int i=0;i<n;i++){
      cin >> x[i] >> y[i];
    }
  	int p,q;
  	int cost=1;
  	vector<int> c;
  for(int i=0;i<n-1;i++){
    p=x[i+1]-x[i];
    q=y[i+1]-y[i];
    for(int j=0;j<n-1;j++){
      if( p!=(x[j+1]-x[j]) && q!=(y[j+1]-y[j]) ){
        cost++;
      }
    }
    	c.bush_back(cost);
  }
  int m=c[0];
  	for(size_t i=0;i<c.size();i++){
      m=min(m,c[i]);
    }
  
  cout << m << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:11: error: 'class std::vector<int>' has no member named 'bush_back'; did you mean 'push_back'?
   23 |         c.bush_back(cost);
      |           ^~~~~~~~~
      |           push_back