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

#include <stdio.h>
 
int main(void){
 
double x,y,ans;
double i;
int check = 0;
 

 scanf("%lf",&x);
scanf("%lf",&y);

if(x == y)
printf("-1");
 
for(i=1;i<1000000000;i++){
ans = x * i;
if(ans%y != 0){
printf("%f",ans);
check = 1;
}
}
 
if(check == 0)
printf("-1");
 
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:7: error: invalid operands to binary % (have 'double' and 'double')
   18 | if(ans%y != 0){
      |       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int (i)=(0);(i)<(int)(n);++(i))
using ll = long long;
using P = pair<int, int>;
using namespace std;

template<class T> void vin(vector<T>& v, int n) {
    v.resize(n);
    for (int i = 0; i < n; ++i) {
        cin >> v[i];
    }
}

ll gcd(ll a, ll b) {
    if (b == 0) return a;
    return gcd(b, a%b);
}

ll lcm(ll a, ll b) {
    ll g = gcd(a, b);
    return a / g * b;
}

int main() {
    ll x, y;
    cin >> x >> y;
    ll tmp = lcm(x, y);
    if (tmp == x or tmp == y) {
        cout << -1 << endl;
    }
    else {
        bool ok = false;
        for (ll i = 1; i*x<=1e18; ++i) {
            if ((i*x)%tmp != 0) {
                cout << i*x << endl;
                ok = true;
                break;
            }
        }
    }
    if (!ok) cout << -1 << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:10: error: 'ok' was not declared in this scope
   42 |     if (!ok) cout << -1 << endl;
      |          ^~
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
using namespace std;
#define pb push_back
#define s stack<T> s;
#define q queue<T> q;





/** sort(array); 配列をソートする　**/


/** リスト内の一番大きな値を返す **/
int getMaxNum(vector<int> array)
{
	int ret = array[0];
	for(int i=1;i<array.size();i++)
	{
		if(ret < array[i]) ret = array[i];
	}
	return ret;
}



int main(){
	
	int A,B;
	scanf("%d%d",&A,&B)

	if(A==B)
	{
		cout << "-1" << endl;
		return 0;
	}
	while (true)
	{
		int i = 1;
		if((A*i)%B==0)
		{
			cout << A*i << endl;
			return 0;
		}
		i += 1;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:28: error: expected ';' before 'if'
   40 |         scanf("%d%d",&A,&B)
      |                            ^
      |                            ;
   41 | 
   42 |         if(A==B)
      |         ~~
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
using namespace std;
#define pb push_back
#define s stack<T> s;
#define q queue<T> q;





/** sort(array); 配列をソートする　**/


/** リスト内の一番大きな値を返す **/
int getMaxNum(vector<int> array)
{
	int ret = array[0];
	for(int i=1;i<array.size();i++)
	{
		if(ret < array[i]) ret = array[i];
	}
	return ret;
}



int main(){
	
	int A,B;
	scanf("%d%d",&A,&B)

	if (A==B)
	{
		cout << "-1" << endl;
		return 0;
	}
	while true
	{
		int i = 1;
		if((A*i)%B==0)
		{
			cout << A*i << endl;
			return 0;
		}
		i += 1;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:28: error: expected ';' before 'if'
   40 |         scanf("%d%d",&A,&B)
      |                            ^
      |                            ;
   41 | 
   42 |         if (A==B)
      |         ~~                  
a.cc:47:15: error: expected '(' before 'true'
   47 |         while true
      |               ^~~~
      |               (
a.cc:47:19: error: expected ')' before '{' token
   47 |         while true
      |               ~~~~^
      |                   )
   48 |         {
      |         ~
Language: C++

import java.util.Scanner;
public class mo1 {
	public static void main(String args[]) throws Exception{
	    Scanner sn = new Scanner(System.in);
	    int X = -1;
	    int Y = -1;

	    while ( X < 1 || Y > 1000000000 ){
	    	X = sn.nextInt();
	    	Y = sn.nextInt();
	    }
	    if ( X == Y ){
	    	System.out.println("-1");
	    }else{
	    	System.out.printf("%d", X);
	    }


	  }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
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 mo1 {
      | ^~~~~~
Language: C

#include <stdio.h>
 
int main(void){
 
double x,y,ans;
double i;
int check = 0;
 
scanf("%lf",&x);
scanf("%lf",&y);
 
if(x == y)
printf("-1");
 
for(i=1;i<1000000000;i++){
ans = x * i:
if(ans%y != 0){
printf("%f",ans);
check = 1;
}
}
 
if(check == 0)
printf("-1");
 
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:12: error: expected ';' before ':' token
   16 | ans = x * i:
      |            ^
      |            ;
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
using namespace std;
#define pb push_back
#define s stack<T> s;
#define q queue<T> q;





/** sort(array); 配列をソートする　**/


/** リスト内の一番大きな値を返す **/
int getMaxNum(vector<int> array)
{
	int ret = array[0];
	for(int i=1;i<array.size();i++)
	{
		if(ret < array[i]) ret = array[i];
	}
	return ret;
}
/** 深さ優先探索の実装 **/
int dfs(int now)
{
	if(/** nowが終了条件 **/) return /** nowの答 **/;
	int ret = -1;
	for (int i=0;i</** 次の状態の個数**/;i++)
	{
		int next = /** i番目の状態 **/;
		if(/** nextが条件を満たしている **/) ret = max(dfs(next),ret);
	}
	return ret;
}




int main(){
	
	int A,B;
	scanf("%d%d",&A,&B)

	if (A==B)
	{
		cout << "-1" << endl;
		return 0;
	}
	while true
	{
		int i = 1;
		if((A*i)%B==0)
		{
			cout << A*i << endl;
			return 0;
		}
		i += 1;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int dfs(int)':
a.cc:37:33: error: expected primary-expression before ')' token
   37 |         if(/** nowが終了条件 **/) return /** nowの答 **/;
      |                                 ^
a.cc:37:35: error: return-statement with no value, in function returning 'int' [-fpermissive]
   37 |         if(/** nowが終了条件 **/) return /** nowの答 **/;
      |                                   ^~~~~~
a.cc:39:45: error: expected primary-expression before ';' token
   39 |         for (int i=0;i</** 次の状態の個数**/;i++)
      |                                             ^
a.cc:41:47: error: expected primary-expression before ';' token
   41 |                 int next = /** i番目の状態 **/;
      |                                               ^
a.cc:42:52: error: expected primary-expression before ')' token
   42 |                 if(/** nextが条件を満たしている **/) ret = max(dfs(next),ret);
      |                                                    ^
a.cc: In function 'int main()':
a.cc:53:28: error: expected ';' before 'if'
   53 |         scanf("%d%d",&A,&B)
      |                            ^
      |                            ;
   54 | 
   55 |         if (A==B)
      |         ~~                  
a.cc:60:15: error: expected '(' before 'true'
   60 |         while true
      |               ^~~~
      |               (
a.cc:60:19: error: expected ')' before '{' token
   60 |         while true
      |               ~~~~^
      |                   )
   61 |         {
      |         ~
Language: C

#include <stdio.h>
 
int main(void){
 
double x,y,ans;
double i:
int check = 0;
 
scanf("%f",&x);
scanf("%f",&y);
 
if(x == y)
printf("-1");
 
for(i=1;i<1000000000;i++){
ans = x * i:
if(ans%y != 0){
printf("%f",ans);
check = 1;
}
}
 
if(check == 0)
printf("-1");
 
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    6 | double i:
      |         ^
main.c:6:9: error: expected expression before ':' token
main.c:15:5: error: 'i' undeclared (first use in this function)
   15 | for(i=1;i<1000000000;i++){
      |     ^
main.c:15:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:12: error: expected ';' before ':' token
   16 | ans = x * i:
      |            ^
      |            ;
main.c:23:4: error: 'check' undeclared (first use in this function)
   23 | if(check == 0)
      |    ^~~~~
Language: C++

// 235816VL
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <deque>
#include <string>
#include <list>
#include <algorithm>
#include <cmath>
#include <fstream>
#include <map>
#include <set>
#include <sstream>
#include <unordered_map>
#include <bitset>
#include <conio.h>
using namespace std;
typedef unsigned long long int lli;
#define FOR(i, p, n) for(int i(p); i < n; i++)
#define ALL(a) (a.begin()),(a.end())
#define sqrt(x) sqrt(1.0*(x))
#define pow(x,n) pow(1.0*(x),n)
#define UN(x) (x).resize(unique(ALL((x))) - (x).begin()
bool solve(){
	int x, y;
	cin >> x >> y;
	if (x % y == 0) {
		cout << "-1";
	}
	else {
		cout << x;
	}
	return 0;
}
int main()
{
	solve();
///	while (!solve());
	return 0;
}


Compiler output:
a.cc:16:10: fatal error: conio.h: No such file or directory
   16 | #include <conio.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>
 
int main(void){
 
double x,y,ans;
double i;
int check = 0;
 
scanf("%lf",&x);
scanf("%lf",&y);
 
if(x == y)
print("-1")
 
for(i=1;i<1000000000;i++){
ans = x * i:
if(ans%y != 0){
printf("%f",ans);
check = 1;
}
}
 
if(check == 0)
printf("-1");
 
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:1: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   13 | print("-1")
      | ^~~~~
      | printf
main.c:13:12: error: expected ';' before 'for'
   13 | print("-1")
      |            ^
      |            ;
   14 | 
   15 | for(i=1;i<1000000000;i++){
      | ~~~
Language: C++

// 235816VL
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <deque>
#include <string>
#include <list>
#include <algorithm>
#include <cmath>
#include <fstream>
#include <map>
#include <set>
#include <sstream>
#include <unordered_map>
#include <bitset>
#include <conio.h>
using namespace std;
typedef unsigned long long int lli;
#define FOR(i, p, n) for(int i(p); i < n; i++)
#define ALL(a) (a.begin()),(a.end())
#define sqrt(x) sqrt(1.0*(x))
#define pow(x,n) pow(1.0*(x),n)
#define UN(x) (x).resize(unique(ALL((x))) - (x).begin()
bool solve(){
	int x, y;
	cin >> x >> y;
	if (x % y == 0) {
		cout << "-1";
	}
	else {
		cout << x;
	}
	return 0;
}
int main()
{
	solve();
	//while (!solve());
	return 0;
}


Compiler output:
a.cc:16:10: fatal error: conio.h: No such file or directory
   16 | #include <conio.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

// 235816VL
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <deque>
#include <string>
#include <list>
#include <algorithm>
#include <cmath>
#include <fstream>
#include <map>
#include <set>
#include <sstream>
#include <unordered_map>
#include <bitset>
#include "windows.h"
#include <conio.h>
using namespace std;
typedef unsigned long long int lli;
#define FOR(i, p, n) for(int i(p); i < n; i++)
#define ALL(a) (a.begin()),(a.end())
#define sqrt(x) sqrt(1.0*(x))
#define pow(x,n) pow(1.0*(x),n)
#define UN(x) (x).resize(unique(ALL((x))) - (x).begin()
bool solve(){
	int x, y;
	cin >> x >> y;
	if (x % y == 0) {
		cout << "-1";
	}
	else {
		cout << x;
	}
	return 0;
}
int main()
{
	solve();
//	while (!solve());
	return 0;
}


Compiler output:
a.cc:16:10: fatal error: windows.h: No such file or directory
   16 | #include "windows.h"
      |          ^~~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>

int main(void){

double x,y,ans;
double i:
int check = 0;

scanf("%f",&x);
scanf("%f",&y);

if(x == y)
print("-1")

for(i=1;i<1000000000;i++){
ans = x * i:
if(ans%y != 0){
printf("%f",ans);
check = 1;
}
}

if(check == 0)
printf("-1");

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    6 | double i:
      |         ^
main.c:6:9: error: expected expression before ':' token
main.c:13:1: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   13 | print("-1")
      | ^~~~~
      | printf
main.c:13:12: error: expected ';' before 'for'
   13 | print("-1")
      |            ^
      |            ;
   14 | 
   15 | for(i=1;i<1000000000;i++){
      | ~~~
Language: Java

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int x = sc.nextInt();
        int y = sc.nextInt();
        
        long ans = x;
        if (x % y == 0) {
            ans = -1;
        }
        System.out.println(ans);
    }
}

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++

#include <bits/stdc++.h>
using namespace std;
int main(){
	long long x, y, d=1;
	cin>>x>>y;
	if (x==y or x%y==0 or y%x==0 or y==1){
		cout<<"-1";
	}
	else if ()
	else {
		for (int k=2; d!=0; k++){
			x*=k;
			if (x%y!=0){
				d=0;
				cout<<x;
			}
			x/=k;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: expected primary-expression before ')' token
    9 |         else if ()
      |                  ^
a.cc:10:9: error: expected primary-expression before 'else'
   10 |         else {
      |         ^~~~
Language: C++

X, Y = map(int, input().split())

if X % Y == 0 or Y % X == 0:
    print('-1')
    exit()

for i in range(2, 10**18):
    if X*i % Y != 0:
        print(X*i)
        exit()

Compiler output:
a.cc:4:11: warning: multi-character character constant [-Wmultichar]
    4 |     print('-1')
      |           ^~~~
a.cc:1:1: error: 'X' does not name a type
    1 | X, Y = map(int, input().split())
      | ^
Language: C++

X, Y = map(int, input().split())

for x in range(1, 10**18):
    if x % X == 0:
        if x % Y != 0:
            ans = x
            break
        else:
            ans = -1
print(ans)

        

Compiler output:
a.cc:1:1: error: 'X' does not name a type
    1 | X, Y = map(int, input().split())
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    ll x,y;
    cin>>x>>y;
    if(x%y==0)
    {
        cout<<-1<<endl;
        return 0;
    }
    for(ll i=x;i<=mm;i+=x)
    {
        if(i%y!=0)
        {
            cout<<i<<endl;
            return 0;
        }
    }
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: 'mm' was not declared in this scope; did you mean 'tm'?
   13 |     for(ll i=x;i<=mm;i+=x)
      |                   ^~
      |                   tm
Language: C++

#include <iostream>
//#include <array>

int main() {
    long a,b;
    if a%b==0{
        std::cout << -1 << '\n';
    }else{
        long i=1;
        while(true){
            if (i*a) % b != 0{
                std::cout << i*a << '\n';
                break;
            }else{
                i++;
            }
        }
    }
    
    return 0; }


Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: expected '(' before 'a'
    6 |     if a%b==0{
      |        ^
      |        (
a.cc:8:6: error: 'else' without a previous 'if'
    8 |     }else{
      |      ^~~~
a.cc:11:22: error: expected primary-expression before '%' token
   11 |             if (i*a) % b != 0{
      |                      ^
Language: C++

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

public class A {

	public static void main(String[] args) {
		FastScanner scan = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		int a = scan.nextInt(), b = scan.nextInt();
		if(a == 1 || b == 1 || a%b==0) out.println(-1);
		else out.println(a);
		out.close();
	}
	
	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner() {
			try	{
				br = new BufferedReader(new InputStreamReader(System.in));
				st = new StringTokenizer(br.readLine());
			} catch (Exception e){e.printStackTrace();}
		}

		public String next() {
			if (st.hasMoreTokens())	return st.nextToken();
			try {st = new StringTokenizer(br.readLine());}
			catch (Exception e) {e.printStackTrace();}
			return st.nextToken();
		}

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

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

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

		public String nextLine() {
			String line = "";
			if(st.hasMoreTokens()) line = st.nextToken();
			else try {return br.readLine();}catch(IOException e){e.printStackTrace();}
			while(st.hasMoreTokens()) line += " "+st.nextToken();
			return line;
		}

		public int[] nextIntArray(int n) {
			int[] a = new int[n];
			for(int i = 0; i < n; i++) a[i] = nextInt();
			return a;
		}

		public long[] nextLongArray(int n){
			long[] a = new long[n];
			for(int i = 0; i < n; i++) a[i] = nextLong();
			return a;
		}

		public double[] nextDoubleArray(int n){
			double[] a = new double[n];
			for(int i = 0; i < n; i++) a[i] = nextDouble();
			return a;
		}

		public char[][] nextGrid(int n, int m){
			char[][] grid = new char[n][m];
			for(int i = 0; i < n; i++) grid[i] = next().toCharArray();
			return grid;
		}
	}

}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.BufferedReader;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.IOException;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.InputStreamReader;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.io.PrintWriter;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import java.util.Arrays;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import java.util.StringTokenizer;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: expected unqualified-id before 'public'
    8 | public class A {
      | ^~~~~~
Language: C++

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



int main(){
    ll x;ll y;
    cin>>x>>y;
    if(x%y==0){cout<<-1<<endl;return 0;}
    cout<<x*y-x<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'll' was not declared in this scope
    7 |     ll x;ll y;
      |     ^~
a.cc:7:12: error: expected ';' before 'y'
    7 |     ll x;ll y;
      |            ^~
      |            ;
a.cc:8:10: error: 'x' was not declared in this scope
    8 |     cin>>x>>y;
      |          ^
a.cc:8:13: error: 'y' was not declared in this scope; did you mean 'yn'?
    8 |     cin>>x>>y;
      |             ^
      |             yn
Language: C++

#include<cstdio>
#include<cmath>
#include<cstring>
#include<stack>
#include<map>
#include<set>
#include<queue>
#include<vector>
#include<iostream>
#include<algorithm>
#define MAXN 11000
#define LL long long
#define ll __int64
#define INF 0x3f3f3f3f
#define mem(x) memset(x,0,sizeof(x))
#define PI acos(-1)
#define eps 1e-10
#define RD(n) scanf("%d",&n)
using namespace std;
int gcd(int a,int b){return b?gcd(b,a%b):a;}
int lcm(int a,int b){return a/gcd(a,b)*b;}
LL powmod(LL a,LL b,LL MOD){LL ans=1;while(b){if(b%2)ans=ans*a%MOD;a=a*a%MOD;b/=2;}return ans;}
//head  ios::sync_with_stdio(false);


/*
    1.Shoud it use long long ?
    2.Have you ever test several sample(at least three) yourself?
    3.Can you promise that the solution is right? At least,the main ideal
    4.use the puts("") or putchar() or printf and such things?
    5.init the used array or any value?
    6.use error MAX_VALUE?
    7.use scanf instead of cin/cout?
    8.whatch out the detail input require
*/
const int maxn=1e18+5; 
int main()
{
	LL a,b;
	cin>>a>>b;
	if(a%b==0)
	{
		cout<<-1;
	}
	else
	{
		cout<<x;
	 } 
}




Compiler output:
a.cc:36:20: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
   36 | const int maxn=1e18+5;
      |                ~~~~^~
a.cc: In function 'int main()':
a.cc:47:23: error: 'x' was not declared in this scope
   47 |                 cout<<x;
      |                       ^
Language: C++

#include<cstdio>
#include<cmath>
#include<cstring>
#include<stack>
#include<map>
#include<set>
#include<queue>
#include<vector>
#include<iostream>
#include<algorithm>
#define MAXN 11000
#define LL long long
#define ll __int64
#define INF 0x3f3f3f3f
#define mem(x) memset(x,0,sizeof(x))
#define PI acos(-1)
#define eps 1e-10
#define RD(n) scanf("%d",&n)
using namespace std;
int gcd(int a,int b){return b?gcd(b,a%b):a;}
int lcm(int a,int b){return a/gcd(a,b)*b;}
LL powmod(LL a,LL b,LL MOD){LL ans=1;while(b){if(b%2)ans=ans*a%MOD;a=a*a%MOD;b/=2;}return ans;}
//head  ios::sync_with_stdio(false);


/*
    1.Shoud it use long long ?
    2.Have you ever test several sample(at least three) yourself?
    3.Can you promise that the solution is right? At least,the main ideal
    4.use the puts("") or putchar() or printf and such things?
    5.init the used array or any value?
    6.use error MAX_VALUE?
    7.use scanf instead of cin/cout?
    8.whatch out the detail input require
*/
const int maxn=1e18+5; 
int main()
{
	LL a,b;
	cin>>a>>b;
	if(x%y==0)
	{
		cout<<-1;
	}
	else
	{
		cout<<x;
	 } 
}




Compiler output:
a.cc:36:20: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
   36 | const int maxn=1e18+5;
      |                ~~~~^~
a.cc: In function 'int main()':
a.cc:41:12: error: 'x' was not declared in this scope
   41 |         if(x%y==0)
      |            ^
a.cc:41:14: error: 'y' was not declared in this scope
   41 |         if(x%y==0)
      |              ^
Language: C++

File Edit Options Buffers Tools C Help                                          
#include <stdio.h>

int main()
{
  long long int X,Y;

  scanf("%lld %lld",&X,&Y);

  printf("%lld\n",X%Y ? X : -1);

  return 0;
}



Compiler output:
a.cc:1:1: error: 'File' does not name a type
    1 | File Edit Options Buffers Tools C Help
      | ^~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'scanf' was not declared in this scope
    8 |   scanf("%lld %lld",&X,&Y);
      |   ^~~~~
a.cc:10:3: error: 'printf' was not declared in this scope
   10 |   printf("%lld\n",X%Y ? X : -1);
      |   ^~~~~~
a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    2 | #include <stdio.h>
  +++ |+#include <cstdio>
    3 |
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 x,y;
	cin >> x >> y;
	cout << ((x%y==0)?"-1":x) << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:26: error: operands to '?:' have different types 'const char*' and 'int'
   10 |         cout << ((x%y==0)?"-1":x) << endl;
      |                  ~~~~~~~~^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define IN freopen("input.txt","r",stdin)
#define OUT freopen("output.txt","w",stdout)
#define pf printf
#define sf scanf
#define pb push_back
#define MAX5 100005
#define MAX6 1000005
#define MAX7 10000005
#define FOR(a,n) for(int i=a;i<n;i++)
#define all(x) x.begin(),x.end()
#define mod7 1000000007
typedef long long int ll;
typedef long double lld;
const double PI=2*acos(0.0);
int CASE=1,TEST=0;
template<typename T>T ceilling(T a){return ((double)((ll)a))==a?  (T)a :  (T)((ll)(a+1.0));}
template<typename T>T flooring(T a){return (T)((ll)a);}
template<typename T>T pairmin(T a,T b){return (a>b) ? b : a;}
template<typename T>T pairmax(T a,T b){return (a>b) ? a : b;}
template<typename T>T arrymax(T arr[],int arrsize){T m=arr[0]; for(int i=0;i<arrsize;i++){ if(arr[i]>m){m=arr[i];}} return m;}
template<typename T>T arrymin(T arr[],int arrsize){T m=arr[0]; for(int i=0;i<arrsize;i++){ if(arr[i]<m){m=arr[i];}} return m;}
template<typename T>T LCM(T a,T b){ return ((a*b)/__gcd(a,b));}
template<typename T>T ABS(T a){return a<0 ? (-1*a): a ;}
struct vpair{
    int a;
    int b;
    vpair(int a,int b){this->a=a;this->b=b;}
};
bool cmp(vpair &a,vpair &b){
    if(a.a<b.a)return true;
    else if(a.a==b.a){
        if(a.b<b.b)return true;
        else return false;
    }else{
        return false;
    }
}
ll a,b,n,ans;
int main(void){
    sf("%lld %lld",&n,&m);
    for(int i=2;i<100005;i++){
        if(n*i%m!=0){
            pf("%lld\n",n*i);
            return 0;
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:24: error: 'm' was not declared in this scope; did you mean 'tm'?
   42 |     sf("%lld %lld",&n,&m);
      |                        ^
      |                        tm
Language: C++

def ascan; gets.split.map(&:to_i);end

x,y = ascan

p x == y || y==1 ? -1 : x*(y+1)


Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def ascan; gets.split.map(&:to_i);end
      | ^~~
a.cc:1:12: error: 'gets' does not name a type
    1 | def ascan; gets.split.map(&:to_i);end
      |            ^~~~
a.cc:1:35: error: 'end' does not name a type
    1 | def ascan; gets.split.map(&:to_i);end
      |                                   ^~~
Language: C++

https://www.facebook.com/KaohsiungHTROC/photos/a.1421418581498187.1073741829.1421279811512064/1503262933313751/?type=3&permPage=1

Compiler output:
a.cc:1:1: error: 'https' does not name a type
    1 | https://www.facebook.com/KaohsiungHTROC/photos/a.1421418581498187.1073741829.1421279811512064/1503262933313751/?type=3&permPage=1
      | ^~~~~
Language: C++

#define _USE_MATH_DEFINES

#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cmath>
//#include <atcoder/all>
using namespace std;
using namespace atcoder;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef tuple<ll, ll, ll> tl3;

typedef modint998244353 mint;

const int BIG_NUM = 1e9;
const ll INF = 1000000000000000000;
//const ll MOD = 1e9 + 7;
const ll MOD = 998244353;

const ll MAX = 1e9 + 5;

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

	vector<ll> a(n);
	vector<ll> b(n);

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

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


	vector<ll> c(n);
	for (int i = 0; i < n; i++) {
		c[i] = b[i] - a[i];
	}

	sort(c.begin(), c.end());

	ll cnt_n = 0;
	ll cnt_p = 0;
	for (int i = 0; i < n; i++) {
		if (c[i] > 0) {
			cnt_p += c[i];
		}
		else {
			cnt_n += abs(c[i]);
		}
	}
	//cout << cnt_n << " " << cnt_p << endl;
	if (cnt_n * 2 > cnt_p) {
		cout << "No" << endl;
	}
	else {
		cout << "Yes" << endl;
	}
}

Compiler output:
a.cc:15:17: error: 'atcoder' is not a namespace-name
   15 | using namespace atcoder;
      |                 ^~~~~~~
a.cc:22:9: error: 'modint998244353' does not name a type
   22 | typedef modint998244353 mint;
      |         ^~~~~~~~~~~~~~~
Language: C++

#define _USE_MATH_DEFINES

#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cmath>
#include <atcoder/all>
using namespace std;
using namespace atcoder;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef tuple<ll, ll, ll> tl3;

typedef modint998244353 mint;

const int BIG_NUM = 1e9;
const ll INF = 1000000000000000000;
//const ll MOD = 1e9 + 7;
const ll MOD = 998244353;

const ll MAX = 1e9 + 5;

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

	vector<ll> a(n);
	vector<ll> b(n);

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

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


	vector<ll> c(n);
	for (int i = 0; i < n; i++) {
		c[i] = b[i] - a[i];
	}

	sort(c.begin(), c.end());

	ll cnt_n = 0;
	ll cnt_p = 0;
	for (int i = 0; i < n; i++) {
		if (c[i] > 0) {
			cnt_p += c[i];
		}
		else {
			cnt_n += abs(c[i]);
		}
	}
	//cout << cnt_n << " " << cnt_p << endl;
	if (cnt_n * 2 > cnt_p) {
		cout << "No" << endl;
	}
	else {
		cout << "Yes" << endl;
	}
}

Compiler output:
a.cc:13:10: fatal error: atcoder/all: No such file or directory
   13 | #include <atcoder/all>
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
#define rep(i,N) for(ll (i)=0;(i)<(N);(i)++)
#define chmax(x,y) x=max(x,y)
#define chmin(x,y) x=min(x,y)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
const int mod = 1000000007;
const int INF = 1001001001;

int main() {
  int n;
  cin >> n;
  vector<ll> a(n), b(n);
  rep(i, n) cin >> a[i] >> b[i];
  ll costa = 0;
  ll costb = 0;

  rep(i, n) {
    if (a[i] < b[i]) costa += (b[i] - a[i]) / 2;
    if (a[i] > b[i]) costb += a[i] - b[i];
  }
  if (costb  costa) cout << "No" << endl;
  else cout << "Yes" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:12: error: expected ')' before 'costa'
   23 |   if (costb  costa) cout << "No" << endl;
      |      ~     ^ ~~~~~
      |            )
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define fi first
#define se second
long long mo = 1e9 + 7;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> Pii;
typedef pair<ll,ll> Pll;
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
template<class A>void PR(A a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}cout << "\n";}
ld PI=3.14159265358979323846;

int main(){
    ll N;
    cin >> N;
    vector<ll> a(N), b(N);
    ll suma=0,sumb=0;
    rep(i,N){
        cin >> a[i];
        suma += a[i];
    }
    rep(i,N){
        cin >> b[i];
        sumb += b[i];
    }
    ll nop = sumb - suma;
    if(nop < 0){
        cout << "No" <<endl;
        returyyen 0;
    }
    ll cnt=0;
    /*rep(i,N){
        cnt += max(0LL, a[i]-b[i]);
    }
    ll ta = cnt*2;*/
    rep(i,N){
        cnt += max(0LL, (b[i]-a[i]+1)/2);
    }
    if(cnt <= nop){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }
}

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

/*------------------------------------
........Bismillahir Rahmanir Rahim....
..........created by Abdul Aziz.......
------------------------------------*/
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <cstring>
#include <unordered_map>
#include <queue>
#define   mod  998244353
#define   int  long long 
#define   ld   long double
#define   pb   push_back
#define   vi  vector<int> 
#define   dbg(x)  cerr << #x << " = " << x << '\n'
#define   sz(x)  (int)x.size()
#define   all(a) (a.begin(),a.end())
#define   ff   first
#define   ss   second
#define   pii  pair<int,int> 
#define   lcm(a,b) (a*b)/__gcd(a,b) 
using namespace std;

inline void solve(){
    int n; cin>>n; 
    vi a(n),b(n);
    for (int &i: a) cin >> i ; 
    for (int &i: b) cin >> i ; 
    int f=0,s=0; 
    int ok = 0;
    for (int i=0;i<n;i++){
        s += max(0LL,(a[i]-b[i])*2);
        ok += max(0LL,(b[i]-a[i])/2); 
    }
    if (ok >= s/2) or (s==0) ) printf("Yes\n");
    else printf("No\n");
}

signed main()
{
    int n=1; // cin>>n;
    while (n--) solve();
    return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:40:20: error: expected primary-expression before 'or' token
   40 |     if (ok >= s/2) or (s==0) ) printf("Yes\n");
      |                    ^~
Language: C++

/*------------------------------------
........Bismillahir Rahmanir Rahim....
..........created by Abdul Aziz.......
------------------------------------*/
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <cstring>
#include <unordered_map>
#include <queue>
#define   mod  998244353
#define   int  long long 
#define   ld   long double
#define   pb   push_back
#define   vi  vector<int> 
#define   dbg(x)  cerr << #x << " = " << x << '\n'
#define   sz(x)  (int)x.size()
#define   all(a) (a.begin(),a.end())
#define   ff   first
#define   ss   second
#define   pii  pair<int,int> 
#define   lcm(a,b) (a*b)/__gcd(a,b) 
using namespace std;

inline void solve(){
    int n; cin>>n; 
    vi a(n),b(n);
    for (int &i: a) cin >> i ; 
    for (int &i: b) cin >> i ; 
    int f=0,s=0; 
    int ok = 0;
    for (int i=0;i<n;i++){
        s += max(0LL,(a[i]-b[i])*2);
        ok += max(0LL,(b[i]-a[i])/2); 
    }
    if (ok >= s/2) or (s==0) ) printf("Yes\n");
    else printf("No\n");
}

signed main()
{
    int n=1;  cin>>n;
    while (n--) solve();
    return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:40:20: error: expected primary-expression before 'or' token
   40 |     if (ok >= s/2) or (s==0) ) printf("Yes\n");
      |                    ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;cin>>N;
  vector<int>A(N);
  for(int X=0;X<N;X++){
    cin>>A[X];
  }
  for(int X=0;X<N;X++){
    cin>>B[X];
  }
  sort(A.begin(),A.end());
  sort(B.begin(),B.end());
  bool F=true;
  for(int X=0;X<N;X++){
    if(A[X]>B[X]){
      F=false;
    }
  }
  if(F){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: 'B' was not declared in this scope
   11 |     cin>>B[X];
      |          ^
a.cc:14:8: error: 'B' was not declared in this scope
   14 |   sort(B.begin(),B.end());
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N; cin>>N;
  vector<int>A(N);
  vector<int>B(N);
  long long a;
  long long b;
  for(int i=0;i<N;i++){cin>>A[i];a+=A[i];}
  for(int i=0;i<N;i++){cin>>B[i];b+=B[i];}
  if(a<b){cout<<"No"<<endl; return 0;}
  long long c=b-a;
  long long d;
  for(int i=0;i<N;i++){
    if(A[i]-B[i]>0)d+=A[i]+D[i];
    else if((B[i]-A[i])%2==1)d++;
  }
  if(c<d){cout<<"No"<<endl; return 0;}
  cout<<"Yes"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:28: error: 'D' was not declared in this scope
   15 |     if(A[i]-B[i]>0)d+=A[i]+D[i];
      |                            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define inf 1000000000
#define IOS ios_base::sync_with_stdio(0);cin.tie(0)
#define meM(y,a) memset(y,a,sizeof y)
#define sC(a) scanf("%d",&a)
#define alL(a) a.begin(),a.end()
#define prinT(a,sz)  cout<<a[0];for(int i=1;i<sz;i++)cout<<" "<<a[i];cout<<endl
#define ranD srand(chrono::steady_clock::now().time_since_epoch().count());
typedef pair<int,int>pi;
typedef pair<ll,ll>pll;
//int fx[]={0,0,1,-1};
//int fy[]={1,-1,0,0};
//int gx[]={0,0,1,1,1,-1,-1,-1};
//int gy[]={1,-1,0,1,-1,0,1,-1};
const int N=100010;
ll a[N],b[N];
int main()
{
    IOS;
    int n;cin>>n;
    for(inAt i=0;i<n;i++)cin>>a[i];
    for(int i=0;i<n;i++)cin>>b[i];
    ll cnt=0;
    for(int i=0;i<n;i++)
    {
        if(b[i]>=a[i])cnt+=b[i]-a[i];
        else cnt-=(a[i]-b[i])*2;
    }
    if(cnt>=0)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
}








Compiler output:
a.cc: In function 'int main()':
a.cc:26:9: error: 'inAt' was not declared in this scope; did you mean 'int'?
   26 |     for(inAt i=0;i<n;i++)cin>>a[i];
      |         ^~~~
      |         int
a.cc:26:18: error: 'i' was not declared in this scope
   26 |     for(inAt i=0;i<n;i++)cin>>a[i];
      |                  ^
Language: C++

#include <iostream>
using namespace std;
#define rep(i, j, n) for(int i = (j); i < (n); ++i)

int main() {
	cin.tie(0); ios_base::sync_with_stdio(false);
	int n; cin >> n;
	i64* a = new i64[n];
	i64* b = new i64[n];
	rep(i, 0, n) cin >> a[i];
	rep(i, 0, n) cin >> b[i];
	
	i64 ac = 0;
	i64 bc = 0;
	rep(i, 0, n) {
		if (a[i] > b[i]) bc += a[i] - b[i];
		else ac += (b[i] - a[i]) / 2;
	}
	if (ac >= bc) cout << "Yes";
	else cout << "No";
  	delete[] a;
	delete[] b;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'i64' was not declared in this scope
    8 |         i64* a = new i64[n];
      |         ^~~
a.cc:8:14: error: 'a' was not declared in this scope
    8 |         i64* a = new i64[n];
      |              ^
a.cc:8:22: error: 'i64' does not name a type
    8 |         i64* a = new i64[n];
      |                      ^~~
a.cc:9:14: error: 'b' was not declared in this scope
    9 |         i64* b = new i64[n];
      |              ^
a.cc:9:22: error: 'i64' does not name a type
    9 |         i64* b = new i64[n];
      |                      ^~~
a.cc:13:12: error: expected ';' before 'ac'
   13 |         i64 ac = 0;
      |            ^~~
      |            ;
a.cc:14:12: error: expected ';' before 'bc'
   14 |         i64 bc = 0;
      |            ^~~
      |            ;
a.cc:16:34: error: 'bc' was not declared in this scope
   16 |                 if (a[i] > b[i]) bc += a[i] - b[i];
      |                                  ^~
a.cc:17:22: error: 'ac' was not declared in this scope
   17 |                 else ac += (b[i] - a[i]) / 2;
      |                      ^~
a.cc:19:13: error: 'ac' was not declared in this scope
   19 |         if (ac >= bc) cout << "Yes";
      |             ^~
a.cc:19:19: error: 'bc' was not declared in this scope
   19 |         if (ac >= bc) cout << "Yes";
      |                   ^~
a.cc:21:9: error: type '<type error>' argument given to 'delete', expected pointer
   21 |         delete[] a;
      |         ^~~~~~~~~~
a.cc:22:9: error: type '<type error>' argument given to 'delete', expected pointer
   22 |         delete[] b;
      |         ^~~~~~~~~~
Language: C++

#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <ratio>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include <climits>
#include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/trie_policy.hpp>
#define ll long long
#define ld long double
#define mp make_pair
#define pb push_back
#define in insert
#define vll vector<ll>
#define endl "\n"
#define pll pair<ll,ll>
#define f first
#define s second
#define int ll
#define sz(x) (ll)x.size()
#define all(x) (x.begin(),x.end())
using namespace std;
using namespace __gnu_pbds;
typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> os;
 
 
const ll INF = 1e18;
const ll N =(1e4+5); // TODO : change value as per problem
const ll MOD = 1e9+7;
ll a[N],b[N];
void solve(){
    ll n;
    cin >> n;
    for(int i =1;i<=n;i++) cin >> a[i];
    for(int i = 1;i<=n;i++) cin >> b[i];
    ll sum = 0;
	for(int i =1;i<=n;i++){
		sum -= a[i];
		sum += b[i];
	}
	ll cnt =0;
	for(int i =1;i<=n;i++){
		if(a[i] < b[i]){
			cnt++;
		}
	}
	if(cnt <= k){
		cout<<"Yes\n";
	}
	else
		cout<<"No\n";

}

signed main(){

    ios_base::sync_with_stdio(0);
    cin.tie(NULL);
    

 
     ll tt=1;   
    while(tt--){    
        solve();
    }    
}	

Compiler output:
a.cc: In function 'void solve()':
a.cc:73:19: error: 'k' was not declared in this scope
   73 |         if(cnt <= k){
      |                   ^
Language: C++

#include<bits.stdc++.h>
using namespace std;
int main () {
  int N;
  cin >> N;
  vector<int>A(N);
  int sum = 0;
  for (int i = 0; i < N; i ++) {
    int a, b;
    cin >> a >> b;
    A[i] = b - a;
    sum += A[i];
  }
  int sum_ = sum;
  for (int i = 0; i < N; i ++) {
    if (A[i] < 0) {
      if (sum_ < A[i]) {
        cout << "No" << endl;
        return 0;
      }
      sum_ += A[i];
    }
  }
  cout << "Yes" << endl;
}

Compiler output:
a.cc:1:9: fatal error: bits.stdc++.h: No such file or directory
    1 | #include<bits.stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

//*******************************By Harry Singh From Phillaur.
#include<bits/stdc++.h>
#define ll long long
#define MAX 1000006
const ll mo=1000000007;
#define string_to_any_base(s,base) stoll(s, 0, base);
#define vc vector
// #define mp map<ll,ll> mp;
#define bt(M,value) bitset<M> b(value)
#define S set<ll> s;
#define ST set<string> s;
#define INF 1e15
using namespace std;
set<ll> primes;
vector<pair<ll,ll>> adj[MAX];
vector<ll> ad[MAX];
///******************************ALL important functions;
ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b);} 
ll lcm(ll a, ll b)  {  return (a*b)/gcd(a, b);  } 
void Sieve(){ bool prime[MAX+1]; memset(prime, true, sizeof(prime)); for (int p=2; p*p<=MAX; p++) { if (prime[p] == true) {for (int i=p*p; i<=MAX; i += p) prime[i] = false; } } for(int i=2;i<=MAX;i++)if(prime[i]==true)primes.insert(i);} 
ll comb(ll N_, ll C_) {
	const int NUM_=400001;
	static ll fact[NUM_+1],factr[NUM_+1],inv[NUM_+1];
	if (fact[0]==0) {
		inv[1]=fact[0]=factr[0]=1;
		for (int i=2;i<=NUM_;++i) inv[i] = inv[mo % i] * (mo - mo / i) % mo;
		for (int i=1;i<=NUM_;++i) fact[i]=fact[i-1]*i%mo, factr[i]=factr[i-1]*inv[i]%mo;
	}
	if(C_<0 || C_>N_) return 0;return factr[C_]*fact[N_]%mo*factr[N_-C_]%mo;}
ll modpow(ll a, ll n=mo-2) {ll r=1;while(n)r=r*((n%2)?a:1)%mo,a=a*a%mo,n>>=1;return r;}





int main()
{
	ll n,s=0,s1=0;
	cin>>n;
	ll a[n+1],b[n+1];
	for(int i=1;i<=n;i++)cin>>a[i],s+=a[i];
	for(int i=1;i<=n;i++)cin>>b[i],s1+=b[i];
	

		ll aa=0,bb=0;
		for(int i=1;i<=n;i++)
		{
			if(a[i]>b[i])
			bb+=a[i]-b[i];
			else  if(b[i]>a[i])
			{
				if(b[i]-a[i]%2)
				bb++,aa+=(b[i]-a[i]+1)/2;////                 in this a we have to add the 2's so values can be large for a baby
				else
				aa+=(b[i]-a[i])/2;
			}
		}
		if(bb<=aa)
		cout<<"Yes\n";
		else cout<<"No\n";
		
	}
}



Compiler output:
a.cc:63:1: error: expected declaration before '}' token
   63 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
#define all(x) begin(x), end(x)
 
using i64 = int_fast64_t;
using f64 = double;
using p64 = pair<i64, i64>;
 
constexpr i64 INF = INT_FAST64_MAX / 2;
constexpr f64 EPS = DBL_EPSILON;
 
void solve() {
    i64 n;
    cin >> n;
    vector<i64> a(n), b(n);
    for (auto& e : a) cin >> e;
    for (auto& e : b) cin >> e;
 
    i64 ap = 0, bp = 0;
    for (i64 i = 0; i < n; i++) {
        if (a[i] == b[i]) continue;
        if (a[i] > b[i]) {
            bp += a[i] - b[i];
        } else {
            if ((b[i] - a[i]) % 2) {
                bp++;
                ap += (b[i] - a[i] + 1) / 2;
            } else {
                ap += (b[i] - a[i]) / 2;
            }
        }
    }
 
    cout << (bp <= ap ? "Yes" : "No") << endl;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
#define all(x) begin(x), end(x)
 
using i64 = int_fast64_t;
using f64 = double;
using p64 = pair<i64, i64>;
 
constexpr i64 INF = INT_FAST64_MAX / 2;
constexpr f64 EPS = DBL_EPSILON;
 
void solve() {
    i64 n;
    cin >> n;
    vector<i64> a(n), b(n);
    for (auto& e : a) cin >> e;
    for (auto& e : b) cin >> e;
 
    i64 ap = 0, bp = 0;
    for (i64 i = 0; i < n; i++) {
        if (a[i] == b[i]) continue;
        if (a[i] > b[i]) {
            bp += a[i] - b[i];
        } else {
            if ((b[i] - a[i]) % 2) {
                bp++;
                ap += (b[i] - a[i] + 1) / 2;
            } else {
                ap += (b[i] - a[i]) / 2;
            }
        }
    }
 
    cout << (bp == ap ? "Yes" : "No") << endl;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <iomanip>
#include <string>
#include <cmath>
#include <numeric>
#include <climits>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <functional>
#include <utility>
////////////////////////////////////////////////
#define REP(i, n) for (int i = 0; i < (int)n; i++)
#define FOR(i, m, n) for (int i = (int)m; i < (int)n; i++)
#define REPvec(itr, mp) for (auto itr = mp.begin(); itr != mp.end(); itr++)
#define REPe(e, mp) for (auto& e : mp)
#define all(x) x.begin(), x.end()
////////////////////////////////////////////////
const ll MOD = 1000000007;  // 1e9+7
using namespace std;
using ll = long long int;
using vecint = vector<int>;
using vecll = vector<ll>;
using vec2int = vector<vector<int>>;
using P = pair<int, int>;
////////////////////////////////////////////////
////////////////////////////////////////////////
int main() {
  ////////////////////////////////////////////////
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  ////////////////////////////////////////////////
  int n;
  cin >> n;
  vecint a(n, 0), b(n, 0);
  int suma = 0;
  int sumb = 0;
  REPe(e, a) {
    cin >> e;
    suma += e;
  }
  REPe(e, b) {
    cin >> e;
    sumb += e;
  }
  if(sumb >= suma){
    cout << "No" << endl;
  }else{
    cout << "Yes" << endl;
  }
}
//////////////////////////////////////////////


Compiler output:
a.cc:26:7: error: 'll' does not name a type; did you mean 'all'?
   26 | const ll MOD = 1000000007;  // 1e9+7
      |       ^~
      |       all
Language: C++

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

int main() {
  int n;
  cin >> n;
  
  vector<int> A(n);
  vector<int> B(n);
  int sum=0;
  for(int i=0;i<N;i++){
    cin >> A[i];
    sum-=A[i];
  }
  for(int i=0;i<N;i++){
    cin >> B[i];
    sum+=B[i];
  }
  
  int An=0,Bn=0;
  for(int i=0;i<N;i++){
    if(A[i]>B[i]){
      Bn+=A[i]-B[i];
    }
    else{ 
      An+=(B[i]-A[i]+1)/2;
    }
  }
  if(An > sum || Bn > sum){
    cout << "No";
  }
  else{
    cout << "Yes";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'N' was not declared in this scope
   11 |   for(int i=0;i<N;i++){
      |                 ^
a.cc:15:17: error: 'N' was not declared in this scope
   15 |   for(int i=0;i<N;i++){
      |                 ^
a.cc:21:17: error: 'N' was not declared in this scope
   21 |   for(int i=0;i<N;i++){
      |                 ^
Language: C++

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

int main(){
    long long n;
    cin >> n;
    long long a[n],b[n],count=0;
    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++) count += b[i]-a[i];
    long long res=0;
    for(int i=0;i<n;i++){
        //if(a[i]>b[i]) res+=a[i]-b[i];
        else if(a[i]<b[i]) res+=(b[i]-a[i]+1)/2;
    }
    if(res<=count) cout << "Yes" << endl;
    else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'else' without a previous 'if'
   14 |         else if(a[i]<b[i]) res+=(b[i]-a[i]+1)/2;
      |         ^~~~