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

#include<stdio.h>
int main(void){
  int X[51];
  int i;
  int V;
  int N;
  int C;
  int Y=0;
  scanf("%d",&N);
  for(i=0; i<N; i++){
    scanf("%d",&V);
    scanf("%d",&C);
    if((V-C)>0){
      X[]=V-C;
    }else{
      X[]=0;
    }
    Y=Y+X[i]
  }
  printf("%f",Y);
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: expected primary-expression before ']' token
   14 |       X[]=V-C;
      |         ^
a.cc:16:9: error: expected primary-expression before ']' token
   16 |       X[]=0;
      |         ^
a.cc:18:13: error: expected ';' before '}' token
   18 |     Y=Y+X[i]
      |             ^
      |             ;
   19 |   }
      |   ~
Language: C++

#include<stdio.h>
int main(void){
  int i;
  int N;
  int C;
  int V;
  int X;
  int Y;
  scanf("%d",&N);
  for(i=0; i<N; i++){
    scanf("%d",&V);
    scanf("%d",&C);
    if((V-C)>0){
      X=V-C;
    }else{
      X=0;
    }
    for(i=1; i<N; i++){
      Y+=X;
  }
  printf("Y");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:2:15: note: to match this '{'
    2 | int main(void){
      |               ^
Language: Java

import java.util.*;


class Main{

     public static void main(String []args){
        Scanner sc= new Scanner(System.ln);
        int x = sc.nextInt();
        int[] c = new int[x];
        int[] v = new int[x];
        int t = 0;
        for(int i = 0; i < x; i++){
            if( v[i] > c[i] ){
                t = t + v[i]-c[i];
            }
        }
        System.out.println(t);
        
        
     }
}

Compiler output:
Main.java:7: error: cannot find symbol
        Scanner sc= new Scanner(System.ln);
                                      ^
  symbol:   variable ln
  location: class System
1 error
Language: C++

#include <bits/stdc++.h>

using namespace std;


int main() {

    int N;
    cin >> N;

    vector<int> V(N);
    vector<int> C(N);
    for (int i = 0; i < N; ++i) {
        cin >> V[i];
    }
    for (int i = 0; i < N; ++i) {
        cin >> C[i];
    }

    int ans = 0;

    for (int i = 0; i <; ++i) {
        int value = V[i];
        int cost = C[i];

        if (value > cost) {
            ans += value - cost;
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:24: error: expected primary-expression before ';' token
   22 |     for (int i = 0; i <; ++i) {
      |                        ^
Language: Java

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.PrintWriter;
import java.util.Scanner;

public class Solution {

    // 11:07-
    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            int N = sc.nextInt();
            int[] vs = new int[N];
            int[] cs = new int[N];
            for (int i = 0; i < N; i++) vs[i] = sc.nextInt();
            for (int i = 0; i < N; i++) cs[i] = sc.nextInt();

            long ret = 0L;
            for (int i = 0; i < vs.length; i++) {
                int delta = vs[i] - cs[i];
                if (delta > 0) ret += delta;
            }

            out.println(ret);
        }
    }

}


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

#include <bits/stdc++.h>

using namespace std;

int v[20],c[20],sub[20],n,res;

bubblesort(int *a,int n)
{

    for (int i = 0 ; i < n ; i ++)
        for (int j = 0 ; j < n - i - 1 ; j ++)
            if (a[j] > a[j+1]) swap(a[j],a[j+1]);

}

int main()
{
    cin >> n;
    for (int i = 0 ; i < n ; i ++) cin >> v[i];
    for (int i = 0 ; i < n ; i ++) cin >> c[i];
    for (int i = 0 ; i < n ; i ++) sub[i] = v[i] - c[i];
    bubblesort(sub,n);
    for (int i = n - 1; i >= 0 ; i --) if (sub[i] > 0) res += sub[i];
    cout << res;
}


Compiler output:
a.cc:7:1: error: ISO C++ forbids declaration of 'bubblesort' with no type [-fpermissive]
    7 | bubblesort(int *a,int n)
      | ^~~~~~~~~~
a.cc: In function 'int bubblesort(int*, int)':
a.cc:14:1: warning: no return statement in function returning non-void [-Wreturn-type]
   14 | }
      | ^
Language: C++

#include <iostream>

using namespace std;

int v[20],c[20],sub[20],n,res;

bubblesort(int *a,int n)
{

    for (int i = 0 ; i < n ; i ++)
        for (int j = 0 ; j < n - i - 1 ; j ++)
            if (a[j] > a[j+1]) swap(a[j],a[j+1]);

}

int main()
{
    cin >> n;
    for (int i = 0 ; i < n ; i ++) cin >> v[i];
    for (int i = 0 ; i < n ; i ++) cin >> c[i];
    for (int i = 0 ; i < n ; i ++) sub[i] = v[i] - c[i];
    bubblesort(sub,n);
    for (int i = n - 1; i >= 0 ; i --) if (sub[i] > 0) res += sub[i];
    cout << res;
}


Compiler output:
a.cc:7:1: error: ISO C++ forbids declaration of 'bubblesort' with no type [-fpermissive]
    7 | bubblesort(int *a,int n)
      | ^~~~~~~~~~
a.cc: In function 'int bubblesort(int*, int)':
a.cc:14:1: warning: no return statement in function returning non-void [-Wreturn-type]
   14 | }
      | ^
Language: Java

import java.util.*;
public class resale {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner s=new Scanner(System.in);
		
		int n=s.nextInt();
		
		int val[]=new int[n];
		int cost[]=new int[n];
		
		for(int i=0;i<n;i++)
			val[i]=s.nextInt();
		
		for(int i=0;i<n;i++)
			cost[i]=s.nextInt();
		
		int ans=0;
		
		for(int i=0;i<n;i++)
			ans+=Integer.max(val[i]-cost[i], 0);
		
		System.out.println(ans);
	}

}


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

//Chandigarh University
//author:- shivamkr21
#include<bits/stdc++.h>
#define tmc long long int
using namespace std;
int main()
{
  tmc n;
  cin>>n;
  tmc v[n],c[n],sum=0;
  for(lli i=0;i<n;i++)
  {
    cin>>v[i];
  }
  for(lli i=0;i<n;i++)
  {
    cin>>c[i];
  }
  for(lli i=0;i<n;i++)
  {
    if(v[i]>c[i])
    {
      sum+=v[i]-c[i];
    }
  }
  cout<<sum<<endl;
  return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	cin>>n;
	int a[n];
	for(int i=0;i<n;i++)
	cin>>a[i];
	long long ans=0
	for(int i=0;i<n;i++)
	{
		int x;
		cin>>x;
		a[i]-=x;
		if(a[i]>0)
		ans+=a[i];
	}
	cout<<ans;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: expected ',' or ';' before 'for'
   11 |         for(int i=0;i<n;i++)
      |         ^~~
a.cc:11:21: error: 'i' was not declared in this scope
   11 |         for(int i=0;i<n;i++)
      |                     ^
Language: C++

#include<bits/stdc++.h>

using namespace std;


typedef long long ll;


int x=0,x1=0,y=0,y1=0;

int val(int v[],int c[],int indx)
{
    if(indx==0)
    {
        return 0;
    }

    x+=v[indx-1]+val(v,c,indx-1);
    y+=c[indx-1]+val(v,c,indx-1);

    x1+=val(v,c,indx-1);
    y1+=val(v,c,indx-1);

    return max(x-y,x1-y1);
}



int main( )
{
    int n;

    scanf("%d",&n);

    int v[n];
    int c[n];

    for(int i=0;i<n;i++)
    {
        scanf("%d",&v[i]);
    }
    for(int i=0;i<n;i++)
    {
        scanf("%d",&c[i]);
    }
    printf("%d\n",val(v,c,n));

    return 0;

}


Compiler output:
a.cc:9:18: error: 'int y1' redeclared as different kind of entity
    9 | int x=0,x1=0,y=0,y1=0;
      |                  ^~
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683,
                 from /usr/include/c++/14/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:33,
                 from a.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:257:1: note: previous declaration 'double y1(double)'
  257 | __MATHCALL (y1,, (_Mdouble_));
      | ^~~~~~~~~~
a.cc: In function 'int val(int*, int*, int)':
a.cc:22:7: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   22 |     y1+=val(v,c,indx-1);
      |     ~~^~~~~~~~~~~~~~~~~
a.cc:22:7: error: assignment of read-only location 'y1'
a.cc:24:22: error: invalid operands of types 'int' and 'double(double) noexcept' to binary 'operator-'
   24 |     return max(x-y,x1-y1);
      |                    ~~^~~
      |                    |  |
      |                    |  double(double) noexcept
      |                    int
Language: C++

#include<bits/stdc++.h>

using namespace std;


typedef long long ll;


int x,x1,y,y1;

int val(int v[],int c[],int indx)
{
    if(indx==0)
    {
        return 0;
    }

    x+=v[indx-1]+val(v,c,indx-1);
    y+=c[indx-1]+val(v,c,indx-1);

    x1+=val(v,c,indx-1);
    y1+=val(v,c,indx-1);

    return max(x-y,x1-y1);
}



int main( )
{
    int n;

    scanf("%d",&n);

    int v[n];
    int c[n];

    for(int i=0;i<n;i++)
    {
        scanf("%d",&v[i]);
    }
    for(int i=0;i<n;i++)
    {
        scanf("%d",&c[i]);
    }

    cout<<val(v,c,n)<<endl;

    return 0;

}


Compiler output:
a.cc:9:12: error: 'int y1' redeclared as different kind of entity
    9 | int x,x1,y,y1;
      |            ^~
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683,
                 from /usr/include/c++/14/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:33,
                 from a.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:257:1: note: previous declaration 'double y1(double)'
  257 | __MATHCALL (y1,, (_Mdouble_));
      | ^~~~~~~~~~
a.cc: In function 'int val(int*, int*, int)':
a.cc:22:7: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   22 |     y1+=val(v,c,indx-1);
      |     ~~^~~~~~~~~~~~~~~~~
a.cc:22:7: error: assignment of read-only location 'y1'
a.cc:24:22: error: invalid operands of types 'int' and 'double(double) noexcept' to binary 'operator-'
   24 |     return max(x-y,x1-y1);
      |                    ~~^~~
      |                    |  |
      |                    |  double(double) noexcept
      |                    int
Language: Java

import java.util.Scanner;
public class MyClass {
    public static void main(String args[]) {
        Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int[] V = new int[N];
        int[] C = new int[N];
        for (int i = 0; i < N; i++) {
            V[i] = s.nextInt();
        }
        for (int i = 0; i < N; i++) {
            C[i] = s.nextInt();
        }
        int ans = 0;
        for (int i = 0; i < N; i++) {
            if (V[i] > C[i])
                ans += V[i] - C[i];
        }
        System.out.print(ans);
    }
}


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

#include<iostream>
using namespace std;

int main(){
    int N;
    int max_n=20;
    int c[max_n];
    int v[max_n];
    int b[max_n];
    int benefit=0;

    cin >> N;
    for(int i=0;i<N;i++){
        cin>>v[i];
    }
    for(int i=0;i<N;i++){
        cin>>c[i];
    }
    for(int i=0;i<N;i++){
        b[i]=v[i]-c[i];
        if(b[i]>0){
            benefit+=b[i];
        }
        else{
            ;
        }
    }
    cout<<benefit;
    return 0;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>
int main(){
  	int N
    int V[N],C[N];
  	int i,sum=0;
  	scanf("%d",N);
  	for(i=0;i<N;i++) scanf("%d",V[i]);
  	for(i=0;i<N;i++) scanf("%d",C[i]);  
  	for(i=0;i<N;i++){
		if(V[i]-C[i]>0) sum=sum+(V[i]-C[i]);
    }
  	printf("%d",sum);
  	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:3:14: error: expected ';' before 'int'
    3 |         int N
      |              ^
      |              ;
    4 |     int V[N],C[N];
      |     ~~~       
main.c:4:11: error: 'N' undeclared (first use in this function)
    4 |     int V[N],C[N];
      |           ^
main.c:4:11: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main(){
  	int i=0,V,C,v_sum=0,c_sum=0,max=0;
	int N;int V[N];int C[N];
  	scanf("%d",V);
    scanf("%d",C);
  	for(i=0;i<N;i++){
      	scanf("%d",V);
      	scanf("%d",C);
      	if(V-C>0) sum=sum+(V-C);
    }
  	printf("%d",sum);
  	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:19: error: conflicting types for 'V'; have 'int[N]'
    4 |         int N;int V[N];int C[N];
      |                   ^
main.c:3:17: note: previous declaration of 'V' with type 'int'
    3 |         int i=0,V,C,v_sum=0,c_sum=0,max=0;
      |                 ^
main.c:4:28: error: conflicting types for 'C'; have 'int[N]'
    4 |         int N;int V[N];int C[N];
      |                            ^
main.c:3:19: note: previous declaration of 'C' with type 'int'
    3 |         int i=0,V,C,v_sum=0,c_sum=0,max=0;
      |                   ^
main.c:10:19: error: 'sum' undeclared (first use in this function); did you mean 'c_sum'?
   10 |         if(V-C>0) sum=sum+(V-C);
      |                   ^~~
      |                   c_sum
main.c:10:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main()
{
  int n, cost;
  int res = 0;
  cin >> n;
  
  vector<int> v(n);
  
  for(int i = 0; i < n; i++)
  {
    
    cin >> v[i];
    
  }
  
  for(int i = 0; i < n; i++)
  {
    
   cin >> cost;
    
    if(cost > v[i]
       res += cost - v[i];
    
  }
  cout << res;
  
  
  
  
  
  return 0;
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:19: error: expected ';' before 'res'
   25 |     if(cost > v[i]
      |                   ^
      |                   ;
   26 |        res += cost - v[i];
      |        ~~~         
a.cc:28:3: error: expected primary-expression before '}' token
   28 |   }
      |   ^
a.cc:26:27: error: expected ')' before '}' token
   26 |        res += cost - v[i];
      |                           ^
      |                           )
   27 | 
   28 |   }
      |   ~                        
a.cc:25:7: note: to match this '('
   25 |     if(cost > v[i]
      |       ^
a.cc:28:3: error: expected primary-expression before '}' token
   28 |   }
      |   ^
Language: C++

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

int n;
int main(){
  int ans=0;
  cin >> n ;
  vector<int> a(n),b(n);
  REP(i,n) cin>>a[i];
  REP(i,n) cin>>b[i];

  REP(i,n){
    if ((a[i]-b[i])>0)
      ans+=a[i]-b[i];
  }


  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   REP(i,n) cin>>a[i];
      |       ^
a.cc:9:3: error: 'REP' was not declared in this scope
    9 |   REP(i,n) cin>>a[i];
      |   ^~~
Language: C++

#include<iostream>
using namespace std;
 
int main()
{
    // get integers
  	int i;
    int N;
    cin >> N;
    int V[N], C[N];
  	for(i = 0 ; i <= N-1 ; i++){
     cin >> V[i];
    }
    for(i = 0 ; i <= N-1 ; i++){
     cin >> C[i]
    } 
  	// Compute
  	int Ans = 0;
    for(i = 1 ; i <= N ; i++){
     if ((V[i] - C[i]) > 0){
 	 	Ans += V[i] - C[i];	
     }
    }
    // output
    cout << Ans;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: expected ';' before '}' token
   15 |      cin >> C[i]
      |                 ^
      |                 ;
   16 |     }
      |     ~
Language: C++

#include<iostream>
using namespace std;
 
int main()
{
    // get integers
    int N;
    cin >> N;
    int V[N], C[N];
  	for(i = 0 ; i <= N-1 ; i++){
     cin >> V[i];
    }
    for(i = 0 ; i <= N-1 ; i++){
     cin >> C[i]
    } 
  	// Compute
  	int Ans = 0;
    for(i = 1 ; i <= N ; i++){
     if ((V[i] - C[i]) > 0){
 	 	Ans += V[i] - C[i];	
     }
    }
    // output
    cout << Ans;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'i' was not declared in this scope
   10 |         for(i = 0 ; i <= N-1 ; i++){
      |             ^
a.cc:13:9: error: 'i' was not declared in this scope
   13 |     for(i = 0 ; i <= N-1 ; i++){
      |         ^
a.cc:18:9: error: 'i' was not declared in this scope
   18 |     for(i = 1 ; i <= N ; i++){
      |         ^
Language: C++

#include<iostream>
using namespace std;
 
int main()
{
    // get integers
    int N;
    cin >> N;
  　vector<int> V, C;
  	for(i = 0 ; i <= N-1 ; i++){
     cin >> x
     V.push_back(x)
    }
    for(i = 0 ; i <= N-1 ; i++){
     cin >> x
     C.push_back(x)
    } 
  	// Compute
  	int Ans = 0;
    for(i = 1 ; i <= N ; i++){
     if ((V[i] - C[i]) > 0){
 	 	Ans += V[i] - C[i];	
     }
    }
    // output
    cout << Ans;
    return 0;
}


Compiler output:
a.cc:9:3: error: extended character 　 is not valid in an identifier
    9 |   　vector<int> V, C;
      |   ^
a.cc: In function 'int main()':
a.cc:9:3: error: '\U00003000vector' was not declared in this scope
    9 |   　vector<int> V, C;
      |   ^~~~~~~~
a.cc:9:12: error: expected primary-expression before 'int'
    9 |   　vector<int> V, C;
      |            ^~~
a.cc:10:13: error: 'i' was not declared in this scope
   10 |         for(i = 0 ; i <= N-1 ; i++){
      |             ^
a.cc:11:13: error: 'x' was not declared in this scope
   11 |      cin >> x
      |             ^
a.cc:14:9: error: 'i' was not declared in this scope
   14 |     for(i = 0 ; i <= N-1 ; i++){
      |         ^
a.cc:15:13: error: 'x' was not declared in this scope
   15 |      cin >> x
      |             ^
a.cc:20:9: error: 'i' was not declared in this scope
   20 |     for(i = 1 ; i <= N ; i++){
      |         ^
a.cc:21:11: error: 'V' was not declared in this scope
   21 |      if ((V[i] - C[i]) > 0){
      |           ^
a.cc:21:18: error: 'C' was not declared in this scope
   21 |      if ((V[i] - C[i]) > 0){
      |                  ^
Language: C++

#include<iostream>
using namespace std;
 
int main()
{
    // get integers
    int N;
    cin >> N;
  	int V[N], C[N]
  	getline(cin , V)
    getline(cin , C)
  	// Compute
  	int Ans = 0;
    for(i = 1 ; i <= N){
     if ((V[i] - C[i]) > 0){
 	 	Ans += V[i] - C[i];	
     }
    }
    // output
    cout << Ans;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: expected initializer before 'getline'
   10 |         getline(cin , V)
      |         ^~~~~~~
a.cc:14:9: error: 'i' was not declared in this scope
   14 |     for(i = 1 ; i <= N){
      |         ^
a.cc:14:23: error: expected ';' before ')' token
   14 |     for(i = 1 ; i <= N){
      |                       ^
      |                       ;
a.cc:15:18: error: 'C' was not declared in this scope
   15 |      if ((V[i] - C[i]) > 0){
      |                  ^
a.cc:16:17: error: 'Ans' was not declared in this scope
   16 |                 Ans += V[i] - C[i];
      |                 ^~~
a.cc:20:13: error: 'Ans' was not declared in this scope
   20 |     cout << Ans;
      |             ^~~
Language: C++

N=int(input())
V=list(map(int,input().split()))
C=list(map(int,input().split()))
ans=0
for v,c in zip(V,C):
    if v>c:
        ans+=v-c
print(ans)

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

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

int main(){
    int n;
  while(cin >> n){
    int arr[n+1],arr2[n+1];
    for( int i = 0; i < n; i++ ){
      cin >> arr[i];
    }
    for( int i = 0; i < n; i++ ){
      cin >> arr2[i];
    }
    int sum = 0;
    for( int i = 0; i < n; i++ ){
      if( arr[i] > arr2[i] ){
        sum += (arr[i]-arr2[i])
      }
    }
    cout << sum << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:32: error: expected ';' before '}' token
   17 |         sum += (arr[i]-arr2[i])
      |                                ^
      |                                ;
   18 |       }
      |       ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
  	ll n;
  	cin >> n;
  	vector<ll> a(n);
  	vector<ll> b(n);
  	
  	for(ll i = 0; i < n; i++){
      cin >> a[i];
    }
  
    for(ll i = 0; i < n; i++){
        cin >> b[i];
      }
  	ll s = 0;
  	for(ll i = 0; i < n; i++){
      if(a[i] > b[i]){
        s+=a[i] - b[i];
    }
      
      cout << s <<endl;
    }

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

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

int main()
{
  	int n;
  	cin >> n;
  	vector<int> a(n);
  	vector<int> b(n);
  	
  	for(int i = 0; i < n; i++){
      cin >> a[i];
    }
  
    for(int i = 0; i < n; i++){
        cin >> b[i];
      }
  	int s = 0;
  	for(int i = 0; i < n; i++){
      if(a[i] > b[i]){
        s+=a[i] - b[i];
    }
      
      cout << s <<endl;
    }

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

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

int main() {
	int N;
	cin >> N;
	vector<int> vecV(N);
	for (int i = 0; i < N; i++) {
		cin >> vecV(i);
	}
	vector<int> vecC(N);
	for (int i = 0; i < N; i++) {
		cin >> vecC(i);
	}
	int sum = 0;
	for (int i = 0; i < N; i++) {
		if (vecV(i) > vecC(i)) {
			sum += vecV(i) - vecC(i);
		}
	}
	cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:28: error: no match for call to '(std::vector<int>) (int&)'
    9 |                 cin >> vecV(i);
      |                        ~~~~^~~
a.cc:13:28: error: no match for call to '(std::vector<int>) (int&)'
   13 |                 cin >> vecC(i);
      |                        ~~~~^~~
a.cc:17:25: error: no match for call to '(std::vector<int>) (int&)'
   17 |                 if (vecV(i) > vecC(i)) {
      |                     ~~~~^~~
a.cc:17:35: error: no match for call to '(std::vector<int>) (int&)'
   17 |                 if (vecV(i) > vecC(i)) {
      |                               ~~~~^~~
a.cc:18:36: error: no match for call to '(std::vector<int>) (int&)'
   18 |                         sum += vecV(i) - vecC(i);
      |                                ~~~~^~~
a.cc:18:46: error: no match for call to '(std::vector<int>) (int&)'
   18 |                         sum += vecV(i) - vecC(i);
      |                                          ~~~~^~~
Language: C++

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

int main() {
  int n; cin >> n;
  vector<int> v(n);
  vector<int> c(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  for (int j = 0; j < n; j++) {
    cin >> c[j];
  }
  
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (v[i] > c[i]) {
      ans += v[i] - c[i];
    }
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> v(n);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | #include <string>
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> v(n);
      |          ^~~
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vector<int> c(n);
      |          ^~~
a.cc:10:12: error: 'v' was not declared in this scope
   10 |     cin >> v[i];
      |            ^
a.cc:13:12: error: 'c' was not declared in this scope
   13 |     cin >> c[j];
      |            ^
a.cc:18:9: error: 'v' was not declared in this scope
   18 |     if (v[i] > c[i]) {
      |         ^
a.cc:18:16: error: 'c' was not declared in this scope
   18 |     if (v[i] > c[i]) {
      |                ^
Language: C

#include <stdio.h>

int main(void) {
  int n, i;
  int ans=0;
  
  scanf("%d". &n);
  int v[n], c[n];
  for(i=0; i<n; i++) {
    scanf("%d", v[i]);
  }
  for(i=0; i<n; i++) {
    scanf("%d", c[i]);
  }
  
  for(i=0; i<n; i++) {
    if(v[i] > c[i]) { ans += (v[i] - c[i]); }
  }
  printf("%d", ans);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:15: error: expected identifier before '&' token
    7 |   scanf("%d". &n);
      |               ^
Language: C++

#include <iostream>

int main () {
  int n = 0;
  std.cin >> n;
  int v[20], c[20];
  
  for (int i = 0; i < n; i++) {
  	std.cin >> v[i];
  }
  int out = 0;
  for (int i = 0; i < n; i++) {
  	std.cin >> c[i];
    if (v[i] - c[i] > 0)
      out += v[i] - c[i];
  }
  
  cout << out;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:6: error: expected primary-expression before '.' token
    5 |   std.cin >> n;
      |      ^
a.cc:9:12: error: expected primary-expression before '.' token
    9 |         std.cin >> v[i];
      |            ^
a.cc:13:12: error: expected primary-expression before '.' token
   13 |         std.cin >> c[i];
      |            ^
a.cc:18:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |   cout << out;
      |   ^~~~
      |   std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: Java

import java.util.Scanner;

public class Main_125_B {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int number = Integer.parseInt(sc.nextLine());
        String valueStr = sc.nextLine();
        int[] values = changeStrToNums(valueStr, number);
        String costStr = sc.nextLine();
        int[] costs = changeStrToNums(costStr, number);

        int max = 0;
        for (int i = 0; i < number; i++) {
            int diff = values[i] - costs[i];
            if (diff > 0) {
                max += diff;
            }
        }
        System.out.print(max);
    }

    private static int[] changeStrToNums (String input, int count) {
        String[] numStrs = input.split(" ");
        int[] nums = new int[count];
        for (int i = 0; i < count; i++) {
            nums[i] = Integer.parseInt(numStrs[i]);
        }
        return nums;
    }
}


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

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

int main(){
    // input
    int N; cin >> N;
    vector<int> V(N);
    for(int i=0; i<N; ++i){
        cin >> V[i];
    }
    vector<int> C(N);
    for(int i=0; i<N; ++i){
        cin >> C[i];
    }

    // compute
    int ans = 0;
    for(int i=0; i<N; ++i){
        if(V[i] > C[i]){
            ans += V[i] - C[i];
        }
    }

    // output
    cout << ans << endl;
}

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

#include <bits/stdc++.h>
using namespace std;
int main(){
  
  int N;
  int A=0;
  vector<int> V(N), C(N), d(N);
    
  cin >> N;
  for(int i=0;i<N;i++){
    cin >> V.at(i);
  }
  for(int i=0;i<N;i++){
    cin >> C.at(i);
  }
  
  for(int i=0;i<N;i++){
   d.at(i) = V.at(i) - C.at(i); 
  }
  
  for(int j=0;j<N;j++){
    
    if(d.at(i)>0){
      A += d.at(i);
      }
    
  }
   
  cout << A <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:13: error: 'i' was not declared in this scope
   23 |     if(d.at(i)>0){
      |             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  
  int N;
  int A=0;
  vector<int> V(N), C(N), d(N);
    
  cin >> N;
  for(i=0;i<N;i++){
    cin >> V.at(i);
  }
  for(i=0;i<N;i++){
    cin >> C.at(i);
  }
  
  for(i=0;i<N;i++){
   d.at(i) = V.at(i) - C.at(i); 
  }
  
  for(j=0;j<N;j++){
    
    if(d.at(i)>0){
      A += d.at(i);
      }
    
  }
   
  cout << A <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'i' was not declared in this scope
   10 |   for(i=0;i<N;i++){
      |       ^
a.cc:13:7: error: 'i' was not declared in this scope
   13 |   for(i=0;i<N;i++){
      |       ^
a.cc:17:7: error: 'i' was not declared in this scope
   17 |   for(i=0;i<N;i++){
      |       ^
a.cc:21:7: error: 'j' was not declared in this scope
   21 |   for(j=0;j<N;j++){
      |       ^
a.cc:23:13: error: 'i' was not declared in this scope
   23 |     if(d.at(i)>0){
      |             ^
Language: C++

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

int main(){
  int N;
  cin>>N;
  
  vector<int> vec1(N),vec2(N);
  
  for(i=0;i<N;i++){
    cin>>vec1.at(i);
  }
   for(i=0;i<N;i++){
    cin>>vec2.at(i);
  }
  
  int ans=0;
   for(i=0;i<N;i++){
     if(vec1.at(i)-vec2.at(i)>0){
       ans+=vec1.at(i)-vec2.at(i);
     }
   }
  cout<<ans<<endl;
}
         
     
  


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

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

int main(){
  int N;
  cin>>N;
  
  vector<int> vec(N),vec2(N);
  
  for(i=0;i<N;i++){
    cin>>vec1.at(i);
  }
   for(i=0;i<N;i++){
    cin>>vec2.at(i);
  }
  
  int ans=0;
   for(i=0;i<N;i++){
     if(vec1.at(i)-vec2.at(i)>0){
       ans+=vec1.at(i)-vec2.at(i);
     }
   }
  cout<<ans<<endl;
}
         
     
  


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'i' was not declared in this scope
   10 |   for(i=0;i<N;i++){
      |       ^
a.cc:11:10: error: 'vec1' was not declared in this scope; did you mean 'vec2'?
   11 |     cin>>vec1.at(i);
      |          ^~~~
      |          vec2
a.cc:13:8: error: 'i' was not declared in this scope
   13 |    for(i=0;i<N;i++){
      |        ^
a.cc:18:8: error: 'i' was not declared in this scope
   18 |    for(i=0;i<N;i++){
      |        ^
a.cc:19:9: error: 'vec1' was not declared in this scope; did you mean 'vec2'?
   19 |      if(vec1.at(i)-vec2.at(i)>0){
      |         ^~~~
      |         vec2
Language: C++

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

int main(){
  int N;
  cin>>N;
  
  vector<int> vec(N),vec2(N);
  
  for(i=0;i<N;i++){
    cin>>vec1.at(i);
  }
   for(i=0;i<N;i++){
    cin>>vec2.at(i);
  }
  
  int ans=0;
   for(i=0;i<N;i++){
     if(vec1(i)-vec2(i)>0){
       ans+=vec1(i)-vec2(i);
     }
   }
  cout<<ans<<endl;
}
         
     
  

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'i' was not declared in this scope
   10 |   for(i=0;i<N;i++){
      |       ^
a.cc:11:10: error: 'vec1' was not declared in this scope; did you mean 'vec2'?
   11 |     cin>>vec1.at(i);
      |          ^~~~
      |          vec2
a.cc:13:8: error: 'i' was not declared in this scope
   13 |    for(i=0;i<N;i++){
      |        ^
a.cc:18:8: error: 'i' was not declared in this scope
   18 |    for(i=0;i<N;i++){
      |        ^
a.cc:19:9: error: 'vec1' was not declared in this scope; did you mean 'vec2'?
   19 |      if(vec1(i)-vec2(i)>0){
      |         ^~~~
      |         vec2
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  vecrot<vector<int>>VC(N,vector<int>(2));
  
  for (int i = 0; i < N; i++) {
    cin >> VC.at(i).at(0);
  }
  for (int i = 0; i < N; i++) {
    cin >> VC.at(i).at(1);
  }
  int A = 0;
  for (int i = 0; i < N; i++) {
    if (VC.at(i).at(0) > VC.at(i).at(1)) {
      A += VC.at(i).at(0) - VC.at(i).at(1);
    }
  }
  cout << A << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vecrot' was not declared in this scope
    7 |   vecrot<vector<int>>VC(N,vector<int>(2));
      |   ^~~~~~
a.cc:7:20: error: expected primary-expression before '>' token
    7 |   vecrot<vector<int>>VC(N,vector<int>(2));
      |                    ^~
a.cc:7:22: error: 'VC' was not declared in this scope
    7 |   vecrot<vector<int>>VC(N,vector<int>(2));
      |                      ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main () {
  int n, v[20], c[20];
  cin>>n;
  for (int i=0;i<n;++i) cin>>v[i];
  for (int i=0;i<n;++i) cin>>c[i];
  int s=0;
  for (int i=0;i<n;++i) {
    if (v[i]>c[i]) s+=v[i]-s[i];
  }
  cout<<s;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:29: error: invalid types 'int[int]' for array subscript
   10 |     if (v[i]>c[i]) s+=v[i]-s[i];
      |                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	long long int n;
	cin>>n;
	long long int v[n],c[n],sum=0,i,k;
	for(i=0;i<n;++i)
	{
		cin>>v[i];
	}
	for (j=0;j<n;++j)
	{
		cin>>c[j];
	}
	for(k=0;k<n;++k)
	{
		if(v[k]-c[k]>0)
		{
			sum+=v[k]-c[k];
		}
	}
	cout<<sum;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: 'j' was not declared in this scope
   12 |         for (j=0;j<n;++j)
      |              ^
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[] v = new int[n];
        int[] c = new int[n];
		int x = Math.pow(n, 2);
        int max = 0;
      
        for (int i = 0; i < n; i++) {
          v[i] = sc.nextInt();
        }
        for (int i = 0; i < n; i++) {
          c[i] = sc.nextInt();
        }
      
      	for (i = 0; i<x; i++) {
            int tempResultValue = 0;
            int tempResultCost = 0;
        	for(j = 0; j<n; j++){
          		if(isBitTrue(j,i)) {
                	tempResultValue+=v[j];
                    tempResultCost+=c[j];
                }
            }
        	
            if (max < (tempResultValue - tempResultCost)) {
            	max = (tempResultValue - tempResultCost);
            }
        }
      
      　System.out.println(max);
        sc.close();
    }
  
  public static boolean isBitTrue(int j, int i) {
    int mask = 0x1 << j;
  	return 0 != (mask & i);
  }
 
}

Compiler output:
Main.java:35: error: illegal character: '\u3000'
      ?System.out.println(max);
      ^
1 error
Language: C++

    #include<iostream>
    using namespace std;
    int main()
    {
        //Input
        int n, v, c;
        cin >> n;
        for(int i = 0; i < n; ++i) cin >>v;
        for(int i = 0; i < n; ++i) cin >>c

        int bestVal = 0;

        for(int p = 0; p<n; ++p){
            if (v[p] > c[p]) bestval += v[p] - c[p]
        }

        // 出力
        cout << bestVal<<endl;
        return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:43: error: expected ';' before 'int'
    9 |         for(int i = 0; i < n; ++i) cin >>c
      |                                           ^
      |                                           ;
   10 | 
   11 |         int bestVal = 0;
      |         ~~~                                
a.cc:14:18: error: invalid types 'int[int]' for array subscript
   14 |             if (v[p] > c[p]) bestval += v[p] - c[p]
      |                  ^
a.cc:14:25: error: invalid types 'int[int]' for array subscript
   14 |             if (v[p] > c[p]) bestval += v[p] - c[p]
      |                         ^
a.cc:14:30: error: 'bestval' was not declared in this scope
   14 |             if (v[p] > c[p]) bestval += v[p] - c[p]
      |                              ^~~~~~~
a.cc:14:42: error: invalid types 'int[int]' for array subscript
   14 |             if (v[p] > c[p]) bestval += v[p] - c[p]
      |                                          ^
a.cc:14:49: error: invalid types 'int[int]' for array subscript
   14 |             if (v[p] > c[p]) bestval += v[p] - c[p]
      |                                                 ^
a.cc:18:17: error: 'bestVal' was not declared in this scope
   18 |         cout << bestVal<<endl;
      |                 ^~~~~~~
Language: C++

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

int main(){
    int N, R = 0;
    cin >> N;
    int V[50], C[50];
    for(int i = 0;i < N; i++){
        cin >> V[i];
    }
    for (int i = 0; i < N; i++){
        cin >> C[i];
    }
    int count;
    for(int i = 0; i < N; i++){
        count = V[i] - C[i];
        if(count > 0){
            X += count;
        }
    }
    cout << X << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: 'X' was not declared in this scope
   18 |             X += count;
      |             ^
a.cc:21:13: error: 'X' was not declared in this scope
   21 |     cout << X << endl;
      |             ^
Language: C++

#include <iostream>
#include <vector>
using namespace std;
int main(){
  int n; cin >> n;
  vertor<int> v(n);
  for(int i = 0;i < n;i++){
    cin >> v[i];
  }
  vector<int> c(n);
  for(int i = 0;i < n;i++){
    cin >> c[i];
  }
  int ans = 0;
  for(int i = 0;i < n;i++){
    if(v[i] > c[i]){
      ans += (v[i] - c[i]);
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'vertor' was not declared in this scope; did you mean 'perror'?
    6 |   vertor<int> v(n);
      |   ^~~~~~
      |   perror
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   vertor<int> v(n);
      |          ^~~
a.cc:8:12: error: 'v' was not declared in this scope
    8 |     cin >> v[i];
      |            ^
a.cc:16:8: error: 'v' was not declared in this scope
   16 |     if(v[i] > c[i]){
      |        ^
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[] array1 = new array[];
        int[] array2 = new array[];
      	int ans = 0;
      	for(int i=0; i<n; i++){
          array1[i] = sc.nextInt();
        }
      	for(int l=0; l<n; l++){
          array2[l] = sc.nextInt();
        }
      	for(int m=0; m<n; m++){
          if(array1[m]>array2[m]){
            ans += array1[m]-array2[m];
          }
        }
      	System.out.println(ans);
    }
}
            

Compiler output:
Main.java:6: error: array dimension missing
      	int[] array1 = new array[];
      	                          ^
Main.java:7: error: array dimension missing
        int[] array2 = new array[];
                                  ^
2 errors
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[] array1 = array[];
        int[] array2 = array[];
      	int ans = 0;
      	for(int i=0; i<n; i++){
          array1[i] = sc.nextInt();
        }
      	for(int l=0; l<n; l++){
          array2[l] = sc.nextInt();
        }
      	for(int m=0; m<n; m++){
          if(array1[m]>array2[m]){
            ans += array1[m]-array2[m];
          }
        }
      	System.out.println(ans);
    }
}
            

Compiler output:
Main.java:6: error: '.class' expected
      	int[] array1 = array[];
      	                      ^
Main.java:7: error: '.class' expected
        int[] array2 = array[];
                              ^
2 errors
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int n; cin>>n;
  int *x = new int[n];
  int *y = new int[n];
  int ans = 0;
  for(int i=0;i<n;i++)cin>>x[i];
  for(int i=0;I<n;i++)
  {
    cin>>y[i];
    if(x[i]>y[i])ans+=x[i]-y[i];
  }
  cout<<ans<<endl;
  delete[] x;
  delete[] y;
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin >> N;
  vector<int> V(N);
  vector<int> C(N);
  for(int i=0;i<N;i++){
    cin >> V[i];
  }
  for(int i=0;i<N;i++){
    cin >> C[i];
  }
  int sum =0;
  for(int i=0;i<N;i++){
    if(X[i]-C[i]>0){
      sum += X[i] - C[i];
    }
  }
  cout << sum << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:8: error: 'X' was not declared in this scope
   16 |     if(X[i]-C[i]>0){
      |        ^
Language: C++

#include <bits/stdc++.h>
#include <vector>
using namespace std;
int main(){
	int N; cin >> N;
	vector<int>V(N); vector<int>C(N);
	for(int i = 0; i < N; i++){
		cin >> V[i] >> C[i];}
		int answer = 0;
		for(int i = 0; i < N; i++){
			if(V[i] > C[i]){answer += V[i] - C[i];}
			}
	

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

#include <iostream>
using namespace std;
int main()
{
    int n;
    int max = 0;
    vector<int> V(n);
    vector<int> C(n);
    cin >> n;
    for (int i = 0; i < n;i++){
        cin >> V[i];
    }
    for (int i = 0; i < n; i++)
    {
        cin >> C[i];
    }
    for (int i = 0; i < n; i++)
    {
        if(V[i]>C[i]){
            max += V[i] - C[i];
        }
    }
    cout << max << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'vector' was not declared in this scope
    7 |     vector<int> V(n);
      |     ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:7:12: error: expected primary-expression before 'int'
    7 |     vector<int> V(n);
      |            ^~~
a.cc:8:12: error: expected primary-expression before 'int'
    8 |     vector<int> C(n);
      |            ^~~
a.cc:11:16: error: 'V' was not declared in this scope
   11 |         cin >> V[i];
      |                ^
a.cc:15:16: error: 'C' was not declared in this scope
   15 |         cin >> C[i];
      |                ^
a.cc:19:12: error: 'V' was not declared in this scope
   19 |         if(V[i]>C[i]){
      |            ^
a.cc:19:17: error: 'C' was not declared in this scope
   19 |         if(V[i]>C[i]){
      |                 ^
Language: C++

#include <iostream>
using namespace std;
int main()
{
    int n,max;
    int V[20], C[20];
    cin >> n;
    for (int i = 0; i < n;i++){
        cin >> V[i];
    }
    for (int i = 0; i < n; i++)
    {
        cin >> C[i];
    }
    for (int i = 0; i < n; i++)
    {
        if(V[i]>C[i]){
            max += V[i] - C[i]
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:31: error: expected ';' before '}' token
   18 |             max += V[i] - C[i]
      |                               ^
      |                               ;
   19 |         }
      |         ~
Language: C

#include <stdio.h>

int main(void){
    int num,i,j,k,ans,dif;
    ans = 0;
    scanf("%d",&num);
    int a[1][num-1];
    
    for (i=0;i<num;i++){
        scanf("%d",&a[0][i]);
    }
    for (j=0;j<num;j++){
        scanf("%d",&a[1][j]);
    }
    for (k=0;k<num;k++){
        dif = a[0][k] - a[1][k]
        if (a[0][k] - a[1][k] > 0){
            ans +=dif;
            }
    }
    printf("%d",ans);
    
    /*for (m = 0; m < 2; m++){  // 成分の表示
        for (n = 0; n < num; n++){
            printf("%d",a[m][n]);
        }
     printf("\n");  */
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:16:32: error: expected ';' before 'if'
   16 |         dif = a[0][k] - a[1][k]
      |                                ^
      |                                ;
   17 |         if (a[0][k] - a[1][k] > 0){
      |         ~~
Language: C++

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

int main(){
	int n;
  	vector<int> vals(n);
  	vector<int> cons(n);
	for(int i = 0; i < n; i++) cin >> vals[i];
  	for(int i = 0; i < n; i++) cin >> cons[i];
  	int res = 0;
  	for(int i = 0; i < n; i++)
      if(vals[i] > cons[i]) res += vals[i]-cons[i];
  	cout << res;
	}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
    1 | #inclue<bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:9: error: 'vector' was not declared in this scope
    6 |         vector<int> vals(n);
      |         ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | #inclue<bits/stdc++.h>
a.cc:6:16: error: expected primary-expression before 'int'
    6 |         vector<int> vals(n);
      |                ^~~
a.cc:7:16: error: expected primary-expression before 'int'
    7 |         vector<int> cons(n);
      |                ^~~
a.cc:8:36: error: 'cin' was not declared in this scope
    8 |         for(int i = 0; i < n; i++) cin >> vals[i];
      |                                    ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inclue<bits/stdc++.h>
a.cc:8:43: error: 'vals' was not declared in this scope
    8 |         for(int i = 0; i < n; i++) cin >> vals[i];
      |                                           ^~~~
a.cc:9:36: error: 'cin' was not declared in this scope
    9 |         for(int i = 0; i < n; i++) cin >> cons[i];
      |                                    ^~~
a.cc:9:36: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:43: error: 'cons' was not declared in this scope; did you mean 'const'?
    9 |         for(int i = 0; i < n; i++) cin >> cons[i];
      |                                           ^~~~
      |                                           const
a.cc:12:10: error: 'vals' was not declared in this scope
   12 |       if(vals[i] > cons[i]) res += vals[i]-cons[i];
      |          ^~~~
a.cc:12:20: error: 'cons' was not declared in this scope; did you mean 'const'?
   12 |       if(vals[i] > cons[i]) res += vals[i]-cons[i];
      |                    ^~~~
      |                    const
a.cc:13:9: error: 'cout' was not declared in this scope
   13 |         cout << res;
      |         ^~~~
a.cc:13:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<int> v(n);
  for(int i=0;i<n;i++){
    cin >> v.at(i);
  }
  vector<int> w(n);
  for(int i=0;i<n;i++){
    cin >> w.at(i);
  }
  vector<int> vw(n);
  for(int i=0;i<n;i++){
    vw.at(i) = v.at(i) - w.at(i);
  }
  sort(vw.begin(),vw.end());
  reverse(vw.begin(),vw.end());
  int count = 0;
  int j = 0;
  while((vw.at(j) > 0) && (j < n)){
    count += vw.at(j);
    j++;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:25:4: error: expected '}' at end of input
   25 |   }
      |    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^