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

#include<iostream>
#include<algorithm>
#include<vector>
#include<cmath>
#include<string>
using namespace std;
int main(){
    long long int s=0;
    cin >> n;
    vector<long long int> a(n),b(n);
    for(long long int i=0;i<n;i++){
        cin >> a[i];
    }
    for(long long int i=0;i<n;i++){
        cin >> b[i];
        if(s>(b[i]-a[i])    s++;
    }
    if(s*2<=(n-s))   cout << "Yes\n";
    else    cout << "No\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'n' was not declared in this scope
    9 |     cin >> n;
      |            ^
a.cc:16:25: error: expected ';' before 's'
   16 |         if(s>(b[i]-a[i])    s++;
      |                         ^   ~
      |                         ;
a.cc:17:5: error: expected primary-expression before '}' token
   17 |     }
      |     ^
a.cc:16:33: error: expected ')' before '}' token
   16 |         if(s>(b[i]-a[i])    s++;
      |           ~                     ^
      |                                 )
   17 |     }
      |     ~                            
a.cc:17:5: error: expected primary-expression before '}' token
   17 |     }
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int a[10000],b[10000];

int main()
{
	int n;
	c1=0,c2=0;
	cin>>n;
	for(int i=1; i<=n; i++)
		cin>>a[i];
	for(int i=1; i<=n; i++)
		cin>>b[i];
	for(int i=1; i<=n; i++)
	{
		if(a[i]>b[i]) 
			c1=c1+a[i]-b[i];
		else if(a[i]<b[i]) 
		{
			if((b[i]-a[i])%2==0) 
				c2=c2+(b[i]-a[i])/2;
			else 
			{
				c1++;
				c2=c2+(b[i]-a[i]+1)/2;
			}
		}
	}

	if(c2>=c1) 
		cout<<"Yes"<<endl;
	else 
		cout<<"No"<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'c1' was not declared in this scope; did you mean 'y1'?
    8 |         c1=0,c2=0;
      |         ^~
      |         y1
a.cc:8:14: error: 'c2' was not declared in this scope
    8 |         c1=0,c2=0;
      |              ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int a[N],b[N];

int main()
{
	int n;
	c1=0,c2=0;
	cin>>n;
	for(int i=1; i<=n; i++)
		cin>>a[i];
	for(int i=1; i<=n; i++)
		cin>>b[i];
	for(int i=1; i<=n; i++)
	{
		if(a[i]>b[i]) 
			c1=c1+a[i]-b[i];
		else if(a[i]<b[i]) 
		{
			if((b[i]-a[i])%2==0) 
				c2=c2+(b[i]-a[i])/2;
			else 
			{
				c1++;
				c2=c2+(b[i]-a[i]+1)/2;
			}
		}
	}

	if(c2>=c1) 
		cout<<"Yes"<<endl;
	else 
		cout<<"No"<<endl;
	return 0;
}

Compiler output:
a.cc:3:7: error: 'N' was not declared in this scope
    3 | int a[N],b[N];
      |       ^
a.cc:3:12: error: 'N' was not declared in this scope
    3 | int a[N],b[N];
      |            ^
a.cc: In function 'int main()':
a.cc:8:9: error: 'c1' was not declared in this scope; did you mean 'y1'?
    8 |         c1=0,c2=0;
      |         ^~
      |         y1
a.cc:8:14: error: 'c2' was not declared in this scope
    8 |         c1=0,c2=0;
      |              ^~
a.cc:11:22: error: 'a' was not declared in this scope
   11 |                 cin>>a[i];
      |                      ^
a.cc:13:22: error: 'b' was not declared in this scope
   13 |                 cin>>b[i];
      |                      ^
a.cc:16:20: error: 'a' was not declared in this scope
   16 |                 if(a[i]>b[i])
      |                    ^
a.cc:16:25: error: 'b' was not declared in this scope
   16 |                 if(a[i]>b[i])
      |                         ^
Language: C++

#include<stdio.h>
int main()
{
	int i,n;
	long long a[10005],b[10005],suma,sumb,t,count=0,s1=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	 scanf("%lld",&a[i]);
	for(i=0;i<n;i++)
	 scanf("%lld",&b[i]);
		suma=0;sumb=0;
	  for(i=0;i<n;i++)
	  {
	  	suma+=a[i];
	  	sumb+=b[i];
	  }
	  t=sumb-suma;
	  else
	  {
	  	 for(i=0;i<n;i++)
	  	 {
	  	 	if(a[i]<b[i])
	  	 	{
	  	 	  s1=s1+(b[i]-a[i])/2;
			  if((b[i]-a[i])%2!=0) 
			  {
			  	 s1++;
			  }
			}
		 }
		 if(s1>t) count=-1;
		 else
		 	count=1;
	  }
	}
  if(count==-1)  printf("No\n");
  else  printf("Yes\n");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:11: error: 'else' without a previous 'if'
   18 |           else
      |           ^~~~
a.cc: At global scope:
a.cc:36:3: error: expected unqualified-id before 'if'
   36 |   if(count==-1)  printf("No\n");
      |   ^~
a.cc:37:3: error: expected unqualified-id before 'else'
   37 |   else  printf("Yes\n");
      |   ^~~~
a.cc:38:3: error: expected unqualified-id before 'return'
   38 |   return 0;
      |   ^~~~~~
a.cc:39:1: error: expected declaration before '}' token
   39 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

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

    int a[N],b[N];
    int joken=0; //操作できる回数(Σb-Σa)
    for(int i=0;i<N;i++){
        cin >> a[i];
        joken-=a[i];
    }
    for(int i=0;i<N;i++){
        cin >> b[i];
        joken+=b[i];
    }

    int sousaa=0,sousab=0; //必要な操作回数
    int sa=0; //aとbの差
    for(int i=0;i<N;i++){
        if(a[i]<b[i]){
            sa=b[i]-a[i];
            sousaa+=sa/2+sa%2;
            sa=0;
        }
        if(a[i]>b[i]){
            sa=a[i]-b[i];
            sousab++;
            sa=0;
        }
    }

    //操作できる回数がマイナスなら絶対無理。
    //また、総操作回数が条件を上回るとA>Bとなり成立しない。
    if(sousa>=sousab){cout << "Yes\n";}
    else{cout << "No\n";}

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:8: error: 'sousa' was not declared in this scope; did you mean 'sousab'?
   36 |     if(sousa>=sousab){cout << "Yes\n";}
      |        ^~~~~
      |        sousab
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void){
    int n,in,c,mi=0,pl2=0
    vector<int> a,b;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>in;
        a.push_back(in);
    }
    for(int i=0;i<n;i++){
        cin>>in;
        b.push_back(in);
    }
    for(int i=0;i<n;i++){
        c=b[i]-a[i];
        if(c<0){
            mi+=-c;
        }
        else if(c>=2){
            pl2+=c/2;
        }
    }
    if(mi>pl2){
        cout<<"No"<<endl;
    }
    else{
        cout<<"Yes"<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: expected ',' or ';' before 'vector'
    5 |     vector<int> a,b;
      |     ^~~~~~
a.cc:9:9: error: 'a' was not declared in this scope
    9 |         a.push_back(in);
      |         ^
a.cc:13:9: error: 'b' was not declared in this scope
   13 |         b.push_back(in);
      |         ^
a.cc:16:11: error: 'b' was not declared in this scope
   16 |         c=b[i]-a[i];
      |           ^
a.cc:16:16: error: 'a' was not declared in this scope
   16 |         c=b[i]-a[i];
      |                ^
Language: C++

#include <cstdio>  
#include <cstring>  
#include <queue>
#include <stack> 
#include <algorithm>  
using namespace std; 
long long N,a[10010],b[10010],c[10010],i,j,s,ax,bx;      
int main()  
{ 
	
	scanf("%lld",&N);
	for(i=0;i<N;i++)
		scanf("%lld",&a[i]);
	for(s=ax=bx=i=0;i<N;i++)
	{
		scanf("%lld",&b[i]);
		c[i]=b[i]-a[i];
		if(c[i]>0)
		{
			bx+=c[i];
			if(c[i]%2)
				s++;
		}			
		else
			ax+=c[i];
	}
	if((bx%2==)||ax&2==0)&&bx>(-ax))
		printf("Yes\n");
	else
		printf("No\n");	

	return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:19: error: expected primary-expression before ')' token
   27 |         if((bx%2==)||ax&2==0)&&bx>(-ax))
      |                   ^
