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

#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
const int N=100005;
int n,m;
int fa[N],dis[N];
int finds(int x) {
  if(x==fa[x]) return x;
  int ret=fa[x];
  fa[x]=finds(fa[x]);
  dis[x]+=dis[ret];
  return fa[x];
}
int main() {
  scanf("%d%d",&n,&m);
  for (int i=1;i<=n;++i) fa[i]=i;
  for (int i=1;i<=m;++i) {
    int x,y,d;
    scanf("%d%d%d",&x,&y,&d);
    int fx=finds(x),fy=finds(y);
    if(fx==fy && (dis[x]-dis[y])!=d) {
      puts("No");
      return 0;
    }
    if(fx!=fy) {
      fa[fx]=fy;
      dis[fx]=-dis[x]+dis[y]+d;`
    }
  }
  puts("Yes");
  return 0;
}


Compiler output:
a.cc:28:32: error: stray '`' in program
   28 |       dis[fx]=-dis[x]+dis[y]+d;`
      |                                ^
Language: C++

#include <bits/stdc++.h>

#define int long long

using namespace std;

typedef pair<int, int> pii;

const int MAXN = 100 * 1000 + 3, INF = 2000ll * 1000 * 1000 * MAXN + 3, D = 1000 * 1000 * 1000 + 7;













int n, m, s, t, d[2 + 1][MAXN], cnt[2 + 1][MAXN], w[MAXN], e[MAXN], ans;
vector<int> g[MAXN];
set<pii> p;


void dij(int x, int y) {
	mark.reset();
	fill(d[y], d[y] + n, INF);
	p.insert({0, x});
	d[y][x] = 0;
	cnt[y][x] = 1;
	while (!p.empty()) {
		int f = p.begin() -> second;
		p.erase(p.begin());
		for (auto i : g[f]) {
			int z = f ^ e[i];
			if (d[y][f] + w[i] < d[y][z]) {
				p.erase({d[y][z], z});
				d[y][z] = d[y][f] + w[i];
				p.insert((pii){d[y][z], z});
				cnt[y][z] = cnt[y][f];
			} else if (d[y][f] + w[i] == d[y][z]) cnt[y][z] += cnt[y][f];
		}
	}
}



int32_t main() {
	cin >> n >> m >> s >> t;
	for (int i = 0; i < m; i++) {
		int u, v;
		cin >> u >> v >> w[i];
		g[--u].push_back(i), g[--v].push_back(i);
		e[i] = u ^ v;
	}
	s--, t--;
	dij(s, 0), dij(t, 1);
	ans = cnt[0][t] * cnt[1][s] % D;
	int q = d[0][t];
	for (int i = 0; i < n; i++) {
		int a = cnt[0][i], x = d[0][i], o = cnt[1][i];
		for (auto j : g[i]) {
			int zz = e[j] ^ i;
			int y = d[1][zz], b = cnt[1][zz];
			if (x + w[j] != d[0][zz] || y + w[j] != d[1][i] || x + y + w[j] != q || abs(x - y) >= w[j]) continue;
			ans -= a * b % D * a % D * b % D;
			ans %= D;
		}
		if (q == d[0][i] + d[1][i] && d[0][i] == d[1][i]) {
			ans -= a * o % D * a % D * o % D;
			ans %= D;
		}
	}
	cout << (ans + D) % D;
	return 0;
}

Compiler output:
a.cc: In function 'void dij(long long int, long long int)':
a.cc:29:9: error: 'mark' was not declared in this scope
   29 |         mark.reset();
      |         ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;
#define ll long long int
const int MAXN = 2e5 + 10;

int n;
vector<vector<int>> g(2, vector<int>(105));
int dp[3][105];

rec(int i, int j, int score){
    if( i == 1 and j == n - 1) return score + g[i][j];
    if( i > 1 or i < 0) return -INT_MAX;
    if( j > n - 1 or j < 0) return -INT_MAX;
    int &res = dp[i][j];    

    if(i == 0){
        //go right and down
        res = rec(i, j + 1, score + g[i][j]);
        res = max(res, rec(i + 1, j, score + g[i][j]));
    } else {
        //go right
        res = max(res, rec(i, j + 1 , score + g[i][j]) );
    }
    return res;
}

void solve(){
    cin >> n;
    for(int i = 0; i < 2; ++i){
        for(int j = 0; j < n; ++j){
            cin >> g[i][j];
        }
    }

    int res = rec(0, 0, 0);
    cout << res << '\n';
}

int main(){
    ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr); 
	//int t; cin >> t;
	//while(t--)
		solve();
}


Compiler output:
a.cc:11:1: error: ISO C++ forbids declaration of 'rec' with no type [-fpermissive]
   11 | rec(int i, int j, int score){
      | ^~~
Language: C++

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

int main(){
  int N;
  cin>>N;
  vector<vector<int>> dp(2,vector<int>(N,0));
  for(int i=0;i<N;i++){
    int x;
    cin>>x;
    if(i==0){
      dp.at(0).at(i)=x;
    }else{
      dp.at(0).at(i)=dp.at(0).at(i-1)+x;
    }
  }
  for(int i=0;i<N;i++){
    int x;
    cin>>x;
    if(i==0){
      dp.at(1).at(i)=dp.at(0).at(i)+x;
    }else{
      dp.at(1).at(i)=max(dp.at(1).at(i-1),dp.at(0).at(i))+x;
    }
  }
  
  cout<<dp.at(1).at(N-1);

Compiler output:
a.cc: In function 'int main()':
a.cc:27:26: error: expected '}' at end of input
   27 |   cout<<dp.at(1).at(N-1);
      |                          ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int[] a1=new int[n];
		int[] a2=new int[n];
		int[] s1=new int[n];
		int[] s2=new int[n];
		int ans=0;
		
		for(int i=0;i<n;i++){
			a1[i]=sc.nextInt();
		}
		for(int i=0;i<n;i++){
			a2[i]=sc.nextInt();
		}

		s1[0]=a1[0]; 
		s2[n-1]=a2[n-1];
		for(int i=1;i<n;i++){
			s1[i]=s1[i-1]+a1[i];
		}
		for(int i=n-2;i>=0;i--){
			s2[i]=s2[i+1]+a2[i];
		}
		
		for(int i=0;i<n;i++){
			ans=Math.max(score, s1[i]+s2[i]);
		}
		
		System.out.println(ans);
	}
}

Compiler output:
Main.java:29: error: cannot find symbol
			ans=Math.max(score, s1[i]+s2[i]);
			             ^
  symbol:   variable score
  location: class Main
1 error
Language: Java

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int[] a1=new int[n];
		int[] a2=new int[n];
		int[] s1=new int[n];
		int[] s2=new int[n];
	    int ans=0;
		
		for(int i=0;i<n;i++){
          a1[i]=sc.nextInt();
        }
		for(int i=0;i<n;i++){
          a2[i]=sc.nextInt();
        }
		
		s1[0]=a1[0]; 
      	s2[n-1]=a2[n-1];
		for(int i=1;i<n;i++){
          s1[i]=s1[i-1]+a1[i];
        }
		for(int i=n-2;i>=0;i--){
          s2[i]=s2[i+1]+a2[i];
        }
		
		for(int i=0;i<n;i++){
          ans=Math.max(score, s1[i]+s2[i]);
        }
		
		System.out.println(ans);
	}
}

Compiler output:
Main.java:29: error: cannot find symbol
          ans=Math.max(score, s1[i]+s2[i]);
                       ^
  symbol:   variable score
  location: class Main
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int[] a1=new int[n];
		int[] a2=new int[n];
		int[] s1=new int[n];
		int[] s2=new int[n];
	    int ans=0;
		
		for(int i=0;i<n;i++){
          a1[i]=sc.nextInt();
        }
		for(int i=0;i<n;i++){
          a2[i]=sc.nextInt();
        }
		
		s1[0]=a1[0]; 
      	s2[n-1]=a2[n-1];
		for(int i=1;i<n;i++){
          s1[i]=s1[i-1]+a1[i];
        }
		for(int i=n-2;i>=0;i--){
          s2[i]=s2[i+1]+a2[i];
        }
		
		for(int i=0;i<n;i++){
          ans=Math.max(score, s1[i]+s2[i]);
        }
		
		System.out.println(ans);
	}
}

Compiler output:
Main.java:29: error: cannot find symbol
          ans=Math.max(score, s1[i]+s2[i]);
                       ^
  symbol:   variable score
  location: class Main
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int[] a1=new int[n];
		int[] a2=new int[n];
		int[] s1=new int[n];
		int[] s2=new int[n];
	    int ans=0;
		
		for(int i=0;i<n;i++){
          a1[i]=sc.nextInt();
        }
		for(int i=0;i<n;i++){
          a2[i]=sc.nextInt();
        }
		
		s1[0]=a1[0]; 
      	s2[n-1]=a2[n-1];
		for(int i=1;i<n;i++){
          s1[i]=s1[i-1]+a1[i];
        }
		for(int i=n-2;i>=0;i--){
          s2[i]=s2[i+1]+a2[i];
        }
		
		for(int i=0;i<n;i++){
          score=Math.max(score, s1[i]+s2[i]);
        }
		
		System.out.println(ans);
	}
}

Compiler output:
Main.java:29: error: cannot find symbol
          score=Math.max(score, s1[i]+s2[i]);
          ^
  symbol:   variable score
  location: class Main
Main.java:29: error: cannot find symbol
          score=Math.max(score, s1[i]+s2[i]);
                         ^
  symbol:   variable score
  location: class Main
2 errors
Language: C++

#include<bits/extc++.h>
#ifdef _debug 
#define dout(i) cout << #i << ' ' << i << ' '
#else 
#include<bits/stdc++.h>
#define dout(i) 0&&0
#endif
#pragma GCC optimize("unroll-loops,no-stack-protector,O3")
#define eout(i) {cout << (i) << '\n';exit(0);}
#define rout(i) {return cout << (i) << '\n', 0;}
#define priority_queue __gnu_pbds::priority_queue
#define unordered_map __gnu_pbds::gp_hash_table
#define rep(a, b) {for(int _i = a;_i > 0;--_i){b;}}
#define multe int _T;for(cin >> _T;_T--;)
using namespace std;
using ll = long long;using ull = unsigned long long;using ul = unsigned;using db = double;
using __gnu_pbds::null_type;
template<typename T> void read(int n, T s){while(n--)cin >> *s, ++s;}
template<typename T> void write(int n, T s){while(n--)cout << *s << " \n"[n==0], ++s;}
template<typename T> using rbtree = __gnu_pbds::tree<T,__gnu_pbds::null_type,less<T>,__gnu_pbds::rb_tree_tag,__gnu_pbds::tree_order_statistics_node_update>;
template<typename T> inline ostream& operator << (ostream &ou, const vector<T> &a){for(auto it = a.begin();it != a.end();++it)ou << (it != a.begin() ? " " : "") << *it;return ou;}
template<typename T1, typename T2>inline istream& operator >> (istream &in, pair<T1, T2> &a){return in >> a.first >> a.second;}
template<typename T1, typename T2>inline ostream& operator << (ostream &ou, const pair<T1, T2> &b){return ou << b.first << ' ' << b.second;}
template<typename T> inline long long pow(long long v, long long t, const T &p){long long res = 1;for(;t;t >>= 1, v = v * v % p)if(t & 1)res = res * v % p;return res;}
int n;
const int maxn = 200;
int dp[2][maxn];
signed main(){
	ios_base::sync_with_stdio(0), cin.tie(0);
	cin >> n;
	read(n, dp[0]+1);
	read(n, dp[1]+1);
	for(int i = 1;i <= n;++i)dp[0][i] += dp[0][i-1];
	for(int i = 1;i <= n;++i)dp[1][i] += max(dp[1][i-]1, dp[0][i]);
	cout << dp[1][n] << '\n';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:58: error: expected primary-expression before ']' token
   34 |         for(int i = 1;i <= n;++i)dp[1][i] += max(dp[1][i-]1, dp[0][i]);
      |                                                          ^
Language: Java

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

		int N = sc.nextInt();
		int[][] A = new int[2][N+1];
		int[] t0 = new int[N+1];
		int[] t1 = new int[N+1];
		int[] ans = new ans[N+1];
		int total0 = 0,total1 = 0;
		for( int i=1; i<=N; i++ ){
			A[0][i] = sc.nextInt();
			total0 += A[0][i];
			t0[i] = total0;
		}
		for( int i=1; i<=N; i++ ){
			A[1][i] = sc.nextInt();
		}
		for( int i=N; i>=1; i-- ){
			total1 += A[1][i];
			t1[i] = total1;
		}
		for( int i=1; i<=N; i++ ){
			ans[i] = t0[i] + t1[i];
		}
		Arrays.sort(ans);
		System.out.println(ans[N]);
	}
}


Compiler output:
Main.java:11: error: cannot find symbol
		int[] ans = new ans[N+1];
		                ^
  symbol:   class ans
  location: class Main
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
 int $(int a,int b) {
   if(a%b==0)
     return a/b;
   else
     return a/b+1;
 }

signed main(){
  int a,d=0;
  cin>>a;
  vector<int> b(a),c(a);
  for(int i=0;i<a;i++)
    cin>>b.at(i);
  for(int i=0;i<a;i++){
    if(i==0)
      break;
    b.at(i)+=b.at(i-1);
  }
  for(int i=0;i<a;i++)
    cin>>c.at(i);
  for(int i=a-1;i>=0;i++){
    if(i==a-1)
      break;
    c.at(i)+=c.at(i+1);
  }
  for(int i=0;i<a;i++)
    d=max(d,b.at(i)+c.at(i));
  cout<<d<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:31:17: error: expected '}' at end of input
   31 |   cout<<d<<endl;
      |                 ^
a.cc:11:14: note: to match this '{'
   11 | signed main(){
      |              ^
Language: C

#include<stdio.h>
int main()
{
    int n,st=0,sb=0,i,t[101],b[101],p=0;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d",&t[i]);
        st=st+t[i];
    }
    for(i=0;i<n;i++)
    {
        scanf("%d",&b[i]);
        sb=sb+b[i];
    }
    int c=t[0];
    for(i=0;i<n;i++)
    {
        st=st-t[i];
        if(st>=sb)
        {
            c=c+t[i+1];
            sb=sb-b[i];
        }
        else
        {
            p=1;
            c=c+sb;
            break;
        }
    }
    if(p==0) c=c+sb[n-1];
    printf("%d",c);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:32:20: error: subscripted value is neither array nor pointer nor vector
   32 |     if(p==0) c=c+sb[n-1];
      |                    ^
Language: C++

#include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int dp[3][110];
int N=0;
int A[3][110];
int main(void){
	cin>>N;
	for(int i=0;i<2;i++){
		for(int j=0;j<N;j++){
			cin>>A[i][j];
		}
	}
	dp[0][0]=A[0][0];
	for(int i=0;i<2;i++){
		for(int j=0;j<N;j++){
			if(x!=0){dp[i][j]=max(dp[i][j],dp[i][j-1]+A[i][j]);}
			if(y!=0){dp[i][j]=max(dp[i][j],dp[i-1][j]+A[i][j]);}
		}
	}
	cout<<dp[1][N-1]<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:28: error: 'x' was not declared in this scope
   18 |                         if(x!=0){dp[i][j]=max(dp[i][j],dp[i][j-1]+A[i][j]);}
      |                            ^
a.cc:19:28: error: 'y' was not declared in this scope
   19 |                         if(y!=0){dp[i][j]=max(dp[i][j],dp[i-1][j]+A[i][j]);}
      |                            ^
Language: C++

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

int main(void)
{
  int n;
  int a[2][100];
  int dp[2][100]
  cin>>n;
  for(int i=0;i<2;i++)
    for(int j=0;j<n;j++)
      cin>>a[i][j];
  
  dp[0][0]=a[0][0];
  dp[1][0]=a[1][0];
  
  for(int i=1;i<n;i++)
    dp[0][i]=dp[0][i-1]+a[0][i];
  
  for(int i=1;i<n;i++)
  {
    dp[1][i]=max(dp[0][i],dp[1][i-1])+a[1][i];
  }
  
  cout<<dp[1][n-1]<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected initializer before 'cin'
   10 |   cin>>n;
      |   ^~~
a.cc:15:3: error: 'dp' was not declared in this scope
   15 |   dp[0][0]=a[0][0];
      |   ^~
Language: C++

#include<bits/stdc++.h>
#define LL long long
using namespace std;
inline int read()
{
    int x = 0,f = 1;char ch = getchar();
    for(;!isdigit(ch);ch = getchar())if(ch == '-') f = -f;
    for(;isdigit(ch);ch = getchar())x = 10 * x + ch - '0';
    return x * f;
}
LL S, sum, L[25000009];
const LL LIM = 25000000, mod = 1000000007;
inline LL ksm(LL x,LL t)
{
    LL res = 1;
    while(t)
    {
        if(t & 1) res = (res * x) % mod;
        x = (x * x) % mod;
        t >>= 1;
    }
    return res;
}
int main()
{
	cin >> S;
	for (int i = 1; i <= LIM; i++)
	{
		int cx = i;
		while (cx >= 1)
		{
			cx /= 10;
			L[i]++;
		}
		L[i] += L[i - 1];
	}
	for (int i = 0; i < 9999999; i++)
	{
		int pos1 = lower_bound(L, L + LIM, L[i] + S) - L;
		if (L[pos1] == L[i] + S) sum++;
	}
	for (int i = S / 8; i >= 1; i--)
	{
		if (S%i == 0) sum += (9LL * skr(10, (S / i) - 1) - i + 1 + mod) % mod;
		else sum++;
	}
	cout << sum%mod << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:45: error: 'skr' was not declared in this scope
   44 |                 if (S%i == 0) sum += (9LL * skr(10, (S / i) - 1) - i + 1 + mod) % mod;
      |                                             ^~~
Language: C++

#include<cstdio>
#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<queue>
#include<string>
#include<vector>
#include<float.h>
#include<math.h>
#include<map>
#include<iomanip>
#include<numeric>
using  ll = long long;
using namespace std;
const ll M = 1000000007;

int main(){
  int n, sum = 0, ans; cin >> n;
  int a[2][101];
  int mx = a[0][0];
  for(int i = 0; i < 2; i++){
    for(int j = 0; j < n; j++){
      cin >> a[i][j];
    }
  }

  for(int i = 0; i < n; i++){
    sum += a[i][j];
  }
  sum += a[1][n-1];
  ans = sum;
  for(int i = n; i >= 1; i--){
    sum -= a[0][i];
    sum += a[1][i-1];

    if(sum > ans) ans = sum;
  }

  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:17: error: 'j' was not declared in this scope
   28 |     sum += a[i][j];
      |                 ^
Language: C++

#include<cstdio>
#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<queue>
#include<string>
#include<vector>
#include<float.h>
#include<math.h>
#include<map>
#include<iomanip>
#include<numeric>
using  ll = long long;
using namespace std;
const ll M = 1000000007;

int main(){
  int n, sum = 0, ans; cin >> n;
  int a[2][101];
  int mx = a[0][0];
  for(int i = 0; i < 2; i++){
    for(int j = 0; j < n; j++){
      cin >> a[i][j];
    }
  }

  for(int i = 0; i < n; i++){
    sum += grid[i][j];
  }
  sum += grid[1][n-1];
  ans = sum;
  for(int i = n; i >= 1; i--){
    sum -= grid[0][i];
    sum += grid[1][i-1];
    if(sum > ans) ans = sum;
  }

  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:12: error: 'grid' was not declared in this scope
   28 |     sum += grid[i][j];
      |            ^~~~
a.cc:28:20: error: 'j' was not declared in this scope
   28 |     sum += grid[i][j];
      |                    ^
a.cc:30:10: error: 'grid' was not declared in this scope
   30 |   sum += grid[1][n-1];
      |          ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(void){
    int n;
    cin >> n;
    vector<int> v1(n);
    vector<int> v2(n);
    for (int i=0 ; i<n ; i++){
        int k;
        cin >> k;
        v1[i] = k;
        cin >> k;
        v2[i] = k;
    }
    int max=0;
    for (int i=0 ; i<n ; i++){
        int sum=0;
        for (int j=0 ; j<=i ; j++){
            sum += v1[j]
        }
        for (int j=i ; j<n ; j++){
            sum += v2[j]
        }
        if (sum > max) max = sum;
    }
    
    cout << max << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:25: error: expected ';' before '}' token
   21 |             sum += v1[j]
      |                         ^
      |                         ;
   22 |         }
      |         ~                
a.cc:24:25: error: expected ';' before '}' token
   24 |             sum += v2[j]
      |                         ^
      |                         ;
   25 |         }
      |         ~
Language: C++

#include <algorithm>
#include <cassert>
// #include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
// #include <random>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>

/*
unsigned seed1 = std::chrono::system_clock::now().time_since_epoch().count();
mt19937 g1.seed(seed1);
*/
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<pii, pii> ppiipii;
typedef pair<int, ppiipii> pippiipii;
typedef pair<int, pii> pipii;
typedef pair<pii, int> ppiii;
typedef pair<int, ppiii> pippiii;
typedef pair<int, ll> pill;
typedef pair<int, double> pid;
typedef pair<string, string> pss;
// note to self, the below two triggers someone
typedef pair<ll, ll> pll;
typedef pair<ll, int> plli;
typedef long double ld;

int g[2][105];

int main() {
  scanf("%d", &c);
  for(int i = 0; i < 2; i++) {
    for(int j = 0; j < c; j++) {
      scanf("%d", &g[i][j]);
    }
  }
  int ret = 0;
  for(int j = 0; j < c; j++) {
    int curr = 0;
    for(int a = 0; a <= j; a++) {
      curr += g[0][a];
    }
    for(int a = j; a < c; a++) {
      curr += g[1][a];
    }
    ret = max(ret, curr);
  }
  printf("%d\n", ret);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:46:16: error: 'c' was not declared in this scope
   46 |   scanf("%d", &c);
      |                ^
Language: C

#include<stdio.h>

int main(){
  int n,a[2][100],i,sum=0,max=0;
  scanf("%d",&n);
  for(i=0;i<n;i++)
    scanf("%d",&a[0][i]);
  for(i=0;i<n;i++)
    scanf("%d",&a[1][i]);
  for(i=0;i<n;i++){
    sum=0;
    for(j=0;j<n;j++){
      if(j<=i)
        sum+=a[0][j];
      if(j>=i)
        sum+=a[1][j];
    }
    if(max<sum) max=sum;
  }
  printf("%d\n",max);
}

Compiler output:
main.c: In function 'main':
main.c:12:9: error: 'j' undeclared (first use in this function)
   12 |     for(j=0;j<n;j++){
      |         ^
main.c:12:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

import java.util.Scanner;
import java.lang.Math;

public class Main {
    private static final int maxn = 111;
    private static int[][] a = new int[3][maxn], f = new int[3][maxn];
    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        for (int i = 1; i <= 2; ++i) for (int j = 1; j <= n; ++j) a[i][j] = in.nextInt();
        for (int i = 1; i <= 2; ++i) for (int j = 1; j <= n; ++j)
            f[i][j] = Math.max(f[i - 1][j], f[i][j - 1]) + a[i][j];
        System.out.println(f[2][n]);
    }
}

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: 'import' does not name a type
    2 | import java.lang.Math;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Main {
      | ^~~~~~
Language: C++

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

int N, M;
int main(){
  srand((unsigned int) time(NULL));
  scanf("%d %d", &N, &M);
	rep(i, M) {
      int r,l,d;
      scanf("%d %d %d", &r, &l, &d);
	}
  printf("%s\n", (rand() % 2) ? "Yes" : "No");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'i' was not declared in this scope
    9 |         rep(i, M) {
      |             ^
a.cc:9:9: error: 'rep' was not declared in this scope
    9 |         rep(i, M) {
      |         ^~~
Language: Java

# coding: UTF-8
n = int(input())
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
tile = [a1, a2]
x, y = 0, 0
score = 0

def move(i, x, y):
    score = tile[y][x]
    for j in range(i):
        x, y = right(x, y)
        score += tile[y][x]
    x, y = under(x, y)
    score += tile[y][x]
    for j in range(n-i-1):
        x, y = right(x, y)
        score += tile[y][x]
    return(score)

def right(x, y):
    if(x < n-1):
        return(x+1, y)
    else:
        return(x, y)

def under(x, y):
    if(y < 1):
        return(x, y+1)
    else:
        return(x, y)

for i in range(n):
    now_score = move(i, 0, 0)
    if(score < now_score):
        score = move(i, 0, 0)

print(score)

Compiler output:
Main.java:1: error: illegal character: '#'
# coding: UTF-8
^
Main.java:1: error: class, interface, enum, or record expected
# coding: UTF-8
        ^
2 errors
Language: C++

$N =int(<STDIN>);
@A1=split(" ",<STDIN>);
@A2=split(" ",<STDIN>);

$x=$N-1;
$B2=$A2[$x];
$B1=$B2+$A1[$x];

for($x=$N-2;$x>=0;$x--){
	$B2=$A2[$x]+$B2;
	$B1=($B2>$B1)?$B2+$A1[$x]:$B1+$A1[$x];
}

print $B1;


Compiler output:
a.cc:2:1: error: stray '@' in program
    2 | @A1=split(" ",<STDIN>);
      | ^
a.cc:3:1: error: stray '@' in program
    3 | @A2=split(" ",<STDIN>);
      | ^
a.cc:1:1: error: '$N' does not name a type
    1 | $N =int(<STDIN>);
      | ^~
a.cc:2:2: error: 'A1' does not name a type
    2 | @A1=split(" ",<STDIN>);
      |  ^~
a.cc:3:2: error: 'A2' does not name a type
    3 | @A2=split(" ",<STDIN>);
      |  ^~
a.cc:5:1: error: '$x' does not name a type
    5 | $x=$N-1;
      | ^~
a.cc:6:1: error: '$B2' does not name a type
    6 | $B2=$A2[$x];
      | ^~~
a.cc:7:1: error: '$B1' does not name a type
    7 | $B1=$B2+$A1[$x];
      | ^~~
a.cc:9:1: error: expected unqualified-id before 'for'
    9 | for($x=$N-2;$x>=0;$x--){
      | ^~~
a.cc:9:13: error: '$x' does not name a type
    9 | for($x=$N-2;$x>=0;$x--){
      |             ^~
a.cc:9:19: error: '$x' does not name a type
    9 | for($x=$N-2;$x>=0;$x--){
      |                   ^~
a.cc:14:1: error: 'print' does not name a type; did you mean 'int'?
   14 | print $B1;
      | ^~~~~
      | int
Language: C++

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

int n,  ara[4][105];

int solve(int i, int j) {
    if(i > n || j > n)
        return 0;
    if(i == 2) {
        if(j == n) {
            return ara[i][j]; 
        }
        
        return ara[i][j] + solve(i, j + 1);
    }
    int k = max(solve(i, j + 1), solve(i + 1, j));
    return k + ara[i][j];
}

int main() {
    cin >> n;
    for(int i = 0; i < 2; i++) {
        for(int j = 0; j < n; j++)
            cin >> ara[i + 1][j + 1];
    }
    
    cout << solve(1, 1) << endl;
    return 0;
}#include <bits/stdc++.h>
using namespace std;

int n,  ara[4][105];

int solve(int i, int j) {
    if(i > n || j > n)
        return 0;
    if(i == 2) {
        if(j == n) {
            return ara[i][j]; 
        }
        
        return ara[i][j] + solve(i, j + 1);
    }
    int k = max(solve(i, j + 1), solve(i + 1, j));
    return k + ara[i][j];
}

int main() {
    cin >> n;
    for(int i = 0; i < 2; i++) {
        for(int j = 0; j < n; j++)
            cin >> ara[i + 1][j + 1];
    }
    
    cout << solve(1, 1) << endl;
    return 0;
}

Compiler output:
a.cc:29:2: error: stray '#' in program
   29 | }#include <bits/stdc++.h>
      |  ^
a.cc:29:3: error: 'include' does not name a type
   29 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:32:5: error: redefinition of 'int n'
   32 | int n,  ara[4][105];
      |     ^
a.cc:4:5: note: 'int n' previously declared here
    4 | int n,  ara[4][105];
      |     ^
a.cc:32:9: error: redefinition of 'int ara [4][105]'
   32 | int n,  ara[4][105];
      |         ^~~
a.cc:4:9: note: 'int ara [4][105]' previously declared here
    4 | int n,  ara[4][105];
      |         ^~~
a.cc:34:5: error: redefinition of 'int solve(int, int)'
   34 | int solve(int i, int j) {
      |     ^~~~~
a.cc:6:5: note: 'int solve(int, int)' previously defined here
    6 | int solve(int i, int j) {
      |     ^~~~~
a.cc:48:5: error: redefinition of 'int main()'
   48 | int main() {
      |     ^~~~
a.cc:20:5: note: 'int main()' previously defined here
   20 | int main() {
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
 
#define SPEED ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define fileio freopen("in.in", "r", stdin),freopen("out.out", "w", stdout);
#define ll long long int
#define FF first
#define SS second
#define mp make_pair
#define pb push_back
#define pii pair<int,int>
#define pll pair<long long int,long long int>
#define sd(x) scanf("%d",&x)
#define slld(x) scanf("%lld",&x)
#define pd(x) printf("%d\n",x)
#define plld(x) printf("%lld\n",x)
#define pss printf
#define MOD 1000000007
#define INF 1e18
#define eps 0.00001
#define endl '\n'
#define debug(n1) cout<<n1<<endl
ll n,m,S,T;
set<pll>s;
vector<pll>adj[100005];
ll dist[100005],dist1[100005];
ll cnts[100005],cntt[100005];
void func()
{
	for(int i=1;i<=n;i++)
		dist[i]=INF;
	dist[S]=0;
	s.insert(mp(0ll,S));
	while(!s.empty())
	{
		ll i=s.begin()->SS;
		ll d=s.begin()->FF;
		s.erase(s.begin());
		for(auto j:adj[i])
		{
			if(dist[j.FF]>dist[i]+j.SS)
			{
				dist[j.FF]=dist[i]+j.SS;
				s.insert(mp(dist[j.FF],j.FF));
			}
		}
	}
}
int main() {

slld(n);slld(m);
slld(S);slld(T);
for(int i=1;i<=m;i++)
{
	ll u,v,w;
	slld(u);slld(v);slld(w);
	adj[u].pb(mp(v,w));
	adj[v].pb(mp(u,w));
}

func();
s.clear();

for(int i=1;i<=n;i++)
	dist1[i]=dist[T]-dist[i];
cnts[S]=1;
cntt[T]=1;

for(int i=1;i<=n;i++)
	s.insert(mp(dist[i],i));

for(auto h:s)
{
	ll i=h.SS;
	for(auto j:adj[i])
		if(dist[j.FF]+j.SS==dist[i])
			cnts[i]=(cnts[i]+cnts[j.FF])%MOD;
}

s.clear();

for(int i=1;i<=n;i++)
	s.insert(mp(dist1[i],i));

for(auto h:s)
{
	ll i=h.SS;
	for(auto j:adj[i])
		if(dist1[j.FF]+j.SS==dist1[i])
			cntt[i]=(cntt[i]+cntt[j.FF])%MOD;
}

ll ans=(cnts[T]*cnts[T])%MOD;
for(int i=1;i<=n;i++)
	if(dist[i]==dist1[i]&&dist[i]=dist[T]/2&&dist[T]%2==0)
		ans=(ans-((((cnts[i]*cntt[i])%MOD)*((cnts[i]*cntt[i]))%MOD)%MOD)+MOD)%MOD;

for(int i=1;i<=n;i++)
	for(auto j:adj[i])
		if(dist[i]<dist[T]/2&&dist1[j.FF]<dist[T]/2&&dist[i]+dist1[j.FF]+j.SS==dist[T])
			ans=(ans-(((cnts[i]*cntt[j.FF])%MOD)*((cnts[i]*cntt[j.FF])%MOD))%MOD + MOD)%MOD;

plld(ans);
	return 0;
           }


Compiler output:
a.cc: In function 'int main()':
a.cc:96:29: error: lvalue required as left operand of assignment
   96 |         if(dist[i]==dist1[i]&&dist[i]=dist[T]/2&&dist[T]%2==0)
      |            ~~~~~~~~~~~~~~~~~^~~~~~~~~
Language: Java

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 n = scan.nextInt();
		int[][] a = new int[2][n];
		a[0] = scan.nextIntArray(n);
		a[1] = scan.nextIntArray(n);
		int[][] dp = new int[2][n];
		dp[0][0] = a[0][0];
		for(int i = 1; i < n; i++) dp[0][i] = dp[0][i-1]+a[0][i];
		for(int i = 0; i < n; i++) dp[1][i] = Math.max(dp[0][i]+a[1][i], i>0?dp[1][i-1]+a[1][i]:0);
		out.println(dp[1][n-1]);
		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:
Main.java:8: error: class A is public, should be declared in a file named A.java
public class A {
       ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ld long double
const ld pi = 3.1415926535897932384626433;
const ld eps = 0.0000001;

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

	int ans = 0;
	for(int i = 0; i < n; i++) {
		int sum = 0;
		for(int j = 0; j <= i; j++)
			sum += a[j];
		for(int j = i; j < n; j++)
			sum += b[j];
		ans = max(ans, sum);
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: 'n' was not declared in this scope; did you mean 'yn'?
   10 |         cin >> n;
      |                ^
      |                yn
Language: Java

import java.util.Scanner;

public class Main {
 
        public static void main(String[] args) {
            Scanner scanner = new Scanner(System.in);
            int N = scanner.nextInt();
            int [][] A = new int[2][N];
            for (int i=0; i<2; i++)
                for (int j=0; j<N; j++)
                    A[i][j] = scanner.nextInt();
            int Point=0;
            for(int j=0; j<N; j++){
                int d= A[0][0];
                //System.out.println("================");
                for(int i=1; i<=j; i++){
                   // System.out.println("0-"+i+"="+A[0][i]);
                    d += A[0][i];
                }
                for(int i=j; i<N; i++){
                    //System.out.println("1-"+i+"="+A[1][i]);
                    d += A[1][i];
                }
                if (Point < d) Point=d;
            }
            System.out.println(Point);
        }


Compiler output:
Main.java:27: error: reached end of file while parsing
        }
         ^
1 error
Language: C++

/*
 		Resilience is the greatest of all virtues.
 		Code by rajiv
 */
 #include <iostream>
 #include <cstring>
 #include <vector>
 #include <map>
 #include <set>
 #include <stack>
 #include <queue>
 #include <deque>
 #include <sstream>
 #include <iomanip>
 #include <cassert>
 #include <sys/time.h>
 #include <algorithm>
 #include <bitset>
 #include <cmath>
 #include <functional>
 #include <cmath>

 using namespace std ;

 #define xx first
 #define yy second
 #define ll long long
 #define ld long double
 #define el (char)0x0A
 #define sp " "
 #define pb push_back
 #define mp make_pair
 #define all(x) (x).begin(),(x).end()
 #define clr(x) memset((x),0,sizeof(x))
 #define uint unsigned int
 #define abs(x) ((x<=0)?(-x):(x))
 #define CASET  int t;cin>>t;while(t--)
 #define FORN(i,x,y) for(int i=x;i<y;i++)
 #define MAXN 100005
 #define INF 10000000010
 #define MOD 1000000007
 #define last_set_bit(x) log2((x)&(-x))
 #define add(x,y) (x)=((x)+(y))%MOD
 #define PI 3.141592653589793

 typedef pair<int,int> PII ; typedef vector<int> VI ; typedef vector<vector<int> > VVI ; typedef vector<bool> VB ; typedef vector<string> VS ;
 typedef map<int,int> MII ; typedef map<int,VI > MIV ; typedef set<int> SI ; typedef set<PII > SPII ; typedef vector<PII > VPII ; typedef vector<VPII > VVPII ;
 const int N = 200 ;
 int dp[2][N] ;
 int a[3][N] ;
 int n ;
 int main(){
 	ios_base::sync_with_stdio(false) ;
 	cin.tie(nullptr) ;
    cin >> n ;
    for(int i = 1 ; i <= 2 ; i++){
        for(int j = 1  ; j <= n ; j++){
            cin >> a[i][j] ;
        }
    }
    dp[1][1] = a[1][1] ;
    for(int i = 2 ; i <= n ; i++){
        dp[1][i] = dp[1][i-1]+a[1][i] ;
    }
    dp[2][n] = a[2][n] ;
    for(int i = n-1 ; i>=1 ; i--){
        dp[2][i] = dp[2][i+1]+a[2][i] ;
    }
    int ans = INT_MIN ;
    for(int i = 1 ; i <= n ; i++){
        ans = max(ans,dp[1][i]+dp[2][i]) ;
    }
    cout << ans << el ;

 }


Compiler output:
a.cc: In function 'int main()':
a.cc:69:15: error: 'INT_MIN' was not declared in this scope
   69 |     int ans = INT_MIN ;
      |               ^~~~~~~
a.cc:22:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   21 |  #include <cmath>
  +++ |+#include <climits>
   22 |
Language: C++

#include <cstdio>
#include <cstring>

using namespace std;

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

    int candies[2 + 1][no_of_columns + 1];
    memset(candies, 0, sizeof(candies));

    for(int i = 1; i <= 2; i++)
        for(int j = 1; j <= no_of_columns; j++)
            scanf("%d", &candies[i][j]);

    int max_candies_till[2 + 1][no_of_columns + 1];
    memset(max_candies_till, 0, sizeof(max_candies_till));

    for(int i = 1; i <= 2; i++)
    {
        for(int j = 1; j <= no_of_columns; j++)
        {
            max_candies_till[i][j] = candies[i][j] + max(max_candies_till[i - 1][j], max_candies_till[i][j - 1]);
    }

    printf("%d\n", max_candies_till[2][no_of_columns]);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:54: error: 'max' was not declared in this scope
   25 |             max_candies_till[i][j] = candies[i][j] + max(max_candies_till[i - 1][j], max_candies_till[i][j - 1]);
      |                                                      ^~~
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:7:1: note: to match this '{'
    7 | {
      | ^
Language: C++

#include <bits/stdc++.h>
#define int long long
#define r(i,n) for(int i=0;i<n;i++)

using namespace std;

typedef pair<int,int>P;
typedef pair<P,int>P2;

#define fi first
#define se second

int ans[222222];
bool used[222222];

int Q=1e15,flag=0;

vector<P2>x[100009];

main(){

  for(int i=0;i<222222;i++)ans[i]=Q;

  int n,m;
  cin>>n>>m;
  vector<int>v;
  for(int i=0;i<m;i++)
  {
    int a,b,c;
    cin>>a>>b>>c;
    x[a].push_back(P2(P(b,c),0));
    x[b].push_back(P2(P(a,c),1));
    v.push_back(a);
    v.push_back(b);
  }
  sort(v.begin(),v.end());
  r(o,v.size()){
    if(!used[v[o]]){
      used[o]=1;
      int X=v[o];
      vector<int>V;
      ans[X]=0;
      V.push_back(X);
      while((int)V.size()){
        int p=V[0];
        V.erase(V.begin());
        r(i,x[p].size()){
          int l=p;
          int r=x[p][i].first.fi;
          int cost=x[p][i].fi.se;//cout<<l<<r<<endl;
          int C=x[p][i].se;
          if(!used[r]){//cout<<l<<' '<<r<<' '<<ans[l]<<' '<<ans[r]<<endl;
            used[r]=1;
            V.push_back(r);
          }
          if(C)swap(l,r);
          if(ans[l]==Q&&ans[r]!=Q){//cout<<l<<' '<<r<<' '<<ans[l]<<' '<<ans[r]<<endl;
            ans[l]=ans[r]-cost;
          }
          else if(ans[l]!=Q&&ans[r]==Q){//cout<<l<<' '<<r<<' '<<ans[l]<<' '<<ans[r]<<endl;
            ans[r]=ans[l]+cost;//cout<<l<<' '<<r<<' '<<ans[l]<<' '<<ans[r]<<endl;
          }
          else{//cout<<l<<' '<<r<<' '<<ans[l]<<' '<<ans[r]<<endl;
            if(ans[l]+cost!=ans[r])flag++;
          }
        }
      }
    }
  }
  int l=1e16;
  int r=-1e16,F=0;
  r(i,n+1){
    if(ans[i]!=Q){
      l=min(l,ans[i]);
      r=max(r,ans[i]);
      int F++;
    }
  }

  if(flag||(F&&abs(r-l)>1000000001))cout<<"No"<<endl;
  else cout<<"Yes"<<endl;
}

Compiler output:
a.cc:20:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   20 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:76:12: error: expected initializer before '++' token
   76 |       int F++;
      |            ^~
Language: C++

#include <iostream>
using namespace std;
#define N 100;

int main() {
  int n, a[2][N], sum[2] = {};
  cin >> n;
  for (int j=0; j<2; j++) {
    for (int i=0; i<n; i++) {
      cin >> a[j][i];
      sum[j] += a[j][i];
    }
  }
  int c = 0;
  for (int i=0; i<n; i++) {
    c+=a[0][i];
    sum[0] -= a[0][i];
    if (sum[0] < sum[1]) {
      c += sum[1];
      break;
    }
    sum[1] -= a[1][i];
  }
  cout << c << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:14: error: expected ']' before ';' token
    3 | #define N 100;
      |              ^
a.cc:6:15: note: in expansion of macro 'N'
    6 |   int n, a[2][N], sum[2] = {};
      |               ^
a.cc:6:16: error: expected primary-expression before ']' token
    6 |   int n, a[2][N], sum[2] = {};
      |                ^
a.cc:10:14: error: 'a' was not declared in this scope
   10 |       cin >> a[j][i];
      |              ^
a.cc:11:7: error: 'sum' was not declared in this scope
   11 |       sum[j] += a[j][i];
      |       ^~~
a.cc:16:8: error: 'a' was not declared in this scope
   16 |     c+=a[0][i];
      |        ^
a.cc:17:5: error: 'sum' was not declared in this scope
   17 |     sum[0] -= a[0][i];
      |     ^~~
Language: Java

import java.util.Scanner;
public class ARC090_1 {
public class Main {
 
        public static void main(String[] args) {
            Scanner scanner = new Scanner(System.in);
            int N = scanner.nextInt();
            int [][] A = new int[2][N];
            for (int i=0; i<2; i++)
                for (int j=0; j<N; j++)
                    A[i][j] = scanner.nextInt();
            int i=2-1;
            int j=N-1;
            int Point = A[i][j];
            while ((0<i) || (0<j)){
                if (i<1) j--;
                else if (j<1) i--;
                else if (A[i-1][j] > A[i][j-1]) i--;
                else j--;
                Point += A[i][j]; 
                //System.out.println("i="+i+"  j="+j);
            }
            //System.out.println("Point="+Point);
            i=0;
            j=0;
            int Point2 = A[0][0];
            while ((i<1) || (j<(N-1))){
                if (i>=1) j++;
                else if (j>=(N-1)) i++;
                else if (A[i+1][j] > A[i][j+1]) i++;
                else j++;
                Point2 += A[i][j]; 
                //System.out.println("i="+i+"  j="+j);
            }
            if (Point < Point2) System.out.println(Point2);
            else System.out.println(Point);
        }
}

Compiler output:
Main.java:38: error: reached end of file while parsing
}
 ^
1 error
Language: C++

//Written by Zhu Zeqi
//Come on,baby
//Hack,please
#include<cmath>
#include<math.h>
#include<ctype.h>
#include<algorithm>
#include<bitset>
#include<cassert>
#include<cctype>
#include<cerrno>
#include<cfloat>
#include<ciso646>
#include<climits>
#include<clocale>
#include<complex>
#include<csetjmp>
#include<csignal>
#include<cstdarg>
#include<cstddef>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<cwchar>
#include<cwctype>
#include<deque>
#include<exception>
#include<fstream>
#include<functional>
#include<iomanip>
#include<ios>
#include<iosfwd>
#include<iostream>
#include<istream>
#include<iterator>
#include<limits>
#include<list>
#include<locale>
#include<map>
#include<memory>
#include<new>
#include<numeric>
#include<ostream>
#include<queue>
#include<set>
#include<sstream>
#include<stack>
#include<stdexcept>
#include<streambuf>
#include<string>
#include<typeinfo>
#include<utility>
#include<valarray>
#include<vector>
#include<string.h>
#include<stdlib.h>
#include<stdio.h>
#define CLR(x) memset(x,0,sizeof x)
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define pii pair<int,int>
#define vi vector<int>
#define MAX 1000000000000000000
#define MOD 1000000007
#define PI 3.141592653589793238462
#define INF 0x3f3f3f3f
typedef long long ll;
int n,a[3][105],res,ans;
int main(){
	//freopen("input.in","r",stdin);
	//freopen("output.out","w",stdout);
	cin>>n;
	for(int i=1;i<=2;i++)
	for(int j=1;j<=n;j++)
	cin>>a[i][j];
	for(int i=1;i<=n;i++)
	res+=a[1][i];
	res+=a[2][n];
	ans=res;
	for(int i=n;i>=2;i--){
		res-=a[1][i];
		res+=a[2][i-1];
		ans=max(ans,res);
	}
	cout<<ans;
	//system("pause");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:75:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   75 |         cin>>n;
      |         ^~~
      |         std::cin
In file included from a.cc:34:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:86:21: error: 'max' was not declared in this scope; did you mean 'std::max'?
   86 |                 ans=max(ans,res);
      |                     ^~~
      |                     std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:7:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:88:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   88 |         cout<<ans;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<cstdio>
#include<cstring>
#include<vector>
#include<queue>
#include<algorithm>
#include<cmath>
#include<climits>
#include<string>
#include<set>
#include<numeric>
#include<map>
#include<iostream>
using namespace std;
#define rep(i,n) for(int i = 0;i<((int)(n));i++)
#define reg(i,a,b) for(int i = ((int)(a));i<=((int)(b));i++)
#define irep(i,n) for(int i = ((int)(n)-1);i>=0;i--)
#define ireg(i,a,b) for(int i = ((int)(b));i>=((int)(a));i--)
typedef long long ll;
typedef pair<ll, ll> mp;

int main(void){
	int N,a[3][110],sum=0;
	cin>>N;
	rep(i,2){
		rep(j,N){
			cin>>a[i][j];
			sum+=a[i][j];
		}
	}
	printf("%d\n",ans-min(a[0][N-1],a[1][0]))
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:23: error: 'ans' was not declared in this scope; did you mean 'abs'?
   30 |         printf("%d\n",ans-min(a[0][N-1],a[1][0]))
      |                       ^~~
      |                       abs
Language: C++

#include<iostream>
#include<stdio.h>
#include<string.h>
#include<ctype.h>
#include<stdlib.h>
using namespace std;


int main(){
	int n;
	int a[100];
	int b[100];
	int suma[100];
	int sumb[100];
	int max;
	max = 0;
	cin >> n;
	suma[0] = 0;
	sumb[0] = 0;
	
	cin a[0];
	suma[0] = a[0];
	for(int i = 1 ; i < n ; i++ ){
		cin a[i];
		suma[i] = suma[i-1] + a[i];
	}
	cin b[0];
	sumb[0] = b[0];
	for(int i = 1 ; i < n ; i++ ){
		cin b[i];
		sumb[i] = sumb[i-1] + b[i];
	}
	
	max = a[0] + b[n-1];
	for(int i = 1 ; i < n ; i++ ){
		if ( max < a[i] + b[n] - b[i-1] ) max = a[i] + b[n] - b[i-1];
	}
	cout << max;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:12: error: expected ';' before 'a'
   21 |         cin a[0];
      |            ^~
      |            ;
a.cc:24:20: error: expected ';' before 'a'
   24 |                 cin a[i];
      |                    ^~
      |                    ;
a.cc:27:12: error: expected ';' before 'b'
   27 |         cin b[0];
      |            ^~
      |            ;
a.cc:30:20: error: expected ';' before 'b'
   30 |                 cin b[i];
      |                    ^~
      |                    ;
Language: C++

#include <stdio.h>

int main() {
  int a[2][100];
  int n;
  scanf("%d", &n);
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j  < n; j++) {
      scanf("%d", &a[i][j]);
     }
   }
  for (int i = 1; i < n; i++) {
    a[0][i] += a[0][i - 1];
    a[1][n - i - 1] += a[1][n - i];
  }
  int ans = 0;
  for (int i = 0; i < n; i++) { ans = max(a[0][i] + a[1][i], ans); }
  printf("%d\n", ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:39: error: 'max' was not declared in this scope
   17 |   for (int i = 0; i < n; i++) { ans = max(a[0][i] + a[1][i], ans); }
      |                                       ^~~
Language: C++

//#define _GLIBCXX_DEBUG

#include<bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
const int INF= 1e9+5;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll> >vvl;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> T;
const ll MOD=1000000007LL;
string abc="abcdefghijklmnopqrstuvwxyz";
string ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
template<class Abel> struct UnionFind {
    vector<ll> par;
    vector<ll> rank;
    vector<Abel> diff_weight;

    UnionFind(ll n = 1, Abel SUM_UNITY = 0) {
        init(n, SUM_UNITY);
    }

    void init(ll n = 1, Abel SUM_UNITY = 0) {
        par.resize(n); rank.resize(n); diff_weight.resize(n);
        for (ll i = 0; i < n; ++i) par[i] = i, rank[i] = 0, diff_weight[i] = SUM_UNITY;
    }

    ll root(ll x) {
        if (par[x] == x) {
            return x;
        }
        else {
            ll r = root(par[x]);
            diff_weight[x] += diff_weight[par[x]];
            return par[x] = r;
        }
    }

    Abel weight(ll x) {
        root(x);
        return diff_weight[x];
    }

    bool issame(ll x, ll y) {
        return root(x) == root(y);
    }

    bool merge(ll x, ll y, Abel w) {
        w += weight(x); w -= weight(y);
        x = root(x); y = root(y);
        if (x == y) return false;
        if (rank[x] < rank[y]) swap(x, y), w = -w;
        if (rank[x] == rank[y]) ++rank[x];
        par[y] = x;
        diff_weight[y] = w;
        return true;
    }

    Abel diff(ll x, ll y) {
        return weight(y) - weight(x);
    }
};
int main(){
  ll n,m;cin>>n>>m;
  UnionFind<ll>uf(n);
  rep(i,m){
    ll l,r,d;cin>>l>>r>>d;
    l--;r--;
    if(uf.issame){
      ll diff=uf.diff(l,r);
      if(diff!=d){
        cout<<"No"<<endl;
        return 0;
      }
    }
    else uf.merge(l,r,d);
  }
  cout<<"Yes"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:71:17: error: cannot convert 'UnionFind<long long int>::issame' from type 'bool (UnionFind<long long int>::)(ll, ll)' {aka 'bool (UnionFind<long long int>::)(long long int, long long int)'} to type 'bool'
   71 |     if(uf.issame){
      |                 ^