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

#include<iostream>
#include<algorithm>
#include<numeric>
#include<vector>
#include<set>
#include<map>
#include <string>
#include <math.h>
#define cinf(n,x) for(int i=0;i<(n);i++) cin >> x[i];
typedef long long int ll;
using namespace std;

int main(){
  ll n;
  ll ga,sa,ba,gb,sb,bb;
  cin >>n>>ga>>sa>>ba>>gb>>sb>>bb;
  int dg=0;int ds=0; int db=0;
  bool a=false;
  bool b=false;
  bool c=false;
  if(ga<gb)a=true;
  if(sa<sb)b=true;
  if(ba<bb)c=true;
  if(a)dg=gb-ga;
  if(b)ds=sb-sa;
  if(c)db=bb-ba;
  if(a==false&&b==false&&c==false){
    cout << n << endl;
    return 0;
  }
  if(a==true&&b==false&&c==false){
    cout<< n%ga+(n/ga*gb) << endl;
    return 0;
  }
  if(a==false&&b==true&&c==false){
    cout << n%sa+(n/sa*sb) << endl;
    return 0;
  }
  if(a==false&&b==false&&c==true){
    cout << n%ba+(n/ba*bb) << endl;
    return 0;
  }
  if(a==true&&b==true&&c==false){
    if(dg>=ds){
      cout << n%dg%ds+(n/ga*gb)+(n/ga/sa*sb)<< endl;
      return 0;
    }
    else{
      cout << n%ds%dg+(n/sa*sb)+(n/sa/ga*gb)<< endl;
      return 0;
    }
  }
  if(a==false&&b==true&&c==true){
    if(ds>=db){
      cout << n%ds%db+(n/sa*sb)+(n/sa/ba*bb)<< endl;
      return 0;
    }
    else{
      cout << n%db%ds+(n/ba*bb)+(n/ba/sa*sb)<< endl;
      return 0;
    }
  }
  if(a==true&&b==false&&c==true){
    if(dg>=db){
      cout << n%dg%db+(n/ga*gb)+(n/ga/ba*bb)<< endl;
      return 0;
    }
    else{
      cout << n%db%dg+(n/ba*bb)+(n/ba/ga*gb)<< endl;
      return 0;
    }
  }
  if(a==true&&b==true&&c==true){
    if(dg<=ds&&ds<=db){
      cout << n%dg%ds%db+(n/ga*gb)+(n/ga/sa*sb)+(n/ga/sa/ba*bb)<<endl;
      return 0;
    }
    if(dg<=db&&db<=ds){
      cout << n%dg%db%ds+(n/ga*gb)+(n/ga/ba*bb)+(n/ga/ba/sa*sb)<<endl;
      return 0;
    }
    if(ds<=dg&&dg<=db){
      cout << n%ds%dg%db+(n/sa*sb)+(n/sa/ga*gb)+(n/sa/ga/ba*bb)<<endl;
      return 0;
    }
    if(ds<=db&&db<=dg){
      cout << n%ds%db%dg+(n/sa*sb)+(n/sa/ba*bb)+(n/sa/ba/ga*gb)<<endl;
      return 0;
    }
    if(db<=dg&&dg<=ds){
      cout << n%db%dg%ds+(n/ba*bb)+(n/ba/ga*gb)+(n/ba/ga/sa*sb)<<endl;
      return 0;
    }
    if(db<=ds&&ds<=dg){
      cout << n%db%ds%dg+(n/ba*bb)+(n/ba/sa*sb)+(n/ba/sa/ga*gåb)<<endl;
      return 0;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:95:61: error: 'g\U000000e5b' was not declared in this scope; did you mean 'gb'?
   95 |       cout << n%db%ds%dg+(n/ba*bb)+(n/ba/sa*sb)+(n/ba/sa/ga*gåb)<<endl;
      |                                                             ^~~
      |                                                             gb
Language: C++

#define DEBUGGING
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ALL(V) (V).begin(), (V).end()
#define ALLR(V) (V).rbegin(), (V).rend()

template <typename T> using V = vector<T>;
template <typename T> using VV = V<V<T>>;
template <typename T, typename U> using P = pair<T, U>;
using ll = int64_t;
using PLL = P<ll, ll>;

template <typename T> const T& var_min(const T &t) { return t; }
template <typename T> const T& var_max(const T &t) { return t; }
template <typename T, typename... Tail> const T& var_min(const T &t, const Tail&... tail) { return min(t, var_min(tail...)); }
template <typename T, typename... Tail> const T& var_max(const T &t, const Tail&... tail) { return max(t, var_max(tail...)); }
template <typename T, typename... Tail> void chmin(T &t, const Tail&... tail) { t = var_min(t, tail...); }
template <typename T, typename... Tail> void chmax(T &t, const Tail&... tail) { t = var_max(t, tail...); }
template <typename T> const T& clamp(const T &t, const T &low, const T &high) { return max(low, min(high, t)); }
template <typename T> void chclamp(T &t, const T &low, const T &high) { t = clamp(t, low, high); }

namespace init__ {

struct InitIO {
    InitIO() {
        cin.tie(nullptr);
        ios_base::sync_with_stdio(false);
        cout << fixed << setprecision(30);
    }
} init_io;

}

#ifdef DEBUGGING
#include "../debug.cpp"
#else
#define DEBUG(...) 0
#define DEBUG_SEPARATOR_LINE 0
#endif

template <typename T>
T make_v(T init) { return init; }

template <typename T, typename... Tail>
auto make_v(T init, size_t s, Tail... tail) {
#define rec make_v(init, tail...)
    return V<decltype(rec)>(s, rec);
#undef rec
}

int main() {
    ll N;
    cin >> N;
    V<ll> v(6);
    for(ll &e : v) cin >> e;
    V<PLL> change;
    for(ll i = 0; i < 3; i++) {
        ll a = v[i], b = v[i + 3];
        if(a > b) swap(a, b);
        change.emplace_back(a, b);
    }

    ll ans = N;

    for(ll i = 0; i * change[0].first <= N; i++) {
        ll used = i * change[0].first;
        ll tmp = i * change[0].second;
        for(ll j = 0; j * change[1].first + used <= N; j++) {
            ll val = tmp + j * change[1].second;
            ll rest = N - (used + j * change[1].first);
            // DEBUG(i, j, val, rest);
            val += rest % change[2].first;
            val += rest / change[2].first * change[2].second;
            chmax(ans, val);
        }
    }

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


Compiler output:
a.cc:36:10: fatal error: ../debug.cpp: No such file or directory
   36 | #include "../debug.cpp"
      |          ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

#pragma GCC optimize("O3")
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
constexpr int MAXN = 5000 + 42;
ll dp[MAXN];

int main() {
  ios_base::sync_with_stdio(0);
  int N;
  cin >> N;
  vector<int> A(3), B(3);
  for (int& j : A) {
    cin >> j;
  }
  for (int& j : B) {
    cin >> j;
  }

  iota(dp, dp + N, 0);
  for (int j = 0; j < 3; j++) {
    if (A[j] < B[j]) {
      for (int i = 1; i <= N; i++) {
        for (int k = 1; A[j] * k <= i; k++) {
          dp[i] = max(dp[i], dp[i - A[j] * k] + k * B[j]);
        }
      }
    }
  }

  int R = dp[N];
  int L = min(R, 5000);

  iota(dp, dp + N, 0);
  for (int j = 0; j < 3; j++) {
    if (B[j] < A[j]) {
      for (int i = 1; i <= L; i++) {
        for (int k = 1; A[j] * k <= i; k++) {
          dp[i] = max(dp[i], dp[i - B[j] * k] + k * A[j]);
        }
      }
    }
  }

  ll res = R;
  for (int j=0; j<3; j++) {
    int k = max((R - L) / B[j], 0);
    res = max(res, dp[i - B[j] * k] + k + A[j]);
  }

  cout << res << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:48:23: error: 'i' was not declared in this scope
   48 |     res = max(res, dp[i - B[j] * k] + k + A[j]);
      |                       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin >>N;
  vector<vector<int>>D(2,vector<int>(3));
  for(int i=0;i<2;i++){
    for(int j=0;j<3;j++){
      cin>>D.at(i).at(j);
    }
  }
  int ga=D.at(0).at(0),gb=D.at(1)at.(0);
  int sa=D.at(0).at(1),sb=D.at(1).at(1);
  int ba=D.at(0).at(2),bb=D.at(1).at(2);
  int rieki;
  if(ga>=gb){
    if(sa>=sb){
      if(ba>=bb){
        rieki=max(max(N*(ga-gb)/gb,N*(sa-sb)/sb),N*(ba-bb)/bb);
      }
      if(ba<bb){
        rieki=N*(bb-ba)/ba;
        rieki=rieki+max((N+rieki)*(ga-gb)/gb,(N+rieki)*(sa-sb)/sb);
      }
    }
    if(sa<sb){
      if(ba>=bb){
        rieki=N*(sb-sa)/sa;
        rieki=rieki+max((N+rieki)*(ga-gb)/gb,(N+rieki)*(ba-bb)/bb);
      }
      if(ba<bb){
        rieki=max(N*(sb-sa)/sa,N*(bb-ba)/ba);
        rieki=rieki+(N+rieki)*(ga-gb)/gb;
      }
    }
  }
  if(ga<gb){
    if(sa>=sb){
      if(ba>=bb){
        rieki=N*(gb-ga)/ga;
        rieki=rieki+max((N+rieki)*(sa-sb)/sb,(N+rieki)*(ba-bb)/bb);
      }
      if(ba<bb){
        rieki=max(N*(gb-ga)/ga,N*(bb-ba)/bb);
        rieki=rieki+(N+rieki)*(sa-sb)/sb;
      }
    }
    if(sa<sb){
      if(ba>=bb){
        rieki=max(N*(gb-ga)/ga,N*(sb-sa)/sa);
        rieki=rieki+(N+rieki)*(ba-bb)/bb;
      }
      if(ba<bb){
        rieki=max(max(N*(gb-ga)/ga,N*(sb-sa)/sa),N*(bb-ba)/ba);
      }
    }
  }
  cout <<N+rieki<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:31: error: cannot convert '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'std::vector<int>'} to 'int' in initialization
   12 |   int ga=D.at(0).at(0),gb=D.at(1)at.(0);
      |                           ~~~~^~~
      |                               |
      |                               __gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type {aka std::vector<int>}
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(void){
    // Your code here!
    int i,j,k;
    int n;
    int ga,gb,sa,sb,ba,bb;
    std::cin >> n;
    std::cin >> ga>>sa>>ba;
    std::cin >> gb>>sb>>bb;
    int ans=0;
    if(ga<=gb&&sa<=sb&&ba<=bb){
        for (i=0;i<=n/ga;i++){
            for (j=0;j<=(n-i*ga)/sa;j++){
                    int m=i*(gb-ga)+j*(sb-sa)+(n-i*ga-j*sa)/ba*(bb-ba);
                    if (m>ans) ans=m;
            }
        }
        ans+=n;
        int z=1;
        while(z==1){i++}
    }
    else if(ga>=gb&&sa>=sb&&ba>=bb){
        int g=ga,s=sa,b=ba;
        ga=gb;sa=sb;ba=bb;gb=g;sb=s;bb=b;
        for (i=0;i<=n/ga;i++){
            for (j=0;j<=(n-i*ga)/sa;j++){
                    int m=i*(gb-ga)+j*(sb-sa)+(n-i*ga-j*sa)/ba*(bb-ba);
                    if (m>ans) ans=m;
            }
        }
        ans+=n;
    }
    else if(ga>=gb&&sa>=sb&&ba<=bb){
        n+=(bb-ba)*(n/ba);
        for (i=0;i<=n/gb;i++){
                int m=i*(ga-gb)+(n-i*gb)/sb*(sa-sb);
                if (m>ans) ans=m;
         }
        ans+=n;
    }
    else if(ga>=gb&&sa<=sb&&ba>=bb){
        n+=(sb-ba)*(n/sa);
        for (i=0;i<=n/gb;i++){
                int m=i*(ga-gb)+(n-i*gb)/bb*(ba-bb);
                if (m>ans) ans=m;
         }
        ans+=n;
    }
    else if(ga<=gb&&sa>=sb&&ba>=bb){
        n+=(gb-ga)*(n/ga);
        for (i=0;i<=n/bb;i++){
                int m=i*(ba-bb)+(n-i*bb)/sb*(sa-sb);
                if (m>ans) ans=m;
         }
        ans+=n;
    }
    else if(ga>=gb&&sa<=sb&&ba<=bb){
        for (i=0;i<=n/sa;i++){
                int m=i*(sb-sa)+(n-i*sa)/ba*(bb-ba);
                if (m>ans) ans=m;
         }
        n+=ans;
        n+=(ga-gb)*(n/gb);
        ans=n;
    }
    else if(ga<=gb&&sa>=sb&&ba<=bb){
        for (i=0;i<=n/ga;i++){
                int m=i*(gb-ga)+(n-i*ga)/ba*(bb-ba);
                if (m>ans) ans=m;
         }
        n+=ans;
        n+=(sa-sb)*(n/sb);
        ans=n;
        int z=1;
        while(z==1){i++}
    }
    else if(ga<=gb&&sa<=sb&&ba>=bb){
        for (i=0;i<=n/ga;i++){
                int m=i*(gb-ga)+(sb-sa)*(n-i*ga)/sa;
                if (m>ans) ans=m;
         }
        n+=ans;
        n+=(ba-bb)*(n/bb);
        ans=n;
        int z=1;
        while(z==1){i++}
    }
    std::cout << ans << std::endl;
   
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:24: error: expected ';' before '}' token
   21 |         while(z==1){i++}
      |                        ^
      |                        ;
a.cc:76:24: error: expected ';' before '}' token
   76 |         while(z==1){i++}
      |                        ^
      |                        ;
a.cc:87:24: error: expected ';' before '}' token
   87 |         while(z==1){i++}
      |                        ^
      |                        ;
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

long long n, now;
struct node
{
	long long a, b;
	friend bool operator < (node x, node y)
	{
		return double(double(x.b)/double(x.a)) > double(double(y.b)/double(y.a));
	}
}e[5];

int main()
{
	cin >> n;
	cin >> e[1].a >> e[2].a >> e[3].a >> e[1].b >> e[2].b >> e[3].b;
	sort(e + 1, e + 4);
	for (long long i = 1; i <= 3; i++)
	{
		if (double(double(e[i].b)/double(e[i].a)) > 1.0)
		{
			now += long long(n / e[i].a) * e[i].b;
			n %= e[i].a;
		}
	}
	n += now;
	now = 0;
	for (long long i = 3; i >= 1; i--)
	{
		if (double(double(e[i].b)/double(e[i].a)) < 1.0)
		{
			now += long long(n / e[i].b) * e[i].a;
			n %= e[i].b;
		}
	}
	n += now;
	cout << n << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:32: error: expected primary-expression before 'long'
   25 |                         now += long long(n / e[i].a) * e[i].b;
      |                                ^~~~
a.cc:35:32: error: expected primary-expression before 'long'
   35 |                         now += long long(n / e[i].b) * e[i].a;
      |                                ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int n, gx, sx, bx, gy, sy, by;

int F[5050];

int main() {
	scanf("%d%d%d%d", &n, &gx, &sx, &bx);
	scanf("%d%d%d", &gy, &sy, &by);
	int o = (gx <= gy) + (sx <= sy) + (bx <= by);
	if(o <= 1) {
		swap(gx, gy);
		swap(sx, sy);
		swap(bx, by);
		o = 3 - o;
	}
	if(sx > sy) swap(gx, sx), swap(gy, sy);
	if(bx > by) swap(gx, bx), swap(gy, by);
	if(gx < gy) {
		// 3
		F[0] = 0;
		for(int i = 1; i <= n; i++) {
			F[i] = F[i - 1] + 1;
			if(i >= gx) F[i] = max(F[i], F[i - gx] + gy);
			if(i >= sx) F[i] = max(F[i], F[i - sx] + sy);
			if(i >= bx) F[i] = max(F[i], F[i - bx] + by);
		}
		printf("%d\n", F[n]);
		return 0;
	} else {
		F[0] = 0;
		for(int i = 1; i <= n; i++) {
			F[i] = F[i - 1] + 1;
			if(i >= sx) F[i] = max(F[i], F[i - sx] + sy);
			if(i >= bx) F[i] = max(F[i], F[i - bx] + by);
		}
		printf("%d\n", ans % gy + ans / gy * gx);
		return 0;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:32: error: 'ans' was not declared in this scope; did you mean 'abs'?
   39 |                 printf("%d\n", ans % gy + ans / gy * gx);
      |                                ^~~
      |                                abs
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
long long int dp[25000000];
int main(){
	long long int ans,a[3],b[3];
	cin>>ans;
	cin>>a[0]>>a[1]>>a[2];
	cin>>b[0]>>b[1]>>b[2];
	##A->B
	for(long long int i=0;i<=5000;i++){dp[i]=i;}
	for(long long int i=0;i<=5000;i++){
		for(long long int j=0;j<3;j++){
			if(i>=a[j]){
				dp[i]=max(dp[i],dp[i-a[j]]+b[j]);
			}
		}
	}
	ans=dp[ans];
	for(long long int i=0;i<=25000000;i++){dp[i]=i;}
	for(long long int i=0;i<=25000000;i++){
		for(long long int j=0;j<3;j++){
			if(i>=a[j]){
				dp[i]=max(dp[i],dp[i-b[j]]+a[j]);
			}
		}
	}
	cout<<dp[ans]<<endl;
	return 0;
}

Compiler output:
a.cc:10:9: error: stray '##' in program
   10 |         ##A->B
      |         ^~
a.cc: In function 'int main()':
a.cc:10:11: error: 'A' was not declared in this scope
   10 |         ##A->B
      |           ^
a.cc:11:31: error: 'i' was not declared in this scope
   11 |         for(long long int i=0;i<=5000;i++){dp[i]=i;}
      |                               ^
Language: C++


#include <stdio.h>
#include <algorithm>
#include <vector>
#include <string>

int main() {
	int N;
	int gA, sA, bA;
	int gB, sB, bB;
	scanf("%d", &N);
	scanf("%d %d %d", &gA, &sA, &bA);
	scanf("%d %d %d", &gB, &sB, &bB);
	int MG, MS, MB, mg, ms, mb;
	MG = max(gA, gB);
	MS = max(sA, sB);
	MB = max(bA, bB);
	mg = min(gA, gB);
	ms = min(sA, sB);
	mb = min(bA, bB);
	int best = 0;
	for (int g = 0; g*mg <= N; g++) {
		for (int s = 0; g*mg + s * ms <= N; s++) {
			int val = N + g * (MG - mg) + s * (MS - ms) + (N - g * mg + s * ms) / mb * (MB - mb);
			if (best < val)best = val;
		}
	}
	printf("%d", best);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: 'max' was not declared in this scope; did you mean 'std::max'?
   15 |         MG = max(gA, gB);
      |              ^~~
      |              std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:18:14: error: 'min' was not declared in this scope; did you mean 'std::min'?
   18 |         mg = min(gA, gB);
      |              ^~~
      |              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)
      |     ^~~
Language: Java

import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner stdIn = new Scanner(System.in);
    String lf = System.lineSeparator();
    String ans = "";
    
    int n = stdIn.nextInt();
    ArrayList<Integer> a = new ArrayList<Integer>();
    for(int i = 0; i < n; i++){
      a.add(stdIn.nextInt());
    }
    
    int max;
    int min:
    switch(n%2){
      case 0:
        while(a.size() != 1){
          Collections.sort(a);
          max = a.get(a.size()-1);
          min = a.get(0);
          ans += max + " " + min + lf;
          a.remove(a.size()-1);
          a.remove(0);
          a.add(max - min);
          Collections.sort(a);
          max = a.get(a.size()-1);
          min = a.get(0);
          ans += min + " " + max + lf;
          a.remove(a.size()-1);
          a.remove(0);
          a.add(min - max);
        }
        System.out.println(a.get(0));
        break;
      case 1:
        while(a.size() != 1){
          Collections.sort(a);
          max = a.get(a.size()-1);
          min = a.get(0);
          ans += min + " " + max + lf;
          a.remove(a.size()-1);
          a.remove(0);
          a.add(min - max);
          Collections.sort(a);
          max = a.get(a.size()-1);
          min = a.get(0);
          ans += max + " " + min + lf;
          a.remove(a.size()-1);
          a.remove(0);
          a.add(max - min);
        }
        System.out.println(a.get(0));
        break;
    }
    System.out.print(ans);
  }
}


Compiler output:
Main.java:16: error: ';' expected
    int min:
           ^
1 error
Language: C++

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

long long GetResult(int n, long long ga, long long sa, long long ba,
              long long gb, long long sb, long long bb) {
  std::vector<long long> f(n + 1, 0);
  for (int i = 1; i <= n; i++) {
    f[i] = f[i - 1] + 1;
    if (i >= ba) {
      f[i] = max(f[i], f[i - ba] + bb);
    }
  }
  long long g_num = 0, ans = n, g_b_num = 0;
  while (g_num <= n) {
    long long s_num = 0, s_b_num = 0;
    while (g_num + s_num <= n) {
      long long temp = g_b_num + s_b_num;
      if (ba < bb) {
        long long val = n - g_num - s_num;
        temp += f[val];
      } else {
        temp += n - g_num - s_num;
      }
      ans = max(ans, temp);
      if (sb <= sa) {
        break;
      }
      s_num += sa;
      s_b_num += sb;
    }
    g_num += ga;
    g_b_num += gb;
    if (gb <= ga) { break; }
  }
  return ans;
}

int main() {
  long long n, ga, sa, ba, gb, sb, bb;
  cin >> n >> ga >> sa >> ba >> gb >> sb >> bb;
  n = GetResult(n, ga, sa, ba, gb, sb, bb);
  n = GetResult(n, gb, sb, bb, ga, sa, ba);
  cout << n << endl;
  return 0;
}

Compiler output:
a.cc: In function 'long long int GetResult(int, long long int, long long int, long long int, long long int, long long int, long long int)':
a.cc:7:8: error: 'vector' is not a member of 'std'
    7 |   std::vector<long long> f(n + 1, 0);
      |        ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <algorithm>
  +++ |+#include <vector>
    3 | using namespace std;
a.cc:7:15: error: expected primary-expression before 'long'
    7 |   std::vector<long long> f(n + 1, 0);
      |               ^~~~
a.cc:9:5: error: 'f' was not declared in this scope
    9 |     f[i] = f[i - 1] + 1;
      |     ^
a.cc:21:17: error: 'f' was not declared in this scope
   21 |         temp += f[val];
      |                 ^
Language: C++

#include <iostream>
#include <cmath>

using namespace std;
int main()
{
    int N;
    int g[2];
    int s[2];
    int b[2];
    int index=0;

    cin>>N;
    cin>>g[0]>>s[0]>>b[0];
    cin>>g[1]>>s[1]>>b[1];

    int difG=g[1]-g[0];
    int difS=s[1]-s[0];
    int difB=b[1]-b[0];

    int dif=abs(difG);
    if(dif<abs(difS))
    {
        dif=abs(difS);
        index=1;
    }
    if(dif<abs(difB))
    {
        dif=abs(difB);
        index=2;
    }
    
    int a[6]={g[0],g[1],s[0],s[1],b[0],b[1]};
    int minRate=g[0];
    for(int i=0;i<6;i++)
    {
        if(minRate>a[i])
        {
            minRate=a[i];
        }
    }
    if(minRate>N)
    {
        cout<<N<<endl:
    }
    else{
    if(index==0)
    {
        int change=N/min(g[0],g[1])*max(g[0],g[1]);
        int stay=N%min(g[0],g[1]);
        cout<<change+stay<<endl;
    }
    if(index==1)
    {
        int change=N/min(s[0],s[1])*max(s[0],s[1]);
        int stay=N%min(s[0],s[1]);
        cout<<change+stay<<endl;
    }
    if(index==2)
    {
        int change=N/min(b[0],b[1])*max(b[0],b[1]);
        int stay=N%min(b[0],b[1]);
        cout<<change+stay<<endl;
    }
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:22: error: expected ';' before ':' token
   44 |         cout<<N<<endl:
      |                      ^
      |                      ;
Language: C++

#include <iostream>
#include <cmath>

using namespace std;
int main()
{
    int N;
    int g[2];
    int s[2];
    int b[2];
    int index=0;

    cin>>N;
    cin>>g[0]>>s[0]>>b[0];
    cin>>g[1]>>s[1]>>b[1];

    int difG=g[1]-g[0];
    int difS=s[1]-s[0];
    int difB=b[1]-b[0];

    int dif=abs(difG);
    if(dif<abs(difS))
    {
        dif=abs(difS);
        index=1;
    }
    if(dif<abs(difB))
    {
        dif=abs(difB);
        index=2;
    }
    
    int[] a={g[0],g[1],s[0],s[1],b[0],b[1]};
    int minRate=g[0];
    for(int i=0;i<6;i++)
    {
        if(minRate>a[i])
        {
            minRate=a[i];
        }
    }
    if(minRate>N)
    {
        cout<<N<<endl:
    }
    else{
    if(index==0)
    {
        int change=N/min(g[0],g[1])*max(g[0],g[1]);
        int stay=N%min(g[0],g[1]);
        cout<<change+stay<<endl;
    }
    if(index==1)
    {
        int change=N/min(s[0],s[1])*max(s[0],s[1]);
        int stay=N%min(s[0],s[1]);
        cout<<change+stay<<endl;
    }
    if(index==2)
    {
        int change=N/min(b[0],b[1])*max(b[0],b[1]);
        int stay=N%min(b[0],b[1]);
        cout<<change+stay<<endl;
    }
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:8: error: structured binding declaration cannot have type 'int'
   33 |     int[] a={g[0],g[1],s[0],s[1],b[0],b[1]};
      |        ^~
a.cc:33:8: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:33:8: error: empty structured binding declaration
a.cc:33:11: error: expected initializer before 'a'
   33 |     int[] a={g[0],g[1],s[0],s[1],b[0],b[1]};
      |           ^
a.cc:37:20: error: 'a' was not declared in this scope
   37 |         if(minRate>a[i])
      |                    ^
a.cc:44:22: error: expected ';' before ':' token
   44 |         cout<<N<<endl:
      |                      ^
      |                      ;
Language: C++

#include <iostream>
#include <cmath>

using namespace std;
int main()
{
    int N;
    int g[2];
    int s[2];
    int b[2];
    int index=0;

    cin>>N;
    cin>>g[0]>>s[0]>>b[0];
    cin>>g[1]>>s[1]>>b[1];

    int difG=g[1]-g[0];
    int difS=s[1]-s[0];
    int difB=b[1]-b[0];

    int dif=abs(difG);
    if(dif<abs(difS))
    {
        dif=abs(difS);
        index=1;
    }
    if(dif<abs(difB))
    {
        dif=abs(difB);
        index=2;
    }
    
    if((std::min)({g[0],g[1],s[0],s[1],b[0],b[1]})>N)
    {
        cout<<N<<endl:
    }
    else{
    if(index==0)
    {
        int change=N/min(g[0],g[1])*max(g[0],g[1]);
        int stay=N%min(g[0],g[1]);
        cout<<change+stay<<endl;
    }
    if(index==1)
    {
        int change=N/min(s[0],s[1])*max(s[0],s[1]);
        int stay=N%min(s[0],s[1]);
        cout<<change+stay<<endl;
    }
    if(index==2)
    {
        int change=N/min(b[0],b[1])*max(b[0],b[1]);
        int stay=N%min(b[0],b[1]);
        cout<<change+stay<<endl;
    }
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:18: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
   33 |     if((std::min)({g[0],g[1],s[0],s[1],b[0],b[1]})>N)
      |        ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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: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:   candidate expects 2 arguments, 1 provided
/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, 1 provided
a.cc:35:22: error: expected ';' before ':' token
   35 |         cout<<N<<endl:
      |                      ^
      |                      ;
Language: C++

#include <iostream>
#include <cmath>

using namespace std;
int main()
{
    int N;
    int g[2];
    int s[2];
    int b[2];
    int index=0;

    cin>>N;
    cin>>g[0]>>s[0]>>b[0];
    cin>>g[1]>>s[1]>>b[1];

    int difG=g[1]-g[0];
    int difS=s[1]-s[0];
    int difB=b[1]-b[0];

    int dif=abs(difG);
    if(dif<abs(difS))
    {
        dif=abs(difS);
        index=1;
    }
    if(dif<abs(difB))
    {
        dif=abs(difB);
        index=2;
    }
    
    if(min({g[0],g[1],s[0],s[1],b[0],b[1]})>N)
    {
        cout<<N<<endl:
    }
    else{
    if(index==0)
    {
        int change=N/min(g[0],g[1])*max(g[0],g[1]);
        int stay=N%min(g[0],g[1]);
        cout<<change+stay<<endl;
    }
    if(index==1)
    {
        int change=N/min(s[0],s[1])*max(s[0],s[1]);
        int stay=N%min(s[0],s[1]);
        cout<<change+stay<<endl;
    }
    if(index==2)
    {
        int change=N/min(b[0],b[1])*max(b[0],b[1]);
        int stay=N%min(b[0],b[1]);
        cout<<change+stay<<endl;
    }
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:11: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
   33 |     if(min({g[0],g[1],s[0],s[1],b[0],b[1]})>N)
      |        ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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: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:   candidate expects 2 arguments, 1 provided
/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, 1 provided
a.cc:35:22: error: expected ';' before ':' token
   35 |         cout<<N<<endl:
      |                      ^
      |                      ;
Language: C++

#include <iostream>
#include <cmath>

using namespace std;
int main()
{
    int N;
    int g[2];
    int s[2];
    int b[2];
    int index=0;

    cin>>N;
    cin>>g[0]>>s[0]>>b[0];
    cin>>g[1]>>s[1]>>b[1];

    int difG=g[1]-g[0];
    int difS=s[1]-s[0];
    int difB=b[1]-b[0];

    int dif=abs(difG);
    if(dif<abs(difS))
    {
        dif=abs(difS);
        index=1;
    }
    if(dif<abs(difB))
    {
        dif=abs(difB);
        index=2;
    }
    
    if(min(g[0],g[1],s[0],s[1],b[0],b[1])>N)
    {
        cout<<N<<endl:
    }
    else{
    if(index==0)
    {
        int change=N/min(g[0],g[1])*max(g[0],g[1]);
        int stay=N%min(g[0],g[1]);
        cout<<change+stay<<endl;
    }
    if(index==1)
    {
        int change=N/min(s[0],s[1])*max(s[0],s[1]);
        int stay=N%min(s[0],s[1]);
        cout<<change+stay<<endl;
    }
    if(index==2)
    {
        int change=N/min(b[0],b[1])*max(b[0],b[1]);
        int stay=N%min(b[0],b[1]);
        cout<<change+stay<<endl;
    }
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:11: error: no matching function for call to 'min(int&, int&, int&, int&, int&, int&)'
   33 |     if(min(g[0],g[1],s[0],s[1],b[0],b[1])>N)
      |        ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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: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:   candidate expects 2 arguments, 6 provided
/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, 6 provided
a.cc:35:22: error: expected ';' before ':' token
   35 |         cout<<N<<endl:
      |                      ^
      |                      ;
Language: C++

#include <iostream>
#include <cmath>

using namespace std;
int main()
{
    int N;
    int g[2];
    int s[2];
    int b[2];
    int index=0;

    cin>>N;
    cin>>g[0]>>s[0]>>b[0];
    cin>>g[1]>>s[1]>>b[1];

    difG=g[1]-g[0];
    difS=s[1]-s[0];
    difB=b[1]-b[0];

    dif=abs(difG);
    if(dif>abs(difS))
    {
        dif=abs(difS);
        index=1;
    }
    if(dif>abs(difB))
    {
        dif=abs(difB);
        index=2;
    }
    
    if(index==0)
    {
        int change=N/min(g[0],g[1])*max(g[0],g[1]);
        int stay=N%min(g[0],g[1]);
        cout<<change+stay<<endl;
    }
    if(index==1)
    {
        int change=N/min(s[0],s[1])*max(s[0],s[1]);
        int stay=N%min(s[0],s[1]);
        cout<<change+stay<<endl;
    }
    if(index==2)
    {
        int change=N/min(b[0],b[1])*max(b[0],b[1]);
        int stay=N%min(b[0],b[1]);
        cout<<change+stay<<endl;
    }
    

}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'difG' was not declared in this scope
   17 |     difG=g[1]-g[0];
      |     ^~~~
a.cc:18:5: error: 'difS' was not declared in this scope
   18 |     difS=s[1]-s[0];
      |     ^~~~
a.cc:19:5: error: 'difB' was not declared in this scope
   19 |     difB=b[1]-b[0];
      |     ^~~~
a.cc:21:5: error: 'dif' was not declared in this scope; did you mean 'div'?
   21 |     dif=abs(difG);
      |     ^~~
      |     div
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
 
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 (a>b) { a=b; return 1; } return 0; }
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define all(x) (x).begin(),(x).end()

int main(){
  int n;
  int a[3];b[3];
  rep(i,3)cin>>a[i];
  rep(i,3)cin>>b[i];
  int don=n;
  vector<pair<double,int>> div(3);
  rep(i,3){
    div[i]=make_pair((double)b[i]/a[i],i);
  }
  sort(all(div),greater<pair<double,int>>());
  rep(i,3){
    if(div[i].first<1)break;
    int j=div[i].second;
    int qty=(n/a[j]);
    don-=qty*a[j];
    don+=qty*b[j];
  }
  vector<pair<double,int>> div2(3);
  rep(i,3){
    div2[i]=make_pair((double)a[i]/b[i],i);
  }
  sort(all(div2),greater<pair<double,int>>());
  rep(i,3){
    if(div2[i].first<1)break;
    int j=div2[i].second;
    int qty=(n/a[j]);
    don-=qty*a[j];
    don+=qty*b[j];
  }
  cout<<don<<endl;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: 'b' was not declared in this scope
   16 |   int a[3];b[3];
      |            ^
Language: C++

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

int main() {
  long long N,H,D;
  cin >> N >> H >> D;
  vector<long long> dp[H+1,0];
  long long ii = 1;
  long long ic;
  long long iii = 0;
  for (int i=1; i<N+1; i++) {
    ic = i;
    ii *= ic;
    ii %= 1000000007;
    iii += ii * ic;
    iii %= 1000000007;
  }
  dp[0] += ii;
  for (int i=1; i<H+1) {
    if (i == H) {
      dp[H] = dp[H-1] * 2;
      dp[H] %= 1000000007;
      dp[H] += 1000000007;
      dp[H] -= dp[H-D-1];
      dp[H] %= 1000000007;
    }
      
    dp[i] = dp[i-1] * 2;
    if (i > D) {
      dp[i] += 1000000007;
      dp[i] -= dp[i-D-1];
    }
    dp[i] %= 1000000007;
    dp[i] *= iii;
    dp[i] %= 1000000007;
  }
  
  cout << dp[H] << endl;
    
    
    
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:27: error: expected ']' before ',' token
    7 |   vector<long long> dp[H+1,0];
      |                           ^
      |                           ]
a.cc:7:28: error: expected unqualified-id before numeric constant
    7 |   vector<long long> dp[H+1,0];
      |                            ^
a.cc:18:3: error: 'dp' was not declared in this scope; did you mean 'dup'?
   18 |   dp[0] += ii;
      |   ^~
      |   dup
a.cc:19:22: error: expected ';' before ')' token
   19 |   for (int i=1; i<H+1) {
      |                      ^
      |                      ;
Language: C++

#include<bits/stdc++.h>
int main(){
  srand("sooke ak ioi");
  int n;
  std::cin>>n;
  for(int i=1;i<=n;i++)
   for(int j=1;j<=n;j++){
     printf("%lld%c",(long long)rand()*rand()%100000000000," \n"[j==n]);
   }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: invalid conversion from 'const char*' to 'unsigned int' [-fpermissive]
    3 |   srand("sooke ak ioi");
      |         ^~~~~~~~~~~~~~
      |         |
      |         const char*
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:575:33: note:   initializing argument 1 of 'void srand(unsigned int)'
  575 | extern void srand (unsigned int __seed) __THROW;
      |                    ~~~~~~~~~~~~~^~~~~~
Language: C++

解説読んだ
ai+ajが異なるような{a}を作れなかった

Compiler output:
a.cc:1:1: error: '\U000089e3\U00008aac\U00008aad\U00003093\U00003060' does not name a type
    1 | 解説読んだ
      | ^~~~~~~~~~
a.cc:2:23: error: '\U00003092\U00004f5c\U0000308c\U0000306a\U0000304b\U00003063\U0000305f' does not name a type
    2 | ai+ajが異なるような{a}を作れなかった
      |                       ^~~~~~~~~~~~~~
Language: C++

////////////////////////////////////////////
///                                      ///
///         Template ver. 1 rapel        ///
/// Fear is Temporary, Regret is Forever ///
///          Must Try and Get AC         ///
///                                      ///
////////////////////////////////////////////
#include <stdio.h>
#include <iostream>
#include <sstream>
#include <iomanip>

#include <algorithm>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <utility>

#include <math.h>
#include <complex>

#include <assert.h>
#include <time.h>
//#include <chrono>
//#include <random>

#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <list>
#include <bitset>

#define FI first
#define SE second
#define MP make_pair
#define PB push_back
#define PF push_front
#define POB pop_back
#define POF pop_front
//#define endl '\n'
using namespace std;

typedef long long LL;
typedef unsigned long long ULL;

void desperate_optimization(int precision){
  	ios_base::sync_with_stdio(false);
  	cin.tie(0);
  	cout.tie(0);
  	cout.setf(ios::fixed);
  	cout.setf(ios::showpoint);
  	cout.precision(precision);
}

const int N = 10;
const LL MAXN = 1e6;
const LL MOD = 1e9 + 7;
LL arr[N + 5][N + 5];
vector<int> vec;

map<LL, LL> ms;

LL random() {
	LL res = 0;
	for(int i = 0;i < 26;i++) {
		LL u = rand() % MAXN + 1;
		if(u % 2) res = (res + u) % MOD;
		else res = (res * u) % MOD;
	}
	return res;
}

void hora(int tc) {
	srand(time(NULL));
	int n;
	cin>>n;
	for(int i = 0;i < n;i++) {
		for(int j = i + 1;j < n;j++) arr[i][j] = arr[j][i] = random();
	}
	for(int i = 0;i < n;i++) {
		for(int j = 0;j < n;j++) {
			if(j) cout<<" ";
			cout<<arr[i][j];
		}
		cout<<endl;
	}
}

int main(){
//	desperate_optimization(10);
	int ntc = 1;
	//cin>>ntc;
	for(int tc = 1;tc <= ntc;tc++) hora(tc);
	return 0;
}




Compiler output:
a.cc:65:4: error: ambiguating new declaration of 'LL random()'
   65 | LL random() {
      |    ^~~~~~
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 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:9:
/usr/include/stdlib.h:521:17: note: old declaration 'long int random()'
  521 | extern long int random (void) __THROW;
      |                 ^~~~~~
Language: C++

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

typedef long long ll;
ll adj[10][10];

ll A1[4] = {1, 2, 4, 7};
ll A2[6] = {1, 2, 4, 8, 15, 28};

int main() {
    for (int t = 0; t < 2; t++) {
        ll P = (t == 0) ? 1 : 52 * 12;
        for (int j = 1; j < 5; j++)
            adj[5 + t][5 + t + j] = P * A1[j - 1];
        int cnt = 0;
        for (int i = 1; i < 5; i++)
            for (int j = i + 1; j < 5; j++)
                adj[5 + t + i][5 + t + j] = P * 12 * A2[cnt++];
    }
    ll Q = 52 * 12 * 52 * 12;

    ll C[5];
    C[0] = 1;
    for (int i = 1; i < 5; i++)
        C[i] = 6 * C[i - 1];
    for (int i = 0; i < 5; i++)
        for (int j = 0; j < 5; j++)
            adj[i][5 + j] = Q * (C[i] * i + C[j]);
    for (int i = 0; i < 10; i++) {
        adj[i][j] = 0;
        for (int j = i + 1; j < 10; j++)
            adj[j][i] = adj[i][j];
    }
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++)
            cout << adj[i][j] << (j == n - 1) ? "\n" : " ";
        cout << "\n";
}

}


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

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define maxval ((int)(1e11))

int RAND(){
	int a = 1;
	while(a < maxval){
		a *= rand();
	}
	return a % maxval + 1;
}

int cmp(int a){
	if(a <= maxval) return a;
	else return rand();
}

signed main(){
	int N, i, j;
	srand(4)
	scanf("%lld", &N);
	vector<vector<int>> w(N, vector<int>(N, 0));
	vector<int> v(N, 0);
	while(1){
		for(i = 0; i < N; i++){
			v[i] = RAND();
		}
		int k = 0;
		for(i = 0; i < N; i++){
			for(j = i + 1; j < N; j++){
				w[i][j] = cmp(1ll << k);
				k++;
				w[j][i] = w[i][j];
			}
		}
		for(i = 0; i < N; i++){
			for(j = 0; j < N; j++){
				printf("%lld ", w[i][j]);
			}
			printf("\n");
		}
		return 0;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:17: error: expected ';' before 'scanf'
   21 |         srand(4)
      |                 ^
      |                 ;
   22 |         scanf("%lld", &N);
      |         ~~~~~
Language: C++

#include <iostream>
#include <string>
#include <set>
#include <unordered_map>
#include <vector>
#include <utility>
#include <cassert>
#include <algorithm>
#include <cstring>

using namespace std;

int primes[] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997};

int main(int argc, char *argv[]) {
  int N;
  cin >> N;
  int base = -N;
  vector<vector<int>> vmap;
  for(int i = 0; i < N; i++){
    vector<int> row;
    base += N - i;
    for(int k = 0; k < N; k++){
      if(i == k) row.push_back(0);
      if(i < k) row.push_back(primes[base + k - i] << (int)sqrt((double)i + k));
      if(i > k) row.push_back(vmap[k][i]);
    }
    vmap.push_back(row);
  }
  for(int y = 0; y < N; y++){
    for(int x = 0; x < N; x++){
      cout << vmap[y][x] << " ";
    }
    cout << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:25:60: error: 'sqrt' was not declared in this scope
   25 |       if(i < k) row.push_back(primes[base + k - i] << (int)sqrt((double)i + k));
      |                                                            ^~~~
Language: C++

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


long long dp[100010];
long long nota[100010];


long long rec(int i){
if(i==0)return 0;  
long long x=1000000007;
if(dp[i]!=-1){  
if(i==1)return dp[i]=1;
if(i>1){
dp[i]=(rec(n-1)+1+rec(n-2)+1+x)%x;
}
  return dp[i];
}
else return dp[i];  
  
}
int main(){
int n,m;

  cin >> n >> m;
for(int i=0;i<100010;i++){
cin >> nota[i];
dp[i]=0;  
}
for(int i=0;i<m;i++){
dp[nota[i]]=-1;
}
  
cout << rec(n) << endl;  
}



Compiler output:
a.cc: In function 'long long int rec(int)':
a.cc:15:12: error: 'n' was not declared in this scope
   15 | dp[i]=(rec(n-1)+1+rec(n-2)+1+x)%x;
      |            ^
Language: Java

import java.util.*;

public class Main {

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

		for (int i = 0; i < 3; i++) {
			line[i] = sc.nextInt();
		}

		int min = Integer.MAX_VALUE;

		for (int i = 0; i < args.length; i++) {
			for (int j = 0; j < args.length; j++) {
				if (i ==j) {
					continue;
				}
				min = Math.min(min, line[i] + line[j])
			}
		}

		System.out.println(min);
	}

}


Compiler output:
Main.java:20: error: ';' expected
				min = Math.min(min, line[i] + line[j])
				                                      ^
1 error
Language: C++

#include <bits/stdc++.h>
#define repr(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define reprrev(i,a,b) for(int i=b-1;i>=a;i--) // [a, b)
#define reprev(i,n) reprrev(i,0,n)

                    
using ll = long long;
using ull = unsigned long long;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
const ll mod = 1e9+7;
void chmod(ll &M){
  if(M >= mod) M %= mod;
  else if(M < 0){
     M += (abs(M)/mod + 1)*mod;
    M %= mod;
}
}
ll modpow(ll x, ll n){
   if(n==0) return 1;
  ll res=modpow(x, n/2);
 if(n%2==0) return res*res%mod;
else return res*res%mod*x%mod;
}
int getl(int i, int N) { return i==0? N-1:i-1; };
int getr(int i, int N) { return i==N-1? 0:i+1; };
long long GCD(long long a, long long b) {
  if (b == 0) return a;
  else return GCD(b, a % b);
}

using namespace std;
/* <-----------------------------------------------------------------------------------> */
/* <-----------------------------------------------------------------------------------> */
/* <-----------------------------------------------------------------------------------> */
/* <-----------------------------------------------------------------------------------> */


int main()
{
    int P, Q, R;
    cin >> P >> Q >> R;
    int max_3 = max(P, Q, R);
    cout << P + Q + R - max_3 << 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::max(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:44:20:   required from here
   44 |     int max_3 = max(P, Q, R);
      |                 ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:7:15: error: expected '(' before '{' token
    7 |     } else if {(b>=a&&b>=c)
      |               ^
      |               (
main.c:7:28: error: expected ';' before 'printf'
    7 |     } else if {(b>=a&&b>=c)
      |                            ^
      |                            ;
    8 |         printf("%d",a+c);
      |         ~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
  int P,Q,R;
  cin >> P >> Q >> R;
  if (P>=Q&&P>=R) {
      cout << Q+R << endl;
  }
  if (Q>R&&Q>P) {
      cout << P+R << endl;
  }
　else {
　    cout << P+Q << endl;
　}
}


Compiler output:
a.cc:13:1: error: extended character 　 is not valid in an identifier
   13 | 　else {
      | ^
a.cc:14:1: error: extended character 　 is not valid in an identifier
   14 | 　    cout << P+Q << endl;
      | ^
a.cc:15:1: error: extended character 　 is not valid in an identifier
   15 | 　}
      | ^
a.cc: In function 'int main()':
a.cc:13:1: error: '\U00003000else' was not declared in this scope
   13 | 　else {
      | ^~~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
	vector<int> a(3); cin >> a[0] >> a[1] >> a[2];
	sort(a.begin(), a.end());
	cout << a[0] + a[1] << '\n';
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'vector' was not declared in this scope
    5 |         vector<int> a(3); cin >> a[0] >> a[1] >> a[2];
      |         ^~~~~~
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:5:16: error: expected primary-expression before 'int'
    5 |         vector<int> a(3); cin >> a[0] >> a[1] >> a[2];
      |                ^~~
a.cc:5:34: error: 'a' was not declared in this scope
    5 |         vector<int> a(3); cin >> a[0] >> a[1] >> a[2];
      |                                  ^
a.cc:6:9: error: 'sort' was not declared in this scope; did you mean 'short'?
    6 |         sort(a.begin(), a.end());
      |         ^~~~
      |         short
Language: C++

#include <iostream>
using namespace std;
int main(){
  int p,q,r;
  cin>>p>>q>>r;
  
  cout<<min(p+q,q+r,r+p);
  
  return 0;
}

Compiler output:
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: In instantiation of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare) [with _Tp = int; _Compare = int]':
a.cc:7:12:   required from here
    7 |   cout<<min(p+q,q+r,r+p);
      |         ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:284:17: error: '__comp' cannot be used as a function
  284 |       if (__comp(__b, __a))
      |           ~~~~~~^~~~~~~~~~