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

int main() {
	long long int n, a[100000], k = 0;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[i];
		if (a[i] % 2 == 1) {
			k++;
		}
	}
	if (k % 2 == 0) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> n;
      |         ^~~
a.cc:11:17: error: 'cout' was not declared in this scope
   11 |                 cout << "YES" << endl;
      |                 ^~~~
a.cc:11:34: error: 'endl' was not declared in this scope
   11 |                 cout << "YES" << endl;
      |                                  ^~~~
a.cc:14:17: error: 'cout' was not declared in this scope
   14 |                 cout << "NO" << endl;
      |                 ^~~~
a.cc:14:33: error: 'endl' was not declared in this scope
   14 |                 cout << "NO" << endl;
      |                                 ^~~~
Language: Java


import java.util.*;

public class Solution {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N=in.nextInt();
        int sum=0;
        for (int i = 0; i < N; i++) {
            if (in.nextInt()%2==1) {
                sum++;
            }
        }
        if(sum%2==0) System.out.println("YES");
        else System.out.println("NO");
        }

        }

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


import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int N=in.nextInt();
        int sum=0;
        for (int i = 0; i < N; i++) {
            if (in.nextInt()%2==1) {
                sum++;
            }
        }
        if(sum%2==0) System.out.println("YES");
        else System.out.println("NO");
        }

        }
    }


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

n = input()
A = map(int, raw_input().strip().split())
A = filter(lambda x: x % 2 == 1, A)
m = len(A)
print "YES" if (m % 2 == 0) else "NO"


Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = input()
      | ^
Language: C++

#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<cmath>
#include<iostream>
#define N 3100
#define inf (1e9)+1
using namespace std;
struct node{int y,nex;}a[2*N];
int f[N],g[N],n,fir[N],len,d[N],num,A[N];
void ins(int x,int y)
{
	a[++len].y=y;a[len].nex=fir[x];fir[x]=len;
}
void dfs(int x,int fa)
{
	f[x]=d[x];
	for(int k=fir[x];k;k=a[k].nex)
	{
		int y=a[k].y;
		if(y==fa) continue;
		dfs(y,x);
		if(d[x]>f[y]) f[x]=inf;
	}
}
void dp(int x,int fa)
{
	int cnt=0;
	for(int k=fir[x];k;k=a[k].nex)
	{
		int y=a[k].y;
		if(y==fa) continue;
		if(d[x]>f[y]) cnt++;
	}
	if(d[x]>g[fa]) cnt++;
	if(cnt) A[++num]=x;
	for(int k=fir[x];k;k=a[k].nex)
	{
		int y=a[k].y;
		if(y==fa) continue;
		int t=cnt;
		if(d[x]>f[y]) t--;
		if(t) g[x]=inf;
		else g[x]=d[x];
		dp(y,x);
	}
}
int main()
{
	scanf("%d",&n);
	for(int i=1;i<=n;i++) scanf("%d",&d[i]);
	for(int i=1;i<n;i++)
	{
		int x,y;scanf("%d%d",&x,&y);
		ins(x,y);ins(y,x);
	}
	dfs(1,0);
	g[0]=inf;
	dp(1,0);
	sort(A+1,A+num+1);
	for(int i=num;i>=1;i--) printf("%d ",A[i]);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:60:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   60 |         sort(A+1,A+num+1);
      |         ^~~~
      |         sqrt
Language: C++

#include<iostream>
using namespace std;
int main() {
	int sum = 0;
	int n; cin >> n;
	for (int i = 0; i < n; i++){
		int a; cin >> a;
		if (a % 2 == 1)sum++;
	}
	if (sum % 2 == 1)cout << "NO\n"; else cot << "YES\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:47: error: 'cot' was not declared in this scope
   10 |         if (sum % 2 == 1)cout << "NO\n"; else cot << "YES\n";
      |                                               ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

const int N = 1234567;

int a[N], d[N];

int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", a + i);
  }
  a[n] = a[0];
  int mx = 0;
  for (int i = 0; i < n; i++) {
    d[i] = a[i + 1] - a[i];
    mx = max(mx, d[i]);
  }
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    sum += a[i];
  }
  int foo = mx;
  for (int i = 0; i < n; i++) {
    if ((foo - d[i]) % n) {
      puts("NO");
      return 0;
    }
  }
  long long bar = n * (long long) (n + 1) / 2;
  long long need = foo * bar;
  long long useless = n * bar;
  if (need > sum || ((total - need) % useless)) {
    puts("NO");
    return 0;
  }
  puts("YES");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:23: error: 'total' was not declared in this scope
   35 |   if (need > sum || ((total - need) % useless)) {
      |                       ^~~~~
Language: Java

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Stack;


public class B348 {

	/**
	 * @param args
	 */
	
	static PrintWriter out = new PrintWriter(System.out);
	
	public static void main(String[] args) {
		
		
		
		Scanner sc= new Scanner(System.in);
	
	
		
		int n=sc.nextInt();
		
		int cnt=0;
			
		for(int i=0;i<n;i++)
		{	
		int s=sc.nextInt();
		if(s%2!=0)
			cnt++;
		}
		
		
	if(cnt%2!=0)	
	{
	System.out.println("NO");	
	}
	else 
		System.out.println("YES");
	}
	
}



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

iimport java.util.*;

class Main{
  public static void main(String[] args){
    //declare
    Scanner in = new Scanner(System.in);
    ArrayList<Integer> array = new ArrayList<Integer>();
    int a,b;
    //imput
    b = 0;
    a = in.nextInt();
    for (int i=0;i<a;i++){
      b += Integer.parseInt(in.next());
    }
    //calculaate
    if(b % 2 == 0){System.out.println("YES");}
    else{System.out.println("NO");}
  }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
iimport java.util.*;
^
1 error
Language: Java

import java.util.*;

class Main{
  public static void main(String[] args){
    //declare
    Scanner in = new Scanner(System.in);
    ArrayList<Integer> array = new ArrayList<Integer>();
    int a,b;
    //imput
    int b = 0;
    a = in.nextInt();
    for (int i=0;i<a;i++){
      b += Integer.parseIn(in.next));
    }
    //calculaate
    if(b % 2 == 0){System.out.println("YES");}
    else{System.ot.println("NO");}
  }
}

Compiler output:
Main.java:13: error: ';' expected
      b += Integer.parseIn(in.next));
                                   ^
