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

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(void){
    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 minA = min_element(a.begin(),a.end());
    int minB = min_element(b.begin(),b.end());
    int ans = minA + minB;
    for(int i = 0;i < M;i++){
        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:15:27: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in initialization
   15 |     int minA = min_element(a.begin(),a.end());
      |                ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      |                           |
      |                           __gnu_cxx::__normal_iterator<int*, std::vector<int> >
a.cc:16:27: error: cannot convert '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' to 'int' in initialization
   16 |     int minB = min_element(b.begin(),b.end());
      |                ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      |                           |
      |                           __gnu_cxx::__normal_iterator<int*, std::vector<int> >
Language: C++

#include<bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
typedef long long ll;
#define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REP(i,num,n) for(int i=num, i##_len=(n); i<i##_len; ++i)
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define print(x) (cout << (x) << endl)
#define pb push_back
#define mp make_pair
#define sz(x) int(x.size())
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class itr> void cins(itr first, itr last){ for(auto i = first; i != last; i++){ cin >> (*i); } }
template<class itr> void array_output(itr start, itr goal){ string ans; for(auto i = start; i != goal; i++) ans += to_string(*i) + " "; if(!ans.empty()) ans.pop_back(); cout << ans << endl; }
#define fs first
#define sc second

const int INF = 1e9;
const ll LLINF = 1e16;
const ll MOD = 1e9+7;
template<class T> inline void add(T &a, T b){a = ((a+b) % MOD + MOD) % MOD;};

template<typename T>
vector<T> make_v(size_t a){return vector<T>(a);}
 
template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts){
  return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}
 

// 指定した文字cが文字列に何文字入ってるか
ll stringcount(string s, char c) {
    return count(s.cbegin(), s.cend(), c);
}


// 割り算の切り上げ処理
template<typename T>
T rp(T a, T b) {
  return (a + b - 1) / b;
}

// 桁和
template<typename T>
T digsum(T n) {
    T res = 0;
    while(n > 0) {
        res += n%10;
        n /= 10;
    }
    return res;
}

// 回文判定
bool kai (string s) {
    string t{s};
    reverse(begin(t), end(t));
    return s == t;
}

using pint = pair<int, int>;
using pll = pair<ll, ll>;



int main(void)
{
    cout.tie(0);
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);
    ll a,b,m;
    cin >> a >> b >> m;
    vector<ll> A(a);
    vector<ll> B(b);
    cins(all(A));
    cins(all(B));
    rep(i, m){
        ll x,y,c;
        cin >> x >> y >> c;
        --x, --y;
        chmin(ans, A[x] + B[y] - c);
    }
    sort(all(A));
    sort(all(B));
    chmin(ans, A[0] + B[0]);
    print(ans);


}



Compiler output:
a.cc: In function 'int main()':
a.cc:86:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   86 |         chmin(ans, A[x] + B[y] - c);
      |               ^~~
      |               abs
a.cc:90:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   90 |     chmin(ans, A[0] + B[0]);
      |           ^~~
      |           abs
Language: C++

#include <bits/stdc++.h>
using namespace std;
//型に気を付けよう
//a=0x61=97
#define rep(i,n) for(int i=0;i<n;i++)
typedef long long  ll;
typedef long double  ld;
typedef string str;
typedef pair<int,int> pairii;
typedef vector<int> veci;
const double pi=3.1415926535;
const ll  mod=1000000007;
//桁数指定　cout << fixed << setprecision(2)
int MIN(vector<int> Vec){//配列の最小値
  int n=Vec.size();
  int min= 2147483648;
  for(int i=0;i<n;i++){
    if(min>Vec.at(i))min=Vec.at(i);
  }
  return min;}
