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

using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
  int A,B,M;
  cin >>A>>B>>M;
  int nedan_a[A];
  rep(i,A)cin>>nedan_a[i];
  int nedan_b[B];
  rep(i,B)cin>>nedan_b[i];
  int bangouA[M];
  int bangouB[M];
  int nedan_c[M];
  rep(i,M)cin>>bangouA[i]>>bangouB[i]>>nedan_c[i];
  int yasune=0;
  int a_min=2147483647;
  int b_min=2147483647;
  rep(i,A)a_min=min(a_min,nedan_a[i]);
  rep(i,B)b_min=min(b_min,nedan_b[i]);
  yasune=a_min+b_min;
  rep(i,M){
    int x=bangouA[i]-1;
    int y=bangouB[i]-1;
    int sum=0;
    sum=nedan_a[x]+nedan_b[x]-nedan_c[i];
    yasune=min(yasune,sum);
  }
  cout<<yasune<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >>A>>B>>M;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:17:17: error: 'min' was not declared in this scope; did you mean 'main'?
   17 |   rep(i,A)a_min=min(a_min,nedan_a[i]);
      |                 ^~~
      |                 main
a.cc:18:17: error: 'min' was not declared in this scope; did you mean 'main'?
   18 |   rep(i,B)b_min=min(b_min,nedan_b[i]);
      |                 ^~~
      |                 main
a.cc:25:12: error: 'min' was not declared in this scope; did you mean 'main'?
   25 |     yasune=min(yasune,sum);
      |            ^~~
      |            main
a.cc:27:3: error: 'cout' was not declared in this scope
   27 |   cout<<yasune<<endl;
      |   ^~~~
a.cc:27:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:27:17: error: 'endl' was not declared in this scope
   27 |   cout<<yasune<<endl;
      |                 ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

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

int main(){
  int A,B,M;
  cin >> A >> B >> M;
  
  vector<int> a(A),b(B);
  vector<int> x(M),y(M),c(M);
  for(int i=0;i<A;i++)
    cin >> a.at(i);
  for(int i=0;i<B;i++)
    cin >> b.at(i);
  for(int i=0;i<M;i++)
    cin >> x.at(i) >> y.at(i) >> c.at(i);
  
  int min=200000;
  int sum;
  for(int i=0; i<A; i++){
    for(int j=0; j<B; j++){
      sum=a.at(i)+b.at(j);
      vector<int> coupon(1,0);
      for(int k=0; k<M; k++){
        if(x.at(k)==i&&y.at(k)==j)
          coupon.push_back(k);
      }
      if(coupon.size()==1){
        if(sum<min)
          min=sum;
      }
      if(coupon.size()==2){
        sum -= c.at(coupon.at(1));
        if(sum<min)
          min=sum;
      }
      if(coupon.size()>=3){
        coupon.pop_front();
        vector<int> discount;
        for(int l=0;l<coupon.size();l++){
          discount.at(l)=c.at(coupon.at(l))
        }
        sort(discount.begin(),discount.end());
        sum -= discount.at(coupon.size()-1);
        if(sum<min)
          min=sum;
      }
    }
  }
  cout << min << endl;
  return 0;
}
        


Compiler output:
a.cc: In function 'int main()':
a.cc:38:16: error: 'class std::vector<int>' has no member named 'pop_front'
   38 |         coupon.pop_front();
      |                ^~~~~~~~~
a.cc:41:44: error: expected ';' before '}' token
   41 |           discount.at(l)=c.at(coupon.at(l))
      |                                            ^
      |                                            ;
   42 |         }
      |         ~
Language: C++

#include <iostream>
using namespace std;
int main(void){
    int A,B,M;
    cin>>A>>B>>M;
    int P[A];
    for(int i=0;i<A;i++){
        cin>>P[i];
        if()
    }
    int Q[B];
    for(int i=0;i<B;i++){
        cin>>Q[i];
    }
    int a,b,c;
    int S[M];
    for(int i=0;i<M;i++){
        cin>>a>>b>>c;
        S[i]=P[a-1]+Q[b-1]-c;
    }
    int min1=100000,min2=1000000;
    for (int i=0;i<A;i++){
        if(min1>P[i]){
            min1=P[i];
        }
    }
    for(int i=0;i<B;i++){
        if(min2>Q[i]){
            min2=Q[i];
        }
    }
    int min=min1+min2;
    for(int i=0;i<M;i++){
        if(min>S[i]){
            min =S[i];
        }
    }
    cout<<min<<endl;
}


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

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

int main(){
  int A,B,M;
  cin >> A >> B >> M;
  
  vector<int> a(A),b(B);
  vector<int> x(M),y(M),c(M);
  for(int i=0;i<A;i++)
    cin >> a.at(i);
  for(int i=0;i<B;i++)
    cin >> b.at(i);
  for(int i=0;i<M;i++)
    cin >> x.at(i) >> y.at(i) >> c.at(i);
  
  int min=200000;
  int sum;
  for(int i=0; i<A; i++){
    for(int j=0; j<B; j++){
      sum=a.at(i)+b.at(j);
      vector<int> coupon(1,0);
      for(int k=0; k<M; k++){
        if(x.at(k)==i&&y.at(k)==j)
          coupon.push_back(k);
      }
      if(coupon.size()==1){
        if(sum<min)
          min=sum;
      }
      if(coupon.size()==2){
        sum -= c.at(coupon.at(1));
        if(sum<min)
          min=sum;
      }
      if(coupon.size()>=3){
        coupon.pop_front();
        vector<int> discount;
        for(int l=0;l<coupon.size();l++){
          discount.at(l)=c.at(coupon.at(l))
        }
        sort(discount.begin(),discount.end());
        sum -= discount.at(coupon.size()-1);
        if(sum<min)
          min=sum;
      }
    }
  }
  return 0;
}
        

Compiler output:
a.cc: In function 'int main()':
a.cc:37:16: error: 'class std::vector<int>' has no member named 'pop_front'
   37 |         coupon.pop_front();
      |                ^~~~~~~~~
a.cc:40:44: error: expected ';' before '}' token
   40 |           discount.at(l)=c.at(coupon.at(l))
      |                                            ^
      |                                            ;
   41 |         }
      |         ~
Language: C++

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

