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

#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
  cin>>N;
  int a=0;
  int b=0;
  vector<int> A(N);
    vector<int> B(N);
  for(int i=0;i<N;i++){
  cin>>A(i);
    cin>>B(i);
  }
for(int i=0;i<N;i++){
a+=A(i);
  b+=B(i);
  
}
  int C=mac(0,a-b);
  cout<<C<<endl;



}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: no match for call to '(std::vector<int>) (int&)'
   11 |   cin>>A(i);
      |        ~^~~
a.cc:12:11: error: no match for call to '(std::vector<int>) (int&)'
   12 |     cin>>B(i);
      |          ~^~~
a.cc:15:5: error: no match for call to '(std::vector<int>) (int&)'
   15 | a+=A(i);
      |    ~^~~
a.cc:16:7: error: no match for call to '(std::vector<int>) (int&)'
   16 |   b+=B(i);
      |      ~^~~
a.cc:19:9: error: 'mac' was not declared in this scope
   19 |   int C=mac(0,a-b);
      |         ^~~
Language: C

#include<stdio.h>
int main(void){
  int l,i,j;
  scanf("%d",&l);
  int v[l],c[l],sum=0;
  for(i=0;i<l;i++){
    scanf("%d",&v[i]);
  }
  for(i=0;i<l;i++){
    scanf("%d",&c[i]);
    sa=v[i]-c[i];
    if(sa>0){
      sum+=sa;
    }
  }
  printf("%d",sum);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:5: error: 'sa' undeclared (first use in this function)
   11 |     sa=v[i]-c[i];
      |     ^~
main.c:11:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main(){
int n,max=0;
  cin>>n;
  vector<int> a(n);
  vector<int> b(n);
  int i,j;
  for(i=0;i<n;i++){
    cin>>a[i]>>b[i];
  }
  for(i=0;i<n;i++){
    for(j=i+1;j<n;j++){
      ans1=a[i]+a[j];
      ans2=b[i]+b[j];
      if(ans1-ans2>max) max=ans1-ans2;
    }
  }
  cout<<max<<endl;
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: 'ans1' was not declared in this scope
   15 |       ans1=a[i]+a[j];
      |       ^~~~
a.cc:16:7: error: 'ans2' was not declared in this scope
   16 |       ans2=b[i]+b[j];
      |       ^~~~
Language: C++

clude<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<N; i++){
    if(V[i]>C[i]) ans+=V[i]-C[i];
  }
  cout << ans <<endl;
}

Compiler output:
a.cc:1:1: error: 'clude' does not name a type
    1 | clude<bits/stdc++.h>
      | ^~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> N;
      |   ^~~
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> V(N);
      |   ^~~~~~
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:9:33: error: 'V' was not declared in this scope
    9 |   for(int i=0; i<N; i++) cin >> V[i];
      |                                 ^
a.cc:10:33: error: 'C' was not declared in this scope
   10 |   for(int i=0; i<N; i++) cin >> C[i];
      |                                 ^
a.cc:14:8: error: 'V' was not declared in this scope
   14 |     if(V[i]>C[i]) ans+=V[i]-C[i];
      |        ^
a.cc:14:13: error: 'C' was not declared in this scope
   14 |     if(V[i]>C[i]) ans+=V[i]-C[i];
      |             ^
a.cc:16:3: error: 'cout' was not declared in this scope
   16 |   cout << ans <<endl;
      |   ^~~~
a.cc:16:17: error: 'endl' was not declared in this scope
   16 |   cout << ans <<endl;
      |                 ^~~~
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
  cout << endl;
}
int main(){
    int N,ans;
    cin >> N;
    vector<int> V(N);
    vector<int> C(N);
    rep(i,N) cin >> V[i];
    rep(i,N) cin >> C[i];
    rep(i,N) (V[i] > C[i]) && (ans += V[i] - C[i]);
    cout << ans << endl;
}

Compiler output:
a.cc:5:3: error: 'cout' does not name a type
    5 |   cout << endl;
      |   ^~~~
a.cc:6:1: error: expected declaration before '}' token
    6 | }
      | ^
Language: C++