int main() {
  int a,b,m,ans=INT_MAX;
  cin>>a>>b>>m;
  veci A(a),B(b);
  rep(i,a)cin>>A[i];
  rep(j,b)cin>>B[j];
  rep(k,n){
    int x,y,c;
    cin>>x>>y>>c;
    ans=min(A[x-1]+B[x-1]-c,ans);
  }
  ans=min(MIN(A)+MIN(B),ans);
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: 'n' was not declared in this scope
   27 |   rep(k,n){
      |         ^
a.cc:5:32: note: in definition of macro 'rep'
    5 | #define rep(i,n) for(int i=0;i<n;i++)
      |                                ^
Language: C++

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

int main() {
  int A,B,M,ans=0;
  cin >> A >> B >> M;
  vector<int> a(A);
  for (int i=0;i<A;i++){
  cin >> a.at(i);
  } 
  vector<int> b(B);
  for (int i=0;i<B;i++){
  cin >> b.at(i);
  }

  vector<vector<int>> c(M,vector<int>(3));
  vector<int> d(M);
  for (int i = 0; i <M; i++) {
    for (int j = 0; j < 3; j++) {
      cin >> c.at(i).at(j);
    }
      d(i) = a.at(c.at(i).at(0))+b.at(c.at(i).at(1))-c.at(i).at(2);
  }
  
  sort(d.begin(),d.end());
  sort(a.begin(),a.end());
  sort(b.begin(),b.end());
  ans=min(d.at(0),a.at(0)+b.at(0));
  cout << ans << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:8: error: no match for call to '(std::vector<int>) (int&)'
   22 |       d(i) = a.at(c.at(i).at(0))+b.at(c.at(i).at(1))-c.at(i).at(2);
      |       ~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int A,B,m;
  cin >> A >> B >> m;
  vector<int> a(A);
  for(int i=0;i<A;i++) cin >> a.at(i);
  vector<int> b(B);
  for(int i=0;i<B;i++) cin >> b.at(i);
  
  int money=200000;
  
  for(int i=0;i<m;i++){
    int x,y,z;
    cin >> x >> y >> z;
    money=min(money,a.at(x-1)+b.at(y-1)-z);
  }
  sort(a.begin(),a.end());
  sort(b.begin(),b.end());
  cout << min(money,a.at(0)+b.at(0) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:37: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and '<unresolved overloaded function type>' to binary 'operator<<'
   21 |   cout << min(money,a.at(0)+b.at(0) << endl;
      |                     ~~~~~~~~~~~~~~~~^~~~~~~
Language: Java

import java.util.*;
import java.math.*;
     
class Main{
    public static void main(String[] args) {
        
        try(Scanner sc = new Scanner(System.in)){
 
            int a = Integer.parseInt(sc.next());
            int b = Integer.parseInt(sc.next());
            int m = Integer.parseInt(sc.next());

            List<Integer> rei = new ArrayList<>();
            List<Integer> ren = new ArrayList<>();

            for(int i = 0; i < a; i++){
                rei.add(Integer.parseInt(sc.next()));
            }

            for(int i = 0; i < b; i++){
                ren.add(Integer.parseInt(sc.next()));
            }

            int min = Collections.min(rei) + Collections.min(ren);

            for(int i = 0; i < m; i++){
                int sum = 0;
                sum += rei.get(Integer.parseInt(sc.next()) - 1) 
                sum += ren.get(Integer.parseInt(sc.next()) - 1)
                sum -= Integer.parseInt(sc.next());
                if(sum < min) min = sum;
            }

            System.out.println(min);
            

        }catch(Exception e){
            e.printStackTrace();
        }        
    }
}

Compiler output:
Main.java:28: error: ';' expected
                sum += rei.get(Integer.parseInt(sc.next()) - 1) 
                                                               ^
Main.java:29: error: ';' expected
                sum += ren.get(Integer.parseInt(sc.next()) - 1)
                                                               ^
2 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void){
    // Your code here!
    int A,B,M,price;
    cin>>A>>B>>M;
    int a[A],b[B],x[M],y[M],c[M];
    for(int i=0;i<A;i++){
        cin>>a[i];
    }
    for(int i=0;i<B;i++){
        cin>>b[i];
    }
    for(int i=0;i<M;i++){
        cin>>x[i]>>y[i]>>c[i];
    }
    for(int i=0;i<A;i++){
        for(int j=0;j<B;j++){
            if(i==0&&j==0){
                price=a[0]+b[0];
            }
            else{
                price=min(price,a[i]+b[j]);
            }
    for(int k=0;k<M;k++){
        price=min(price,a[x[k]]+b[x[k]]-c[k]);
    }
    cout<<price<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:17:25: note: to match this '{'
   17 |     for(int i=0;i<A;i++){
      |                         ^
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:3:15: note: to match this '{'
    3 | int main(void){
      |               ^
Language: C++

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

int main() {
 int a,b,m;
  cin>>a>>b>>m;
  vector<int>aprice(a);
  vector<int>bprice(b);
  vector<vector<int>> data(m, vector<int>(3));
  for(int i=0;i<a;i++){
    cin>>aprice[i];
  }
  for(int i=0;i<b;i++){
    cin>>bprice[i];
  }
   for (int j = 0; j < m ; j++) {
      for (int k = 0; k < 3; k++) {
        cin >> data.at(j).at(k);
      }
    }
  
  for(int i=0;i<m;i++){
    int pp=aprice.at(data.at(0).at(0))+bprice.at(data.at(0).at(1))-data.at(0).at(2);
    int x=aprice.at(data.at(i).at(0))+bprice.at(data.at(i).at(1))-data.at(i).at(2);
    if(x <=pp){
      pp =x;
    }
  }
  sort(aprice.begin(),aprice.end());
  sort(bprice.begin(),bprice.end());
  int t=aprice[0]+bprice[0];
  if(t<=pp){
    pp=t;
  }
  cout<<pp<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:9: error: 'pp' was not declared in this scope
   32 |   if(t<=pp){
      |         ^~
a.cc:35:9: error: 'pp' was not declared in this scope
   35 |   cout<<pp<<endl;
      |         ^~
Language: C++

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

  int A, B, M;
 cin >> A >> B >> M;
 vector<int> a(A);
 vector<int> b(B);
 for (int i = 0; i < A; i++)cin >> a[i];
 for (int i = 0; i < B; i++)cin >> b[i];
 int minA = *min_element(a.begin(), a.end());
 int minB = *min_element(b.begin(), b.end());
 int ans = minA+minB;
 for (int i = 0; i < M; i++) {
 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:3:9: error: expected initializer before ')' token
    3 | int main){
      |         ^
Language: C++

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

int main()
{
  long A, B, M;
  cin >> A >> B >> M;
  vector<long> price(A*B, 0);
  map<long, int> discount;
  for (long i = 0; i < A*B; i+=B) 
  {
    long a;
  	cin >> a;
    for (long j = i; j < i+B; j++) price[j] += a;
  }
  for (long i = 0; i < B; i++)
  { 
    long b;
    cin >> b;
    for (long j = i; j < A*B; j+=B) price[j] += b;
  }
  for (int i = 0; i < M; i++)
  {
    long x, y, c;
    cin >> x >> y >> c;
    long idx = (x-1)*B+(y-1);
    if (discount.find(idx) != discount.end())
      c = max(c, discount[idx]);
    discount[idx] = c;
  }
  for (auto d : discount)
  {
    price[d.first] -= d.second;
  }
  sort(price.begin(), price.end());
  cout << price[0] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:14: error: no matching function for call to 'max(long int&, std::map<long int, int>::mapped_type&)'
   28 |       c = max(c, discount[idx]);
      |           ~~~^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:28:14: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'std::map<long int, int>::mapped_type' {aka 'int'})
   28 |       c = max(c, discount[idx]);
      |           ~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:28:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
   28 |       c = max(c, discount[idx]);
      |           ~~~^~~~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;
int in(){int a;cin>>a;return a;}
int a[100001],b[100001],ans,ak=1e9+7,ac=ak;
int main(){
	int n=in(),m=in(),k=in();
	for(int i=1;i<=n;i++)a[i]=in(),ac=min(a[i],ac);
	for(int i=1;i<=m;i++)b[i]=in(),ak=min(b[i],ak);
	ans=ak+ac;
	while(k--)ans=min(ans,a[in()]+b[in()]-in());
	return cout<<ans<<endl,0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:33: error: expected ';' before '}' token
   11 |         return cout<<ans<<endl,0
      |                                 ^
      |                                 ;
   12 | }
      | ~
Language: C


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <float.h>


#define i_cin(X) scanf("%d", &X)
#define i_cin2(X,Y) scanf("%d %d",&X,&Y)
#define i_cin3(X,Y,Z) scanf("%d %d %d",&X,&Y,&Z)
#define l_cin(X) scanf("%ld",&X)
#define f_cin(X) scanf("%f",&X)
#define l_cin2(X,Y) scanf("%ld %ld",&X,&Y)
#define s_cin(X) scanf("%s",&X)

#define  i_cout(X) printf("%d\n",X)
#define  f_cout(X) printf("%g\n",X)
#define  i_cout2(X,Y) printf("%d %d\n",X,Y)
#define  l_cout(X) printf("%ld\n",X)
#define  s_cout(X) printf("%s\n",X)
#define  ll_cout(X) printf("%lld\n",X)

typedef long long  ll;
#define rept(x, s, n) for (int x = s; x < n; x++)

#define Yes_RTN s_cout("Yes");return 0
#define No_RTN  s_cout("No");return 0
#define YES_RTN s_cout("YES");return 0
#define NO_RTN  s_cout("NO");return 0


int i_cins(int n, int* A);
int l_cins2(int n, long* A,long* B);
int s_dsort(const void* a, const void* b);
int s_asort(const void* a, const void* b);

int  _gcd(int a, int b);

int s_asorts(const void* a, const void* b);
#define MAX 100001

static int a[MAX+1], b[MAX+1];
int main(void) {
	int A,B,M,i,min=MAX+1,tmp;
    int c[4],x,y;

	i_cin(A); i_cin(B); i_cin(M);
	x = min;
	for (i = 0; i < A; i++) {
		i_cin(a[i]);
		if (a[i] < x)x = a[i];
	}
	y = min;
	for (i = 0; i < B; i++) {
		i_cin(b[i]);
		if (b[i] < y)y = b[i];
	}


Compiler output:
main.c: In function 'main':
main.c:58:9: error: expected declaration or statement at end of input
   58 |         }
      |         ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using std::cin;
using std::cout;
using std::endl;
using std::sort;
using std::vector;

int main(){
  int A,B,M;
  cin >> A >> B >> M;
  vector<int> a(A);
  vector<int> b(B);
  vector<int> c(M);
  for (int i=0;i<A;++i) cin >> a[i];
  for (int j=0;j<B;++j) cin >> b[j];
  for (int i=0;i<M;++i) cin >> c[i];
  
  sort(a.begin(),a.end());
  sort(b.begin(),b.end());
  
  int ans;
  for (int i=0;i<M;++i){
     ans=min(a[i]+b[i]-c[i],a[0]+b[0]);
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:10: error: 'min' was not declared in this scope; did you mean 'std::min'?
   25 |      ans=min(a[i]+b[i]-c[i],a[0]+b[0]);
      |          ^~~
      |          std::min
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C++

#include <iostream>
#include <vector>
using std::cin;
using std::cout;
using std::endl;
using std::sort;
using std::vector;

int main(){
  int A,B,M;
  cin >> A >> B >> M;
  vector<int> a(A);
  vector<int> b(B);
  vector<int> c(M);
  for (int i=0;i<A;++i) cin >> a[i];
  for (int j=0;j<B;++j) cin >> b[j];
  for (int i=0;i<M;++i) cin >> c[i];
  
  sort(a.begin(),a.end());
  sort(b.begin(),b.end());
  
  int ans;
  for (int i=0;i<M;++i){
     ans=min(a[i]+b[i]-c[i],a[0]+b[0]);
  }
  cout << ans << endl;
}


Compiler output:
a.cc:6:12: error: 'sort' has not been declared in 'std'
    6 | using std::sort;
      |            ^~~~
a.cc: In function 'int main()':
a.cc:19:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   19 |   sort(a.begin(),a.end());
      |   ^~~~
      |   short
a.cc:24:10: error: 'min' was not declared in this scope; did you mean 'std::min'?
   24 |      ans=min(a[i]+b[i]-c[i],a[0]+b[0]);
      |          ^~~
      |          std::min
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
Language: C++

#include <iostream>
#include <vector>
#include <sort>
using std::cin;
using std::cout;
using std::endl;
using std::sort;
using std::vector;

int main(){
  int A,B,M;
  cin >> A >> B >> M;
  vector<int> a(A);
  vector<int> b(B);
  vector<int> c(M);
  for (int i=0;i<A;++i) cin >> a[i];
  for (int j=0;j<B;++j) cin >> b[j];
  for (int i=0;i<M;++i) cin >> c[i];
  
  sort(a.begin(),a.end());
  sort(b.begin(),b.end());
  
  int ans;
  for (int i=0;i<M;++i){
     ans=min(a[i]+b[i]-c[i],a[0]+b[0]);
  }
  cout << ans << endl;
}


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

#include <iostream>
#include <vector>
using std::cin;
using std::cout;
using std::endl;
using std::sort;

int main(){
  int A,B,M;
  cin >> A >> B >> M;
  vector<int> a(A);
  vector<int> b(B);
  vector<int> c(M);
  for (int i=0;i<A;++i) cin >> a[i];
  for (int j=0;j<B;++j) cin >> b[j];
  for (int i=0;i<M;++i) cin >> c[i];
  
  sort(a.begin(),a.end());
  sort(b.begin(),b.end());
  
  int ans;
  for (int i=0;i<M;++i){
     ans=min(a[i]+b[i]-c[i],a[0]+b[0]);
  }
  cout << ans << endl;
}


Compiler output:
a.cc:6:12: error: 'sort' has not been declared in 'std'
    6 | using std::sort;
      |            ^~~~
a.cc: In function 'int main()':
a.cc:11:3: error: 'vector' was not declared in this scope
   11 |   vector<int> a(A);
      |   ^~~~~~
a.cc:11:3: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:11:10: error: expected primary-expression before 'int'
   11 |   vector<int> a(A);
      |          ^~~
a.cc:12:10: error: expected primary-expression before 'int'
   12 |   vector<int> b(B);
      |          ^~~
a.cc:13:10: error: expected primary-expression before 'int'
   13 |   vector<int> c(M);
      |          ^~~
a.cc:14:32: error: 'a' was not declared in this scope
   14 |   for (int i=0;i<A;++i) cin >> a[i];
      |                                ^
a.cc:15:32: error: 'b' was not declared in this scope
   15 |   for (int j=0;j<B;++j) cin >> b[j];
      |                                ^
a.cc:16:32: error: 'c' was not declared in this scope
   16 |   for (int i=0;i<M;++i) cin >> c[i];
      |                                ^
a.cc:18:8: error: 'a' was not declared in this scope
   18 |   sort(a.begin(),a.end());
      |        ^
a.cc:18:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   18 |   sort(a.begin(),a.end());
      |   ^~~~
      |   short
a.cc:19:8: error: 'b' was not declared in this scope
   19 |   sort(b.begin(),b.end());
      |        ^
a.cc:23:24: error: 'c' was not declared in this scope
   23 |      ans=min(a[i]+b[i]-c[i],a[0]+b[0]);
      |                        ^
a.cc:23:10: error: 'min' was not declared in this scope; did you mean 'std::min'?
   23 |      ans=min(a[i]+b[i]-c[i],a[0]+b[0]);
      |          ^~~
      |          std::min
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
Language: C++

#include <iostream>
using std::cin;
using std::cout;
using std::endl;
using std::sort;
using std::vector;

int main(){
  int A,B,M;
  cin >> A >> B >> M;
  vector<int> a(A);
  vector<int> b(B);
  vector<int> c(M);
  for (int i=0;i<A;++i) cin >> a[i];
  for (int j=0;j<B;++j) cin >> b[j];
  for (int i=0;i<M;++i) cin >> c[i];
  
  sort(a.begin(),a.end());
  sort(b.begin(),b.end());
  
  int ans;
  for (int i=0;i<M;++i){
     ans=min(a[i]+b[i]-c[i],a[0]+b[0]);
  }
  cout << ans << endl;
}


Compiler output:
a.cc:5:12: error: 'sort' has not been declared in 'std'
    5 | using std::sort;
      |            ^~~~
a.cc:6:12: error: 'vector' has not been declared in 'std'
    6 | using std::vector;
      |            ^~~~~~
a.cc: In function 'int main()':
a.cc:11:3: error: 'vector' was not declared in this scope
   11 |   vector<int> a(A);
      |   ^~~~~~
a.cc:11:10: error: expected primary-expression before 'int'
   11 |   vector<int> a(A);
      |          ^~~
a.cc:12:10: error: expected primary-expression before 'int'
   12 |   vector<int> b(B);
      |          ^~~
a.cc:13:10: error: expected primary-expression before 'int'
   13 |   vector<int> c(M);
      |          ^~~
a.cc:14:32: error: 'a' was not declared in this scope
   14 |   for (int i=0;i<A;++i) cin >> a[i];
      |                                ^
a.cc:15:32: error: 'b' was not declared in this scope
   15 |   for (int j=0;j<B;++j) cin >> b[j];
      |                                ^
a.cc:16:32: error: 'c' was not declared in this scope
   16 |   for (int i=0;i<M;++i) cin >> c[i];
      |                                ^
a.cc:18:8: error: 'a' was not declared in this scope
   18 |   sort(a.begin(),a.end());
      |        ^
a.cc:18:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   18 |   sort(a.begin(),a.end());
      |   ^~~~
      |   short
a.cc:19:8: error: 'b' was not declared in this scope
   19 |   sort(b.begin(),b.end());
      |        ^
a.cc:23:24: error: 'c' was not declared in this scope
   23 |      ans=min(a[i]+b[i]-c[i],a[0]+b[0]);
      |                        ^
a.cc:23:10: error: 'min' was not declared in this scope; did you mean 'std::min'?
   23 |      ans=min(a[i]+b[i]-c[i],a[0]+b[0]);
      |          ^~~
      |          std::min
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: 'std::min' declared here
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
Language: C++

#include <iostream>
#include <sort>
#include <vector>
using std::cin;
using std::cout;
using std::endl;

int main(){
  int A,B,M;
  cin >> A >> B >> M;
  vector<int> a(A);
  vector<int> b(B);
  vector<int> c(M);
  for (int i=0;i<A;++i) cin >> a[i];
  for (int j=0;j<B;++j) cin >> b[j];
  for (int i=0;i<M;++i) cin >> c[i];
  
  sort(a.begin(),a.end());
  sort(b.begin(),b.end());
  
  int ans;
  for (int i=0;i<M;++i){
     ans=min(a[i]+b[i]-c[i],a[0]+b[0]);
  }
  cout << ans << endl;
}


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

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

int main(){
  int A,B,M;
  cin >> A >> B >> M;
  vector<int> a(A);
  vector<int> b(B);
  vector<int> c(M);
  for (int i=0;i<A;++i) cin >> a[i];
  for (int j=0;j<B;++j) cin >> b[j];
  for (int i=0;i<M;++i) cin >> c[i];
  
  sort(a.begin(),a.end());
  sort(b.begin(),b.end());

  for (int i=0;i<M;++i){
     int ans;
     ans=min(a[i]+b[i]-c[i],a[0]+b[0]);
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   21 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

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

int main(){
  int A,B,M;
  cin >> A >> B >> M;
  vector<int> a(A);
  vector<int> b(B);
  vector<int> c(M);
  for (int i=0;i<A;++i) cin >> a[i];
  for (int j=0;j<B;++j) cin >> b[j];
  for (int i=0;i<M;++i) cin >> c[i];
  
  sort(a.begin(),a.end());
  sort(b.begin(),b.end());

  cout << min(a[i]+b[i]-c[i],a[0]+b[0]) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: 'i' was not declared in this scope
   17 |   cout << min(a[i]+b[i]-c[i],a[0]+b[0]) << endl;
      |                 ^
Language: C++

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

int main(){
  int A,B,M;
  cin >> A >> B >> M;
  vector<int> a(A);
  vector<int> b(B);
  vector<int> c(M);
  for (int i=0;i<A;++i) cin >> a[i];
  for (int j=0;j<B;++j) cin >> b[j];
  for (int i=0;i<M;++i) cin >> c[i];
  
  sort(a.begin(),a.end());
  sort(b.begin(),b.end());

  cout << min(a[i]+b[i]-c[i],a[0]+b[0]) << endl;
}


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

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

int main(){
  int A,B,M;
  cin >> A >> B >> M;
  vector<int> a(A);
  vector<int> b(B);
  vector<int> c(M);
  for (int i=0;i<A;++i) cin >> a[i];
  for (int j=0;j<B;++j) cin >> b[j];
  for (int i=0;i<M;++i) cin >> c[i];
  
  sort(a.begin(),a.end());
  sort(b.begin(),b.end());

  cout << min(a[i]+b[i]-c[i],a[0]+b[0]) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   15 |   sort(a.begin(),a.end());
      |   ^~~~
      |   short
a.cc:18:17: error: 'i' was not declared in this scope
   18 |   cout << min(a[i]+b[i]-c[i],a[0]+b[0]) << endl;
      |                 ^
Language: C++

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

int main(){
  int A,B,M;
  cin >> A >> B >> M;
  vector<int> a(A);
  vector<int> b(B);
  vector<int> c(C);
  for (int i=0;i<A;++i) cin >> a[i];
  for (int j=0;j<B;++j) cin >> b[j];
  for (int i=0;i<C;++i) cin >> c[i];
  
  sort(a.begin(),a.end());
  sort(b.begin(),b.end());

  cout << min(a[i]+b[i]-c[i],a[0]+b[0]) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'C' was not declared in this scope
   10 |   vector<int> c(C);
      |                 ^
a.cc:15:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   15 |   sort(a.begin(),a.end());
      |   ^~~~
      |   short
a.cc:18:17: error: 'i' was not declared in this scope
   18 |   cout << min(a[i]+b[i]-c[i],a[0]+b[0]) << endl;
      |                 ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  int A,B,M;
  cin >> A >> B >> M;
  vector<int> a(A);
  vector<int> b(B);
  vector<int> c(C);
  for (int i=0;i<A;++i) cin >> a[i];
  for (int j=0;j<B;++j) cin >> b[j];
  for (int i=0;i<C;++i) cin >> c[i];
  
  sort(a.begin(),a.end());
  sort(b.begin(),b.end());

  cout << min(a[i]+b[i]-c[i],a[0]+b[0]) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<int> a(A);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vector<int> a(A);
      |          ^~~
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vector<int> b(B);
      |          ^~~
a.cc:9:10: error: expected primary-expression before 'int'
    9 |   vector<int> c(C);
      |          ^~~
a.cc:10:32: error: 'a' was not declared in this scope
   10 |   for (int i=0;i<A;++i) cin >> a[i];
      |                                ^
a.cc:11:32: error: 'b' was not declared in this scope
   11 |   for (int j=0;j<B;++j) cin >> b[j];
      |                                ^
a.cc:12:18: error: 'C' was not declared in this scope
   12 |   for (int i=0;i<C;++i) cin >> c[i];
      |                  ^
a.cc:12:32: error: 'c' was not declared in this scope
   12 |   for (int i=0;i<C;++i) cin >> c[i];
      |                                ^
a.cc:14:8: error: 'a' was not declared in this scope
   14 |   sort(a.begin(),a.end());
      |        ^
a.cc:14:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   14 |   sort(a.begin(),a.end());
      |   ^~~~
      |   short
a.cc:15:8: error: 'b' was not declared in this scope
   15 |   sort(b.begin(),b.end());
      |        ^
a.cc:17:17: error: 'i' was not declared in this scope
   17 |   cout << min(a[i]+b[i]-c[i],a[0]+b[0]) << endl;
      |                 ^
a.cc:17:25: error: 'c' was not declared in this scope
   17 |   cout << min(a[i]+b[i]-c[i],a[0]+b[0]) << endl;
      |                         ^
Language: C++

n_a, n_b, m = gets.split.map(&:to_i)
a = gets.split.map(&:to_i)
b = gets.split.map(&:to_i)
xycs = m.times.map{STDIN.gets.split.map(&:to_i)}

ans = a.min + b.min

xycs.each do |xyc|
    x = xyc[0] - 1
    y = xyc[1] - 1
    t = a[x] + b[y] - xyc[2]
    ans = t if ans > t
end

p ans

Compiler output:
a.cc:1:1: error: 'n_a' does not name a type
    1 | n_a, n_b, m = gets.split.map(&:to_i)
      | ^~~
a.cc:6:1: error: 'ans' does not name a type
    6 | ans = a.min + b.min
      | ^~~
Language: C++

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

int main()
{
    int a, b, m;
    cin >> a >> b >> m;
    vector<int> p(m), q(m);
    for(int i = 0; i < a; i++){
        cin >> p[i];
    }

    for(int i = 0; i < b; i++){
        cin >> q[i];
    }

    int ans = 200010;

    for(int i = 0; i < a; i++){
        for(int j = 0; j < b; j++){
            ans = min(ans, p[i], q[j]);
        }
    }

    int x, y, c;

    for(int i = 0; i < m; i++){
        cin >> x >> y >> c;
        ans = min(p[x] + q[y] - c, ans);
    }

    cout << ans << endl;

}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:21:22:   required from here
   21 |             ans = min(ans, p[i], q[j]);
      |                   ~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C++

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

int main()
{
    int a, b, m;
    cin >> a >> b >> m;
    vector<int> p(m), q(m);
    for(int i = 0; i < m; i++){
        cin >> p[i];
    }

    for(int i = 0; i < m; i++){
        cin >> q[i];
    }

    int ans = 200010;

    for(int i = 0; i < a; i++){
        for(int j = 0; j < b; j++){
            ans = min(ans, p[i], q[j]);
        }
    }

    int x, y, c;

    for(int i = 0; i < m; i++){
        cin >> x >> y >> c;
        ans = min(p[x] + q[y] - c, ans);
    }

    cout << ans << endl;

}

Compiler output:
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:21:22:   required from here
   21 |             ans = min(ans, p[i], q[j]);
      |                   ~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i)
typedef long long ll;
#define pb push_back
void Yes() {cout << "Yes" << endl;}
void No() {cout << "No" << endl;}
void YES() {cout << "YES" << endl;}
void NO() {cout << "NO" << endl;}
const double PI=acos(-1);

void solve(){
    int a, b, m; cin >> a >> b >> m;
    vector<int> A(a), B(b);
    REP(i, a) cin >> A[i];
    REP(i, b) cin >> B[i];
    int tmpmin = 1000000;
    REP(i, m){
        int x, y, c;
        cin >> x >> y >> c;
        int tmp = A[x-1]+B[y-1]-c;
        //cout << "tmp; " << tmp << endl;
        tmpmin = min(tmpmin, tmp);
    }
    sort(A.begin(), A.end());
    sort(B.begin(), B.end());
    int tmpmin = min(A[0] + B[0], tmpmin);
    cout << tmpmin << endl;
    
}

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

Compiler output:
a.cc: In function 'void solve()':
a.cc:27:9: error: redeclaration of 'int tmpmin'
   27 |     int tmpmin = min(A[0] + B[0], tmpmin);
      |         ^~~~~~
a.cc:17:9: note: 'int tmpmin' previously declared here
   17 |     int tmpmin = 1000000;
      |         ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int n,m,k,a[100010],b[100010],x,y,z,mn1=1e9,mn2=1e9,ans;、
int main(){
    cin>>n>>m>>k;
    for(int i=1;i<=n;i++){
        cin>>a[i];
        mn1=min(mn1,a[i]);
    }
    for(int i=1;i<=m;i++){
        cin>>b[i];
        mn2=min(mn2,b[i]);
    }
    ans=mn1+mn2;
    while(k--){
        cin>>x>>y>>z;
        ans=min(ans,a[x]+b[y]-z);
    }
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc:3:57: error: extended character 、 is not valid in an identifier
    3 | int n,m,k,a[100010],b[100010],x,y,z,mn1=1e9,mn2=1e9,ans;、
      |                                                         ^
a.cc:3:57: error: '\U00003001' does not name a type
    3 | int n,m,k,a[100010],b[100010],x,y,z,mn1=1e9,mn2=1e9,ans;、
      |                                                         ^~
Language: C++

#include<bits/stdc++.h>
#define inf 1000000000
#define fastread ios::sync_with_stdio(false);cin.tie(NULL)
int a[100000],b[100000];
int main()
{
    fastread;
    int i,j,k;
    int na,nb,m;
    int ma=inf,mb=inf;
    cin>>na>>nb>>m;
    for(i=0;i<na;i++){
        cin>>a[i];
        ma=min(a[i],ma);
    }
    for(i=0;i<nb;i++){
        cin>>b[i];
        mb=min(b[i],mb);
    }
    int res=ma+mb;
    for(i=0;i<m;i++){
        int x,y,c;
        cin>>x>>y>>c;
        res=min(res,a[x-1]+b[y-1]-c);
    }
    cout<<res;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:18: error: 'ios' has not been declared
    3 | #define fastread ios::sync_with_stdio(false);cin.tie(NULL)
      |                  ^~~
a.cc:7:5: note: in expansion of macro 'fastread'
    7 |     fastread;
      |     ^~~~~~~~
a.cc:3:46: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    3 | #define fastread ios::sync_with_stdio(false);cin.tie(NULL)
      |                                              ^~~
a.cc:7:5: note: in expansion of macro 'fastread'
    7 |     fastread;
      |     ^~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:14:12: error: 'min' was not declared in this scope; did you mean 'std::min'?
   14 |         ma=min(a[i],ma);
      |            ^~~
      |            std::min
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:18:12: error: 'min' was not declared in this scope; did you mean 'std::min'?
   18 |         mb=min(b[i],mb);
      |            ^~~
      |            std::min
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:24:13: error: 'min' was not declared in this scope; did you mean 'std::min'?
   24 |         res=min(res,a[x-1]+b[y-1]-c);
      |             ^~~
      |             std::min
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:26:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   26 |     cout<<res;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

typedef long long ll;

int main(){
	ll A,B,M;cin>>A>>B>>M;
	
	vector<ll> a(A);for(int i=0;i<A;++i)cin>>a[i];
	vector<ll> b(B);for(int i=0;i<B;++i)cin>>b[i];

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

	for(int i=0;i<M;++i){
		int x,y,c;
		cin>>x>>y>>c;
		x--;y--;
		ans=min(ans,a[x]+b[y]+c);
	}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:24: error: no matching function for call to 'min(int&, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type)'
   20 |                 ans=min(ans,a[x]+b[y]+c);
      |                     ~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:20:24: note:   deduced conflicting types for parameter 'const _Tp' ('int' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'})
   20 |                 ans=min(ans,a[x]+b[y]+c);
      |                     ~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:20:24: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   20 |                 ans=min(ans,a[x]+b[y]+c);
      |                     ~~~^~~~~~~~~~~~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:19:11: error: expected '}' at end of input
   19 |  return 0;
      |           ^
a.cc:3:13: note: to match this '{'
    3 |  int main() {
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  cin >> a >> b >> m;
  vector<int> x(a+1),y(b+1);
  int mn1 = INT_MAX;
  int mn2 = INT_MAX;
  for (int i = 1; i <= a; i++){
    cin >> x[i];
    mn1 = min(mn1,x[i]);
  }
  for (int i = 1; i <= b; i++){
    cin >> y[i];
    mn2 = min(mn2,y[i]);
  }
  int ans = mn1+mn2;
  while (m--){
    int x1,y1,c1;
    cin >> x1 >> y1 >> c1;
    ans = min(ans,x[x1]+y[y1]-c1);
  }
  cout << ans;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:10: error: 'a' was not declared in this scope
    4 |   cin >> a >> b >> m;
      |          ^
a.cc:4:15: error: 'b' was not declared in this scope
    4 |   cin >> a >> b >> m;
      |               ^
a.cc:4:20: error: 'm' was not declared in this scope; did you mean 'tm'?
    4 |   cin >> a >> b >> m;
      |                    ^
      |                    tm
Language: C++

#pragma GCC optimize "-O3"
#pragma GCC optimize("Ofast")
#pragma GCC optimization ("unroll-loops")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define endl '\n'
#define NumberOfOnes __builtin_popcount
#define LSOne(S) (S & (-S))
#define ll long long
#define two pair<int,int>
#define twoll pair<ll,ll>
#define four pair<two,two>
#define pb push_back
#define eb emplace_back
#define mk make_pair
#define y1 y1922
#define INF 1000000000000000000
#define P 1000000007
#define lmax 1000000000
#define nn 1000003
#define ff first.first
#define fs first.second
#define sf second.first
#define ss second.second
#define f first
#define s second
#define vi vector<int>
#define vll vector<ll>
#define vtwo vector<two>
#define ALL(container) (container).begin(), (container).end()
#define sz(container) (int)(container.size())
#define max(a,b) ((a)>(b)?(a):(b))
#define min(a,b) ((a)<(b)?(a):(b))
#define mid(a,b) (a+b>>1)
#define minN 0
#define maxN 10000000
#define na(x) ((x)<P?(x):(x)-P)
#define ab(a) (-(a)<(a)?(a):-(a))
#define FAST std::ios::sync_with_stdio(false)
#define xRand mt19937 rng(chrono::steady_clock::now().time_since_epoch().count())
#define rnd rng
#define IT iterator
typedef
tree<
  int,// aq pair<int,int> shegidzlia
  null_type,
  less/*_equal*/<int>,// aqac
  rb_tree_tag,
  tree_order_statistics_node_update>
ordered_set;
// '_equal' mashin ginda roca multiset gchirdeba
template<class key, class value,class cmp = std::less<key>>
using ordered_map = tree<key, value, cmp, rb_tree_tag, tree_order_statistics_node_update>;
ordered_map<int, int> my_map;
inline int rin(){
	int x=0,w=1;char ch=getchar();
	while ((ch<'0'||ch>'9')&&ch!='-') ch=getchar();
	if (ch=='-') w=0,ch=getchar();
	while (ch>='0'&&ch<='9') x=(x<<3)+(x<<1)+ch-'0',ch=getchar();
	return w?x:-x;
}
inline int bin(){
	int x=0;char ch=getchar();
	while (ch<'0'||ch>'9') ch=getchar();
	while (ch>='0'&&ch<='9') x=(x<<3)+(x<<1)+ch-'0',ch=getchar();
	return x;
}
int A,B,M;
int a[100004];
int b[100004];
int x[100004];
int y[100004];
int c[100004];
int ans;
int main(){FAST;xRand;
cin>>A>>B>>M;
for(int i=1;i<=A;i++){
	cin>>a[i];
}
for(int i=1;<=B;i++){
	cin>>b[i];
}
ans=lmax;
for(int i=1;i<=M;i++){
	cin>>x[i]>>y[i]>>c[i];
	ans=min(a[x[i]]+b[y[i]]-c[i],ans);
}
cout<<ans<<endl;

	// you should actually read the stuff at the bottom
}
/* stuff you should look for
	* int overflow, array bounds
	* special cases (n=1?), slow multiset operations
	* do smth instead of nothing and stay organized
	* unordered_map, hash_map, scanf, calculate answer instead of ans*K
*/
/*


                   *         *
                  * *       * *
                 *   *     *   *
                *     *   *     *
                 *   *   * *   *
                  *   *   *   *
                   *   * *   *
                     *  *   *
					   *  *


*/




Compiler output:
a.cc: In function 'int main()':
a.cc:82:13: error: expected primary-expression before '<=' token
   82 | for(int i=1;<=B;i++){
      |             ^~
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main() {
    int a, b, c;
    cin >> a >> b;
    int c = 100000;
    int d = 100000;
    vector<int>x(a);
    for (int i = 0; i < a; i++) {
        cin >> x[i];
        c = min(c, x[i]);
    }
    vector<int>y(b);
    for (int j = 0; j < b; j++) {
        cin >> y[j];
        int d = min(d, y[j]);
    }
    int nya = c + d;
    for (int l = 0; l < c; l++) {
        int w, q, e;
        cin >> w >> q >> e;
        nya = min(nya, x[w] + y[q] - e);
    }
    cout << nya;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: redeclaration of 'int c'
    8 |     int c = 100000;
      |         ^
a.cc:6:15: note: 'int c' previously declared here
    6 |     int a, b, c;
      |               ^
Language: C

#include<stdio.h>
int main()
{
  int A,B,M;
  scanf("%d %d %d",&A,&B,&M);
  int a[A],b[B],x[M],y[M],c[M];
  int i;
  for(i=0;i<A;i++){
    scanf("%d",&a[i]);
  }
  for(i=0;i<B;i++){
    scanf("%d",&b[i]);
  }
  for(i=0;i<M;i++){
    scanf("%d %d %d",&x[i],&y[i],&c[i]);
  }
  int mina=a[0];
  int minb=b[0];
  for(i=1;i<A;i++){
    if(mina>a[i]){
      mina=a[i];
    }
  }
  for(i=1;i<B;i++){
    if(minb>b[i]){
      minb=b[i];
    }
  }
  int min=mina+minb;
  for(i=0;i<M;i++){
    if(min>a[x[i]]+b[y[i]]-c[i]){
      min=a[x[i]]+b[y[i]]-c[i]);
    }
  }
  printf("%d",min);
  return 0;
}
  
  
  

Compiler output:
main.c: In function 'main':
main.c:32:31: error: expected ';' before ')' token
   32 |       min=a[x[i]]+b[y[i]]-c[i]);
      |                               ^
      |                               ;
main.c:32:31: error: expected statement before ')' token