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

#include <bits/stdc++.h>

using namespace std;
#define BUF (105)
#define ll long long 
#define INF  1000
int n;

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

P red[BUF];
P blue[BUF];
int cnt_r[BUF];
int cnt_b[BUF];

int A[BUF][BUF];

int main(void){
	cin >> n;

	for(int i=1;i<=n;i++){
		int a,b;
		cin >> a>> b;
		red[i] = {a,b};	
	}

	for(int i=1;i<=n;i++){
		int a,b;
		cin >> a>> b;
		blue[i] = {a,b};	
	}
	int f=1;	
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++){
			if(red[i].x < blue[j].x && red[i].y < blue[j].y){
				A[i][j]=1;
				cnt_r[i]++;
				cnt_b[j]++;
			}else{
				f=0;
			}
		}	
	}

	if(f==1){
		cout << b << endl;
		return 0;
	}

	int cnt;
/*
	int cnt = 0;
	for(int i=1;i<=n;i++){
		if(cnt_r[i]==1){
			for(int j=1;j<=n;j++){
				if(A[i][j]==1){
					cnt++;
					A[i][j]=0;
					cnt_r[i]=INF;
					cnt_b[j]=INF;
				}
			}
		}
	}
*/
/*
	for(int j=1;j<=n;j++){
		if(cnt_b[j]==1){
			for(int i=1;i<=n;i++){
				if(A[i][j]==1){
					cnt++;
					A[i][j]=0;
					cnt_r[i]=INF;
					cnt_b[j]=INF;
				}
			}
		}
	}
*/

	for (int k = 0; k < n; k++)
	{
		int mn = INF;
		P mnp ;
		for (int i = 1; i <= n; i++)
		{
			for (int j = 1; j <= n; j++)
			{
				if(A[i][j]==1 && mn>cnt_r[i]+cnt_b[j]){
					mn=cnt_r[i]+cnt_b[j];
					mnp = {i,j};
				}	
			}
		}
		if(mn<INF){
			cnt++;
			cnt_r[mnp.x]=INF;
			cnt_b[mnp.y]=INF;
			A[mnp.x][mnp.y]=0;
		}else{
			break;
		}

	}

	cout << cnt << endl;

	return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
const int N = 205;
typedef long long ll;
struct node
{
    int a;
    int b;
    int c;
} p[N],q[N];
int flag[N];
bool cmp2(node x,node y)//小顺序
{
    if(x.c!=y.c)
        return x.c<y.c
    else if(x.a!=y.a)
        return x.a<y.a;
    else
        return x.b<y.b;
}
bool cmp1(node x,node y) //大顺序
{
    if(x.c!=y.c)
        return x.c>y.c;
    else if(x.a!=y.a)
        return x.a>y.a;
    else
        return x.b>y.b;
}

int main()
{
    int n;
    cin>>n;
    for(int i=1; i<=n; i++){
        scanf("%d%d",&p[i].a,&p[i].b);
        p[i].c=abs(p[i].a-p[i].b);    
         }
    for(int i=1; i<=n; i++){
        scanf("%d%d",&q[i].a,&q[i].b);
        q[i].c=abs(q[i].a-q[i].b);
  }
    memset(flag,0,sizeof(flag));
    sort(p+1,p+n+1,cmp1);
    sort(q+1,q+n+1,cmp2);
    int cnt=0;
    for(int j=1; j<=n; j++)
    {
        int pos=-1,sum=100000;
        for(int i=1; i<=n; i++)
        {

            if(!flag[i])
            {
                int mid=100000;
                if((p[i].a<q[j].a)&&(p[i].b<q[j].b))
                {
                    // printf("%d %d   %d  %d\n",p[i].a,p[i].b,q[j].a,q[j].b);

                    mid=(q[j].a-p[i].a)+(q[j].b-p[i].b);
                }

                if(mid<=sum&&mid!=100000)
                {
                    pos=i;
                    sum=mid;
                }
            }
        }
        if(pos!=-1)
        {
            flag[pos]=1;
            cnt++;
        }
    }
    cout<<cnt<<endl;
    return 0;
}





Compiler output:
a.cc: In function 'bool cmp2(node, node)':
a.cc:15:23: error: expected ';' before 'else'
   15 |         return x.c<y.c
      |                       ^
      |                       ;
   16 |     else if(x.a!=y.a)
      |     ~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;
#define BUF (105)
#define ll long long 
#define INF  1000
int n;

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

P red[BUF];
P blue[BUF];
int cnt_r[BUF];
int cnt_b[BUF];

int A[BUF][BUF];

int main(void){
	cin >> n;

	for(int i=1;i<=n;i++){
		int a,b;
		cin >> a>> b;
		red[i] = {a,b};	
	}

	for(int i=1;i<=n;i++){
		int a,b;
		cin >> a>> b;
		blue[i] = {a,b};	
	}
	
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++){
			if(red[i].x < blue[j].x && red[i].y < blue[j].y){
				A[i][j]=1;
				cnt_r[i]++;
				cnt_b[j]++;
			}
		}	
	}

/*
	int cnt = 0;
	for(int i=1;i<=n;i++){
		if(cnt_r[i]==1){
			for(int j=1;j<=n;j++){
				if(A[i][j]==1){
					cnt++;
					A[i][j]=0;
					cnt_r[i]=INF;
					cnt_b[j]=INF;
				}
			}
		}
	}
*/
/*
	for(int j=1;j<=n;j++){
		if(cnt_b[j]==1){
			for(int i=1;i<=n;i++){
				if(A[i][j]==1){
					cnt++;
					A[i][j]=0;
					cnt_r[i]=INF;
					cnt_b[j]=INF;
				}
			}
		}
	}
*/

	for (int k = 0; k < n; k++)
	{
		int mn = INF;
		P mnp ;
		for (int i = 1; i <= n; i++)
		{
			for (int j = 1; j <= n; j++)
			{
				if(A[i][j]==1 && mn>cnt_r[i]+cnt_b[j]){
					mn=cnt_r[i]+cnt_b[j];
					mnp = {i,j};
				}	
			}
		}
		if(mn<INF){
			cnt++;
			cnt_r[mnp.x]=INF;
			cnt_b[mnp.y]=INF;
			A[mnp.x][mnp.y]=0;
		}else{
			break;
		}

	}

	cout << cnt << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:90:25: error: 'cnt' was not declared in this scope; did you mean 'int'?
   90 |                         cnt++;
      |                         ^~~
      |                         int