# include < bits / stdc ++. h >
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:11: fatal error:  bits / stdc ++. h : No such file or directory
    1 | # include < bits / stdc ++. h >
      |           ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
  int n;
  cin >> n;
  int ans=0;
  int k[n];
  int y[n];
  rep(i,n)cin >> k[i];
  rep(i,n)cin >> y[i];
  rep(i,n){
    ans+=max(0,k[i]-w[i]);
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: 'w' was not declared in this scope
   13 |     ans+=max(0,k[i]-w[i]);
      |                     ^
Language: C++

#include<iostream>
using namespace std;

int v[20],c[20];
int main()

{	
	int n,max=0,v,s1=0,max1=0,s=0;
	cin >> n;
	for (int i=0;i<n;i++)
	{
		cin >>v[i];
		cin >> c[i];
	}
	for (int i=0;i<n;i++)
	{
		for (int j=i+1;j<n;j++)
		s=v[j]+v[i];
		s1=c[j]+c[i];
		
		if(s>max)
		max=s;
		if(s1>max1)
		max1=s1;
		
	}
	cout << max-max1;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: invalid types 'int[int]' for array subscript
   12 |                 cin >>v[i];
      |                        ^
a.cc:18:20: error: invalid types 'int[int]' for array subscript
   18 |                 s=v[j]+v[i];
      |                    ^
a.cc:18:25: error: invalid types 'int[int]' for array subscript
   18 |                 s=v[j]+v[i];
      |                         ^
a.cc:19:22: error: 'j' was not declared in this scope
   19 |                 s1=c[j]+c[i];
      |                      ^
Language: C++

#include <iostream>
using namespace std;

int v[21];
int c[21];

int main(){
	int n,v,i,j,s1=0,s2=0,max1=0,max2=0;
	cin >> n;
	for(i=0;i<n;i++)
		cin >> v[i] >> c[i];
	for(i=0;i<n;i++)
		for(j=i+1;j<n;i++)	
			s1 = v[i] + v[j];
			s2 = c[i] + c[j];
			if(s1>max1)
				max1=s1;
			if(s2>max2)
				max2=s2;
	cout << max1-max2;
		
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: invalid types 'int[int]' for array subscript
   11 |                 cin >> v[i] >> c[i];
      |                         ^
a.cc:14:31: error: invalid types 'int[int]' for array subscript
   14 |                         s1 = v[i] + v[j];
      |                               ^
a.cc:14:38: error: invalid types 'int[int]' for array subscript
   14 |                         s1 = v[i] + v[j];
      |                                      ^
Language: C++

n = int(input())
x = list(map(int,input().split()))
y = list(map(int,input().split()))

a = 0
for i in range(n):
  if y[i] < x[i]:
    a = a+(x[i]-y[i])
    
print(a)

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;
  cin >> N;
  vector<int> V(N);
    vector<int> C(N);
    for (int i = 0; i < N; i++) {
    cin >> V.at(i);
  }
    for (int i = 0; i < N; i++) {
    cin >> C.at(i);
  }
  int i = 0; // カウンタ変数
while (i < N) {
  if(V[i] - C[i] >0){
  int S = V[i] - C[i];
    i ++  
}
}
  cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: expected ';' before '}' token
   19 |     i ++
      |         ^
      |         ;
   20 | }
      | ~        
a.cc:22:11: error: 'S' was not declared in this scope
   22 |   cout << S << endl;
      |           ^
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 [ 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;
  return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   for(i=0;i<N;i++)
      |       ^
a.cc:12:8: error: 'i' was not declared in this scope
   12 |    for(i=0;i<N;i++)
      |        ^
a.cc:16:7: error: 'i' was not declared in this scope
   16 |   for(i=0;i<N;i++)
      |       ^
a.cc:18:13: error: 'c' was not declared in this scope
   18 |     if(V[i]>c[i])
      |             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(s,i, n) for (int i = (int)s; i < (int)(n); i++)
#define pb push_back
typedef long long ll;
  
int main(){
    int n;
    cin>>n;
    vector<int> vec(n);
    rep(i,n){
        int v,c;
        cin>>v>>c;
        v[i]=v-c;
    }
    int ans=0;
    rep(i,n){
        if(vec[i]>0){
            ans+=vec[i];
        }
    }
    cout<<ans<<endl;
    
    return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(s,i, n) for (int i = (int)s; i < (int)(n); i++)
#define pb push_back
typedef long long ll;
  
int main(){
    int n;
    cin>>n;
    vector<int> v;
    rep(i,n){
        int c,v;
        cin>>v>>c;
        v.pb(v-c);
    }
    int ans=0;
    rep(i,n){
        if(v[i]>0){
            ans+=v[i];
        }
    }
    cout<<ans<<endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: request for member 'push_back' in 'v', which is of non-class type 'int'
    5 | #define pb push_back
      |            ^~~~~~~~~
a.cc:15:11: note: in expansion of macro 'pb'
   15 |         v.pb(v-c);
      |           ^~
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[2*N];
    int x=0;
    for(int i=0;i<2*N;i++){
      if(i<N){V[i]=sc.nextInt();}
      elseV[i]=V[i-N]-sc.nextInt();
           if(V[i]>0){x=x+V[i];}}}
    System.out.println(x);
  }
}

Compiler output:
Main.java:12: error: <identifier> expected
    System.out.println(x);
                      ^
Main.java:12: error: <identifier> expected
    System.out.println(x);
                        ^
Main.java:14: error: class, interface, enum, or record expected
}
^
3 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 V[] =new int[N];
    int C[] =new int[N];
    int x=0;
    for(int i=0;i<2N;i++){
      if(i<N){V[i]=sc.nextInt();}
      else{C[i-N]=V[i]-sc.nextInt();
           if(C[i-N]>0){x=x+C[i-N];}}}
  }
}