int main(){
  int A, B, M;
  cin >> A >> B >> M;
  vector <int> vec1(A);
  vector <int> vec2(B);
  vector <int> vec3(3);
  
  for(int i=0;i<A;i++){
    cin >> vec1[i];
  }
  
  for(int i=0;i<B;i++){
    cin >> vec2[i];
  }
    vector <int> x(M);
    vector <int> y(M);
    vector <int> c(M);
    
  for(int i=0;i<M;i++){
    cin >> vec3[0] >> vec3[1] >> vec3[2];
    vec3[0] = x[i];
    vec3[1] = y[i];
    vec3[2] = c[i];
  }
    
  int p;
 vector <int> ans(M);
  for(int i=0;i<M;i++){
      p = vec1[x[i]] + vec2[y[i]] - c[i];
      p = ans[i];
  }
    int min = min_element(ans.begin(),ans.end());
    cout << min << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:26: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in initialization
   35 |     int min = min_element(ans.begin(),ans.end());
      |               ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
      |                          |
      |                          __gnu_cxx::__normal_iterator<int*, std::vector<int> >
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <list>
#include <tuple>
#include <algorithm>
#include <cmath>

using namespace std;

int main()
{
    int i, j, k;
    int a, b, m;
    vector<int> as, bs;
    /* vector<tuple<int, int, int> > cs; */
    vector<int> xs, ys, cs;
    int min = 1001001001;
    int sum;
    int max;

    cin >> a >> b >> m;

    for (i = 0; i < a; i++) {
        int ai;
        cin >> ai;
        as.push_back(ai);
    }
    for (i = 0; i < b; i++) {
        int bi;
        cin >> bi;
        bs.push_back(bi);
    }
    for (i = 0; i < m; i++) {
        int xi, yi, ci;
        cin >> xi >> yi >> ci;
        xs.push_back(xi);
        ys.push_back(yi);
        cs.push_back(ci);
    }

    for (i = 0; i < a; i++) {
        for (j = 0; j < b; j++) {
            max = 0;
            for (k = 0; k < m; k++) {
                if (xs[k] == i + 1 && ys[k] == j + 1) {
                    if (cs[k] > max) max = c1;
                }
            }
            sum = as[i] + bs[j] - max;
            if (sum < min) min = sum;
        }
    }

    cout << min << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:48:44: error: 'c1' was not declared in this scope; did you mean 'cs'?
   48 |                     if (cs[k] > max) max = c1;
      |                                            ^~
      |                                            cs
Language: C

tmp = dlmread(0);

a = tmp(2,1:tmp(1,1));
b = tmp(3,1:tmp(1,2));

disp( min((min(a)+min(b)),min(a(1,tmp(4:3+tmp(1,3),1))' + b(1,tmp(4:3+tmp(1,3),2))' - tmp(4:3+tmp(1,3),3))));


Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | tmp = dlmread(0);
      | ^~~
main.c:1:1: error: type defaults to 'int' in declaration of 'tmp' [-Wimplicit-int]
main.c:1:7: error: implicit declaration of function 'dlmread' [-Wimplicit-function-declaration]
    1 | tmp = dlmread(0);
      |       ^~~~~~~
main.c:1:7: error: initializer element is not constant
main.c:3:1: warning: data definition has no type or storage class
    3 | a = tmp(2,1:tmp(1,1));
      | ^
main.c:3:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:3:12: error: expected ')' before ':' token
    3 | a = tmp(2,1:tmp(1,1));
      |        ~   ^
      |            )
main.c:3:5: error: called object 'tmp' is not a function or function pointer
    3 | a = tmp(2,1:tmp(1,1));
      |     ^~~
main.c:1:1: note: declared here
    1 | tmp = dlmread(0);
      | ^~~
main.c:4:1: warning: data definition has no type or storage class
    4 | b = tmp(3,1:tmp(1,2));
      | ^
main.c:4:1: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:4:12: error: expected ')' before ':' token
    4 | b = tmp(3,1:tmp(1,2));
      |        ~   ^
      |            )
main.c:4:5: error: called object 'tmp' is not a function or function pointer
    4 | b = tmp(3,1:tmp(1,2));
      |     ^~~
main.c:1:1: note: declared here
    1 | tmp = dlmread(0);
      | ^~~
main.c:6:7: error: unknown type name 'min'
    6 | disp( min((min(a)+min(b)),min(a(1,tmp(4:3+tmp(1,3),1))' + b(1,tmp(4:3+tmp(1,3),2))' - tmp(4:3+tmp(1,3),3))));
      |       ^~~
main.c:6:55: warning: multi-character literal with 27 characters exceeds 'int' size of 4 bytes
    6 | disp( min((min(a)+min(b)),min(a(1,tmp(4:3+tmp(1,3),1))' + b(1,tmp(4:3+tmp(1,3),2))' - tmp(4:3+tmp(1,3),3))));
      |                                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

//#include<bhaai.h>
#include<bits/stdc++.h>
using namespace std;
#define to int64_t
#define mo 1000000007
#define fr(a,e) for(int i=a;i<=e;i++)
#define yah_faster_baby ios_base::sync_with_stdio(0);cin.tie(0);