a.cc:100:17: error: 'cnt' was not declared in this scope; did you mean 'int'?
  100 |         cout << cnt << endl;
      |                 ^~~
      |                 int
Language: C++

#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<vector>

using namespace std;

#define MAX_V 100*2

int V;
vector<int> G[MAX_V];
int match[MAX_V];
bool used[MAX_V];

void add_edge(int u, int v){
  G[u].push_back(v);
  G[v].push_back(u);
}

bool dfs(int v) {
  used[v] = true;
  for (int i = 0; i<G[v].size();i++){
    int u = G[v][i], w = match[u];
    if ( w < 0 || !used[w] && dfs(w)){
      match[v]=u;
      match[u]=v;
      return true;
    }
  }
  return false;
}

int bipartite_matching(){
  int res = 0;
  memset(match, -1, sizeof(match));
  for (int v = 0;v<V;v++){
    if(match[v]<0){
      memset(used,0,sizeof(used));
      if(dfs(v)){
	res++;
      }
    }
  }
  return res;
}

struct Point{
  int x,y;
};

bool goodPair(const Point &r,const Point &b){
  if((r.x<b.x)&&(r.y<b.y))
    return true;
  return false;
}

int main(){
  int N;
  cin>>N;
  vector<Point> reds(N);
  vector<Point> blues(N);

  for(int i=0;i<N;i++){
    Point &r=reds[i];
    cin>>r.x>>r.y;
  }

  for(int i=0;i<N;i++){
    Point &b=blues[i];
    cin>>b.x>>b.y;
  }

  for(int i=0;i<N;i++){
    for(int j=0;j<N;j++){
      if(goodPair(reds[i],blues[j]))
	add_edge(i,N+j);
    }
  }
  
  V=2*N;
  int result = bipartite_matching();
  cout << result <<endl;

  return 0;
}


Compiler output:
a.cc: In function 'int bipartite_matching()':
a.cc:35:3: error: 'memset' was not declared in this scope
   35 |   memset(match, -1, sizeof(match));
      |   ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include<vector>
  +++ |+#include <cstring>
    5 |
Language: C++

#include<iostream>
#include<iomanip>
#include<math.h>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<string>
#include<bitset>
#include<random>
#include<time.h>
#define INF 1000000000ll
#define MOD 1000000007ll
#define EPS 1e-10
#define REP(i,m) for(long long i=0; i<m; i++)
#define FOR(i,n,m) for(long long i=n; i<m; i++)
#define DUMP(a) for(long long dump=0; dump<(ll)a.size(); dump++) { cout<<a[dump]; if(dump!=(ll)a.size()-1) cout<<" "; else cout<<endl; }
#define ALL(v) v.begin(),v.end()
#define pb push_back
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef long double ld;



struct edge { int to, cap, rev; };
vector<edge> G[300];
bool used[300];

void add_edge(int from, int to, int cap) {
	G[from].push_back((edge){to, cap, int(G[to].size())});
	G[to].push_back((edge){from, 0, int(G[from].size()-1)});
}

int dfs(int v, int t, int f) {
	if(v == t) return f;
	used[v] = 1;
	for(int i = 0 ; i < G[v].size(); i++){
		edge &e = G[v][i];
		if(used[e.to] or e.cap <= 0) continue;
		int d = dfs(e.to, t, min(f, e.cap));
		if(d > 0){
			e.cap -= d;
			G[e.to][e.rev].cap += d;
			return d;
		}
	}
	return 0;
}

int ford_fulkerson(int s, int t) {
	int flow = 0, f;
	while(1){
		memset(used, 0, sizeof(used));
		f = dfs(s, t, INF);
		if(f == 0) return flow;
		flow += f;
	}
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	ll n;
	cin>>n;
	vector<P> a(n);
	vector<P> b(n);
	REP(i,n) cin>>a[i].first>>a[i].second;
	REP(i,n) cin>>b[i].first>>b[i].second;
	REP(i,n) add_edge(0,1+i,1);
	REP(i,n) add_edge(2*n-i,2*n+1,1);
	REP(i,n) {
		REP(j,n) {
			if(a[i].first<b[j].first&&a[i].second<b[j].second) {
				add_edge(1+i,2*n-j,1);
			}
		}
	}
	cout<<ford_fulkerson(0,2*n+1)<<endl;
}


Compiler output:
a.cc: In function 'int ford_fulkerson(int, int)':
a.cc:57:17: error: 'memset' was not declared in this scope
   57 |                 memset(used, 0, sizeof(used));
      |                 ^~~~~~
a.cc:13:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   12 | #include<random>
  +++ |+#include <cstring>
   13 | #include<time.h>
Language: C++

#include<iostream>
#include<vector>

using namespace std;

#define MAX_V 100*2

int V;
vector<int> G[MAX_V];
int match[MAX_V];
bool used[MAX_V];

void add_edge(int u, int v){
  G[u].push_back(v);
  G[v].push_back(u);
}

bool dfs(int v) {
  used[v] = true;
  for (int i = 0; i<G[v].size();i++){
    int u = G[v][i], w = match[u];
    if ( w < 0 || !used[w] && dfs(w)){
      match[v]=u;
      match[u]=v;
      return true;
    }
  }
  return false;
}

int bipartite_matching(){
  int res = 0;
  memset(match, -1, sizeof(match));
  for (int v = 0;v<V;v++){
    if(match[v]<0){
      memset(used,0,sizeof(used));
      if(dfs(v)){
	res++;
      }
    }
  }
  return res;
}

struct Point{
  int x,y;
};

bool goodPair(const Point &r,const Point &b){
  if((r.x<b.x)&&(r.y<b.y))
    return true;
  return false;
}

int main(){
  int N;
  cin>>N;
  vector<Point> reds(N);
  vector<Point> blues(N);

  for(int i=0;i<N;i++){
    Point &r=reds[i];
    cin>>r.x>>r.y;
  }

  for(int i=0;i<N;i++){
    Point &b=blues[i];
    cin>>b.x>>b.y;
  }

  for(int i=0;i<N;i++){
    for(int j=0;j<N;j++){
      if(goodPair(reds[i],blues[j]))
	add_edge(i,N+j);
    }
  }
  
  V=2*N;
  int result = bipartite_matching();
  cout << result <<endl;

  return 0;
}


Compiler output:
a.cc: In function 'int bipartite_matching()':
a.cc:33:3: error: 'memset' was not declared in this scope
   33 |   memset(match, -1, sizeof(match));
      |   ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<vector>
  +++ |+#include <cstring>
    3 |