Compiler output:
Main.java:9: error: ';' expected
    for(int i=0;i<2N;i++){
                   ^
Main.java:9: error: ')' expected
    for(int i=0;i<2N;i++){
                    ^
Main.java:9: error: ';' expected
    for(int i=0;i<2N;i++){
                        ^
3 errors
Language: Java

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

class Resale {
  public static void main(String[] args) {
    BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
    PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    
    int a = Integer.parseInt(f.readLine());
    StringTokenizer vals = new StringTokenizer(f.readLine());
    StringTokenizer costs = new StringTokenizer(f.readLine());
    
    int val;
    int cost;
    int profit = 0;
    
    for (int i = 0; i < a; i++) {
      val = Integer.parseInt(vals.nextToken());
      cost = Integer.parseInt(costs.nextToken());
      if (val > cost) {
        profit += val - cost;
      }
    }
    
    out.write(profit);
    out.close();
  }
}


Compiler output:
Main.java:9: error: unreported exception IOException; must be caught or declared to be thrown
    int a = Integer.parseInt(f.readLine());
                                       ^
Main.java:10: error: unreported exception IOException; must be caught or declared to be thrown
    StringTokenizer vals = new StringTokenizer(f.readLine());
                                                         ^
Main.java:11: error: unreported exception IOException; must be caught or declared to be thrown
    StringTokenizer costs = new StringTokenizer(f.readLine());
                                                          ^
3 errors
Language: Java

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

class Resale {
  public static void main(String[] args) {
    BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
    PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    
    int a = Integer.parseInt(f.readLine());
    StringTokenizer vals = new StringTokenizer(f.readLine());
    StringTokenizer costs = new StringTokenizer(f.readLine());
    
    String val;
    String cost;
    int profit = 0;
    
    for (int i = 0; i < a; i++) {
      val = vals.nextToken();
      cost = costs.nextToken();
      if (val > cost) {
        profit += val - cost;
      }
    }
    
    out.write(profit);
    out.close();
  }
}


Compiler output:
Main.java:20: error: bad operand types for binary operator '>'
      if (val > cost) {
              ^
  first type:  String
  second type: String
Main.java:21: error: bad operand types for binary operator '-'
        profit += val - cost;
                      ^
  first type:  String
  second type: String
2 errors
Language: Java

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

class Resale {
  public static void main(String[] args) {
    BufferedReader f = new BufferedReader(System.in);
    PrintWriter out = new PrintWriter(new BufferedWriter(System.out));
    
    int a = Integer.parseInt(f.readLine());
    StringTokenizer vals = new StringTokenizer(f.readLine());
    StringTokenizer costs = new StringTokenizer(f.readLine());
    
    String val;
    String cost;
    int profit = 0;
    
    for (int i = 0; i < a; i++) {
      val = vals.nextToken();
      cost = costs.nextToken();
      if (val > cost) {
        profit += val - cost;
      }
    }
    
    out.write(profit);
    out.close();
  }
}


Compiler output:
Main.java:6: error: incompatible types: InputStream cannot be converted to Reader
    BufferedReader f = new BufferedReader(System.in);
                                                ^
Main.java:7: error: incompatible types: PrintStream cannot be converted to Writer
    PrintWriter out = new PrintWriter(new BufferedWriter(System.out));
                                                               ^
Main.java:20: error: bad operand types for binary operator '>'
      if (val > cost) {
              ^
  first type:  String
  second type: String
Main.java:21: error: bad operand types for binary operator '-'
        profit += val - cost;
                      ^
  first type:  String
  second type: String
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
4 errors
Language: Java

class Resale {
  public static void main(String[] args) {
    BufferedReader f = new BufferedReader(System.in);
    PrintWriter out = new PrintWriter(new BufferedWriter(System.out));
    
    int a = Integer.parseInt(f.readLine());
    StringTokenizer vals = new StringTokenizer(f.readLine());
    StringTokenizer costs = new StringTokenizer(f.readLine());
    
    String val;
    String cost;
    int profit = 0;
    
    for (int i = 0; i < a; i++) {
      val = vals.nextToken();
      cost = costs.nextToken();
      if (val > cost) {
        profit += val - cost;
      }
    }
    
    out.write(profit);
    out.close();
  }
}

Compiler output:
Main.java:3: error: cannot find symbol
    BufferedReader f = new BufferedReader(System.in);
    ^
  symbol:   class BufferedReader
  location: class Resale
Main.java:3: error: cannot find symbol
    BufferedReader f = new BufferedReader(System.in);
                           ^
  symbol:   class BufferedReader
  location: class Resale
Main.java:4: error: cannot find symbol
    PrintWriter out = new PrintWriter(new BufferedWriter(System.out));
    ^
  symbol:   class PrintWriter
  location: class Resale
Main.java:4: error: cannot find symbol
    PrintWriter out = new PrintWriter(new BufferedWriter(System.out));
                          ^
  symbol:   class PrintWriter
  location: class Resale
Main.java:4: error: cannot find symbol
    PrintWriter out = new PrintWriter(new BufferedWriter(System.out));
                                          ^
  symbol:   class BufferedWriter
  location: class Resale
Main.java:7: error: cannot find symbol
    StringTokenizer vals = new StringTokenizer(f.readLine());
    ^
  symbol:   class StringTokenizer
  location: class Resale
Main.java:7: error: cannot find symbol
    StringTokenizer vals = new StringTokenizer(f.readLine());
                               ^
  symbol:   class StringTokenizer
  location: class Resale
Main.java:8: error: cannot find symbol
    StringTokenizer costs = new StringTokenizer(f.readLine());
    ^
  symbol:   class StringTokenizer
  location: class Resale
Main.java:8: error: cannot find symbol
    StringTokenizer costs = new StringTokenizer(f.readLine());
                                ^
  symbol:   class StringTokenizer
  location: class Resale
Main.java:17: error: bad operand types for binary operator '>'
      if (val > cost) {
              ^
  first type:  String
  second type: String
Main.java:18: error: bad operand types for binary operator '-'
        profit += val - cost;
                      ^
  first type:  String
  second type: String
11 errors
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: no match for call to '(std::vector<int>) (int&)'
    8 |   for(i=0;i<N;i++)cin>>V(i);
      |                        ~^~~
a.cc:9:25: error: no match for call to '(std::vector<int>) (int&)'
    9 |   for(j=0;j<N;j++)cin>>C(j);
      |                        ~^~~
a.cc:12:9: error: no match for call to '(std::vector<int>) (int&)'
   12 |     if(V(k)>C(k))sum+=(V(k)-C(k));
      |        ~^~~
a.cc:12:14: error: no match for call to '(std::vector<int>) (int&)'
   12 |     if(V(k)>C(k))sum+=(V(k)-C(k));
      |             ~^~~
a.cc:12:25: error: no match for call to '(std::vector<int>) (int&)'
   12 |     if(V(k)>C(k))sum+=(V(k)-C(k));
      |                        ~^~~
a.cc:12:30: error: no match for call to '(std::vector<int>) (int&)'
   12 |     if(V(k)>C(k))sum+=(V(k)-C(k));
      |                             ~^~~
Language: C++

#include <iostream>
#include <string>
#include <map>
#include <vector>
#include <math.h>
#include <algorithm>

using namespace std;

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

  int sum = 0;
  for (int i = 0; i < N; ++i)
  {
    int V, C;
    cin >> V >> C;

    int diff = V - C;
    if (diff > 0) sum += diff;
  }
  cout << sum << endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:24:23: error: expected '}' at end of input
   24 |   cout << sum << endl;
      |                       ^
a.cc:11:1: note: to match this '{'
   11 | {
      | ^
Language: Java

import java.util.Scanner;

public class ABC125B {
	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 ans = 0;
		for (int i = 0; i < N; i++) {
			V[i] = sc.nextInt();
			C[i] = sc.nextInt();
			if (V[i] > C[i]) {
				ans += V[i] - C[i];
			}
		}
		sc.close();
		System.out.println(ans);
	}
}

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

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;
  int x;
  for(int i=0;i<n;i++){
    x=v[i]-c[i];
    if(x>0)sum+=x;
  }
  cout<<sum<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin>>n;
      |   ^~~
a.cc:4:3: error: 'vector' was not declared in this scope
    4 |   vector<int>v(n);
      |   ^~~~~~
a.cc:4:10: error: expected primary-expression before 'int'
    4 |   vector<int>v(n);
      |          ^~~
a.cc:5:10: error: expected primary-expression before 'int'
    5 |   vector<int>c(n);
      |          ^~~
a.cc:6:28: error: 'v' was not declared in this scope
    6 |   for(int i=0;i<n;i++)cin>>v[i];
      |                            ^
a.cc:7:28: error: 'c' was not declared in this scope
    7 |   for(int i=0;i<n;i++)cin>>c[i];
      |                            ^
a.cc:11:7: error: 'v' was not declared in this scope
   11 |     x=v[i]-c[i];
      |       ^
a.cc:11:12: error: 'c' was not declared in this scope
   11 |     x=v[i]-c[i];
      |            ^
a.cc:14:3: error: 'cout' was not declared in this scope
   14 |   cout<<sum<<endl;
      |   ^~~~
a.cc:14:14: error: 'endl' was not declared in this scope
   14 |   cout<<sum<<endl;
      |              ^~~~
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 [ 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:1:11: fatal error:  bits / stdc ++. h : No such file or directory
    1 | # include < bits / stdc ++. h >
      |           ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <bits/stdc++.h>
#include<queue>
#include <numeric>
#include<stdio.h>
using namespace std;
 
//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
 
//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}
 template<class T>bool chmin(T &a, const T &b) { if (b<a) { a = b; return 1; } return 0; }
//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
 
//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define fore(i,a) for(auto &i:a)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);
 
//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

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

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

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

Compiler output:
a.cc:105:6: error: extended character 　 is not valid in an identifier
  105 |     }　
      |      ^
a.cc:105:6: error: '\U00003000' does not name a type
  105 |     }　
      |      ^~
Language: C++

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

int main()
{
    return 0;
    int sum_x = 0, sum_y = 0, size, num;
    cin >> size;
    for(int i = 0; i < 2; i++)
    {
        for(int j = 0; j < size; j++)
        {
            cin >> num;
            if(i == 0 &&(i == 0 || i == size - 1))
                sum_x += num;
            if(i == 1 &&(i == 0 || i == size - 1))
                sum_y += num;
        }
    }
    if (size > 1)
    {
        cout << sum_x - sum_z << endl;
    }
    else
        cout << 0 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:25: error: 'sum_z' was not declared in this scope; did you mean 'sum_y'?
   23 |         cout << sum_x - sum_z << endl;
      |                         ^~~~~
      |                         sum_y
Language: C++

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

int main()
{
    return 0;
    int sum_x = 0, sum_y = 0, size, num;
    cin >> size;
    for(int i = 0; i < 2; i++)
    {
        for(int j = 0; j < size; j++)
        {
            cin >> num;
            if(i == 0 &&(i == 0 || i == size - 1))
                sum_x += num
            if(i == 1 &&(i == 0 || i == size - 1))
                sum_y += num
        }
    }
    if (size > 1)
    {
        cout << sum_x - sum_z << endl;
    }
    else
        cout << 0 << endl
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:29: error: expected ';' before 'if'
   16 |                 sum_x += num
      |                             ^
      |                             ;
   17 |             if(i == 1 &&(i == 0 || i == size - 1))
      |             ~~               
a.cc:23:25: error: 'sum_z' was not declared in this scope; did you mean 'sum_y'?
   23 |         cout << sum_x - sum_z << endl;
      |                         ^~~~~
      |                         sum_y
a.cc:26:26: error: expected ';' before '}' token
   26 |         cout << 0 << endl
      |                          ^
      |                          ;
   27 | }
      | ~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int n, a[10000005], b[1000005], sum;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected primary-expression before '>' token
    8 |     cin >>> n;
      |           ^
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> C(N);
  for(int i=0;i<N;i++){
    cin>>C.at(i):
  }
  int ans = 0;
  for(int i=0;i<N;i++){
    if(V.at(i)>=C.at(i)){
      ans+=V.at(i)-C.at(i);
    }
  }
  cout<<ans<<endl;
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: expected ';' before ':' token
   12 |     cin>>C.at(i):
      |                 ^
      |                 ;
Language: C++

#include <stdio.h>
void main(){
int i,n,x[50],y[50];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&x[i]);
}
for(i=0;i<n;i++){
scanf("%d",&y[i]);
}
int z=0;
for(i=0;i<n;i++){
int h=x[i]-y[i];
if (h>0){
z=z+h;
}
}
printf("%d",z);
}

Compiler output:
a.cc:2:1: error: '::main' must return 'int'
    2 | void main(){
      | ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
 
  int n;
  cin >> n;
  int v[n],c[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]>0) sum+=(v[i]-c[i]);
  }
 
  cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: 'sum' was not declared in this scope
   12 |    if(v[i]-c[i]>0) sum+=(v[i]-c[i]);
      |                    ^~~
a.cc:15:11: error: 'sum' was not declared in this scope
   15 |   cout << sum << endl;
      |           ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
 
  int n
  cin >> n;
  int v[n],c[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]>0) sum+=(v[i]-c[i]);
  }
 
  cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >> n;
      |   ^~~
a.cc:7:9: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |   int v[n],c[n];
      |         ^
      |         yn
a.cc:8:31: error: 'v' was not declared in this scope
    8 |   for(int i=0; i<n; i++) cin>>v[i];
      |                               ^
a.cc:9:31: error: 'c' was not declared in this scope
    9 |   for(int i=0; i<n; i++) cin>>c[i];
      |                               ^
a.cc:12:7: error: 'v' was not declared in this scope
   12 |    if(v[i]-c[i]>0) sum+=(v[i]-c[i]);
      |       ^
a.cc:12:12: error: 'c' was not declared in this scope
   12 |    if(v[i]-c[i]>0) sum+=(v[i]-c[i]);
      |            ^
a.cc:12:20: error: 'sum' was not declared in this scope
   12 |    if(v[i]-c[i]>0) sum+=(v[i]-c[i]);
      |                    ^~~
a.cc:15:11: error: 'sum' was not declared in this scope
   15 |   cout << sum << endl;
      |           ^~~
Language: C++

//#include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <climits>
#include <iomanip>

using namespace std;

#define FAST       			ios_base :: sync_with_stdio(false); cin.tie(NULL); 
#define endl "\n"

typedef long long int  ll;

int maxSum = INT_MIN;
void max1(int i , int n , int cost[] , int gem[] , int prevCost , int prevGem)
{
	if(i == n)
	{
		maxSum = max(maxSum , prevGem-prevCost);
		return;
	}

	max1(i+1 , n , cost , gem , cost[i]+prevCost , gem[i]+prevGem);
	max1(i+1 , n , cost , gem , prevCost , prevGem);
}

int main()
{
	FAST;
	int n;
	cin >> n;
	int gem[21];
	int cost[21];

	for(int i=0 ; i<n ; i++)
		cin >> gem[i];
	for(int i=0 ; i<n ; i++)
		cin >> cost[i];

	max1(0 , n , cost , gem , 0 , 0);

	cout << maxSum;
	return 0;
}a

Compiler output:
a.cc:45:2: error: 'a' does not name a type
   45 | }a
      |  ^