1 error
Language: C

#include<stdio.h>

int main()
{
	int a,c,d;
	int b[];
	int tmp;
	scanf("%d",&a);
	for(c=0;c<a;c++)
	{
		scanf("%d",&b[c]);
	}
	for(c=0;c<a;c++)
	{
		if(b[c]%2==0)
		{
			d++;
		}
	}
	if(d%2==0)
	{
		printf("YES");
	}
	else{
		printf("NO");
	}
}

Compiler output:
main.c: In function 'main':
main.c:6:13: error: array size missing in 'b'
    6 |         int b[];
      |             ^
Language: C++

#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define ALL(a) (a).begin(),(a).end()
#define SET(a,c) memset(a,c,sizeof a)
#define CLR(a) memset(a,0,sizeof a)
#define OUT(x) cout<<x<<endl;

#define I(x) int x; scanf_s("%d",&x);
#define LI(x) long long x; scanf_s("%lld",&x);
#define VI(v,n) vector<int> v(n); REP(i,n) scanf_s("%d", &v[i]);
#define VLI(v,n) vector<lint> v(n); REP(i,n) scanf_s("%lld", &v[i]);
#define D(x) double x; scanf_s("%lf",&x);
#define VD(v,n) vector<double> v(n); REP(i,n) scanf_s("%lf", &v[i]);
#define STR(x) string x; cin >> x;

#define INF INT_MAX/3
#define LL long long

#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <string>

using namespace std;