Language: C++

#include <cstdio>
#include <algorithm>
#include <cstring>

using namespace std;
typedef long long lli;
const lli inf = -1e15;
int nx[1000][2],n;
lli cache[1000][2],arr[1001];

lli DP(int idx,int f) {
	lli &ret=cache[idx][f];
	if(ret != -inf) return ret;

	lli val;
	ret=arr[idx];

	lli mx = 0;
	int ni = -1;
	for(int i=idx+2;i<n;i+=2) {
		val = DP(i,1);
		if(val > mx) {
			mx=val;
			ni = i;
		}
	}
	if(mx > 0) {
		ret += mx;
		nx[idx][f]=ni;
	}

	if(idx < n-1 && !f) {
		val = DP(idx+1, 0);
		if(val > ret) {
			ret=val;
			nx[idx][f]=idx+1;
		}
	}
	return ret;
}
vector<int> ans;
void trace(int idx,int f) {
	if(nx[idx][f] == -1) {
		for(int t=n-idx;t>=2;t--) ans.push_back(t);
		return;
	}
	if(nx[idx][f] == idx+1) {
		ans.push_back(1);
		trace(idx+1,0);
	}
	else {
		for(int l=(nx[idx][f]-idx)/2;l;l--) ans.push_back(l+1);
		trace(nx[idx][f],1);
	}
}

int main() {
	scanf("%d",&n);
	for(int i=0;i<n;i++) scanf("%lld",arr+i);
	for(int i=0;i<n;i++) cache[i][0]=cache[i][1] = -inf,nx[i][0]=nx[i][1]=-1;
	printf("%lld\n",DP(0,0));
	trace(0,0);
	printf("%d\n",ans.size());
	for(auto &it:ans) printf("%d\n",it);

	return 0;
}


Compiler output:
a.cc:41:1: error: 'vector' does not name a type
   41 | vector<int> ans;
      | ^~~~~~
a.cc: In function 'void trace(int, int)':
a.cc:44:43: error: 'ans' was not declared in this scope; did you mean 'abs'?
   44 |                 for(int t=n-idx;t>=2;t--) ans.push_back(t);
      |                                           ^~~
      |                                           abs
a.cc:48:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   48 |                 ans.push_back(1);
      |                 ^~~
      |                 abs
a.cc:52:53: error: 'ans' was not declared in this scope; did you mean 'abs'?
   52 |                 for(int l=(nx[idx][f]-idx)/2;l;l--) ans.push_back(l+1);
      |                                                     ^~~
      |                                                     abs
a.cc: In function 'int main()':
a.cc:63:23: error: 'ans' was not declared in this scope; did you mean 'abs'?
   63 |         printf("%d\n",ans.size());
      |                       ^~~
      |                       abs
Language: C++

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

struct RPOINT{
    int x;
    int y;
    bool chosen;
};
struct GPOINT{
    int x;
    int y;
    int d;
};