a.cc:27:34: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   27 |         if((bx%2==)||ax&2==0)&&bx>(-ax))
      |                              ~~~~^~~~~~
a.cc:27:40: error: expected ';' before ')' token
   27 |         if((bx%2==)||ax&2==0)&&bx>(-ax))
      |                                        ^
      |                                        ;
a.cc:27:32: error: label 'bx' used but not defined
   27 |         if((bx%2==)||ax&2==0)&&bx>(-ax))
      |                                ^~
Language: C++

#include <cstdio>  
#include <cstring>  
#include <queue>
#include <stack> 
#include <algorithm>  
using namespace std; 
long long N,a[10010],b[10010],c[10010],i,j,s,ax,bx;      
int main()  
{ 
	
	scanf("%lld",&N);
	for(i=0;i<N;i++)
		scanf("%lld",&a[i]);
	for(s=ax=bx=i=0;i<N;i++)
	{
		scanf("%lld",&b[i]);
		c[i]=b[i]-a[i];
		if(c[i]>0)
		{
			bx+=c[i];
			if(c[i]%2)
				s++;
		}			
		else
			ax+=c[i];
	}
	while()
	if((bx%2==0&&ax%2)||(bx%2&&ax&2==0)&&bx>-ax)
		printf("Yes\n");
	else
		printf("No\n");	

	return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:15: error: expected primary-expression before ')' token
   27 |         while()
      |               ^
Language: C++

#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <cctype>
#include <cstdlib>
#include <set>
#include <map>
#include <sstream>
using namespace  std;
#define  ll long long
#define mINF(a) memset(a,INF,sizeof(a))
#define m0(a) memset(a,0,sizeof(a))
#define mf1(a) memset(a,-1,sizeof(a))
#define lson i<<1,l,l+r>>1
#define rson i<<1|1,((l+r)>>1)+1,r
typedef pair<ll,ll>P;
static const ll INF=1e18;
static const ll len=1e4+7;
int main()
{
	ll n,a[len],b[len];
	while(cin>>n)
	{
		for(ll i=0;i<n;++i)
			scanf("%lld",a+i);
		for(ll i=0;i<n;++i)
			scanf("%lld",b+i);
		ll c[len],sum1=0,sum2=0;
		for(ll i=0;i<n;++i)
		{
			sum1+=a[i];
			sum2+=b[i]; 
			c[i]=fabs(a[i]-b[i]);
		}
		if(sum1>sum2)puts("No");
		else
		if(sum1==sum2)
		{
			ll w=0;
			for(ll i=0;i<n;++i)
			{
				if(c[i]!=0)
					w=1;
			}
			if(w==1)puts("No");
			else puts("Yes");
		}
		else
		{
			ll sum3=0;
			ll w=0;
			for(ll i=0;i<n;++i)
			{
				if(c[i]!=0)
					sum3++;
			}
			for(ll i=0;i<n;++i)
			{
				if(c[i]!=0)
				{
					ll xx=c[i];
					break;
				}
			}
			ll c1=0,c2=0;
			for(ll i=0;i<n;++i)
			{
				if(c[i]==0)continue;
				else
				{
					c1++;
				}
				if(c[i]==xx)
					c2++;
			}
			if(sum3%2==0)w=1;
			if(c1==c2)w=1;
			if(w==0)puts("No");
			else puts("Yes");
		}
	}
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:79:42: error: 'xx' was not declared in this scope
   79 |                                 if(c[i]==xx)
      |                                          ^~
Language: Java

import java.util.Scanner;
 
public class Main {
 
        public static void main(String[] args) {
            Scanner scanner = new Scanner(System.in);
            int N = scanner.nextInt();
            long [] A = new long[N];
            for (int i=0; i<N; i++)
                A[i] = scanner.nextLong();
            long [] B = new long[N];
            for (int i=0; i<N; i++)
                B[i] = scanner.nextLong();
            long Pos=0;
            long Neg=0;
            for (int i=0; i<N; i++){
                long s=A[i]-B[i];
                if (s < 0){
                    Neg +=s;
                } else {
                    Pos +=s*(long)2;
                }
            }
            long Judge = Neg + Pos;
            if (Judge >= 0) {
                System.out.println("No");
            } else {
                System.out.println("Yes");
            } 
}

Compiler output:
Main.java:30: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.util.Scanner;
 
public class Main {
 
        public static void main(String[] args) {
            Scanner scanner = new Scanner(System.in);
            int N = scanner.nextInt();
            long [] A = new long[N];
            for (int i=0; i<N; i++)
                A[i] = scanner.nextLong();
            long [] B = new long[N];
            for (int i=0; i<N; i++)
                B[i] = scanner.nextLong();
            long Pos=0;
            long Neg=0;
            for (int i=0; i<N; i++){
                long s=A[i]-B[i];
                if (s < 0){
                    Neg +=s;
                } else {
                    Pos +=s*(long)2;
                }
            }
            long Judge = Neg + Pos;
            if (Judge >= 0) {
                System.out.println("No");
            } else {
                System.out.println("Yes");
            } 
      

Compiler output:
Main.java:29: error: reached end of file while parsing
            } 
             ^
1 error
Language: Java

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

public class main {
    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] a = new int[n];
        int[] b = new int[n];
        long diff = 0;
        for (int i = 0; i < n; ++i) {
            a[i] = in.nextInt();
            diff -= a[i];
        }
        for (int i = 0; i < n; ++i) {
            b[i] = in.nextInt();
            diff += b[i];
        }
        int num = 0;
        for (int i = 0; i < n; ++i) if (a[i] < b[i]) {
            num += (b[i] - a[i] + 1) / 2;
        }
        System.out.println((num <= diff) ? "Yes" : "No");
    }
}

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

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

public class sol {
    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int[] a = new int[n];
        int[] b = new int[n];
        long diff = 0;
        for (int i = 0; i < n; ++i) {
            a[i] = in.nextInt();
            diff -= a[i];
        }
        for (int i = 0; i < n; ++i) {
            b[i] = in.nextInt();
            diff += b[i];
        }
        int num = 0;
        for (int i = 0; i < n; ++i) if (a[i] < b[i]) {
            num += (b[i] - a[i] + 1) / 2;
        }
        System.out.println((num <= diff) ? "Yes" : "No");
    }
}

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

#include <iostream>
using namespace std;

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

    int a[n];
    int b[n];
    int asum = 0;
    int bsum = 0;

    int p = 0;

    for (int i = 0; i < n; i++){
        cin >> p;
        a[i] = p;
        asum += p;
    }
    p = 0;
    for (int i = 0; i < n; i++){
        cin >> p;
        b[i] = p;
        bsum += p;
    }
    string s;
    if (asum < bsum) {
        int onediff = 0;
        int twodiff = 0;
        for (int i = 0; i < n; i++){
            if (a[i] > b[i]){onediff += a[i] - b[i]; }
            else {twodiff += b[i] - a[i]}
        }
        if (onediff > n){s = "No"; }
        if (twodiff > n * 2){s = "No"; }
        else {s = "Yes";}
    }
    else if (asum == bsum){
        int i = 0;
        s = "Yes";
        for (int i = 0; i < n; i++){
            if (a[i] != b[i]){
                s = "No";
                break;
            }
        }
    }
    else {s = "No";}
    cout << s << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:41: error: expected ';' before '}' token
   32 |             else {twodiff += b[i] - a[i]}
      |                                         ^
      |                                         ;
Language: C++

from math import ceil
n = int(input())
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
c = 0
for x, y in zip(a, b):
    if y > x:
        c += ceil((y-x)/2)

if sum(b)-sum(a)>=0 and sum(b)-sum(a)>=c:
    print("Yes")
else:
    print("No")


Compiler output:
a.cc:1:1: error: 'from' does not name a type
    1 | from math import ceil
      | ^~~~
Language: Java

import java.util.*;
public class Main {
  public static void main(String...args) {
    final int N = sc.nextInt();
    final int[] a = new int[N];
    for(int i = 0; i < N; i++)
      a[i] = sc.nextInt();
    final int[] b = new int[N];
    for(int i = 0; i < N; i++)
      b[i] = sc.nextInt();
    Arrays.sort(a);
    Arrays.sort(b);
    boolean success = true;
    for(int i = 0; i < N; i++)
      success &= a[i] <= b[i];
    System.out.println(success ? "Yes" : "No");
  }
}

Compiler output:
Main.java:4: error: cannot find symbol
    final int N = sc.nextInt();
                  ^
  symbol:   variable sc
  location: class Main
Main.java:7: error: cannot find symbol
      a[i] = sc.nextInt();
             ^
  symbol:   variable sc
  location: class Main
Main.java:10: error: cannot find symbol
      b[i] = sc.nextInt();
             ^
  symbol:   variable sc
  location: class Main
3 errors
Language: C

#include <stdio.h>
#include <stdlib.h>

int main(void){
	int i;
	int n;
	scanf("%d",&n);
	int a[n],b[n];
	int c[n];
	int plus=0,minus=0;
	for(i=0;i<n;i++){
		scanf("%d",a+i);
	}
	for(i=0;i<n;i++){
		scanf("%d",b+i);
		c[i]=a[i]-b[i];
		
	}
	
	for(i=0;i<n;i++){
		while(c[i]>0){
			c[i]--;
			for(j=0;j<n;j++){
				if(c[j]<-1){
					c[j]+=2;
					break;
				}
				if(j==n-1){
					printf("No\n");
				}
			}
		}
		printf("Yes\n");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:29: error: 'j' undeclared (first use in this function)
   23 |                         for(j=0;j<n;j++){
      |                             ^
main.c:23:29: note: each undeclared identifier is reported only once for each function it appears in
main.c:35:1: error: expected declaration or statement at end of input
   35 | }
      | ^
Language: C++

#include <iostream>
#include <algorithm>
 
using std::cin;
using std::cout;
using std::endl;
 
using ll = long long;
 
int main() {
  int a[10001], b[10001], 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 - 1); i++) {
        if (a[i] < b[i]) {
            ll sub = b[i] - a[i];
            if (sub % 2 == 0) {
                a[i] += sub;
                b[i+1] += (sub / 2);
            } else {
                a[i] += (sub * 2);
                b[i] += sub; 
            }
        } else if (a[i] > b[i]) {
            ll sub = a[i] - b[i];
            a[i+1] += (sub * 2);
            b[i] += sub;
        }
    }
    if (a[N-1] === b[N-1]) {
        cout << "YES" << endl;
    } else {
        cout << "NO" << endl;
    }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:18: error: expected primary-expression before '=' token
   38 |     if (a[N-1] === b[N-1]) {
      |                  ^
Language: C++

#include <iostream>
#include <algorithm>
 
using std::cin;
using std::cout;
using std::endl;
 
using ll = long long;
 
int main() {
  int a[10001], b[10001], N;
 
  cin >> N;
  for (int i = 0; i < N; ++i) {
    cin >> a[i];
  }
  for (int i = 0; i < N; ++i) {
    cin >> b[i];
  }
 
  ll cnt_a = 0, cnt_b = 0;
 
  for (int i = 0; i< (N - 1); i++) {
        if (a[i] < b[i]) {
            var sub = b[i] - a[i];
            if (sub % 2 == 0) {
                a[i] += sub;
                b[i+1] += (sub / 2);
            } else {
                a[i] += (sub * 2);
                b[i] += sub; 
            }
        } else if (a[i] > b[i]) {
            var sub = a[i] - b[i];
            a[i+1] += (sub * 2);
            b[i] += sub;
        }
    }
    if (a[N-1] === b[N-1]) {
        cout << "YES" << endl;
    } else {
        cout << "NO" << endl;
    }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:13: error: 'var' was not declared in this scope
   25 |             var sub = b[i] - a[i];
      |             ^~~
a.cc:26:17: error: 'sub' was not declared in this scope
   26 |             if (sub % 2 == 0) {
      |                 ^~~
a.cc:34:13: error: 'var' was not declared in this scope
   34 |             var sub = a[i] - b[i];
      |             ^~~
a.cc:35:24: error: 'sub' was not declared in this scope
   35 |             a[i+1] += (sub * 2);
      |                        ^~~
a.cc:39:18: error: expected primary-expression before '=' token
   39 |     if (a[N-1] === b[N-1]) {
      |                  ^
Language: C++

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

  int sum_a = 0, sum_b = 0;
  for(int i = 0; i < n; i++) {
    sum_a += a[i];
    sum_b += b[i];
  }

  int t = sum_b - sum_a;
  int count_a = 0, count_b = 0;
  for(int i = 0; i < n; i++) {
    if(a[i] > b[i]) {
      count_b += a[i] - b[i];
    }
    else if(a[i] < b[i]) {
      count_a += (b[i] - a[i] + 1) / 2;
    }
  }
  if(t >= max(count_a, count_b)) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> n;
      |   ^~~
a.cc:28:11: error: 'max' was not declared in this scope
   28 |   if(t >= max(count_a, count_b)) {
      |           ^~~
a.cc:29:5: error: 'cout' was not declared in this scope
   29 |     cout << "Yes" << endl;
      |     ^~~~
a.cc:29:22: error: 'endl' was not declared in this scope
   29 |     cout << "Yes" << endl;
      |                      ^~~~
a.cc:32:5: error: 'cout' was not declared in this scope
   32 |     cout << "No" << endl;
      |     ^~~~
a.cc:32:21: error: 'endl' was not declared in this scope
   32 |     cout << "No" << endl;
      |                     ^~~~
Language: C++

#include <iostream>

int main() {
  int n;
  cin >> n;
  int a[n], b[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> b[i];
  }
  int d1 = 0, d2 = 0;
  for (int i = 0; i < n; i++) {
    while(a[i] < b[i]) {
      d1++;
      a[i] += 2;
    }
    while(a[i] > b[i]) {
      d2++;
      b[i]++;
    }
  }
  if (d2 == d1) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> n;
      |   ^~~
      |   std::cin
In file included 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:25:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   25 |     cout << "YES" << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:25:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   25 |     cout << "YES" << endl;
      |                      ^~~~
      |                      std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:27:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   27 |     cout << "NO" << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:27:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   27 |     cout << "NO" << endl;
      |                     ^~~~
      |                     std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

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

        long sumA = 0; // a[i] - b[i] が正の時、それを集計(必要な操作の回数)
        long sumB = 0; // a[i] - b[i] が負の時、a[i] + 1 = b[i] または a[i] = b[i] となるために必要な偶数を集計
        for (int i = 0; i < n; i++) {
            int bi = sc.nextInt();
            int diff = a[i] - bi;

            if (diff >= 0) {
                sumA += diff;
            } else {
                diff = -diff;
                sumB += diff - (diff % 2);
            }
        }

        System.out.println((sumA * 2 <= sumB) ? "Yes" : "No");
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
sum_c = 0
for i in range(n):
    if (a[i] - b[i]) > 0:
        sum_c += (a[i]- b[i])
    else:
        sum_c += int (((b[i] - a[i]) / 2 ) + 0.5)
sum_a = 0
sum_b = 0
for i in range(n):
    sum_a += a.pop(0)
    sum_b += b.pop(0)
if sum_c <= (sum_b - sum_a):
    print ('Yes')
else:
    print ('No')

Compiler output:
a.cc:16:12: warning: multi-character character constant [-Wmultichar]
   16 |     print ('Yes')
      |            ^~~~~
a.cc:18:12: warning: multi-character character constant [-Wmultichar]
   18 |     print ('No')
      |            ^~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#define LL long long
int N;
std::vector<LL> a;
std::vector<LL> b;
int main() {
	std::cin >> N;
	for (int i = 0; i < N; i++) {
		LL tmp;
		std::cin >> tmp;
		a.push_back(tmp);
	}
	for (int i = 0; i < N; i++) {
		LL tmp;
		std::cin >> tmp;
		b.push_back(tmp);
	}
	LL adda = 0;
	LL addb = 0;
	for (int i = 0; i < N - 1; i++) {
		if (a[i] - b[i] < 0) {
			LL ne = ((b[i] - a[i] / 2) * 2;

			if (adda >= ne) {
				adda -= ne;
				ne = 0;
			}
			else{
				ne -= adda;
				adda = 0;
			}
			addb += ne / 2;

			if ((b[i] - a[i]) % 2 != 0)addb--;
		}

		if (b[i] - a[i] < 0) {
			LL  ne = a[i] - b[i];
			if (addb >= ne) {
				addb -= ne;
				ne = 0;
			}
			else {
				ne -= addb;
				addb = 0;
			}
			adda += ne * 2;
		}
	}
	if (a[N - 1] + adda <= b[N - 1] + addb)std::cout << "Yes" << std::endl;
	else std::cout << "No" << std::endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:55: error: expected ')' before ';' token
   25 |                         LL ne = ((b[i] - a[i] / 2) * 2;
      |                                 ~                     ^
      |                                                       )
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
    int N;
    cin >> N;

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

    //a[i]+=2, b[j]++;
    //sortしたときにa[i]<b[i]であれば成り立つ？
    sort(a, a+N);
    sort(b, b+N);

    for(inti=0; i<N; i++){
        if(a[i]>b[i]){
            cout << "No\n";
            return 0;
        }
    }

    cout << "Yes\n";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'inti' was not declared in this scope; did you mean 'int'?
   17 |     for(inti=0; i<N; i++){
      |         ^~~~
      |         int
a.cc:17:17: error: 'i' was not declared in this scope
   17 |     for(inti=0; i<N; i++){
      |                 ^
Language: C++

#include<string>
#include<string.h>
#include<map>
#include<set>
#include<vector>
#include<stdio.h>
#include<math.h>
#include<iostream>
#include<algorithm>
#include<queue>
using namespace std;
int ifarray(int a,int b)
{
int x=0;
while (a<b){
x++;
a+=2;
b++;
}
if (a>b) return 0;
return x;
} 
int main(){
int x;
int a[10001];
int b[10001];
int sma=0;
int smb=0;
cin>>x;
for (int i=1;i<=x;i++)
cin>>a[i];
for (int i=1;i<=x;i++)
cin>>b[i];
for (int i=1;i<=x;i++){
 sma+=a[i];
 smb+=b[i];
}
int ok=1;
for (int i=1;i<=x;i++)
if (a[i]!=b[i])ok=0;
if (sma>smb) {cout<<"No"<<endl;return 0;}
else if (ok) {cout<<"Yes"<<endl;return 0;}
     else if (sma==smb) {cout<<"No"<<endl;return 0;}
int n=ifarray(sma,smb);
if (n) cout<<"";
else {cout<<"No"<<endl;return 0;}
int chaa=0;3
for (int i=1;i<=x;i++)
if (a[i]<=b[i]) chaa+=b[i]-a[i];
           else chab+=a[i]-b[i];
if (chaa+1/2<chab) {cout<<"No"<<endl;return 0;}
if (chaa+1/2==chab)  {cout<<"Yes"<<endl;return 0;}
else if (n*2-chaa==n-chab) {cout<<"Yes"<<endl;return 0;}
      else {cout<<"No"<<endl;return 0;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:13: error: expected ';' before 'for'
   47 | int chaa=0;3
      |             ^
      |             ;
   48 | for (int i=1;i<=x;i++)
      | ~~~          
a.cc:48:14: error: 'i' was not declared in this scope
   48 | for (int i=1;i<=x;i++)
      |              ^
a.cc:50:12: error: 'else' without a previous 'if'
   50 |            else chab+=a[i]-b[i];
      |            ^~~~
a.cc:50:17: error: 'chab' was not declared in this scope; did you mean 'chaa'?
   50 |            else chab+=a[i]-b[i];
      |                 ^~~~
      |                 chaa
Language: C++

#include <bits/stdc++.h>
using namespace std;
int a[10000],b;
int magic_number_that_can_be_used=0;
int magic_number_that_you_need=0;
int main()
{
	int n,i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&a[i]);
	for(i=0;i<n;i++)
	{
		scanf("%d",&b);
		if(a[i]<b)
			magic_number_that_can_be_used+=((b-a[i])%2==1?(b-a[i])/2+1:(b-a[i])/2;
		else
			magic_number_that_you_need+=a[i]-b;
		//printf("need=%d used=%d\n",magic_number_that_you_need,magic_number_that_can_be_used);
	}
	if(magic_number_that_you_need>magic_number_that_can_be_used)
		printf("No");
	else
		printf("Yes");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:94: error: expected ')' before ';' token
   16 |                         magic_number_that_can_be_used+=((b-a[i])%2==1?(b-a[i])/2+1:(b-a[i])/2;
      |                                                        ~                                     ^
      |                                                                                              )
Language: C++

#include<iostream>
using namespace std;
#define E 1000000000
int main()
{
	int n;
	long long a[10000],b[10000],suma,sumb,p;
	cin>>n;
	for(int i=1;i<=n;i++)cin>>a[i];suma+=a[i];
	for(int i=1;i<=n;i++)cin>>b[i];sumb+=b[i];
	p=sumb-suma;
	if(p<0)
	cout<<"No";
	else
	{
		long long ans=0;
		for(int i=1;i<=n;i++)
		{
			cnt+=(b[i]-a[i]+1)/2;
		}
		if(cnt>p)cout<<"No";
		else cout<<"Yes";
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:48: error: 'i' was not declared in this scope
    9 |         for(int i=1;i<=n;i++)cin>>a[i];suma+=a[i];
      |                                                ^
a.cc:19:25: error: 'cnt' was not declared in this scope; did you mean 'int'?
   19 |                         cnt+=(b[i]-a[i]+1)/2;
      |                         ^~~
      |                         int
a.cc:21:20: error: 'cnt' was not declared in this scope; did you mean 'int'?
   21 |                 if(cnt>p)cout<<"No";
      |                    ^~~
      |                    int
Language: C++

#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
#include <cstring>
#include <string>
#include <map>
#define pb push_back
using namespace std;
typedef pair<int,int> pii;
typedef long long int lli;

int main(void){
  vector<lli> a,b,c;
  int n;
  lli x,y;
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>x;a.pb(x);
  }
  for(int i=0;i<n;i++){
    cin>>x;b.pb(x);
  }
  lli resp=0,resm=0;
  for(int i=0;i<n;i++){
    c.pb(a[i]-b[i]);
    if(a[i]>b[i]) resp+=a[i]-b[i];
    else resm+=b[i]-a[i];
  }
  
  if(resp>ceil((double)resm/2.0)) cout<<"No"<<endl;
  else cout<<"Yes"<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:11: error: 'ceil' was not declared in this scope
   31 |   if(resp>ceil((double)resm/2.0)) cout<<"No"<<endl;
      |           ^~~~
Language: C++

#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
#include <cstring>
#include <string>
#include <map>
#define pb push_back
using namespace std;
typedef pair<int,int> pii;
typedef long long int lli;

int main(void){
  vector<lli> a,b,c;
  int n;
  lli x,y;
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>x;a.pb(x);
  }
  for(int i=0;i<n;i++){
    cin>>x;b.pb(x);
  }
  lli resp=0,resm=0;
  for(int i=0;i<n;i++){
    c.pb(a[i]-b[i]);
    if(a[i]>b[i]) resp+=a[i]-b[i];
    else resm+=b[i]-a[i];
  }
  
  if(resp>ceil((long double)resm/2.0)) cout<<"No"<<endl;
  else cout<<"Yes"<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:11: error: 'ceil' was not declared in this scope
   31 |   if(resp>ceil((long double)resm/2.0)) cout<<"No"<<endl;
      |           ^~~~
Language: C++

#include<string>
#include<string.h>
#include<map>
#include<set>
#include<vector>
#include<stdio.h>
#include<math.h>
#include<iostream>
#include<algorithm>
#include<queue>
using namespace std;
int ifarray(int a,int b)
{
int x=0;
while (a<b){
x++;
a+=2;
b++;
}
if (a>b) return 0;
return x;
} 
int main(){
int x;
int a[10001];
int b[10001];
int sma=0;
int smb=0;
cin>>x;
for (int i=1;i<=x;i++)
cin>>a[i];
for (int i=1;i<=x;i++)
cin>>b[i];
for (int i=1;i<=x;i++){
 sma+=a[i];
 smb+=b[i];
}
int ok=1;
for (int i=1;i<=x;i++)
if (a[i]!=b[i])ok=0;
if (sma>smb) {cout<<"No"<<endl;return 0;}
else if (ok) {cout<<"Yes"<<endl;return 0;}
     else if (sma==smb) {cout<<"No"<<endl;return 0;}
int n=ifarray(sma,smb);
if (n) cout<<"";
else {cout<<"No"<<endl;return 0;}
int chaa=0;
int chab=0;
for (int i=1;i<=x;i++)
if (a[i]<=b[i]) chaa+=b[i]-a[i];
           else chab+=a[i]-b[i];
if (chaa/2<chab) {cout<<"No"<<endl;return 0;}
if ((chaa==n*2 && chab==n)||(n*2-chaa==n-chab && n-chab%2==0 && n*2-chaa>0 && n-chab>0) {cout<<"Yes"<<endl;return 0;}
else {cout<<"No"<<endl;return 0;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:53:88: error: expected ')' before '{' token
   53 | if ((chaa==n*2 && chab==n)||(n*2-chaa==n-chab && n-chab%2==0 && n*2-chaa>0 && n-chab>0) {cout<<"Yes"<<endl;return 0;}
      |    ~                                                                                   ^~
      |                                                                                        )
a.cc:55:1: error: expected primary-expression before '}' token
   55 | }
      | ^
Language: Java

import java.util.*;

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

        int n = sc.nextInt();
        int[] a = new int[n];
        int[] b = new int[n];
        int sum_a = 0, sum_b = 0;

        for (int i = 0; i < n; i++) {
            a[i] = Integer.parseInt(sc.next());
            sum_a += a[i];
        }
        for (int i = 0; i < n; i++) {
            b[i] = Integer.parseInt(sc.next());
            sum_b += b[i];
        }

        if (sum_a > sum_b) {
            System.out.println("No");
            return;
        }

        long opt = sum_b - sum_a;

        for (int i = 0; i < n; i++) {
            long diff = b[i] - a[i];
            if (diff > 0) {
                ans += (diff + 1) / 2;
            }
        }

        if (ans > opt) {
            System.out.println("No");
        } else {
            System.out.println("Yes");
        }
    }
}

Compiler output:
Main.java:31: error: cannot find symbol
                ans += (diff + 1) / 2;
                ^
  symbol:   variable ans
  location: class Main
Main.java:35: error: cannot find symbol
        if (ans > opt) {
            ^
  symbol:   variable ans
  location: class Main
2 errors
Language: Java

import java.util.*;

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

        int n = sc.nextInt();
        int[] a = new int[n];
        int[] b = new int[n];
        int[] sub = new int[n];
        int sum_a = 0, sum_b = 0;
        int num;
        int ans = 0;

        for (int i = 0; i < n; i++) {
            a[i] = Integer.parseInt(sc.next());
            sum_a += a[i];
        }
        for (int i = 0; i < n; i++) {
            b[i] = Integer.parseInt(sc.next());
            sum_b += b[i];
            sub[i] = a[i] - b[i];
        }

        lim = sum_b - sum_a;

        if (lim < 0) {
            System.out.println("No");
            return;
        }

        for (int i = 0; i < n; i++) {
            if (sub[i] > 0) {
                ans += sub[i];
            }
        }

        if (ans > num) {
            System.out.println("No");
        } else {
            System.out.println("Yes");
        }
    }
}

Compiler output:
Main.java:25: error: cannot find symbol
        lim = sum_b - sum_a;
        ^
  symbol:   variable lim
  location: class Main
Main.java:27: error: cannot find symbol
        if (lim < 0) {
            ^
  symbol:   variable lim
  location: class Main
2 errors
Language: C

#include <stdio.h>

int main()
{
    int N,a[10000],b[10000],i;
    int sum_a=0,sum_b=0,BA=0,AB=0,X,Y;

    scanf("%d",&N);

    for(i=0;i<N;i++){
        scanf("%d",&a[i]);
        sum_a += a[i];
    }
    for(i=0;i<N;i++){
        scanf("%d",&b[i]);
        sum_b += b[i];
        if(b[i]-a[i]>0){
            BA += b[i]-a[i];
        }else{
            AB += a[i]-b[i];
        }
    }

    X = sum_b-sum_a;

    if(sum_b < sum_a){
        printf("No\n");
    }else if((X - BA == 2*X - AB)&&(X-AB>=0){
        printf("Yes\n");
    }else{
        printf("No\n");
    }

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:28:45: error: expected ')' before '{' token
   28 |     }else if((X - BA == 2*X - AB)&&(X-AB>=0){
      |             ~                               ^
      |                                             )
main.c:35:1: error: expected expression before '}' token
   35 | }
      | ^
Language: C++

#include <iostream>
using namespace std;


int main() {
	int N;
	cin >> N;
	int* a = new int[N];
	int* b = new int[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) {
		if (a[i] + 2 == b[i] + 1) {
		
		} else {
			cout << "No" << endl;
			return;
		}
	}
	cout << "Yes" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:25: error: return-statement with no value, in function returning 'int' [-fpermissive]
   21 |                         return;
      |                         ^~~~~~
Language: C++

#include <iostream>
using namespace std;


int main() {
	int N;
	cin >> N;
	int* a = new int[N];
	int* b = new int[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) {
		if (a[i] + 2 == b[j] + 1) {
		
		} else {
			cout << 'No' << endl;
			return;
		}
	}
	cout << 'Yes' << endl;
}

Compiler output:
a.cc:20:33: warning: multi-character character constant [-Wmultichar]
   20 |                         cout << 'No' << endl;
      |                                 ^~~~
a.cc:24:17: warning: multi-character character constant [-Wmultichar]
   24 |         cout << 'Yes' << endl;
      |                 ^~~~~
a.cc: In function 'int main()':
a.cc:17:35: error: 'j' was not declared in this scope
   17 |                 if (a[i] + 2 == b[j] + 1) {
      |                                   ^
a.cc:21:25: error: return-statement with no value, in function returning 'int' [-fpermissive]
   21 |                         return;
      |                         ^~~~~~
Language: C++

#include <iostream>
using namespace std;
int main()
{
	int n;
	cin >> n;
	int a[10000];
	int b[10000];
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];

	}
	for (int i = 0; i < n; i++)
	{
		cin >> b[i];
	}
	int la = 0;
	int lb = 0;

	for(int i = 0 ; i < n ; i++)
	{
		if(a[i] > b[i])
		{
			la += (a[i] - b[i]);
		}else
		{
			lb += (b[i] - a[i])
		}

	}
	if(la > lb)
	{
		cout << "No" << endl;
	}else
	{
		cout << "Yes" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:44: error: expected ';' before '}' token
   28 |                         lb += (b[i] - a[i])
      |                                            ^
      |                                            ;
   29 |                 }
      |                 ~
Language: C++

#include<iostream>

using namespace std;

int main()
{
    int n,c=0;

    cin>>n;

    long long a[n+1];
    long long b[n+1];

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

    }

    for(int i=1; i<=n; i++)
    {
        if(a[i] > b[i])
        {
            c += a[i] - b[i];
        }
        if(b[i] > a[i])
        {
            c -= (b[i] - a[i]) / 2;
        }

    }
    if(c<=0)
    {
        cout<<"YES"<<endl;
    }
    else
    {
        cout<<"NO"<<endl;
    }


    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:16: error: 'j' was not declared in this scope
   20 |         cin>>b[j];
      |                ^
Language: Java

import java.util.*;

class Main {
   public static void main(String[] args)
   {
      Scanner scan = new Scanner(System.in);
      int     num = scan.nextInt();
      int     value = 0, count = 0, t;

      long[] A = new long[num];
      long[] B = new long[num];

      for(int i = 0; i < num; i++){
          A[i] = scan.nextInt();
          }
      for(int j = 0; j < num; j++){
          B[j] = scan.nextInt();
          }

      //Arrays.sort(A);
      //Arrays.sort(B);
      for(int i = 0; i < num; i++){
          if(A[i] < B[i]){
             value = (B[i] + 1 - A[i]) / 2
                     //System.out.println("value" + value);
                     if(A[i] > B[i]){
                count += A[i] - B[i];
                //System.out.println(count);
                }
             }
          else if(A[i] == B[i]){
                  }
          else{
              count += A[i] - B[i];
              }
          }
      t = value - count;
      //System.out.println("cou" + count);
      if(t == 0 || t == 1){
         System.out.println("Yes");
         return;
         }
      else{
          System.out.println("No");
          return;
          }
   }
}


Compiler output:
Main.java:24: error: ';' expected
             value = (B[i] + 1 - A[i]) / 2
                                          ^
1 error
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define INF (1<<30)
#define MOD (1e9+7)

int main(void){
	int n,i;
  	ll ,a[12345],b[12345],debt=0ll;
	bool flag = true;
	cin >> n;
	for(i=0; i<n; i++){
		cin >> a[i];
	}
	for(i=0; i<n; i++){
		cin >> b[i];
	}
	for(i=0; i<n; i++){
		if(a[i]>b[i]){
			debt += (a[i]-b[i])*2;
			b[i] = a[i];
		}
	}
	for(i=0; i<n; i++){
		debt -= ((b[i]-a[i])/2)*2;
	}
	cout << ((debt<=0)?"Yes":"No") << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: expected unqualified-id before ',' token
    9 |         ll ,a[12345],b[12345],debt=0ll;
      |            ^
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define INF (1<<30)
#define MOD (1e9+7)

int main(void){
	int n,i;
	bool flag = true;
	ll a[12345],b[12345],i,save=0;
	cin >> n;
	for(i=0; i<n; i++){
		cin >> a[i];
	}
	for(i=0; i<n; i++){
		cin >> b[i];
	}
	for(i=0; i<n; i++){
		if(a[i] > b[i]){
			flag = false;
			save -= (a[i]-b[i])*2;
		}else{
			save += ((b[i]-a[i])/2)*2;
		}
	}
	if(flag){
		cout << "Yes" << endl;
		return 0;
	}else if(save >= 0){
		cout << "Yes" << endl;
	}else{
		cout << "No" << endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:30: error: conflicting declaration 'll i'
   10 |         ll a[12345],b[12345],i,save=0;
      |                              ^
a.cc:8:15: note: previous declaration as 'int i'
    8 |         int n,i;
      |               ^
Language: C++

#include<iostream>
#include<set>
#include<vector>
#include<cmath>
#include<complex>
#include<string>
#include<algorithm>

using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define pb push_back

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vi> vvi;


int main(void)
{

    int n,x[10007],y[10007];
    ll xsum , ysum;
    ll sum;

    cin >> n;
    rep(i,n){
      cin >> x[i];
      xsum += x[i];
    }
    rep(j,n){
      cin >> y[j];
      ysum += y[i];
    }
    sum = xsum+ysum;

    if((sum%3) == 0){
      cout << "Yes" << endl;
      return 0;
    }

    cout << "No" << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:17: error: 'i' was not declared in this scope
   34 |       ysum += y[i];
      |                 ^
Language: Java

import java.util.*;

class Main {
   public static void main(String[] args)
   {
      Scanner scan = new Scanner(System.in);
      int     num = scan.nextInt();
      int     value = 0, count = 0;

      int[] A = new int[num];
      int[] B = new int[num];

      for(int i = 0; i < num; i++){
          A[i] = scan.nextInt();
          }
      for(int j = 0; j < num; j++){
          B[j] = scan.nextInt();
          }

      //Arrays.sort(A);
      //Arrays.sort(B);
      for(int i = 0; i < num; i++){
          if(A[i] < B[i]){
             do {
                A[i] += 2;
                value++;
                } while(A[i] < B[i]);
             //System.out.println("value" + value);
             if(A[i] > B[i]){
                count += A[i] - B[i];
                //System.out.println(count);
                }
             }
          else{
              count += A[i] - B[i];
              }
          }
      System.out.println("cou" + count);
      if((value - count) >= 0 && (value - count) <= 1; ){
         System.out.println("Yes");
         return;
         }
      else{
          System.out.println("No");
          return;
          }
   }
}


Compiler output:
Main.java:39: error: ')' expected
      if((value - count) >= 0 && (value - count) <= 1; ){
                                                     ^
Main.java:39: error: illegal start of expression
      if((value - count) >= 0 && (value - count) <= 1; ){
                                                       ^
Main.java:43: error: 'else' without 'if'
      else{
      ^
3 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin >> n;
    long int a,b;
    for (int i = 0;i<n;i++){
        cin >> a;
        cin >> b;
        long int ar = 0;
        long int br = 0;
        ar+=a;
        br+=b;
    }
    if ((ar-br)%3 == 0) cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:10: error: 'ar' was not declared in this scope; did you mean 'a'?
   15 |     if ((ar-br)%3 == 0) cout << "Yes" << endl;
      |          ^~
      |          a
a.cc:15:13: error: 'br' was not declared in this scope; did you mean 'b'?
   15 |     if ((ar-br)%3 == 0) cout << "Yes" << endl;
      |             ^~
      |             b
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int[] hai1=new int[n];
    int[] hai2=new int[n];
    int[] hai3=new int[n];
    boolean han=true;
    for(int i:hai1)
      hai1[i]=sc.nextInt();
    for(int i:hai2)
      hai2[i]=sc.nextInt();
    for(int i:hai3){
      if(hai1[i]>hai2[i]) hai3[i]=hai1[i]-hai2[i];
      else if(hai2[i]>hai1[i]) hai3[i]=hai2[i]-hai1[i];
      else hai3[i]==0;
    }
    for(int i:hai3)
      if(hai3[i]>1&&hai3[i]%2!=0)han=false;
    if(han==true) System.out.println("Yes");
    else System.out.println("No");
  }
}

Compiler output:
Main.java:17: error: not a statement
      else hai3[i]==0;
                  ^
1 error
Language: C++

import java.util.*;
public class Main{
  public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int[] hai1=new int[n];
    int[] hai2=new int[n];
    int[] hai3=new int[n];
    boolean han=true;
    for(int i:hai1)
      hai1[i]=sc.nextInt();
    for(int i:hai2)
      hai2[i]=sc.nextInt();
    for(int i:hai3){
      if(hai1[i]>hai2[i]) hai3[i]=hai1[i]-hai2[i];
      else if(hai2[i]>hai1[i]) hai3[i]=hai2[i]-hai1[i];
    }
    for(int i:hai3)
      if(hai3[i]>1&&hai3[i]%2!=0)han=false;
    if(han==true) System.out.println("Yes");
    else System.out.println("No");
  }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
    2 | public class Main{
      | ^~~~~~