int main()
{
	I(N);
	LL A = 0;
	LL C = 0;
	REP(i, N) { cin >> A; if (A % 2 != 0) C++; }
	if (C % 2 == 0)
	{
		OUT("YES");
	}
	else
	{
		OUT("NO");
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   10 | #define I(x) int x; scanf_s("%d",&x);
      |                     ^~~~~~~
a.cc:32:9: note: in expansion of macro 'I'
   32 |         I(N);
      |         ^
Language: C++

#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define ALL(a) (a).begin(),(a).end()
#define SET(a,c) memset(a,c,sizeof a)
#define CLR(a) memset(a,0,sizeof a)
#define OUT(x) cout<<x<<endl;

#define I(x) int x; scanf_s("%d",&x);
#define LI(x) long long x; scanf_s("%lld",&x);
#define VI(v,n) vector<int> v(n); REP(i,n) scanf_s("%d", &v[i]);
#define VLI(v,n) vector<lint> v(n); REP(i,n) scanf_s("%lld", &v[i]);
#define D(x) double x; scanf_s("%lf",&x);
#define VD(v,n) vector<double> v(n); REP(i,n) scanf_s("%lf", &v[i]);
#define STR(x) string x; cin >> x;

#define INF INT_MAX/3
#define LL long long

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

using namespace std;

void main()
{
	I(N);
	LL A = 0;
	LL C = 0;
	REP(i, N) { cin >> A; if (A % 2 != 0) C++; }
	if (C % 2 == 0)
	{
		OUT("YES");
	}
	else
	{
		OUT("NO");
	}
}

Compiler output:
a.cc:29:1: error: '::main' must return 'int'
   29 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:10:21: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   10 | #define I(x) int x; scanf_s("%d",&x);
      |                     ^~~~~~~
a.cc:31:9: note: in expansion of macro 'I'
   31 |         I(N);
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(x) (x).begin(),(x).end()


int A[(int)1e5 + 10];



int main() {

    int n;
    cin >> n;
    for(int i=1;i;<=n;i++){
        cin >> A[i];
    }
    bool ok = 1,_ok = 1;
    for(int i=1;i<=n;i++){
        ok &= (A[i]&1);
        _ok &= (A[i]&1==0);
    }
    if(ok || _ok){
        
        cout << "YES" << endl;
        return 0;
        
    }
    int cnt = 0;
    for(int i=1;i<=n;i++){
        cnt += (A[i]&1);
    }
    if(cnt==2){
        cout << "YES" << endl;
        return 0;
    }
    cout << "NO" << endl;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: expected primary-expression before '<=' token
   15 |     for(int i=1;i;<=n;i++){
      |                   ^~
a.cc:15:22: error: expected ')' before ';' token
   15 |     for(int i=1;i;<=n;i++){
      |        ~             ^
      |                      )
a.cc:15:23: error: 'i' was not declared in this scope
   15 |     for(int i=1;i;<=n;i++){
      |                       ^
Language: C++

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

int main(){
int n, x,t=0;
cin>>n;
for (i=0;i<n;i++){
cin>>x;
if (x%2)t++;
}
if (t%2)cout<<"NO\n";else cout<<"YES\n";
}

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

#include <iostream>

int main() {
    int n, m, cnt=0;
    std::cin >> n;
    for (int i=0; i<n; i++) {
        std::cin >> m;
        if ( m%2 == 1 ) {
            cnt++;
        }
    }
    if ( cnt%2 == 0 ) {
        std::cout << "YES" << std::endl;
    } else {
        std::cout << "NO" << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include <iostream>

using namespace std;
int main(){
	int N;
	N = 3;
	cin >> N;
	unsigned int odd, even;
	odd = even = 0;
	//vector<int> A;
	for(int i = 0;i<N;i++){
		int tmp;
		cin >> tmp;
		if (tmp % 2 == 0)even++;
		else odd++;
		//A.push_back(tmp);
	}
	if ((odd % 2) != 0){ cout << "NO" << endl; return; }
	else{
		even += odd / 2;
		int bits = 0;
		for (int i = 0; i<32; i++){
			if (even > ((even >> 1) << 1) ) bits++;
			even = even >> 1;
		}
		if (bits % 2 == 1){ cout << "NO" << endl; return; }
	} 
	cout << "YES" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:52: error: return-statement with no value, in function returning 'int' [-fpermissive]
   18 |         if ((odd % 2) != 0){ cout << "NO" << endl; return; }
      |                                                    ^~~~~~
a.cc:26:59: error: return-statement with no value, in function returning 'int' [-fpermissive]
   26 |                 if (bits % 2 == 1){ cout << "NO" << endl; return; }
      |                                                           ^~~~~~
Language: C++

#include <iostream.h>

using namespace std;
int main(){
	int N;
	cin >> N;
	unsigned int odd, even;
	odd = even = 0;
	//vector<int> A;
	for(int i = 0;i<N;i++){
		int tmp;
		cin >> tmp;
		if (tmp % 2 == 0)even++;
		else odd++;
		//A.push_back(tmp);
	}
	if (odd % 2 != 0){ cout << "NO" << endl; }
	else if ((odd / 2 + even) % 2 == 1){ cout << "NO" << endl; }
	else cout << "YES" << endl;
	return 1;
}

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

#import<iostream>
int c,a,i;main(){while(std::cin>>a)i++&&c^=a%2;puts(c?"NO":"YES");}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<iostream>
      |  ^~~~~~
a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | int c,a,i;main(){while(std::cin>>a)i++&&c^=a%2;puts(c?"NO":"YES");}
      |           ^~~~
a.cc: In function 'int main()':
a.cc:2:39: error: lvalue required as left operand of assignment
    2 | int c,a,i;main(){while(std::cin>>a)i++&&c^=a%2;puts(c?"NO":"YES");}
      |                                    ~~~^~~
Language: C++

#import<iostream>
int c,a,i;main(){while(std::cin>>a)i++?c+=a%2:;puts(c%2?"NO":"YES");}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<iostream>
      |  ^~~~~~
a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | int c,a,i;main(){while(std::cin>>a)i++?c+=a%2:;puts(c%2?"NO":"YES");}
      |           ^~~~
a.cc: In function 'int main()':
a.cc:2:47: error: expected primary-expression before ';' token
    2 | int c,a,i;main(){while(std::cin>>a)i++?c+=a%2:;puts(c%2?"NO":"YES");}
      |                                               ^
Language: C++

#import<iostream>
int c,a,i;main(){for(;std::cin>>a;!i++&&c+=a%2);puts(c%2?"NO":"YES");}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<iostream>
      |  ^~~~~~
a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | int c,a,i;main(){for(;std::cin>>a;!i++&&c+=a%2);puts(c%2?"NO":"YES");}
      |           ^~~~
a.cc: In function 'int main()':
a.cc:2:39: error: lvalue required as left operand of assignment
    2 | int c,a,i;main(){for(;std::cin>>a;!i++&&c+=a%2);puts(c%2?"NO":"YES");}
      |                                   ~~~~^~~
Language: C++

#include<iostream>
int a,f;
int main() {
	fgets(&a,5,0);
	for (; std::cin>>a; f ^= a & 1);
	puts(f?"NO\n":"YES\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:15: error: cannot convert 'int*' to 'char*'
    4 |         fgets(&a,5,0);
      |               ^~
      |               |
      |               int*
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdio.h:654:38: note:   initializing argument 1 of 'char* fgets(char*, int, FILE*)'
  654 | extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
      |                     ~~~~~~~~~~~~~~~~~^~~
Language: C++

#import<iostream> int c,a;main(){for(std::cin>>a;std::cin>>a;c+=a%2);puts(c%2?"NO":"YES");}


Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<iostream> int c,a;main(){for(std::cin>>a;std::cin>>a;c+=a%2);puts(c%2?"NO":"YES");}
      |  ^~~~~~
a.cc:1:19: warning: extra tokens at end of #import directive
    1 | #import<iostream> int c,a;main(){for(std::cin>>a;std::cin>>a;c+=a%2);puts(c%2?"NO":"YES");}
      |                   ^~~
/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++

#import<iostream>int c,a;main(){for(std::cin>>a;std::cin>>a;c+=a%2);puts(c%2?"NO":"YES");}


Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<iostream>int c,a;main(){for(std::cin>>a;std::cin>>a;c+=a%2);puts(c%2?"NO":"YES");}
      |  ^~~~~~
a.cc:1:22: warning: extra tokens at end of #import directive
    1 | #import<iostream>int c,a;main(){for(std::cin>>a;std::cin>>a;c+=a%2);puts(c%2?"NO":"YES");}
      |                      ^
a.cc:1:8: fatal error: iostream>in: No such file or directory
    1 | #import<iostream>int c,a;main(){for(std::cin>>a;std::cin>>a;c+=a%2);puts(c%2?"NO":"YES");}
      |        ^~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
int a,f;
int main() {
	scanf("%*d");
	gets(&a);
	for (; std::cin>>a; f ^= a & 1);
	puts(f?"NO\n":"YES\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    5 |         gets(&a);
      |         ^~~~
      |         getw
Language: C++

#import<map>
int c,a,n;main(){for(;std::cin>>a;c^=n++&&a%2);puts(c?"NO":"YES");}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<map>
      |  ^~~~~~
a.cc:2:11: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | int c,a,n;main(){for(;std::cin>>a;c^=n++&&a%2);puts(c?"NO":"YES");}
      |           ^~~~
a.cc: In function 'int main()':
a.cc:2:28: error: 'cin' is not a member of 'std'
    2 | int c,a,n;main(){for(;std::cin>>a;c^=n++&&a%2);puts(c?"NO":"YES");}
      |                            ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #import<map>
  +++ |+#include <iostream>
    2 | int c,a,n;main(){for(;std::cin>>a;c^=n++&&a%2);puts(c?"NO":"YES");}
a.cc:2:48: error: 'puts' was not declared in this scope
    2 | int c,a,n;main(){for(;std::cin>>a;c^=n++&&a%2);puts(c?"NO":"YES");}
      |                                                ^~~~
Language: C++

#include<iostream>
#include<set>
#include<iterator>
#include<algorithm>
#include<string>
#include<Windows.h>
#include<map>
#include<vector>
using namespace std;

int main() {
	//RECT rc;
	//GetClientRect(GetConsoleWindow(), &rc);
	//SetWindowPos(GetConsoleWindow(), HWND_TOP, 700, 200, rc.right , rc.bottom, 0x0040);
	
	int n;
	cin >> n;
	bool y = 1;
	int cou = 0;
	int a;
	for (int i = 0; i < n; i++)
	{
		cin >> a;
		if (a % 2 == 1)
			cou++;
	}
	if (cou % 2 == 1)
		y = 0;


	if (y)
		cout << "YES";
	else
		cout << "NO";
	cout << endl;
	
	return 0;
}


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

#include <iostream>
#include <vector>
 
using namespace std;
 
int main(){
  long long int N;
  vector<long long int> a;
  long long int b = 0;
  long long int sum = 0;
  long long int c = 0;
 
  cin >> N;
  for(long long int i = 0; i < N; i++){
    cin >> b;
    a.push_back(b);
    sum += b;
  }
 
  long long int trial = sum / (N*(N+1)/2);
  if (sum % (N*(N+1)/2) != 0){
    cout << "NO" << endl;
    return 0;
  }
 
  for(long long int i = 0; i < N-1; i++){
    if(a[i] + trial != a[i+1]){
      if((a[i] + trial - a[i+1]) % N != 0){
        cout << "NO" << endl;
        return 0;
      }
      else{
        c += (a[i] + trial - a[i+1]) / N;
      }
    }
  }
 
  if (a[N-1] + trial != a[0]){
    if((a[N-1] + trial - a[0]) % N != 0){
      cout << "NO" << endl;
      return 0;
    }
    else{
      c += (a[N-1] + trial - a[0]) / N;
    }
  }
 
  if (c == trial)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}

Compiler output:
a.cc:3:1: error: extended character   is not valid in an identifier
    3 |  
      | ^
a.cc:5:1: error: extended character   is not valid in an identifier
    5 |  
      | ^
a.cc:12:1: error: extended character   is not valid in an identifier
   12 |  
      | ^
a.cc:19:1: error: extended character   is not valid in an identifier
   19 |  
      | ^
a.cc:25:1: error: extended character   is not valid in an identifier
   25 |  
      | ^
a.cc:37:1: error: extended character   is not valid in an identifier
   37 |  
      | ^
a.cc:47:1: error: extended character   is not valid in an identifier
   47 |  
      | ^
a.cc:3:1: error: '\U000000a0' does not name a type
    3 |  
      | ^
a.cc:5:1: error: '\U000000a0' does not name a type
    5 |  
      | ^
Language: C

#include<stdio.h>

int en;
int on;
int N;

void input(){
	int i, t;
	en = 0;
	on = 0;
	scanf("%d", &N);
	for( i = 0; i < N; i++ ){
		scanf("%d", &t);
		if( t % 2 ){
			en++;
		}else{
			on++;
		}
	}
	return;
}

int main(){
	input();
	if( on % 2 == 0 || on == 1 && en == 0) ){
		printf("YES\n");
	}else{
		printf("NO\n");
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:25:48: error: expected statement before ')' token
   25 |         if( on % 2 == 0 || on == 1 && en == 0) ){
      |                                                ^
main.c:27:10: error: 'else' without a previous 'if'
   27 |         }else{
      |          ^~~~
Language: C

#include<stdio.h>

int en;
int on;
int N;

void input(){
	int i;
	en = 0;
	on = 0;
	scanf("%d", &N);
	for( i = 0; i < N; i++ ){
		scanf("%d", &t);
		if( t % 2 ){
			en++;
		}else{
			on++;
		}
	}
	return;
}

int main(){
	input();
	if( on > 3 || (on == 1 && en > 0) ){
		printf("NO\n");
	}else{
		printf("YES\n");
	}
	return 0;
}


Compiler output:
main.c: In function 'input':
main.c:13:30: error: 't' undeclared (first use in this function)
   13 |                 scanf("%d", &t);
      |                              ^
main.c:13:30: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

#define forn(i,n) for (int i = 0; i < int(n); ++i)
#define forsn(i,x,y) for(long long i = (x) ; i <= (y) ; ++i)
typedef long long ll;
typedef long double ld;


int main() {
  ll n;
  cin >> n;
  vector<ll> a;
  vector<ll> subs;
  ll total = 0;
  ll ave = 0;
  forn(n0,n) {
    ll t;
    cin >> t;
    a.push_back(t);
    total += t;
  }
  subs.push_back(a[0] - a[a.size()-1]);
  for(int i =1 ;i < n; i++) {
    subs.push_back(a[i] - a[i-1]);
  }
  ave = (n * (n+1)) / 2
  if(total % ave != 0) {
    cout << "NO" << endl;
    return 0;
  }
  ll numadd = total / ave;
  ll sub = n-1;
  ll num_sub = numadd;
  /*
  forn(i,n) {
    cout << subs[i] << " " ;
  }
  cout << endl;
  cout << "numadd:" << numadd << endl;
  */
  for(int i = 0; i < n; i++) {
    //cout << "i:" << i << endl;
    if((subs[i] - numadd) % n != 0) {
      cout << "NO" << endl;
      return 0;
    }
    //cout << (subs[i] - numadd) / n << endl;
    num_sub += (subs[i] - numadd) / n;
  }
  
  
  if(true) { //num_sub == 0) {
    cout << "YES" << endl;
  }
  else {
    cout << "NO" << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:24: error: expected ';' before 'if'
   33 |   ave = (n * (n+1)) / 2
      |                        ^
      |                        ;
   34 |   if(total % ave != 0) {
      |   ~~
Language: C

#include <stdio.h>
#include <math.h>

int main()
{       
int N;
int A;
int odd;

scanf("%d",&N);

  for(i=0; i<N; i++)
  {
    scanf("%d",&A);
    if ((A%2)==0) odd++;
  }

  if(mod(odd%2)==1)
  {
       printf("YES");
  }else{
       printf("NO");
  }
  return 0;
} 

Compiler output:
main.c: In function 'main':
main.c:12:7: error: 'i' undeclared (first use in this function)
   12 |   for(i=0; i<N; i++)
      |       ^
main.c:12:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:6: error: implicit declaration of function 'mod'; did you mean 'fmod'? [-Wimplicit-function-declaration]
   18 |   if(mod(odd%2)==1)
      |      ^~~
      |      fmod
Language: C

#include<stdio.h>
int main()
{
  int N;
  int num[10000];
  int i;
  scanf("%d",&N);
  for(i==0;i<N;i++)
  scanf("%d",&num[i]);
  int count=0;
  for(i==0;i<N;i++)
  if(num%2==1)
  count++;
  if(count%2==0)
  printf("YES\n");
  else
  printf("NO\n");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:9: error: invalid operands to binary % (have 'int *' and 'int')
   12 |   if(num%2==1)
      |      ~~~^
      |      |
      |      int *
Language: C++

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

int main(){
	int n;
	cin>>n;
	int e=0;o=0;
	for(int i=0;i<n;i++){
		int x;
		cin>>x;
		if(x%2==0){
			e++;
		}else{
			o++;
		}
		if(o%2==1){
			cout<<"NO";
		}else{
			cout<<"YES";
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'o' was not declared in this scope
    7 |         int e=0;o=0;
      |                 ^
Language: Java



import java.util.Scanner;

/**
 * Created by srikanth on 04-02-2017.
 */
public class Addition {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int even=0,odd=0;
        int N=scan.nextInt();
        while(N-->0){
            int i=scan.nextInt();
            if(i%2==0){
                even++;

            }
            else{
                odd++;
            }
        }
        if(odd%2==1 && even>0)
            System.out.println("NO");
        else{
            System.out.println("YES");
        }
    }
}


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

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

def readln(ch):
    _res = list(map(int,str(input()).split(ch)))
    return _res

n = int(input())
a = readln(' ')
ans = 0
for x in a:
    if x % 2 == 1:
        ans = ans + 1
if ans % 2 == 1:
    print('YES')
else:
    print('NO')


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/env python3
      |  ^
a.cc:2:3: error: invalid preprocessing directive #-
    2 | # -*- coding: utf-8 -*-
      |   ^
a.cc:15:11: warning: multi-character character constant [-Wmultichar]
   15 |     print('YES')
      |           ^~~~~
a.cc:17:11: warning: multi-character character constant [-Wmultichar]
   17 |     print('NO')
      |           ^~~~
a.cc:4:1: error: 'def' does not name a type
    4 | def readln(ch):
      | ^~~
Language: Java

package grand_04_02_17;

import java.util.Scanner;

/**
 * Created by srikanth on 04-02-2017.
 */
public class Addition {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int even=0,odd=0;
        int N=scan.nextInt();
        while(N-->0){
            int i=scan.nextInt();
            if(i%2==0){
                even++;

            }
            else{
                odd++;
            }
        }
        if(odd%2==1 && even>0)
            System.out.println("NO");
        else{
            System.out.println("YES");
        }
    }
}


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

#include<iostream>

int main() {
int n; std::cin >> n; std::cout << (n%2 ? "Yes" : "No") << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:60: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    4 | int n; std::cin >> n; std::cout << (n%2 ? "Yes" : "No") << endl;
      |                                                            ^~~~
      |                                                            std::endl
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

package test;

import java.util.Scanner;

public class main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.nextLine();
		int[] a = new int[n];
		int oddOfSum = 0;
		for (int i=0;i<n;i++){
			a[i] = sc.nextInt();
			if (a[i]%2==1){
				oddOfSum++;
			}
		}
		if (oddOfSum%2==1){
			System.out.println("NO");
		}
		else{
			System.out.println("YES");
		}
		
	}
}

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

import java.util.Scanner;

/**
 * Created by wenjian on 2017/2/4.
 */
public class Main{
    public static void main(String[] args) {
        Scanner reader = new Scanner(System.in);
        int n = reader.nextInt();
        int[] a = new int[n];
        for (int i=0; i<a.length; ++i) a[i] = reader.nextInt();
        int sum = 0;
        for (int i=0; i<a.length; ++i) {
            if (a[i] % 2 == 1) ++sum;
        }
        if (sum % 2 == 0) 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.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
    6 | public class Main{
      | ^~~~~~
Language: Java

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

    private static void solve(Scanner in) {
        int N = in.nextInt();
        final int[] A = new int[N];// 2 <= N
        for (int i = 0; i < N; i++) {
            A[i] = in.nextInt() % 2;
        }
        String ans = "YES";

        int count = 0;
        for (int a : A) {
            count += a;
        }
        if (count % 2 == 1) {
            ans = "NO";
        }

        System.out.println(ans);
    }
}

Compiler output:
Main.java:8: error: cannot find symbol
    private static void solve(Scanner in) {
                              ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        try (Scanner in = new Scanner(System.in)) {
             ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        try (Scanner in = new Scanner(System.in)) {
                              ^
  symbol:   class Scanner
  location: class Main
3 errors
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n;
  int count=0;
  int temp;
  cin >> n;
  for(i=0;i<n;i++){
  	cin >> temp;
  	if(temp%2==1){
  	count++;}
  }
  if(count%2==1)
	cout << "NO";
  else
  	cout <<"YES";	
  
  return 0;
}

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

#include <iostream>	
#include <time.h>
#include <vector>
#include <stdio.h>
#include <memory.h>
#include <string>
#include <map>
#include <algorithm>
#include <bitset>
#include <queue>
#include <set>
#include <time.h>
#include <assert.h>
#include <sstream>
//#include <unordered_map>
#include <bitset>
#include <utility>
#include <iomanip>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <cmath>
#include <math.h>
#include <string.h>
#include <string>
#include <complex>
#include <valarray>
#if !ONLINE_JUDGE
#include "inc.h"
#endif
using namespace std;
typedef long long ll;



int main() {
#if !ONLINE_JUDGE
    freopen("a.txt", "r", stdin);
    //freopen("b.txt", "w", stdout);
    decTime;
#endif
    
    int n;
    scanf("%d",&n);
    int cnt=0;
    for(int i=0;i<n;++i){
        int x;
        scanf("%d",&x);
        cnt+=x&1;
    }
    puts((cnt&1)?"NO":"YES");
    
    
#if !ONLINE_JUDGE
    printTime;
#endif
    return 0;
}

Compiler output:
a.cc:30:10: fatal error: inc.h: No such file or directory
   30 | #include "inc.h"
      |          ^~~~~~~
compilation terminated.
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;
typedef __int64 LL;
typedef vector<int> ivec;
typedef vector<string> svec;

int n;
int a[100010];
int ans=0;
int main(){
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>a[i];
	if(a[i]%2==1)ans++;
    }	
	
	
    
    puts(ans%2==0 ? "YES" : "NO");
    return 0;
}

Compiler output:
a.cc:13:9: error: '__int64' does not name a type; did you mean '__int64_t'?
   13 | typedef __int64 LL;
      |         ^~~~~~~
      |         __int64_t
Language: C++

#include <bits/stdc++.h>

#define x first
#define y second

using namespace std;

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> ii;
typedef pair<ll,ll> pll;

const int mod=1000000000+7;

int addm(int& a,int b) {return (a+=b)<mod?a:a-=mod;}

template<class T,class U> bool smin(T& a,U b) {return a>b?(a=b,1):0;}
template<class T,class U> bool smax(T& a,U b) {return a<b?(a=b,1):0;}

int a[100000];
int ct[2];
int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);

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

	if (n==1 || ct[1]%2==0) cout << "YES\n";
	else cout << "NO\n"
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:28: error: expected ';' before '}' token
   36 |         else cout << "NO\n"
      |                            ^
      |                            ;
   37 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
	int N;
	cin >> N;
	int c = 0;
	for (int i = 0; i < N; ++ i) {
		int x;
		cin >> x;
		if (x % 2) ++ c;
	}
	cout << (c % 2 == 0 ? "YES" : "NO") << endl;
}
#include <bits/stdc++.h>
using namespace std;
int main() {
	int N;
	cin >> N;
	int c = 0;
	for (int i = 0; i < N; ++ i) {
		int x;
		cin >> x;
		if (x % 2) ++ c;
	}
	cout << (c % 2 == 0 ? "YES" : "NO") << endl;
}


Compiler output:
a.cc:16:5: error: redefinition of 'int main()'
   16 | int main() {
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main() {
      |     ^~~~
Language: C++

n = input()
a = sum(map(int, raw_input().split())) & 1
print 'YES' if a == 1 else 'NO'


Compiler output:
a.cc:3:7: warning: multi-character character constant [-Wmultichar]
    3 | print 'YES' if a == 1 else 'NO'
      |       ^~~~~
a.cc:3:28: warning: multi-character character constant [-Wmultichar]
    3 | print 'YES' if a == 1 else 'NO'
      |                            ^~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n = input()
      | ^
Language: C++

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

int main() {
    long long n;
    cin >> n;
    vector<long long> a(n);
    long long sum=0;
    for ( int i=0; i<n; i++ ) {
        cin >> a[i];
        sum+=a[i];
    }
    long long m=(long long)n*(n+1)/2;
    if ( m%n ){
        cout << "NO" << '\n';
        return 0;
    }
    m = sum/m;
    a.push_back(a[0]);
    // (k-d)/n = x
    sum = 0;
    for ( int i=0; i<n; i++ ) {
        // cout << a[i+1] << ' ' << a[i] << '\n';
        long long d=(a[i+1] - a[i]);
        if ( m<d || (m-d)%n ){
            cout << "NO" << '\n';
            return 0;
        }
    }
    else cout << "YES" << '\n';
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:5: error: 'else' without a previous 'if'
   30 |     else cout << "YES" << '\n';
      |     ^~~~
Language: C++

#include <iostream> 
#define ll long long 
using namespace std;
int main(){
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    int check=0;
    ll n, sum = 0, k=0;
    int stones[100005], diff[100005];
    cin >> n;
    for(int i=1; i<=n; i++){
        cin >> stones[i];
        sum+=stones[i];
    }
    for(int i=1; i<=n; i++){
        if(i==n){
            diff[n]=(stones[1]-stones[n]);
        }
        else{
            diff[i]=(stones[i+1]-stones[i]);
        }
    }
    
    if(sum%(n*(n+1)/2)!=0){
        cout << "NO" << endl;
    }
    else{
        k=sum/(n*(n+1)/2);
        for(int i=1; i<=n; i++){
            ll x = (diff[i]+(k*(n-1)));
            if(x>=0 && x%n==0 && (k-x>==0) && (k-x%n==0)){
                check++;
            }
        }
        if(check==n){
            cout << "YES" << endl;
        }
        else{
            cout << "NO" << endl;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:40: error: expected primary-expression before '=' token
   30 |             if(x>=0 && x%n==0 && (k-x>==0) && (k-x%n==0)){
      |                                        ^
Language: C++

/**
 ____ ____ ____ ____ ____
||a |||t |||o |||d |||o ||
||__|||__|||__|||__|||__||
|/__\|/__\|/__\|/__\|/__\|

**/

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int N_MAX = 100002;

int n;

int a[N_MAX];

ll sum;

ll k;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cin >> n;
    for(int i = 1; i <= n; i++)
        cin >> a[i];
    for(int i = 1; i <= n; i++)
        sum += a[i];
    k = sum / (1LL * n * (n + 1) / 2);
    for(int i = 1; i <= n; i++)
    {
        int j = i - 1;
        if(j == 0)
            j = n;
        int diff = a[i] - a[j];
        if((k - diff) % n != 0)
        {
            cout << "NO\n";
            return 0;
        }
    }
    cout << "YES\n";
    return 0;
}
/**
 ____ ____ ____ ____ ____
||a |||t |||o |||d |||o ||
||__|||__|||__|||__|||__||
|/__\|/__\|/__\|/__\|/__\|

**/

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int N_MAX = 100002;

int n;

int a[N_MAX];

ll sum;

ll k;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cin >> n;
    for(int i = 1; i <= n; i++)
        cin >> a[i];
    for(int i = 1; i <= n; i++)
        sum += a[i];
    k = sum / (1LL * n * (n + 1) / 2);
    for(int i = 1; i <= n; i++)
    {
        int j = i - 1;
        if(j == 0)
            j = n;
        int diff = a[i] - a[j];
        if((k - diff) % n != 0)
        {
            cout << "NO\n";
            return 0;
        }
    }
    cout << "YES\n";
    return 0;
}


Compiler output:
a.cc:65:11: error: redefinition of 'const int N_MAX'
   65 | const int N_MAX = 100002;
      |           ^~~~~
a.cc:15:11: note: 'const int N_MAX' previously defined here
   15 | const int N_MAX = 100002;
      |           ^~~~~
a.cc:67:5: error: redefinition of 'int n'
   67 | int n;
      |     ^
a.cc:17:5: note: 'int n' previously declared here
   17 | int n;
      |     ^
a.cc:69:5: error: redefinition of 'int a [100002]'
   69 | int a[N_MAX];
      |     ^
a.cc:19:5: note: 'int a [100002]' previously declared here
   19 | int a[N_MAX];
      |     ^
a.cc:71:4: error: redefinition of 'll sum'
   71 | ll sum;
      |    ^~~
a.cc:21:4: note: 'll sum' previously declared here
   21 | ll sum;
      |    ^~~
a.cc:73:4: error: redefinition of 'll k'
   73 | ll k;
      |    ^
a.cc:23:4: note: 'll k' previously declared here
   23 | ll k;
      |    ^
a.cc:75:5: error: redefinition of 'int main()'
   75 | int main()
      |     ^~~~
a.cc:25:5: note: 'int main()' previously defined here
   25 | int main()
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,o,n) for(long long i = o;i<n;i++)
#define oneforall ios::sync_with_stdio(false);cin.tie(0);
#define all(v) (v).begin(),(v).end()
#define ini(...) int __VA_ARGS__; in(__VA_ARGS__)
#define inl(...) long long __VA_ARGS__; in(__VA_ARGS__)
#define ins(...) string __VA_ARGS__; in(__VA_ARGS__)
#define int long long 
const long long inf=1e18;
void in(){} template <typename T,class... U> void in(T &t,U &...u){ cin >> t; in(u...);}
void out(){cout << "\n";} template <typename T,class... U> void out(const T &t,const U &...u){ cout << t; if(sizeof...(u)) cout << " "; out(u...);}
typedef vector<int> vi;
typedef vector<long long> vl;
typedef long long ll;
typedef vector<pair<long, long > > vpll;
typedef vector<pair<int, int > > vpii;
#define FORR(x,arr) for(auto& x:arr)
#define ZERO(a) memset(a,0,sizeof(a))





//3111111111111111111111111111111




	void solve(){


		ini(n);
		int morty[n];
		int tmp = 0;
		FOR(i,0,n){
			in(morty[i]);
			tmp+=morty[i];
		}
		if(tmp%((n*(n+1))/2))return out("NO");
		tmp = tmp/((n*(n+1))/2);
		FOR(i,0,n){
			int tmp1 = morty[(i+1)%n]-morty[i];
			tmp1*=-1;tmp1+=tmp;
			if(tmp1<0 or tmp1%n)return out("NO");
		}
		out("YES);
		


	}























int32_t main() {
	oneforall
	oneforall
	oneforall
	oneforall
	oneforall
	oneforall
	oneforall
	oneforall
	oneforall
	oneforall
	oneforall
	oneforall
	oneforall 
	oneforall

	solve();
	


	return 0;
}


Compiler output:
a.cc:47:21: warning: missing terminating " character
   47 |                 out("YES);
      |                     ^
a.cc:47:21: error: missing terminating " character
   47 |                 out("YES);
      |                     ^~~~~~
a.cc: In function 'void solve()':
a.cc:51:9: error: expected primary-expression before '}' token
   51 |         }
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define FOR(i,o,n) for(long long i = o;i<n;i++)
#define oneforall ios::sync_with_stdio(false);cin.tie(0);
#define all(v) (v).begin(),(v).end()
#define ini(...) int __VA_ARGS__; in(__VA_ARGS__)
#define inl(...) long long __VA_ARGS__; in(__VA_ARGS__)
#define ins(...) string __VA_ARGS__; in(__VA_ARGS__)
#define int long long 
const long long inf=1e18;
void in(){} template <typename T,class... U> void in(T &t,U &...u){ cin >> t; in(u...);}
void out(){cout << "\n";} template <typename T,class... U> void out(const T &t,const U &...u){ cout << t; if(sizeof...(u)) cout << " "; out(u...);}
typedef vector<int> vi;
typedef vector<long long> vl;
typedef long long ll;
typedef vector<pair<long, long > > vpll;
typedef vector<pair<int, int > > vpii;
#define FORR(x,arr) for(auto& x:arr)
#define ZERO(a) memset(a,0,sizeof(a))





//3111111111111111111111111111111




	void solve(){


		ini(n);
		int morty[n];
		int tmp = 0;
		FOR(i,0,n){
			in(morty[i]);
			tmp+=morty[i];
		}
		if(tmp%((n*(n+1))/2))return out("No");
		tmp = tmp%((n*(n+1))/2);
		FOR(i,0,n){
			int tmp1 = morty[(i+1)%n]-morty[i];
			tmp1*=-1;tmp1+=tmp;
			if(tmp1<0 or tmp1%n)retrun out("No");
		}
		out("Yes");
		


	}























int32_t main() {
	oneforall
	oneforall
	oneforall
	oneforall
	oneforall
	oneforall
	oneforall
	oneforall
	oneforall
	oneforall
	oneforall
	oneforall
	oneforall 
	oneforall

	solve();
	


	return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:45:45: error: 'retrun' was not declared in this scope
   45 |                         if(tmp1<0 or tmp1%n)retrun out("No");
      |                                             ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(ll i=0; i<n; i++)
#define eb(t) emplace_back(t)
typedef long long ll;
typedef long long unsigned int llu;
ll INF = 1000000009;
ll MOD = 1000000007;

ll a[100010];
ll d[100010];

void solve(){
    
    ll n;
    cin >> n;
    ll sum=0;
    rep(i,n){
        cin >> a[i];
        sum+=a[i];
    }
    a[n]=a[0];
    ll tmp = n*(n+1)/2;
    ll k = sum/(tmp);
    rep(i,n){
        d[i]=a[i+1]-a[i]-k;
    }

    bool b = true;
    rep(i,n){
        if(abs(d[i])%n!=0) b=false;
    }

    cout << b?"YES":"NO" << endl;

}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  solve();
  return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:34:26: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
   34 |     cout << b?"YES":"NO" << endl;
      |                     ~~~~~^~~~~~~
Language: C++

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<set>
#include<map>
#include<iostream>
using namespace std;
#define ll long long
#define REP(a,b,c) for(int a=b;a<=c;a++)
#define re register
#define file(a) freopen(a".in","r",stdin);freopen(a".out","w",stdout)
typedef pair<int,int> pii;
#define mp make_pair
#define int ll
inline int gi()
{
	int f=1,sum=0;char ch=getchar();
	while(ch>'9' || ch<'0'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0' && ch<='9'){sum=(sum<<3)+(sum<<1)+ch-'0';ch=getchar();}
	return f*sum;
}
const int N=200010;
int n,a[N];
ll sum,x[N];
int nxt(int id){return id%n+1;}
int main()
{
	n=gi();ll get=1ll*n*(n+1)/2;
	for(int i=1;i<=n;i++)a[i]=gi(),sum+=a[i];
	if(sum%get)return puts("NO"),0;
	ll t=sum/get,s=0;
	for(int i=1;i<=n;i++)
	{
		ll del=a[i]-a[nxt(i)]+t;
		if(del%n)return puts("NO"),0;
		x[i]=del/n;
	}
	for(int i=1;i<=n;i++)s+=x[i];
	puts(s==t?"YES":"NO");
	return 0;
}


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

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

int main() {
  ll N; 
  cin >> N;
  vector<ll> A(N), D(N);
  ll t = 0;
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
    t += A.at(i);
  }
  ll u = N * (N+1) / 2;
  
  if (t % u != 0) {
    return cout << "NO" << '\n', 0;
  
  ll m = t / u;
  
  for (int i = 0; i < N-1; i++) 
  	D.at(i) = A.at(i + 1) - A.at(i);
  
  D.at(N-1) = A.at(0) - A.at(N-1);
  
  for (int i = 0; i < N; i++) {
    ll y = m - D.at(i);
    if (y < 0 || y % N != 0)
      return cout << "NO" << '\n', 0;
  }
  
  cout << "YES" << '\n';
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:2: error: expected '}' at end of input
   34 | }
      |  ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n); i++)
#define ALL(v) (v).begin(),(v).end()
using ll = long long;
using P = pair<int, int>;
const int INF = 1e9;
const long long LINF = 1e18;
const long long MOD = 1e9 + 7;

signed main(){
    ll n;
    cin >> n;
    ll sum = 0;
    ll a[n];
    rep(i,n){
        cin >> a[i];
        sum += a[i];
    }
    if(sum % (n * (n + 1) / 2) != 0){
        cout << "NO" << endl;
        return 0;
    }
    ll d[n];
    ll k = sum / (n * (n + 1) / 2);
    for(int i = 0; i < n; i++){
        d[i] = a[(i + 1) % n] - a[i] - k;
    }
    sum = 0;
    for(int i = 0; i < n; i++){
        if(d[i] % n != 0 || d[i] > 0){
            cout << "NO" << endl;
            return 0;
        }
        sum -= d[i]
    }
    cout << (sum / n == k ? "YES" : "NO") << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:20: error: expected ';' before '}' token
   35 |         sum -= d[i]
      |                    ^
      |                    ;
   36 |     }
      |     ~