to a,b,m,x[100005],y[100005],p[100005][3];
//vector <int> v[100005];
char s[100005];
int main()
 {  yah_faster_baby
    cin>>a>>b>>m;
    to min1,min2;
    cin>>min1;
    fr(1,a-1)
    {cin>>x[i];min1=min(min1,x[i];}
    cin>>min2;
    fr(1,b-1)
    {cin>>y[i];min2=min(min2,y[i];}
    fr(0,m-1)
    cin>>p[i][0]>>p[i][1]>>p[i][2];
    to ans=min1+min2;
    fr(0,m-1)
    ans=min(ans,x[p[i][0]-1]+y[p[i][1]-1]-p[i][2]);
    cout<<ans;
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:18:34: error: expected ')' before ';' token
   18 |     {cin>>x[i];min1=min(min1,x[i];}
      |                        ~         ^
      |                                  )
a.cc:21:34: error: expected ')' before ';' token
   21 |     {cin>>y[i];min2=min(min2,y[i];}
      |                        ~         ^
      |                                  )
Language: C++

#include<iostream>
#include<cmath>
#include<queue>
#include<vector>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
#define maxn 100005
#define LL long long
#define INF 0x3f3f3f3f
#define mset(p,v) memset(p,v,sizeof(p))
using namespace std;
int a[maxn],b[maxn];
int c[maxn][maxn];
int A,B,M,ans;
void init()
{
    mset(c,0);
    ans=INF;
    for(int i=1;i<=A;i++) scanf("%d",&a[i]);
    for(int i=1;i<=B;i++) scanf("%d",&b[i]);
    for(int i=1;i<=M;i++)
    {
        int st,nd,dc;
        scanf("%d%d%d",&st,&nd,&dc);
        c[st][nd]=max(c[st][nd],dc);
    }
}
int main()
{
    while(~scanf("%d%d%d",&A,&B,&M))
    {
        init();
        for(int i=1;i<=A;i++)
            for(int j=1;j<=B;j++)
            {
                int temp=0;
                temp=a[i]+b[j]-c[i][j];
                ans=min(ans,temp);
            }
        printf("%d\n",ans);
    }

	return 0;
}


Compiler output:
/tmp/ccq0qaqq.o: in function `init()':
a.cc:(.text+0x2b): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccq0qaqq.o
a.cc:(.text+0x70): relocation truncated to fit: R_X86_64_PC32 against symbol `A' defined in .bss section in /tmp/ccq0qaqq.o
a.cc:(.text+0xb6): relocation truncated to fit: R_X86_64_PC32 against symbol `B' defined in .bss section in /tmp/ccq0qaqq.o
a.cc:(.text+0x154): relocation truncated to fit: R_X86_64_PC32 against symbol `M' defined in .bss section in /tmp/ccq0qaqq.o
/tmp/ccq0qaqq.o: in function `main':
a.cc:(.text+0x1ff): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccq0qaqq.o
a.cc:(.text+0x20f): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccq0qaqq.o
a.cc:(.text+0x219): relocation truncated to fit: R_X86_64_PC32 against symbol `B' defined in .bss section in /tmp/ccq0qaqq.o
a.cc:(.text+0x22c): relocation truncated to fit: R_X86_64_PC32 against symbol `A' defined in .bss section in /tmp/ccq0qaqq.o
a.cc:(.text+0x23b): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccq0qaqq.o
a.cc:(.text+0x258): relocation truncated to fit: R_X86_64_PC32 against symbol `M' defined in .bss section in /tmp/ccq0qaqq.o
a.cc:(.text+0x262): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h>
#include<stdlib.h>
int main() {
    int a, b, m, min=INT_MAX;
    int* an;
    int* bn;
    scanf("%d%d%d", &a, &b, &m);
    an = (int*)malloc(sizeof(int) * (a + 1));
    bn = (int*)malloc(sizeof(int) * (b + 1));

    for (int i = 1; i <= a; i++) { scanf("%d", &an[i]); }
    for (int i = 1; i <= b; i++) { scanf("%d", &bn[i]); }

    for (int i = 0; i < m; i++) {
        int d1, d2, d3;
        scanf("%d%d%d", &d1, &d2, &d3);
        int cost = an[d1] + an[d2] - d3;
        if (cost < min) { min = cost; }
    }
    printf("%d", min);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:22: error: 'INT_MAX' undeclared (first use in this function)
    4 |     int a, b, m, min=INT_MAX;
      |                      ^~~~~~~
main.c:3:1: note: 'INT_MAX' is defined in header '<limits.h>'; this is probably fixable by adding '#include <limits.h>'
    2 | #include<stdlib.h>
  +++ |+#include <limits.h>
    3 | int main() {
main.c:4:22: note: each undeclared identifier is reported only once for each function it appears in
    4 |     int a, b, m, min=INT_MAX;
      |                      ^~~~~~~
Language: Java

import java.util.*;
     
class Main{
    public static void main(String[] args) {
        
        try(Scanner sc = new Scanner(System.in)){
 
            int rei = Integer.valueOf(sc.next());
            int den = Integer.valueOf(sc.next());
            int wari = Integer.valueOf(sc.next());

            List<Integer> reiPrice = new ArrayList<>();
            for(int i = 0; i < rei; i++){
                reiPrice.add(Integer.valueOf(sc.next()));
            }
            
            List<Integer> denPrice = new ArrayList<>();
            for(int j = 0; j < den; j++){
                denPrice.add(Integer.valueOf(sc.next()));
            }

            List<List<Integer>> wariList = new ArrayList<>();
            for(int k = 0; k < wari; k++){
                List<Integer> wariConbi = new ArrayList<>();
                wariConbi.add(Integer.valueOf(sc.next()));
                wariConbi.add(Integer.valueOf(sc.next()));
                wariConbi.add(Integer.valueOf(sc.next()));
                wariList.add(wariConbi);
            }

            int minR = 0;
            for(int ii = 0; ii < reiPrice.size(); ii++){
                if(minR = 0){
                    minR = reiPrice.get(ii);
                }else{
                    if(minR > reiPrice.get(ii)) minR = reiPrice.get(ii);
                }
            }

            int minD = 0;
            for(int jj = 0; jj < denPrice.size(); jj++){
                if(minD = 0){
                    minD = denPrice.get(jj);
                }else{
                    if(minD > denPrice.get(jj)) minD = denPrice.get(jj);
                }
            }

            int min = minR + minD;

            int minIf = 0;
            for(int kk = 0; kk < wariList.size(); kk++){
                int r = reiPrice.get(wariList.get(kk).get(0));
                int d = denPrice.get(wariList.get(kk).get(1));
                int sum = r + d - wariList.get(kk).get(2);

                if(minIf = 0) minIf = sum;
                else if(minIf > sum) minIf = sum;
            }

            if(min > minIf) min = minIf;

            System.out.println(min);
 
        }catch(Exception e){
            e.printStackTrace();
        }        
    }
}

Compiler output:
Main.java:33: error: incompatible types: int cannot be converted to boolean
                if(minR = 0){
                        ^
Main.java:42: error: incompatible types: int cannot be converted to boolean
                if(minD = 0){
                        ^
Main.java:57: error: incompatible types: int cannot be converted to boolean
                if(minIf = 0) minIf = sum;
                         ^
3 errors
Language: C++

#include<iostream>
#include<algorithm>
#include<cstdio>

using namespace std;

const int N=1e5+50;

int A,B,M,a[N],b[N],c[N],mina=INT_MAX,minb=INT_MAX;

int main()
{
	ios::sync_with_stdio(false);
	
	cin>>A>>B>>M;
	
	for (int i=1;i<=A;i++) cin>>a[i],mina=min(mina,a[i]);
	for (int i=1;i<=B;i++) cin>>b[i],minb=min(minb,b[i]);
	
	int ans=mina+minb;
	
	for (int i=1;i<=M;i++)
	{
		int x,y,z;
		cin>>x>>y>>z;
		
		ans=min(ans,a[x]+b[y]-z);
	}
	printf("%d\n",ans);
} 

Compiler output:
a.cc:9:31: error: 'INT_MAX' was not declared in this scope
    9 | int A,B,M,a[N],b[N],c[N],mina=INT_MAX,minb=INT_MAX;
      |                               ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include<cstdio>
  +++ |+#include <climits>
    4 | 
a.cc: In function 'int main()':
a.cc:18:42: error: 'minb' was not declared in this scope; did you mean 'mina'?
   18 |         for (int i=1;i<=B;i++) cin>>b[i],minb=min(minb,b[i]);
      |                                          ^~~~
      |                                          mina
a.cc:20:22: error: 'minb' was not declared in this scope; did you mean 'mina'?
   20 |         int ans=mina+minb;
      |                      ^~~~
      |                      mina
Language: C++

#include<bits/stdc++.h>
#define ll long long
const int maxn=1e5+10,inf=0x3f3f3f3f;
using namespace std;
pair<ll,ll>nt[maxn];
ll sum=1;
bool cmp(pair<ll,ll> a,pair<ll,ll> b)
{
    return a.first>b.first;
}
ll ksm(ll a,ll b)
{
    ll ans=1;
    for(; b; b>>=1,a=a*a%mod) if(b&1) ans=ans*a%mod;
    return ans;
}
ll C(ll m,ll n)
{
    n=min(n,m-n);
    ll s1=1,s2=1;
    for(int i=1; i<=n; i++)
    {
        s1=s1*i%mod;
        s2=s2*(m-i+1)%mod;
    }
    return s2*ksm(s1,mod-2)%mod;
}
int a[100010],b[100010];
int main()
{
    ios::sync_with_stdio(false);
    int A,B,M;cin>>A>>B>>M;
    int ma=inf,mb=inf;
    for(int i=0;i<A;i++)
    {
        cin>>a[i];
        if(a[i]<ma) ma=a[i];
    }
    for(int i=0;i<B;i++)
    {
        cin>>b[i];
        if(mb>b[i])mb=b[i];
    }
        
    //sort(a,a+A);sort(b,b+B);
    int sum=ma+mb;
    for(int i=0;i<M;i++)
    {
        int t1,t2,t3;cin>>t1>>t2>>t3;
        sum=min(sum,a[t1-1]+b[t2-1]-t3);
    }
    if(sum<0) sum=0;
    cout<<sum<<endl;

}









Compiler output:
a.cc: In function 'long long int ksm(long long int, long long int)':
a.cc:14:26: error: 'mod' was not declared in this scope; did you mean 'modf'?
   14 |     for(; b; b>>=1,a=a*a%mod) if(b&1) ans=ans*a%mod;
      |                          ^~~
      |                          modf
a.cc: In function 'long long int C(long long int, long long int)':
a.cc:23:17: error: 'mod' was not declared in this scope; did you mean 'modf'?
   23 |         s1=s1*i%mod;
      |                 ^~~
      |                 modf
a.cc:26:22: error: 'mod' was not declared in this scope; did you mean 'modf'?
   26 |     return s2*ksm(s1,mod-2)%mod;
      |                      ^~~
      |                      modf
Language: C

#include<stdio.h>
#include<stdlib.h>
int main(){
  int a,b,m,min;
  int* an;
  int* bn;
  scanf("%d%d%d",&a,&b,&m);
  an=malloc(sizeof(int)*(a+1));
  bn=malloc(sizeof(int)*(b+1));
  
  for(int i=1;i<=a;i++){scanf("%d",&an[i]);}
  for(int i=1;i<=b;i++){scanf("%d",&bn[i]);}
  
  for(int i=0;i<m;i++){
    int d1,d2,d3;
    scanf("%d%d%d",&d1,&d2,&d3);
    int cost=an[d1]+an[d2]-d3;
    if(cost<min){min=cost;}
  }
  printf("%d",cost);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:15: error: 'cost' undeclared (first use in this function)
   20 |   printf("%d",cost);
      |               ^~~~
main.c:20:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

/// awoooo

# include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair < int, int > pii;

const int N = (int)1e6 + 5;
const int inf = (int)1e9 + 7;

struct fenwick {
  int t[N];
  void inc(int pos, int val) {
    for(; pos < N; pos += pos & -pos) {
      t[pos] += val;
    }
  }
  int get(int pos) {
    int ans = 0;
    for(; pos > 0; pos -= pos & -pos) {
      ans += t[pos];
    }
    return ans;
  }
  int getkth(int k, int n) {
    int l = 1, r = n;
    int e = 0;
    while(l <= r) {
      int m = (l + r) >> 1;
      if(get(m) < k) {
        e = max(e, m);
        l = m + 1;
      } else {
        r = m - 1;
      }
    }
    return e + 1;
  }
}T;

int n, m, type;
int pos[N], val[N];

int main() {
  scanf("%d %d %d", &n, &m, &type);
  for(int i = n + m, j = m; j >= 1; --i, --j) {
    pos[j] = i;
    val[i] = j;
    T.inc(i, 1);
  }

  int ptr = n;
  for(int i = 1; i <= n; ++i) {
    int x;
    scanf("%d", &x);
    int ans = -1;
    if(type == 1) {
      ans = T.get(pos[x]);
      T.inc(pos[x], -1);
      pos[x] = ptr;
      T.inc(pos[x], 1);
      --ptr;
    } else {
      int cpos = T.getkth(x, n + m);
      ans = val[cpos];
      val[cpos] = 0;
      T.inc(cpos, -1);
      T.inc(ptr, 1);
      val[ptr] = ans;
      --ptr;
    }
    printf("%d ", ans);
  }
  return 0;
}

 

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


import java.util.Scanner;

public class MainB {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		int m = Integer.parseInt(sc.next());
		
		int []aa = new int [a];
		int []bb = new int [b];
		int mina = 1000000000;
		int minb = 1000000000;
		
		for(int i = 0 ;i < a ;i++) {
			aa[i] = Integer.parseInt(sc.next());
			mina = Math.min(mina, aa[i]);
		}
		for(int i = 0 ;i < b ;i++) {
			bb[i] = Integer.parseInt(sc.next());
			minb = Math.min(minb, bb[i]);
		}
		
		int ans  = mina + minb;
				
		int [][]c = new int [a][b];
		
		for(int i = 0 ;i < m ;i++) {
			int x = Integer.parseInt(sc.next());
			int y = Integer.parseInt(sc.next());
			int z = Integer.parseInt(sc.next());
			int temp = aa[x-1] +bb[y-1] - z;
			ans = Math.min(temp, ans);
		}
		
		System.out.println(ans);
		
		
		
		
	}

}


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

#include<iostream>
#include<cstring>
#include<queue>
#include<algorithm>
#include<cstdio>
#include<math.h>
#include<stack>
#include<vector>
#define maxn 2147483647
typedef long long ll;
using namespace std;
int A,B,M,a[maxn],b[maxn],x[maxn],y[maxn],c[maxn];
int cost[maxn],rec=0,tmp=0;
int arr[maxn],brr[maxn],crr[maxn];


int main()
{
	cin>>A>>B>>M;
	for(int i=1;i<=A;i++)
	{
		cin>>a[i];
		arr[a[i]]++;
	}
	for(int i=1;i<=B;i++)
	{
		cin>>b[i];
		brr[b[i]]++;
	}
	for(int i=0;i<=maxn;i++)
	{
		if(arr[i]!=0)
		{
			rec+=i;
			break;
		}
	}
	for(int i=0;i<=maxn;i++)
	{
		if(brr[i]!=0)
		{
			rec+=i;
			break;
		}
	}
	for(int i=1;i<=M;i++)
	{
		cin>>x[i]>>y[i]>>c[i];
		cost[i] = a[x[i]]+b[y[i]]-c[i];
		if(cost[i]<0)
		{
			cost[i] = 0;
		}
		crr[cost[i]]++;
	}
	for(int i=0;i<=maxn;i++)
	{
		if(crr[i]!=0)
		{
			tmp=i;
			break;
		}
	}
	int t;
	t=tmp<rec?tmp:rec;
	cout<<t<<endl;
	return 0;
}

Compiler output:
/tmp/cc2LccU6.o: in function `main':
a.cc:(.text+0xa2): relocation truncated to fit: R_X86_64_PC32 against symbol `arr' defined in .bss section in /tmp/cc2LccU6.o
a.cc:(.text+0xb9): relocation truncated to fit: R_X86_64_PC32 against symbol `arr' defined in .bss section in /tmp/cc2LccU6.o
a.cc:(.text+0xe8): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/cc2LccU6.o
a.cc:(.text+0x111): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/cc2LccU6.o
a.cc:(.text+0x126): relocation truncated to fit: R_X86_64_PC32 against symbol `brr' defined in .bss section in /tmp/cc2LccU6.o
a.cc:(.text+0x13d): relocation truncated to fit: R_X86_64_PC32 against symbol `brr' defined in .bss section in /tmp/cc2LccU6.o
a.cc:(.text+0x16a): relocation truncated to fit: R_X86_64_PC32 against symbol `arr' defined in .bss section in /tmp/cc2LccU6.o
a.cc:(.text+0x177): relocation truncated to fit: R_X86_64_PC32 against symbol `rec' defined in .bss section in /tmp/cc2LccU6.o
a.cc:(.text+0x182): relocation truncated to fit: R_X86_64_PC32 against symbol `rec' defined in .bss section in /tmp/cc2LccU6.o
a.cc:(.text+0x1a6): relocation truncated to fit: R_X86_64_PC32 against symbol `brr' defined in .bss section in /tmp/cc2LccU6.o
a.cc:(.text+0x1b3): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

//    Unmesh Kumar
//    CSE'22 IIT Roorkee

#include <iostream>
#include <bits/stdc++.h>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <map>
#include <iterator>
#include <iomanip>
#include <queue>
#include <utility>
#include <set>

using namespace std;
#define ll long long int
#define c(x) ll x;cin>>x
#define cc(x,y) ll x,y;cin>>x>>y
#define ccc(x,y,z) ll x,y,z; cin>>x>>y>>z
#define db long double
#define fast cin.tie(NULL); cout.tie(NULL); ios_base::sync_with_stdio(false)
#define inf 200000000000000
#define mod 1000000007
#define eps 1e-7
#define PI 3.1415926535897932385
#define pb push_back
#define bitc  __builtin_popcountll
#define mp make_pair
#define ff first
#define ss second
#define all(ar) ar.begin(), ar.end()
#define len(x) (ll)(x).size()
#define fr(i,a,b) for (ll i = (a), _b = (b); i <= _b; i++)
#define rep(i,n) for (ll i = 0, _n = (n); i < _n; i++)
#define repr(i,n) for (ll i = n - 1; i >= 0; i--)
#define frr(i,a,b) for (ll i = (a), _b = (b); i >= _b; i--)
#define foreach(it,ar) for (auto it = ar.begin(); it != ar.end(); it++)
#define fill(ar,val) memset(ar, val, sizeof(ar))
#define print(arr,n) rep(i,n) cout<<arr[i]<<" "; cout<<endl
#define print2(arr,n,m) rep(i,n){ rep(j,m) cout<<arr[i][j]<<" "; cout<<endl; }
#define dyn1(arr,n) ll* arr=new ll[n]; rep(i,n) arr[i]=0;
#define dyn2(arr,n,m) ll** arr=new ll*[(n)]; rep(i,n) arr[i]=new ll[m]; rep(i,n) rep(j,m) arr[i][j]=0
#define carr(arr,n) rep(i,n) cin>>arr[i]
#define carr2(arr,n,m) rep(i,n) rep(j,m) cin>>arr[i][j]
#define debug(a) cout<<" :: "<<#a<<" == "<<a<<endl
#define debug2(a,b) cout<<" :: "<<#a<<" == "<<a<<" :: "<<#b<<" == "<<b<<endl
typedef pair<int,int> ii;
typedef vector<ii> vii;

inline ll maxim(ll a,ll b) {if(a>b) return a; else return b;}
inline ll minim(ll a,ll b) {if(a<b) return a; else return b;}
inline bool equals(double a, double b){ return fabs(a - b) < 1e-9; }
ll gcd(ll a, ll b){ return b==0 ? a : gcd(b, a%b); }


ll binpow(ll a, ll b)
{
    ll res = 1;
    while (b > 0)
    {
        if (b & 1) res = (res * a);
        a = (a * a);
        b >>= 1;
    }
    return res;
}

int modInverse(int a, int m)
{
    int m0 = m;
    int y = 0, x = 1;
    if (m == 1)
      return 0;
    while (a > 1)
    {
        int q = a / m;
        int t = m;
        m = a % m, a = t;
        t = y;
        y = x - q * y;
        x = t;
    }
    if (x < 0)
       x += m0;
    return x;
}

ll refri[1000005];
ll mic[1000005];


int main()
{
  fast;
  //freopen("input.txt", "r", stdin);
  //freopen("output.txt", "w", stdout);
  cout<<setprecision(10)<<fixed;
  cc(a,b);
  c(m);
  carr(refri,a);
  carr(mic,b);
  ll mino=100000000000;
  rep(o,m)
  {
    cc(x,y);
    c(d);
    mino=minim(mino,refri[x-1]+mic[y-1]-d);
  }
  sort(refri,ref+a);
  sort(mic,mic+b);
  mino=minim(mino,refri[0]+mic[0]);
  cout<<mino<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:110:17: error: invalid operands of types '<unresolved overloaded function type>' and 'long long int' to binary 'operator+'
  110 |   sort(refri,ref+a);
      |              ~~~^~
Language: C++

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

int main() {
  int a, b, m;
  cin >> a >> b >> m;
  
  int aa[a], bb[b];
  
  int t;
  int min_aa = 100001;
  int min_bb = 100001;
  
  for(int i = 0; i < a; ++i){
    cin >> t:
	aa[i] = t;
    if(t < min_aa){
      min_aa = t;
    }
  }

  for(int i = 0; i < b; ++i){
    cin >> t:
	bb[i] = t;      
    if(t < min_bb){
      min_bb = t;
    }
  }
  
  // 割引を考慮しない場合の最小
  int res = min_aa + min_bb;
  
  int x, y, c;
  
  for(int i = 0; i < m; ++i){
    cin >> x >> y >> c;
    int w = aa[x-1] + bb[y-1] - c;
    if(w < res){
      res = w;
    }
  }
  
  cout << res << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: found ':' in nested-name-specifier, expected '::'
   15 |     cin >> t:
      |             ^
      |             ::
a.cc:15:12: error: 't' is not a class, namespace, or enumeration
   15 |     cin >> t:
      |            ^
a.cc:23:13: error: found ':' in nested-name-specifier, expected '::'
   23 |     cin >> t:
      |             ^
      |             ::
a.cc:23:12: error: 't' is not a class, namespace, or enumeration
   23 |     cin >> t:
      |            ^
Language: C++

#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <ctime>
#include <iomanip>
#include <numeric>
#include <cmath>
using namespace std;
#define ll long long
#define endl '\n'
const int MAX = 2e5 + 4;
const int MOD = 1e9 + 7;
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	int a, b, m;
	cin >> a >> b >> m;
	vector<int> line(a), sline(b);
	int cheapest_refrigerator = INT_MAX, cheapest_microwave = INT_MAX;
	for (int i = 0; i < a; i++)
	{
		cin >> line[i];
		if (line[i] < cheapest_refrigerator)
			cheapest_refrigerator = line[i];
	}
	for (int i = 0; i < b; i++)
	{
		cin >> sline[i];
		if (sline[i] < cheapest_microwave)
			cheapest_microwave = sline[i];
	}
	int ans = cheapest_microwave + cheapest_refrigerator;
	for (int i = 0; i < m; i++)
	{
		int refrig, microwave, discount;
		cin >> refrig >> microwave >> discount;
		if (ans > line[refrig - 1] + sline[microwave - 1] - discount)
			ans = line[refrig - 1] + sline[microwave - 1] - discount;
	}
	cout << ans;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:37: error: 'INT_MAX' was not declared in this scope
   21 |         int cheapest_refrigerator = INT_MAX, cheapest_microwave = INT_MAX;
      |                                     ^~~~~~~
a.cc:9:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    8 | #include <cmath>
  +++ |+#include <climits>
    9 | using namespace std;
a.cc:31:32: error: 'cheapest_microwave' was not declared in this scope
   31 |                 if (sline[i] < cheapest_microwave)
      |                                ^~~~~~~~~~~~~~~~~~
a.cc:34:19: error: 'cheapest_microwave' was not declared in this scope
   34 |         int ans = cheapest_microwave + cheapest_refrigerator;
      |                   ^~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>

int main(void){
    int A, B, M;
    std::cin >> A >> B >> M;
    std::vector<int> valueA(A);
    for(int i = 0; i < A; ++i){
        std::cin >> valueA[i];
    }
    std::vector<int> valueB(B);
    for(int i = 0; i < B; ++i){
        std::cin >> valueB[i];
    }

    // sum[i][j] = valueA[i] + valueB[j];
    std::vector<std::vector<int>> sum(A);
    for(int i = 0; i < A; ++i){
        sum[i].resize(B);
        for(int j = 0; j < B; ++j){
            sum[i][j] = valueA[i]+valueB[j];
        }
    }

    int x, y, c;
    for(int i = 0; i < M; ++i){
        std::cin >> x >> y >> c;
        --x; --y;
        sum[x][y] -= c;
    }

    int p = INT_MAX;
    for(int i = 0; i < A; ++i){
        std::sort(sum[i].begin(), sum[i].end());
        if(p > sum[i].front()) p = sum[i].front();
    }

    std::cout << p << "\n";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:13: error: 'INT_MAX' was not declared in this scope
   33 |     int p = INT_MAX;
      |             ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include <algorithm>
  +++ |+#include <climits>
    4 |
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int a,b,m;
  cin>>a>>b>>m;
  int mx=INT_MAX;
  int my=INT_MAX;
  int x[a+1],y[b+1];
  for(int i=1;i<=a;i++)
  {
    cin>>x[i];
    mx=min(mx,x[i]);
  }
  for(int i=1;i<=b;i++)
  {
    cin>>y[i];
    my=min(my,y[i]);
  }
  int ans=INT+MAX;
  int p,q,r;
  for(int i=0;i<m;i++)
  {
    cin>>p>>q>>r;
    int h=x[p]+y[q]-r;
    ans=min(ans,h);
  }
  ans=min(ans,mx+my);
  cout<<ans<<"\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:11: error: 'INT' was not declared in this scope
   20 |   int ans=INT+MAX;
      |           ^~~
a.cc:20:15: error: 'MAX' was not declared in this scope
   20 |   int ans=INT+MAX;
      |               ^~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repr(i, n) for (int i = (n); i >= 0; --i)
#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
#define FORR(i, m, n) for (int i = (m); i >= (n); --i)
#define equals(a, b) (fabs((a) - (b)) < EPS)
using namespace std;
typedef long long ll;
typedef long double ld;
const ll mod = 1000000007;
const ll mod2 = 998244353;
const int inf = 1e9 + 10;
const ll INF = 1e18;
const ld EPS = 1e-10;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

int main() {
  int na, nb, m;
  cin >> na >> nb >> m;
  vector<int> a(na), b(nb);
  rep(i, na) cin >> a[i];
  rep(i, nb) cin >> b[i];
  vector<int> x(m), y(m), c(m);
  rep(i, m) {
    cin >> x[i] >> y[i] >> c[i];
    x[i]--, y[i]--;
  }

  int ans = *min_element(a.begin(), a.end()) + *min_element(b.begin(), b.end());
  rep(i, m) {
    int res = a[x[i]] + b[y[i]] - c[i])
    ans = min(ans, res);
  }
  cout << ans << endl;

  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:39: error: expected ',' or ';' before ')' token
   32 |     int res = a[x[i]] + b[y[i]] - c[i])
      |                                       ^
Language: C++

#include <iostream>
#include <string>
#include <vector>

using namespace std;

int main(int argc, char *argv[])
{
  int A, B, M;
  cin >> A >> B >> M;
  
  vector<int> a(A), b(B);
  for (int i=0; i<A; i++)
    cin >> a[i];
  for (int i=0; i<B; i++)
    cin >> b[i];
  
  vector<int> x(M), y(M), c(M);
  for (int i=0; i<M; i++)
    cin >> x[i] >> y[i] >> c[i];
  
  int min = *min_element(a.begin(), a.end()) + *min_element(b.begin(), b.end());
  for (int i=0; i<M; i++){
    int tmp = a[x[i]] + b[y[i]] - c[i];
    if (tmp < min)
      min = tmp;
  }
  cout << min << endl;
  
  
  return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:22:14: error: 'min_element' was not declared in this scope
   22 |   int min = *min_element(a.begin(), a.end()) + *min_element(b.begin(), b.end());
      |              ^~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, M;
  cin >> A >> B >> M;
  vector<int> a(A), b(B);
  for (int &v : a) cin >> v;
  for (int &v : b) cin >> v;
  
  int ans = (*min_element(A.begin(), A.end()))+(*min_element(B.begin(), B.end()));
  while (M--) {
   int x, y, c;
    cin >> x >> y >> c;
    --x, --y;
    ans = min(ans, a[x]+b[y]-c);
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:29: error: request for member 'begin' in 'A', which is of non-class type 'int'
   10 |   int ans = (*min_element(A.begin(), A.end()))+(*min_element(B.begin(), B.end()));
      |                             ^~~~~
a.cc:10:40: error: request for member 'end' in 'A', which is of non-class type 'int'
   10 |   int ans = (*min_element(A.begin(), A.end()))+(*min_element(B.begin(), B.end()));
      |                                        ^~~
a.cc:10:64: error: request for member 'begin' in 'B', which is of non-class type 'int'
   10 |   int ans = (*min_element(A.begin(), A.end()))+(*min_element(B.begin(), B.end()));
      |                                                                ^~~~~
a.cc:10:75: error: request for member 'end' in 'B', which is of non-class type 'int'
   10 |   int ans = (*min_element(A.begin(), A.end()))+(*min_element(B.begin(), B.end()));
      |                                                                           ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef int64_t ll;
typedef long double ld;
const ll MOD=1000000007;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define change(a,b) do{ll c=a; a=b; b=c;}while(0)
long long gcd(long long a,long long b){
    ll gcdmax=max(a,b);
    ll gcdmin=min(a,b);
    while(true){
        if(gcdmax%gcdmin==0)break;
        else gcdmax%=gcdmin;
        change(gcdmin,gcdmax);
    }
    return gcdmin;
}
ll powerup(ll N,ll P,ll M){
    if(P==0)return 1;
    else if(P%2==0){
        ll t=powerup(N,P/2,M);
        return t*t%M;
    }
    else return N*powerup(N,P-1,M)%M;
}
int main()
{
  ll a,b,M;
  ll A[100010]={0};
  ll B[100010]={0};
  cin>>a>>b>>M;
  ll x,y,z;
  ll ans=1000000;
  rep(i,M){
    cin>>x>>y>>z;
    ans=min(A[x]+B[y]-z,ans);
  }
  sort(A,A+N);
  sort(B,B+N);
  ans=min(A[0]+B[0],ans);
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:12: error: 'N' was not declared in this scope
   38 |   sort(A,A+N);
      |            ^
Language: C++

#include <iostream>
#include <vector>
#include <array>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <string>
#include <sstream>
#include <algorithm>
#include <random>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cmath>
#include <cassert>
#include <climits>
#include <bitset>
#include <functional>
#include <iomanip>
#include <random>


#define FOR_LT(i, beg, end) for (int i = beg; i < end; i++)
#define FOR_LE(i, beg, end) for (int i = beg; i <= end; i++)
#define FOR_DW(i, beg, end) for (int i = beg; end <= i; i--)

using namespace std;

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout << fixed << setprecision(20);

	int64_t a, b, m; cin >> a >> b >> m;
	vector<int64_t> rs(a);
	vector<int64_t> ds(b);

	int64_t rmin = std::numeric_limits<int>::max();
	for (auto& r : rs) {
		cin >> r;
		rmin = min(rmin, r);
	}
	int64_t dmin = std::numeric_limits<int>::max();
	for (auto& d : ds) {
		cin >> d;
		dmin = min(dmin, d);
	}

	struct Dis {
		int x;
		int y;
		int64_t c;
	};
	vector<Dis> diss(m);
	for (auto& d : diss) {
		cin >> d.x >> d.y >> d.c;
	}

	int64_t ans = rmin + dmin;
	for (auto& d : diss) {
		int64_t c = rs[d.x - 1] + ds[d.y - 1] - d.c;
		ans = min(c, ans);
	}
	cout << ans << endl;

	struct {

	};

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:75:9: error: abstract declarator 'main()::<unnamed struct>' used as declaration
   75 |         };
      |         ^
Language: C++

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

#define ull unsigned long long int
#define ll long long int
#define pb push_back
#define MOD (ull)(double)(1e9 + 7)
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pull pair<ull, ull>
#define m_p make_pair

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	
	int A, B, M;
	cin >> A >> B >> M;
	
	int a[A];
	for(int i=0 ; i<A ; ++i)cin >> a[i];
	
	int b[B];
	for(int i=0 ; i<B ; ++i)cin >> b[i];
	
	int minA = *min_element(a, a+A);
	int minB = *min_element(b, b+B);
	
	int x, y, c;
	int minP = minA + minB;
	for(int i=0 ; i<M ; ++i){
		cin >> x >> y >> c;
		int price = a[x-1] + b[y-1] - c;
		minP = min(minp, price);
	}
	
	cout << minP;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:28: error: 'minp' was not declared in this scope; did you mean 'minP'?
   34 |                 minP = min(minp, price);
      |                            ^~~~
      |                            minP
Language: C++

#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<queue>
#define ll long long
#define maxn 1000010
inline ll read()
{
	ll x=0; char c=getchar(),f=1;
	for(;c<'0'||'9'<c;c=getchar())if(c=='-')f=-1;
	for(;'0'<=c&&c<='9';c=getchar())x=x*10+c-'0';
	return x*f;
}
inline void write(ll x)
{
	static int buf[20],len; len=0;
	if(x<0)x=-x,putchar('-');
	for(;x;x/=10)buf[len++]=x%10;
	if(!len)putchar('0');
	else while(len)putchar(buf[--len]+'0');
}
inline void writeln(ll x){write(x); putchar('\n');}
inline void writesp(ll x){write(x); putchar(' ');}
int a[maxn],b[maxn];
int n,m,k;
int main()
{
	n=read(); m=read(); k=read();
	for(int i=1;i<=n;i++)
		a[i]=read();
	for(int i=1;i<=m;i++)
		b[i]=read();
	int mn1=inf,mn2=inf;
	for(int i=1;i<=n;i++)
		mn1=std::min(mn1,a[i]);
	for(int i=1;i<=m;i++)
		mn2=std::min(mn2,b[i]);
	int ans=mn1+mn2;
	for(int i=1;i<=k;i++){
		int x=read(),y=read(),z=read();
		ans=std::min(ans,a[x]+b[y]-z);
	}
	writeln(ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:17: error: 'inf' was not declared in this scope; did you mean 'ynf'?
   35 |         int mn1=inf,mn2=inf;
      |                 ^~~
      |                 ynf
a.cc:39:17: error: 'mn2' was not declared in this scope; did you mean 'mn1'?
   39 |                 mn2=std::min(mn2,b[i]);
      |                 ^~~
      |                 mn1
a.cc:40:21: error: 'mn2' was not declared in this scope; did you mean 'mn1'?
   40 |         int ans=mn1+mn2;
      |                     ^~~
      |                     mn1
Language: C++

#include <bits/stdc++.h>

#define f first
#define s second
#define all(x) x.begin(),x.end()
#define pb push_back
#define ll long long

using namespace std;

int main()
{
    int A,B,M;
    cin>>A>>B>>M;
    int mnA=INT_MAX,mnB=INT_MAX;
    vector<int> a(A),b(B)2;
    for(int i=0;i<A;i++)
        scanf("%i",&a[i]),mnA=min(mnA,a[i]);
    for(int i=0;i<B;i++)
        scanf("%i",&b[i]),mnB=min(mnB,b[i]);
    int sol=mnA+mnB;
    for(int i=0;i<M;i++){
        int x,y,c;
        scanf("%i %i %i",&x,&y,&c);
        x--;y--;
        sol=min(sol,a[x]+b[y]-c);
    }
    printf("%i\n",sol);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:26: error: expected ',' or ';' before numeric constant
   16 |     vector<int> a(A),b(B)2;
      |                          ^
Language: C++

#include<bits/stdc++.h>
#define int long long
using namespace std;
constexpr int mod=1e9+7;
signed main(){
    int A,B,m,a[100000],b[100000],x,y,c;
    cin>>A>>B>>m;
    for(int i=0;i<A;i++)
        cin>>a[i];
    for(int i=0;i<B;i++)
        cin>>b[i];
    int ans=*min_element(a,a+A)+*min_element(b,b+B);
    while(cni>>x>>y>>c)
        ans=min(ans,a[x-1]+b[y-1]-c);
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'cni' was not declared in this scope
   13 |     while(cni>>x>>y>>c)
      |           ^~~
Language: C++

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

signed main() {
	ios::sync_with_stdio(0); cin.tie(0);
	
	int A, B, M; cin >> A >> B >> M;
	vector<int> a(A), b(B);
	for (int i = 0; i < A; i++) {
		cin >> a[i];
	}
	for (int i = 0; i < B; i++) {
		cin >> b[i];
	}

	int ans = *min_element(a.begin(), a.end()) + *min_element(b.begin(), b.end());

	while (m--) {
		int x, y, c; cin >> x >> y >> c;
		x--; y--;
		ans = min(ans, a[x] + b[y] - c);
	}
	cout << ans;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: 'm' was not declared in this scope
   18 |         while (m--) {
      |                ^
Language: C++

#include <bits/stdc++.h>

#define ll long long
using namespace std;
const int N = 2e5 + 5;
vector<int> G[N];
int dep[N], ans[N];

void dfs(int u, int fa) {
    for (auto v:G[u]) {
        if (v == fa) continue;
        dep[v] = dep[u] + 1;
        dfs(v, u);
    }
}

int main() {
    //freopen("in.txt","r",stdin);
    int n;
    scanf("%d", &n);
    for (int i = 1, u, v; i < n; i++) {
        scanf("%d%d", &u, &v);
        G[u].push_back(v);
        G[v].push_back(u);
    }
    dfs(1, -1);
    vector<int> A, B, V[3], Ans[2];
    for (int i = 1; i <= n; i++) {
        if (dep[i] & 1) A.push_back(i);
        else B.push_back(i);
    }
    for (int i = 1; i <= n; i++) {
        V[i % 3].push_back(i);
    }
    if (A.size() >= n / 3 && B.size() >= n / 3) {
        for (auto it:V[1]) Ans[0].push_back(it);
        for (auto it:V[2]) Ans[1].push_back(it);
        int t = A.size() - V[1].size();
        for (int i = 0; i < t; i++) Ans[0].push_back(V[0][i]);
        for (int i = t; i < V[0].size(); i++) Ans[1].push_back(V[0][i]);
    } else if (A.size() < n / 3) {
        for (int i = 0; i < A.size(); i++) Ans[0].push_back(V[0][i]);
        for (int i = A.size(); i < V[0].size(); i++) Ans[1].push_back(V[0][i]);
        for (auto it:V[1]) Ans[1].push_back(it);
        for (auto it:V[2]) Ans[1].push_back(it);
    } else {
        for (int i = 0; i < B.size(); i++) Ans[1].push_back(V[0][i]);
        for (int i = B.size(); i < V[0].size(); i++) Ans[0].push_back(V[0][i]);
        for (auto it:V[1]) Ans[0].push_back(it);
        for (auto it:V[2]) Ans[0].push_back(it);
    }
    for (int i = 0; i < A.size(); i++) {
        ans[A[i]] = Ans[0][i];
    }
    for (int i = 0; i < B.size(); i++) {
        ans[B[i]] = Ans[1][i];
    }
    for (int i = 1; i <= n; i++) {
        printf("%d%c", ans[i], i == n ? '\n' : ' ');
    }
    return 0;
}

C.cpp

Compiler output:
a.cc:64:1: error: 'C' does not name a type
   64 | C.cpp
      | ^