int main(){
  int N, nearj, dis;
  int count = 0;
  cin >> N;
  RPOINT reds[N];
  for (int i = 0; i < N; i++){
    cin >> reds[i].x >> reds[i].y;
    reds[i].chosen = false;
  }
  GPOINT greens[N];
  for (int i = 0; i < N; i++){
    cin >> greens[i].x >> greens[i].y;
    greens[i].d = greens[i].x * greens[i].y;
  }
  sort(greens, greens + N, [](const GPOINT &x, const GPOINT &y) { return x.d < y.d; });
  for (int i = 0; i < N; i++){
    dis = 1e5;
    nearj = -1;
    for (int j = 0; j < N; j++){
      if(greens[i].x > reds[j].x && greens[i].y > reds[j].y && reds[j].chosen == false){
        int di = pow((greens[i].x - reds[j].x), 2.0) + pow((greens[i].y - reds[j].y), 2.0);
        if (dis > di){
          dis = di;
          nearj = j;
        }
      }
    }
    if(nearj != -1){
      reds[nearj].chosen = true;
      count++;
    }
  }
  cout << count << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   30 |   sort(greens, greens + N, [](const GPOINT &x, const GPOINT &y) { return x.d < y.d; });
      |   ^~~~
      |   sqrt
Language: C++

/**********************************************************************/
/********                                                      ********/
/********                     Writer:孙~~                      ********/
/********                       Lang:C++                       ********/
/********                     Status:Unknow                    ********/
/********                                                      ********/
/**********************************************************************/
#include <iostream>
#include <string>
#include <cstdio>
#include <vector>
#include <queue>
#include <list>
#include <cstdlib>
#include <algorithm>
#include <set>
#include <map>
#include <deque>
#include <cstring>
#include <cmath>
//#include<bits/stdc++.h>
using namespace std;

const int INF=0x3f3f3f3f;
const int SIZE=105;

int deg[SIZE];
int n,xa[SIZE],ya[SIZE],xb[SIZE],yb[SIZE];
vector<int> path[SIZE];
bool choose[SIZE];

int main(){
	scanf("%d",&n);
	for(int i=0;i<n;i++) scanf("%d%d",xa+i,ya+i);
	for(int i=0;i<n;i++) scanf("%d%d",xb+i,yb+i);
	int ans=0;
	for(int i=0;i<n;i++){
		for(int j=0;j<n;j++){
			if(xa[i]<xb[j] && ya[i]<yb[j]){
				path[i].push_back(j);
				ans++;
				deg[j]++;
			}
		}
	}
	for(int i=0;i<n;i++){
		int MIN=INF;
		int p=-1;
		for(int j=0;j<path[i].size();j++){
			int tmp=path[i][j];
			if(choose[tmp]) continue;
			if(MIN=>deg[tmp]){
				p=tmp;
				MIN=deg[tmp];
			}
		}
		if(p==-1){
			ans-=path[i].size();
			continue;
		}
		choose[p]=true;
		ans-=path[i].size()-1;
	}
	printf("%d\n",ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:32: error: expected primary-expression before '>' token
   52 |                         if(MIN=>deg[tmp]){
      |                                ^
Language: Java

20
1 1
2 2
3 3
10 10
11 11
12 12
13 13
14 14
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
13 13
14 14
15 15
16 16
17 17
18 18
19 19
20 20

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
20
^
1 error
Language: C++

#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cstdlib>
std::vector<int> G[10000]={};
int match[10000]={};
bool used[10000]={};
void add_edge(int u,int v){
	G[u].push_back(v);
	G[v].push_back(u);
}
bool dfs(int v){
	used[v]=true;
	for(int i=0;i<G[v].size();i++){
		int u=G[v][i];
		int w=match[u];
		if(w<0 || !used[w] && dfs(w)){
			match[v]=u;
			match[u]=v;
			return true;
		}
	}
	return false;
}

int bipartite_matching(){
	int res=0;
	memset(match,-1,sizeof(match));
	for(int v=0;v<10000;v++){
		if(match[v]<0){
			memset(used,0,sizeof(used));
			if(dfs(v)){
				res++;
			}
		}
	}
	return res;
}
int main(){
	int n;
	scanf("%d",&n);
	int a[n]={};
	int b[n]={};
	int c[n]={};
	int d[n]={};
	for(int i=0;i<n;i++){
		scanf("%d %d",&a[i],&b[i]);
	}
	for(int i=0;i<n;i++){
		scanf("%d %d",&c[i],&d[i]);
	}
	for(int i=0;i<n;i++){
		for(int j=0;j<n;j++){
			if(a[i]<c[j]&&b[i]<d[j]){
				add_edge(i,n+j);
			}
		}
	}
	printf("%d\n",bipartite_matching());
	return 0;
}


Compiler output:
a.cc:5:6: error: 'vector' in namespace 'std' does not name a template type
    5 | std::vector<int> G[10000]={};
      |      ^~~~~~
a.cc:5:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    4 | #include<cstdlib>
  +++ |+#include <vector>
    5 | std::vector<int> G[10000]={};
a.cc: In function 'void add_edge(int, int)':
a.cc:9:9: error: 'G' was not declared in this scope
    9 |         G[u].push_back(v);
      |         ^
a.cc: In function 'bool dfs(int)':
a.cc:14:23: error: 'G' was not declared in this scope
   14 |         for(int i=0;i<G[v].size();i++){
      |                       ^
Language: Java

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

public class Main {
	private static class Pair {
		int first;
		int second;

		Pair(int first, int second) {
			this.first = first;
			this.second = second;
		}
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		Pair[] redPoints = new Pair[n];
		for(int i = 0; i < n; ++i) {
			redPoints[i] = new Pair(sc.nextInt(), sc.nextInt());
		}

		Pair[] bluePoints = new Pair[n];
		for(int i = 0; i < n; ++i) {
			bluePoints[i] = new Pair(sc.nextInt(), sc.nextInt());
		}

		Arrays.sort(redPoints, new Comparator<Pair>() {
			@Override
			public int compare(Pair p, Pair q) {
				if(p.first != q.first) return q.first - p.first;
				else return q.second - p.second;
			}
		});

		Arrays.sort(bluePoints, new Comparator<Pair>() {
			@Override
			public int compare(Pair p, Pair q) {
				if(p.first != q.first) return q.first - p.first;
				else return q.second - p.second;
			}
		});

		int ans = 0;
		boolean[] used = new boolean[n];
		for(int i = 0; i < n; ++i) {
			for(int j = 0; j < n; ++j) {
				if(!used[j] && redPoints[i].first < bluePoints[j].first &&
					redPoints[i].second < bluePoints[j].second) {
					ans++;
					used[j] = true;
					break;
				}
			}
		}

		Arrays.sort(redPoints, new Comparator<Pair>() {
			@Override
			public int compare(Pair p, Pair q) {
				if(p.first != q.first) return p.first - q.first;
				else return p.second - q.second;
			}
		});

		Arrays.sort(bluePoints, new Comparator<Pair>() {
			@Override
			public int compare(Pair p, Pair q) {
				if(p.first != q.first) return p.first - q.first;
				else return p.second - q.second;
			}
		});

		int ans2 = 0;
		boolean[] used = new boolean[n];
		for(int i = 0; i < n; ++i) {
			for(int j = 0; j < n; ++j) {
				if(!used[j] && redPoints[i].first < bluePoints[j].first &&
					redPoints[i].second < bluePoints[j].second) {
					ans2++;
					used[j] = true;
					break;
				}
			}
		}

		System.out.println(Math.max(ans, ans2));
	}
}

Compiler output:
Main.java:76: error: variable used is already defined in method main(String[])
		boolean[] used = new boolean[n];
		          ^
1 error
Language: C++

#include <algorithm>
#include <cmath>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
const int INT_INF = 500000000;
const long long LONG_LONG_INF = (long long)pow(10, 18);
const int MOD = pow(10, 9) + 7;
/* contest template */
int N, ans;
int a[100], b[100], c[100], d[100];
vector<vector<int> > v(101, vector<int>(201));

int main() {
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> a[i] >> b[i];
  }

  for (int i = 0; i < N; i++) {
    cin >> c[i] >> d[i];
  }
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < N; j++) {
      if (a[i] < c[j] && b[i] < d[j]) {
        v[j][2N]++;
        v[j][i] = 1;
      }
    }
  }
  while (true) {
    int ite = N;
    for (int i = 0; i < N; i++) {
      if (v[i][2N] > 0) {
        if (ite == N) {
          ite = i;
        } else {
          if (v[ite][N] > v[i][N]) {
            ite = i;
          }
        }
      }
    }
    if (ite == N) {
      break;
    }
    int i = 0;
    while (v[ite][i] == 1) {
      i++;
    }
    ans++;
    for (int j = 0; j < N; j++) {
      if (v[j][i] == 1) {
        v[j][i] = 0;
        v[j][2N]--;
      }
    }
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:14: error: unable to find numeric literal operator 'operator""N'
   32 |         v[j][2N]++;
      |              ^~
a.cc:40:16: error: unable to find numeric literal operator 'operator""N'
   40 |       if (v[i][2N] > 0) {
      |                ^~
a.cc:61:14: error: unable to find numeric literal operator 'operator""N'
   61 |         v[j][2N]--;
      |              ^~
Language: C++

#include <algorithm>
#include <iostream>

using namespace std;

const int MAXN1 = 150;
const int MAXN2 = 150;
const int MAXM = 150;

int n1, n2, edges, last[MAXN1], _prev[MAXM], head[MAXM];
int matching[MAXN2], dist[MAXN1], Q[MAXN1];
bool used[MAXN1], vis[MAXN1];
vector<pair<int, int >>red, blue;
int n;
void init(int _n1, int _n2) {
    n1 = _n1;
    n2 = _n2;
    edges = 0;
    fill(last, last + n1, -1);
}

void addEdge(int u, int v) {
    head[edges] = v;
    _prev[edges] = last[u];
    last[u] = edges++;
}

void bfs() {
    fill(dist, dist + n1, -1);
    int sizeQ = 0;
    for (int u = 0; u < n1; ++u) {
        if (!used[u]) {
            Q[sizeQ++] = u;
            dist[u] = 0;
        }
    }
    for (int i = 0; i < sizeQ; i++) {
        int u1 = Q[i];
        for (int e = last[u1]; e >= 0; e = _prev[e]) {
            int u2 = matching[head[e]];
            if (u2 >= 0 && dist[u2] < 0) {
                dist[u2] = dist[u1] + 1;
                Q[sizeQ++] = u2;
            }
        }
    }
}

bool dfs(int u1) {
    vis[u1] = true;
    for (int e = last[u1]; e >= 0; e = _prev[e]) {
        int v = head[e];
        int u2 = matching[v];
        if (u2 < 0 || !vis[u2] && dist[u2] == dist[u1] + 1 && dfs(u2)) {
            matching[v] = u1;
            used[u1] = true;
            return true;
        }
    }
    return false;
}

int maxMatching() {
    fill(used, used + n1, false);
    fill(matching, matching + n2, -1);
    for (int res = 0;;) {
        bfs();
        fill(vis, vis + n1, false);
        int f = 0;
        for (int u = 0; u < n1; ++u)
            if (!used[u] && dfs(u))
                ++f;
        if (!f)
            return res;
        res += f;
    }
}

int main() {
    init(149, 149);
    cin>>n;
    for(int i=0;i<n;i++){
	    int a,b;cin>>a>>b;red.push_back({a,b});
    }
    for(int i=0;i<n;i++){
	    int a, b;cin>>a>>b;blue.push_back({a,b});
    }
    for( int i = 0;i<n;i++)
	    for(int j = 0;j<n;j++)
		    if(blue[i].first > red[j].first && blue[i].second > red[j].second)
			    addEdge(i, j);
    cout <<  maxMatching() << endl;
}


Compiler output:
a.cc:13:1: error: 'vector' does not name a type
   13 | vector<pair<int, int >>red, blue;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:83:31: error: 'red' was not declared in this scope
   83 |             int a,b;cin>>a>>b;red.push_back({a,b});
      |                               ^~~
a.cc:86:32: error: 'blue' was not declared in this scope
   86 |             int a, b;cin>>a>>b;blue.push_back({a,b});
      |                                ^~~~
a.cc:90:24: error: 'blue' was not declared in this scope
   90 |                     if(blue[i].first > red[j].first && blue[i].second > red[j].second)
      |                        ^~~~
a.cc:90:40: error: 'red' was not declared in this scope
   90 |                     if(blue[i].first > red[j].first && blue[i].second > red[j].second)
      |                                        ^~~
Language: C++

#include<bits/stdc++.h>
using namespac estd;
int n,ans,w[105][105],p[105],a[105],b[105],c[105],d[105],vis[105];
int hungary(int u){
	for(int v=0;v<n;v++){
		if(!w[u][v]||vis[v])continue;
		vis[v]=1;
		if(p[v]==-1||hungary(p[v])){
			p[v]=u;return 1;
		}
	}
	return 0;
}
int main(){cin>>n;
	for(int i=0;i<n;i++)cin>>a[i]>>b[i];
	for(int i=0;i<n;i++)cin>>c[i]>>d[i];
	for(int i=0;i<n;i++){
		for(int j=0;j<n;j++){
			if(a[i]<c[j]&&b[i]<d[j])w[i][j]=1;
		}
	}
	memset(p,-1,sizeof(p));
	for(int i=0;i<n;i++){memset(vis,0,sizeof(vis));ans+=hungary(i);}
	cout<<ans;
}


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespac'
    2 | using namespac estd;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:14:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   14 | int main(){cin>>n;
      |            ^~~
      |            std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:24:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   24 |         cout<<ans;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

// C.

#include <iostream>
#include <sstream>
#include <algorithm>
#include <vector>

using namespace std;

typedef pair<int, int> II;

// From The Programming Contest Challendge Book
vector<int> G[2000];
int match[2000];
bool used[2000];

void add_edge(int u, int v) {
	G[u].push_back(v);
	G[v].push_back(u);
}

bool dfs(int v) {
	used[v] = true;
	int i;
	for (i = 0; i < (int)G[v].size(); ++i) {
		int u = G[v][i];
		int w = match[u];
		if (w < 0 || !used[w] && dfs(w)) {
			match[v] = u;
			match[u] = v;
			return true;
		}
	}
	return false;
}

int main(int argc, char *argv[]) {
	int n;
	vector<II> red, blue;
	cin >> n;
	for (int i = 0; i < n; ++i) {
		int a, b;
		cin >> a >> b;
		red.push_back(II(a, b));
	}
	for (int i = 0; i < n; ++i) {
		int a, b;
		cin >> a >> b;
		blue.push_back(II(a, b));
	}
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < n; ++j) {
			if (red[i].first < blue[j].first && red[i].second < blue[j].second) {
				add_edge(i, j + n);
			}
		}
	}

	fill(match, match + 2 * n, -1);
	int ans = 0;
	for (int v = 0; v < n; ++v) {
		if (match[v] < 0) {
			memset(used, 0, sizeof(used));
			if (dfs(v)) {
				++ans;
			}
		}
	}
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:63:25: error: 'memset' was not declared in this scope
   63 |                         memset(used, 0, sizeof(used));
      |                         ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include <vector>
  +++ |+#include <cstring>
    7 |
Language: C++

#include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<string>
#include<functional>
#include<queue>
#include<stack>
#include<math.h>
#define INF 1000000001
#define EPS 1.0e-6
#define MAX_V 1000

using namespace std;

typedef long long ll;


int n;

int akax[150];
int akay[150];
int aox[150];
int aoy[150];

//グラフをつくる
/*loop
s-t pathをさがす　なければ終了
あったらそれに沿って流す
グラフを更新
*/

struct edge {
	int to, cap, rev;
};

vector<edge> G[MAX_V];
bool used[MAX_V];

void add_edge(int from, int to, int cap)
{
	G[from].push_back(edge{ to,cap,(int)G[to].size() });
	G[to].push_back(edge{ from, 0, (int)G[from].size() - 1 });
}

int dfs(int v, int t, int f)
{
	if (v == t)return f;
	used[v] = true;
	for (int i = 0; i < G[v].size(); i++) {
		edge &e = G[v][i];
		if (!used[e.to] && e.cap > 0) {
			int d = dfs(e.to, t, min(f, e.cap));
			if (d > 0) {
				e.cap -= d;
				G[e.to][e.rev].cap += d;
				return d;
			}
		}
	}
	return 0;
}

int max_flow(int s, int t)
{
	int flow = 0;
	for (;;) {
		memset(used, 0, sizeof(used));
		int f = dfs(s, t, INF);
		if (f == 0)return flow;
		flow += f;
	}
}

int main()
{
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> akax[i] >> akay[i];
	}
	for (int i = 0; i < n; i++) {
		cin >> aox[i] >> aoy[i];
	}
	
	for (int i = 0; i < n; i++) {
		add_edge(2 * n, i, 1);
	}

	for (int i = 0; i < n; i++) {
		add_edge(n + i, 2 * n + 1, 1);
	}
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			if (akax[i] < aox[j] && akay[i] < aoy[j]) {
				add_edge(i, n + j, 1);
			}
		}
	}

	cout << max_flow(2 * n, 2 * n + 1) << endl;



	return 0;
}

Compiler output:
a.cc: In function 'int max_flow(int, int)':
a.cc:70:17: error: 'memset' was not declared in this scope
   70 |                 memset(used, 0, sizeof(used));
      |                 ^~~~~~
a.cc:12:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   11 | #include<math.h>
  +++ |+#include <cstring>
   12 | #define INF 1000000001
Language: C++

#include<set>
#include<map>
#include<list>
#include<queue>
#include<stack>
#include<string>
#include<math.h>
#include<time.h>
#include<vector>
#include<bitset>
#include<memory>
#include<utility>
#include<fstream>
#include<stdio.h>
#include<sstream>
#include<iostream>
#include<stdlib.h>
#include<string.h>
#include<algorithm>
using namespace std;
int a[105],b[105];
int c[105],d[105];
struct edge
{
    int y;
    edge * next;
};
edge * new_edge()
{
    static edge a[100005];
    static int top=0;
    return &a[top++];
}
edge * li[105];
void insert_edge(int x,int y)
{
    edge * t=new_edge();
    t->y=y;
    t->next=li[x];
    li[x]=t;
}
int g[105][105];
int n;
int t[105];
bool vis[105];
bool dfs(int x,int y)
{
    if (vis[x]) return;
    vis[x]=true;
    int j;
    for (j=y;j<n;j++)
    {
        if (g[x][j])
        {
            if ((t[j]==-1)||(dfs(t[j],0)))
            {
                t[j]=x;
                return true;
            }
        }
    }
    return false;
}
int main()
{
    #ifdef absi2011
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif
    scanf("%d",&n);
    int i;
    for (i=0;i<n;i++)
    {
        scanf("%d%d",&a[i],&b[i]);
    }
    for (i=0;i<n;i++)
    {
        scanf("%d%d",&c[i],&d[i]);
    }
    for (i=0;i<n;i++)
    {
        int j;
        for (j=0;j<n;j++)
        {
            if ((a[i]<c[j])&&(b[i]<d[j]))
            {
                g[i][j]=true;
            }
        }
    }
    memset(t,-1,sizeof(t));
    int ans=0;
    for (i=0;i<n;i++)
    {
        memset(vis,0,sizeof(vis));
        ans+=dfs(i,0);
    }
    printf("%d\n",ans);
    return 0;
} 


Compiler output:
a.cc: In function 'bool dfs(int, int)':
a.cc:48:17: error: return-statement with no value, in function returning 'bool' [-fpermissive]
   48 |     if (vis[x]) return;
      |                 ^~~~~~
Language: C++

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

int V;
const int MAX_V = 1000;
vector<int> G[MAX_V];
int match[MAX_V];
bool used[MAX_V];

int red[MAX_V][2];
int blue[MAX_V][2];

void add_edge(int u, int v){
    G[u].push_back(v);
    G[v].push_back(u);
}

bool dfs(int v){
//    cout<<"\tdfs with "<<v<<endl;
    used[v] = true;
    for (int i = 0; i < G[v].size(); i++){
        int u = G[v][i], w = match[u];
//        cout<<"\tcheck with "<<u<<endl;
        if (w < 0 || !used[w] && dfs(w)){  //増加パスは当然同じ頂点を一度しか訪れないのでused[w]を除く。used[w]だと、例えばv=wのとき無限ループが起きる。
            match[v] = u;
            match[u] = v;
            return true;
        }
    }
    return false;
}

int bipartite_matching() {
    int res = 0;
    memset(match, -1, sizeof(match));
    for(int v = 0; v < V; v++){
        if(match[v] < 0){
            memset(used, 0, sizeof(used));
//            cout<<"START with "<<v<<endl;
            if (dfs(v)) {
                res++;
            }
        }
    }
    return res;
}

int main()
{
    int N;
    cin >> N;
    for (int i = 0; i < N; i++){
        cin >> red[i][0];
        cin >> red[i][1];
    }
    for (int i = 0; i < N; i++){
        cin >> blue[i][0];
        cin >> blue[i][1];
    }

    for (int i = 0; i < N; i++){
        for (int j = 0; j < N; j++){
            if (red[i][0] < blue[j][0] && red[i][1] < blue[j][1]){
                add_edge(i, N+j);
            }
        }
    }

    V = 2 * N;
    cout<<bipartite_matching()<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int bipartite_matching()':
a.cc:36:5: error: 'memset' was not declared in this scope
   36 |     memset(match, -1, sizeof(match));
      |     ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<vector>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

/*	author:  Kite_kuma
	created: 2020.09.09 11:36:34 */

#include <iostream>
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
struct iofast {
	iofast() {
		ios::sync_with_stdio(false);
		cin.tie(nullptr);
		cout << fixed << setprecision(15);
	}
} iofast_;
using namespace std;
int res;
int a[200000], b[200000];
int main() {
	int n;
	cin >> n;
	for(int i = 0; i < n; i++) cin >> a[i];
	for(int i = 0; i < n; i++) cin >> b[i];
	for(int i = 0; i < n; i++)
		for(int j = 0; j < n; j++) res ^= (a[i] + b[j]);
	cout << res << endl;
}

Compiler output:
a.cc: In constructor 'iofast::iofast()':
a.cc:10:17: error: 'ios' has not been declared
   10 |                 ios::sync_with_stdio(false);
      |                 ^~~
a.cc:11:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   11 |                 cin.tie(nullptr);
      |                 ^~~
      |                 std::cin
In file included from a.cc:4:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:12:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |                 cout << fixed << setprecision(15);
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:25: error: 'fixed' was not declared in this scope; did you mean 'std::fixed'?
   12 |                 cout << fixed << setprecision(15);
      |                         ^~~~~
      |                         std::fixed
In file included from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/bits/ios_base.h:1104:3: note: 'std::fixed' declared here
 1104 |   fixed(ios_base& __base)
      |   ^~~~~
a.cc:12:34: error: 'setprecision' was not declared in this scope
   12 |                 cout << fixed << setprecision(15);
      |                                  ^~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int,  int>;

const ll INF = 1LL << 60;
const int INF32 = 1 << 29;
const ll MOD = 1000000007;

int main() {
int N;
    cin >> N;
    a.resize(N); for (int i = 0; i < N; ++i) cin >> a[i];
    b.resize(N); for (int i = 0; i < N; ++i) cin >> b[i];
    int res = 0;
    for (int digit = 29; digit >= 0; --digit) {
        int bekihigh = 1<<(digit+1)
        int bekilow = 1<<digit;
        for (int i = 0; i < N; ++i) a[i] %= bekihigh, b[i] %= bekihigh;
        sort(b.begin(), b.end());
        long long num = 0;
        for (int i = 0; i < N; ++i) {
            int add = 0;
            if (bekilow - a[i] >= 0) {
                add += lower_bound(b.begin(), b.end(), bekihigh-a[i])
                        - lower_bound(b.begin(), b.end(), bekilow-a[i]);
            }
            else {
                add += lower_bound(b.begin(), b.end(), bekihigh-a[i]) - b.begin();
                add += lower_bound(b.begin(), b.end(), bekihigh)
                        - lower_bound(b.begin(), b.end(), bekihigh + bekilow - a[i]);
            }
            num += add;
        }
        if (num & 1) res += bekilow;
    }
    cout << res << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 'a' was not declared in this scope
   14 |     a.resize(N); for (int i = 0; i < N; ++i) cin >> a[i];
      |     ^
a.cc:15:5: error: 'b' was not declared in this scope
   15 |     b.resize(N); for (int i = 0; i < N; ++i) cin >> b[i];
      |     ^
a.cc:19:9: error: expected ',' or ';' before 'int'
   19 |         int bekilow = 1<<digit;
      |         ^~~
a.cc:25:17: error: 'bekilow' was not declared in this scope
   25 |             if (bekilow - a[i] >= 0) {
      |                 ^~~~~~~
a.cc:36:29: error: 'bekilow' was not declared in this scope
   36 |         if (num & 1) res += bekilow;
      |                             ^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int,  int>;

const ll INF = 1LL << 60;
const int INF32 = 1 << 29;
const ll MOD = 1000000007;

int main() {
    cin >> N;
    a.resize(N); for (int i = 0; i < N; ++i) cin >> a[i];
    b.resize(N); for (int i = 0; i < N; ++i) cin >> b[i];
    int res = 0;
    for (int digit = 29; digit >= 0; --digit) {
        int bekihigh = 1<<(digit+1)
        int bekilow = 1<<digit;
        for (int i = 0; i < N; ++i) a[i] %= bekihigh, b[i] %= bekihigh;
        sort(b.begin(), b.end());
        long long num = 0;
        for (int i = 0; i < N; ++i) {
            int add = 0;
            if (bekilow - a[i] >= 0) {
                add += lower_bound(b.begin(), b.end(), bekihigh-a[i])
                        - lower_bound(b.begin(), b.end(), bekilow-a[i]);
            }
            else {
                add += lower_bound(b.begin(), b.end(), bekihigh-a[i]) - b.begin();
                add += lower_bound(b.begin(), b.end(), bekihigh)
                        - lower_bound(b.begin(), b.end(), bekihigh + bekilow - a[i]);
            }
            num += add;
        }
        if (num & 1) res += bekilow;
    }
    cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: 'N' was not declared in this scope
   12 |     cin >> N;
      |            ^
a.cc:13:5: error: 'a' was not declared in this scope
   13 |     a.resize(N); for (int i = 0; i < N; ++i) cin >> a[i];
      |     ^
a.cc:14:5: error: 'b' was not declared in this scope
   14 |     b.resize(N); for (int i = 0; i < N; ++i) cin >> b[i];
      |     ^
a.cc:18:9: error: expected ',' or ';' before 'int'
   18 |         int bekilow = 1<<digit;
      |         ^~~
a.cc:24:17: error: 'bekilow' was not declared in this scope
   24 |             if (bekilow - a[i] >= 0) {
      |                 ^~~~~~~
a.cc:35:29: error: 'bekilow' was not declared in this scope
   35 |         if (num & 1) res += bekilow;
      |                             ^~~~~~~
Language: C++

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


using namespace std;
typedef long long li;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    li n;
    cin >> n;
    vector<li> xs(n), ys(n);
    for (int i = 0; i < n; ++i) {
        cin >> xs[i];
    }
    for (int i = 0; i < n; ++i) {
        cin >> ys[i];
    }

    li ans = 0;
    for (int b = 0; b < 28; ++b) {
        const li mask = (1LL << (b + 1)) - 1;
        vector<li> subxs(n), subys(n);
        for (int i = 0; i < n; ++i) {
            subxs[i] = xs[i] & mask;
            subys[i] = ys[i] & mask;
        }

        sort(subys.begin(), subys.end());
        const li unit = 1LL << b;
        li bits = 0;
        for (int xp = 0; xp < n; ++xp) {
            bits += (lower_bound(subys.begin(), subys.end(), 2 * unit - subxs[xp]) -
                    lower_bound(subys.begin(), subys.end(), 1 * unit - subxs[xp]));
            bits += (lower_bound(subys.begin(), subys.end(), 4 * unit - subxs[xp]) -
                    lower_bound(subys.begin(), subys.end(), 3 * unit - subxs[xp]));
        }
        ans += (bits & 1) * unit;
    }
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   31 |         sort(subys.begin(), subys.end());
      |         ^~~~
      |         short
Language: Java

import java.util.Scanner;
import java.util.Arrays;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		long[] a=new long[n];
		long[] b=new long[n];
		for(int i=0; i<n; i++){
			a[i]=sc.nextLong();
		}
		for(int i=0; i<n; i++){
			b[i]=sc.nextLong();
		}
		long[] fig=new long[29];
		for(int i=0; i<30; i++){
			long t=1<<i+1;
			long[] aa=new long[n];
			long[] bb=new long[n];
			for(int j=0; j<n; j++){
				aa[j]=a[j]%t;
				bb[j]=b[j]%t;
			}
			Arrays.sort(bb);
			for(int k=0; k<n; k++){
				int left=0;
				int right=n-1;
				if(t>>1-aa>=0){
					while(){
						int ty=(left+right)/2;
						if(b[ty]<(t>>1-aa)){
							left=ty;	
						}else{
							
						}
					}
				}else{
					
				}
			}
		}
	}
}


Compiler output:
Main.java:29: error: illegal start of expression
					while(){
					      ^
1 error
Language: C++

#include<iostream>
#include<sstream>
#include<fstream>
#include<cstring>
#include<vector>
#include<stack>
#include<map>
#include<set>
#include<queue>
#include<deque>
#include<bitset>
#include<utility>
#include<algorithm>
#include<functional>
#include<ctime>
#include<cmath>
#include<cstdlib>
#include<cstdio>
/*           __        __
	/ ___   /  \      /  \   ___ \
   / / _ \ /    \    /    \ / _ \ \
   | || ||                  || || |
   | ||_||    \         /   ||_|| |
   \ \___/     \_______/    \___/ /
    \                            /
*/
using namespace std;
map<int,int> mpa1,mpa,mpb;
int a[200200],b[200200];
vector<int> A,B;
long long ans=0;
long long spc1[2];
int main()
{
	int N;
	cin>>N;
	for(int i=0;i<N;i++)
		cin>>a[i],
		mpa[a[i]]++;
	for(int i=0;i<N;i++)
		cin>>b[i],
		mpb[b[i]]++;
	for(int i=0;i<N;i++)
	{
		if(mpa[a[i]]%2&&mpa[a[i]+1]%2)
			spc1[a[i]%2]++,
			mpa[a[i]]--,
			mpa[a[i]+1]--;
		if(mpa[a[i]]%2)
			A.push_back(a[i]),
			mpa[a[i]]--;
	}
	mpa1=mpa;
	for(int i=0;i<N;i++)
	{
		if(mpa1[b[i]]%2)
		{
			ans^=(b[i]*2);
			mpb[b[i]]--;
			continue;
		}
		if(mpb[b[i]]%2&&mpb[b[i]+1]%2)
			spc2[b[i]%2]++,
			mpb[b[i]]--,
			mpb[b[i]+1]--;
		if(mpb[b[i]]%2)
			B.push_back(b[i]),
			mpb[b[i]]--;
	}
	for(int i=0;i<2;i++)
		if(spc1[i]%2)
			for(int j=0;j<B.size();j++)
				ans^=(i+B[j]%2==1?3:1);
	for(int i=0;i<A.size();i++)
		for(int j=0;j<B.size();j++)
			ans^=(A[i]+B[j]);
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:63:25: error: 'spc2' was not declared in this scope; did you mean 'spc1'?
   63 |                         spc2[b[i]%2]++,
      |                         ^~~~
      |                         spc1
Language: C++

#include <stdio.h>
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <string>
#include <cstring>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <ctime>
#include <vector>
#include <fstream>
#include <list>
#include <iomanip>
#include <numeric>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define ms(s) memset(s, 0, sizeof(s))
const int INF = 1e9;
inline int read(){
	int X = 0,w = 0 ;
	char ch = 0;
	while(!isdigit(ch)) {w |= ch == '-';ch = getchar();}
	while(isdigit(ch)) X = (X<<3) + (X<<1) + (ch ^ 48),ch = getchar();
	return w ? -X : X;
}

vector<int>a(n), b(n);
int main()
{
	int n;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
	}
	for(int i=0;i<n;i++)
	{
		cin>>b[i];
	}
	vector<int> c,d;
	int ans=0;
	int pow_2=1;
	for(int i=0;i<=28;i++)
	{
		c=a;
		d=b;
		for(int j=0;j<n;j++)
		{
			c[j]%=2*pow_2;
			d[j]%=2*pow_2;
		}
		sort(c.begin(),c.end());
		sort(d.begin(),d.end());
		int l,r;
		int sum=0;
		for(int j=0;j<n;j++)
		{
			l=lower_bound(d.begin(),d.end(),pow_2-c[j])-d.begin();
			r=lower_bound(d.begin(),d.end(),2*pow_2-c[j])-d.begin()-1;
			sum+=(r-l+1);
			l=lower_bound(d.begin(),d.end(),3*pow_2-c[j])-d.begin();
			r=lower_bound(d.begin(),d.end(),4*pow_2-c[j])-d.begin()-1;
			sum+=(r-l+1);
		}
		if(sum&1)
		{
			ans+=pow_2;
		}
		pow_2*=2;
	}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc:32:14: error: 'n' was not declared in this scope; did you mean 'yn'?
   32 | vector<int>a(n), b(n);
      |              ^
      |              yn
a.cc:32:20: error: 'n' was not declared in this scope; did you mean 'yn'?
   32 | vector<int>a(n), b(n);
      |                    ^
      |                    yn
Language: C++

using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
constexpr ll TEN(int n) { return (n==0) ? 1 : 10*TEN(n-1); }
template<class T> using V = vector<T>;
template<class T> using VV = V<V<T>>;
 
const int B = 1024;
const int N = 205000 / B * B;
 
int a[N], b[N];
 
int main() {
    int n;
    scanf("%d", &n);
    for (int i = 0; i < n; i++) scanf("%d", a+i);
    for (int i = 0; i < n; i++) scanf("%d", b+i);
    int ans = 0;
    for (int sa = 0; sa < N; sa += B) {
        for (int sb = 0; sb < N; sb += B) {
            for (int i = sa; i < sa+B; i++) {
                for (int j = sb; j < sb+B; j++) {
                    ans ^= (a[i] + b[j]);
                }
            }
        }
    }
    printf("%d\n", ans);
    return 0;
}

Compiler output:
a.cc:6:29: error: 'vector' does not name a type
    6 | template<class T> using V = vector<T>;
      |                             ^~~~~~
a.cc:7:30: error: 'V' does not name a type
    7 | template<class T> using VV = V<V<T>>;
      |                              ^
a.cc: In function 'int main()':
a.cc:16:5: error: 'scanf' was not declared in this scope
   16 |     scanf("%d", &n);
      |     ^~~~~
a.cc:29:5: error: 'printf' was not declared in this scope
   29 |     printf("%d\n", ans);
      |     ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | using namespace std;