Language: C

#include<stdio.h>
int main(){
int a;
scanf("%d",&a);
int b[a],c[a];
int d=0;
for(int i=0; i<a; i++){
scanf("%d",&b[i]);
}
for(int i=0; i<a; i++){
scanf("%d",&c[i]);
}
for(int i=0; i<a; i++){
if(b[i]>c[i]){d+=b[i]-c[i]}
}
printf("%d",d);
return 0;}

Compiler output:
main.c: In function 'main':
main.c:14:27: error: expected ';' before '}' token
   14 | if(b[i]>c[i]){d+=b[i]-c[i]}
      |                           ^
      |                           ;
Language: C++

#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define REP(i,a,b) for (int i = a; i < (b); ++i)
#define all(x) (x).begin(),(x).end()
#define R cin>>
#define C cout<<
const int INF = 1000000007;
typedef long long ll;
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
int main(){
  // ios::sync_with_stdio(false);cin.tie(nullptr);
  int n;
  R n;
  ll tmp = 0
  rep(i,10000000)tmp += i;
  vector<int>v(n),c(n);
  rep(i,n)cin >> v[i];
  rep(i,n)cin >> c[i];
  int ans = -1 * INF;
  rep(i,(1 << n)){
    int a = 0,b = 0;
    rep(j,n){
      if(i & (1 << j)){
        a += v[j];
        b += c[j];
      }
    }
    ans = max(ans,a - b);
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:18: error: expected ',' or ';' before 'for'
    3 | #define rep(i,n) for (int i = 0; i < (n); ++i)
      |                  ^~~
a.cc:19:3: note: in expansion of macro 'rep'
   19 |   rep(i,10000000)tmp += i;
      |   ^~~
a.cc:19:7: error: 'i' was not declared in this scope
   19 |   rep(i,10000000)tmp += i;
      |       ^
a.cc:3:34: note: in definition of macro 'rep'
    3 | #define rep(i,n) for (int i = 0; i < (n); ++i)
      |                                  ^
Language: C

#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define REP(i,a,b) for (int i = a; i < (b); ++i)
#define all(x) (x).begin(),(x).end()
#define R cin>>
#define C cout<<
const int INF = 1000000007;
typedef long long ll;
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
int main(){
  // ios::sync_with_stdio(false);cin.tie(nullptr);
  int n;
  R n;
  vector<int>v(n),c(n);
  rep(i,n)cin >> v[i];
  rep(i,n)cin >> c[i];
  int ans = -1 * INF;
  rep(i,(1 << n)){
    int a = 0,b = 0;
    rep(j,n){
      if(i & (1 << j)){
        a += v[j];
        b += c[j];
      }
    }
    ans = min(ans,a - b);
  }
  cout << ans << endl;
  return 0;
}

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

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

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

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n,kotae=0;
  cin>>n;
  vector<int> kati(n), cost(n);
  for (int i=0;i<n;i++){
    cin>>kati.at(i);
  }
  for (int j=0;j<n;j++){
    cin>>cost.at(j);
  }
  for (int k=0;k<n;k++){
    if(kati(k)>>cost(k)){
      kotae+=(kati(k)-cost(k));
    }
  }
  cout<<kotae;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: no match for call to '(std::vector<int>) (int&)'
   14 |     if(kati(k)>>cost(k)){
      |        ~~~~^~~
a.cc:14:21: error: no match for call to '(std::vector<int>) (int&)'
   14 |     if(kati(k)>>cost(k)){
      |                 ~~~~^~~
a.cc:15:19: error: no match for call to '(std::vector<int>) (int&)'
   15 |       kotae+=(kati(k)-cost(k));
      |               ~~~~^~~
a.cc:15:27: error: no match for call to '(std::vector<int>) (int&)'
   15 |       kotae+=(kati(k)-cost(k));
      |                       ~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n,kotae=0;
  cin>>n;
  vector<int> kati(n), cost(n);
  for (int i=0;i<n;i++){
    cin>>kati(i);
  }
  for (int j=0;j<n;j++){
    cin>>cost(j);
  }
  for (int k=0;k<n;k++){
    if(kati(k)>>cost(k)){
      kotae+=(kati(k)-cost(k));
    }
  }
  cout<<kotae;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: no match for call to '(std::vector<int>) (int&)'
    8 |     cin>>kati(i);
      |          ~~~~^~~
a.cc:11:14: error: no match for call to '(std::vector<int>) (int&)'
   11 |     cin>>cost(j);
      |          ~~~~^~~
a.cc:14:12: error: no match for call to '(std::vector<int>) (int&)'
   14 |     if(kati(k)>>cost(k)){
      |        ~~~~^~~
a.cc:14:21: error: no match for call to '(std::vector<int>) (int&)'
   14 |     if(kati(k)>>cost(k)){
      |                 ~~~~^~~
a.cc:15:19: error: no match for call to '(std::vector<int>) (int&)'
   15 |       kotae+=(kati(k)-cost(k));
      |               ~~~~^~~
a.cc:15:27: error: no match for call to '(std::vector<int>) (int&)'
   15 |       kotae+=(kati(k)-cost(k));
      |                       ~~~~^~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'c' was not declared in this scope
    6 |   cin>>c;
      |        ^
Language: C++

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

int main(){
    int n, max;
    cin >> n;
    max = -11111
    vector<int> vec1(n);
    vector<int> vec2(n);

    for(int i = 0; i < n; i++){
        cin >> vec1.at(i);
    }
    for(int i = 0; i < n; i++){
        cin >> vec2.at(i);
    }

    for(int i = 0; i < n; i++){
        for(int j = 0; j < i; j++){
            int x = vec1(i) + vec1(j);
            int y = vec2(i) + vec2(j);
            if(max < x - y) {
                max = x - y;
            }
        }
    }
    cout << max << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: expected ';' before 'vector'
    8 |     max = -11111
      |                 ^
      |                 ;
    9 |     vector<int> vec1(n);
      |     ~~~~~~       
a.cc:13:16: error: 'vec1' was not declared in this scope; did you mean 'vec2'?
   13 |         cin >> vec1.at(i);
      |                ^~~~
      |                vec2
a.cc:21:21: error: 'vec1' was not declared in this scope; did you mean 'vec2'?
   21 |             int x = vec1(i) + vec1(j);
      |                     ^~~~
      |                     vec2
a.cc:22:25: error: no match for call to '(std::vector<int>) (int&)'
   22 |             int y = vec2(i) + vec2(j);
      |                     ~~~~^~~
a.cc:22:35: error: no match for call to '(std::vector<int>) (int&)'
   22 |             int y = vec2(i) + vec2(j);
      |                               ~~~~^~~
Language: C++

#include <bits/stdc++.h>
typedef long long ll;
#define rep(i,n) for(ll i=0;i<(n);i++)
#define sz(x) ll(x.size())
using namespace std;

int main() {
  int n,ans=0,v,c;
  cin >> n;
  vector<int>v(n);
  vector<int>c(n);
  rep(i,n) cin >> v.at(i);
  rep(i,n) cin >> c.at(i);
  rep(i,n) ans+=max(0,v.at(i)-c.at(i));
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: conflicting declaration 'std::vector<int> v'
   10 |   vector<int>v(n);
      |              ^
a.cc:8:15: note: previous declaration as 'int v'
    8 |   int n,ans=0,v,c;
      |               ^
a.cc:11:14: error: conflicting declaration 'std::vector<int> c'
   11 |   vector<int>c(n);
      |              ^
a.cc:8:17: note: previous declaration as 'int c'
    8 |   int n,ans=0,v,c;
      |                 ^
a.cc:12:21: error: request for member 'at' in 'v', which is of non-class type 'int'
   12 |   rep(i,n) cin >> v.at(i);
      |                     ^~
a.cc:13:21: error: request for member 'at' in 'c', which is of non-class type 'int'
   13 |   rep(i,n) cin >> c.at(i);
      |                     ^~
a.cc:14:25: error: request for member 'at' in 'v', which is of non-class type 'int'
   14 |   rep(i,n) ans+=max(0,v.at(i)-c.at(i));
      |                         ^~
a.cc:14:33: error: request for member 'at' in 'c', which is of non-class type 'int'
   14 |   rep(i,n) ans+=max(0,v.at(i)-c.at(i));
      |                                 ^~
Language: C++

#include <bits/stdc++.h>
typedef long long ll;
#define rep(i,n) for(ll i=0;i<(n);i++)
#define sz(x) ll(x.size())
using namespace std;

int main() {
  ll n,ans=0,v,c;
  cin >> n;
  vector<int>v(n);
  vector<int>c(n);
  rep(i,n) cin >> v.at(i);
  rep(i,n) cin >> c.at(i);
  rep(i,n) ans+=max(0,v.at(i)-c.at(i));
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: conflicting declaration 'std::vector<int> v'
   10 |   vector<int>v(n);
      |              ^
a.cc:8:14: note: previous declaration as 'll v'
    8 |   ll n,ans=0,v,c;
      |              ^
a.cc:11:14: error: conflicting declaration 'std::vector<int> c'
   11 |   vector<int>c(n);
      |              ^
a.cc:8:16: note: previous declaration as 'll c'
    8 |   ll n,ans=0,v,c;
      |                ^
a.cc:12:21: error: request for member 'at' in 'v', which is of non-class type 'll' {aka 'long long int'}
   12 |   rep(i,n) cin >> v.at(i);
      |                     ^~
a.cc:13:21: error: request for member 'at' in 'c', which is of non-class type 'll' {aka 'long long int'}
   13 |   rep(i,n) cin >> c.at(i);
      |                     ^~
a.cc:14:25: error: request for member 'at' in 'v', which is of non-class type 'll' {aka 'long long int'}
   14 |   rep(i,n) ans+=max(0,v.at(i)-c.at(i));
      |                         ^~
a.cc:14:33: error: request for member 'at' in 'c', which is of non-class type 'll' {aka 'long long int'}
   14 |   rep(i,n) ans+=max(0,v.at(i)-c.at(i));
      |                                 ^~
Language: C++

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   for(i=0;i<n;i++)cin>>v[i];
      |       ^
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   for(i=0;i<n;i++)cin>>c[i];
      |       ^
a.cc:10:7: error: 'i' was not declared in this scope
   10 |   for(i=0;i<n;i++)p[i]=v[i]-c[i];
      |       ^
a.cc:12:7: error: 'i' was not declared in this scope
   12 |   for(i=0;i<n;i++){
      |       ^
Language: C++

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

int main(){
  int n, ans = 0;
  cin >> n;
  vector<int> v(n), c(n);
  
  for(int i = 0; i < n; i++){
    cin >> v.at(i);
  }
  
  for(int i = 0; i < n; i++){
    cin >> c.at(i);
    int tmp = v[i] - c[i];

    if(tmp > 0){
     ans += tmp;
    }
  }
  
  cout << ans << endl;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> n;
      |   ^~~
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> v(n), c(n);
      |   ^~~~~~
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> v(n), c(n);
      |          ^~~
a.cc:10:12: error: 'v' was not declared in this scope
   10 |     cin >> v.at(i);
      |            ^
a.cc:14:12: error: 'c' was not declared in this scope
   14 |     cin >> c.at(i);
      |            ^
a.cc:15:15: error: 'v' was not declared in this scope
   15 |     int tmp = v[i] - c[i];
      |               ^
a.cc:22:3: error: 'cout' was not declared in this scope
   22 |   cout << ans << endl;
      |   ^~~~
a.cc:22:18: error: 'endl' was not declared in this scope
   22 |   cout << ans << endl;
      |                  ^~~~
Language: C++

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

int main() {
  int n; cin >> n;
  int val[n], cos[n];
  rep(i,n) cin >> val[i];
  rep(i,n) cin >> cos[i];
  
  int ans = 0;
  rep(i,n){
    if(val[i]-cos[i] > 0) ans += val[i]-cos[i]
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:47: error: expected ';' before '}' token
   14 |     if(val[i]-cos[i] > 0) ans += val[i]-cos[i]
      |                                               ^
      |                                               ;
   15 |   }
      |   ~
Language: C++

#include < bits/stdc++.h >
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++.h : No such file or directory
    1 | #include < bits/stdc++.h >
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<bits/stdc++.h>
#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 i=0;i<n;i++){
    cin >> c[i] ;
  }
  
  
  int gain = 0 ;
  for(int i=0;i<n;i++){
    if(v[i]>c[i]){
      gain += v[i]
    }
  }
  
  cout << gain << endl ;
  return 0 ;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:24:19: error: expected ';' before '}' token
   24 |       gain += v[i]
      |                   ^
      |                   ;
   25 |     }
      |     ~
Language: C++

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

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

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

#include <bits/stdc++.h>
using namespace std;
int main() {

int a,b[100],,c[100];
   cin >> a;

for (int i = 0; i < a; ++i) 
cin >> b[i];
for(int i=0;i<a;++i)
  cin >> c[i];
int d = 0;
  
  for(int i=0;i<a;i++){
    if(b[i]>=c[i]){
      d+= b[i]-c[i];
    }
  }
  
  cout << d << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: expected unqualified-id before ',' token
    5 | int a,b[100],,c[100];
      |              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {

int a,b[100],,c[100];
   cin >> a;

for (int i = 0; i < a; ++i) 
cin >> b[i];
for(int i=0;i<;++i)
  cin >> c[i];
int d = 0;
  for(int i=0;i<a;i++){
    if(b[i]>=c[i]){
      d+= b[i]-c[i];
    }
  }
  
  cout << d << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: expected unqualified-id before ',' token
    5 | int a,b[100],,c[100];
      |              ^
a.cc:10:15: error: expected primary-expression before ';' token
   10 | for(int i=0;i<;++i)
      |               ^
Language: C++

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

int main() {
  
  int N;
  int num = 0;
  int num2;

  int answer = -1e9;
  
  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];
  }
  
  for(int i = 0;i < N;++i){
    num2 = V[i] - C[i];
    answer = max(answer,num2)
  }
   
  cout << answer << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:30: error: expected ';' before '}' token
   28 |     answer = max(answer,num2)
      |                              ^
      |                              ;
   29 |   }
      |   ~