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

require 'prime'

### constant

MAX_T = 30000;
MAX_SIDE = (MAX_T - 1) / 2;

### main

pnums = Prime.each(MAX_SIDE).map{|pn| pn}
#p pnums

loop do
  t = gets.to_i
  break if t == 0

  count = 0
  mina = t / 3
  maxside = (t - 1) / 2
  
  for a in pnums
    next if a < mina
    break if a > maxside
    for b in pnums
      break if b > a
      c = t - (a + b)
      if c > 0 && c <= b && Prime.prime?(c)
        #p [a, b, c]
        count += 1
      end
    end
  end

  p count
end

Compiler output:
a.cc:1:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    1 | require 'prime'
      |         ^~~~~~~
a.cc:3:1: error: stray '##' in program
    3 | ### constant
      | ^~
a.cc:3:3: error: stray '#' in program
    3 | ### constant
      |   ^
a.cc:8:1: error: stray '##' in program
    8 | ### main
      | ^~
a.cc:8:3: error: stray '#' in program
    8 | ### main
      |   ^
a.cc:11:2: error: invalid preprocessing directive #p
   11 | #p pnums
      |  ^
a.cc:28:10: error: invalid preprocessing directive #p
   28 |         #p [a, b, c]
      |          ^
a.cc:1:1: error: 'require' does not name a type
    1 | require 'prime'
      | ^~~~~~~
a.cc:6:1: error: 'MAX_SIDE' does not name a type
    6 | MAX_SIDE = (MAX_T - 1) / 2;
      | ^~~~~~~~
a.cc:8:5: error: 'main' does not name a type
    8 | ### main
      |     ^~~~
a.cc:13:1: error: 'loop' does not name a type
   13 | loop do
      | ^~~~
Language: C++

#include <iostream>
using namespace std;
int n, c, p[5000]; bool prime[30001];
int main() {
	for(int i = 2; i <= 30000; i++) prime[i] I true;
	for(int i = 2; i * i <= 30000; i++) {
		if(!prime[i]) continue;
		for(int j = i * i; j <= 30000; j += i) prime[j] = false;
	}
	for(int i = 2; i <= 30000; i++) {
		if(prime[i]) p[c++] = i;
	}
	while(cin >> n, n) {
		int ret = 0;
		for(int i = 0; i < c && p[i] < n; i++) {
			for(int j = 0; j < c && p[i] + p[j] < n; j++) {
				int w = n - p[i] - p[j];
				if(p[i] + p[j] > w && p[i] + w > p[j] && p[j] + w > p[i]) ret++;
			}
		}
		cout << ret << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:49: error: expected ';' before 'I'
    5 |         for(int i = 2; i <= 30000; i++) prime[i] I true;
      |                                                 ^~
      |                                                 ;
Language: C++

#include<iostream>
main(){int p[30001],M=30001,T,a,i,j,k;for(i=1;i*i++<M;)for(j=i+i;!p[i]&j<M;j+=i)p[j]=1;for(;std::cin>>T,T;printf("%d\n",a))for(a=0,i=2;i<T;i++)for(j=i;!p[i]&j<=(k=T-i-j);j++){if(p[j]||p[k]||i+j<=k)continue;a++}}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){int p[30001],M=30001,T,a,i,j,k;for(i=1;i*i++<M;)for(j=i+i;!p[i]&j<M;j+=i)p[j]=1;for(;std::cin>>T,T;printf("%d\n",a))for(a=0,i=2;i<T;i++)for(j=i;!p[i]&j<=(k=T-i-j);j++){if(p[j]||p[k]||i+j<=k)continue;a++}}
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:210: error: expected ';' before '}' token
    2 | main(){int p[30001],M=30001,T,a,i,j,k;for(i=1;i*i++<M;)for(j=i+i;!p[i]&j<M;j+=i)p[j]=1;for(;std::cin>>T,T;printf("%d\n",a))for(a=0,i=2;i<T;i++)for(j=i;!p[i]&j<=(k=T-i-j);j++){if(p[j]||p[k]||i+j<=k)continue;a++}}
      |                                                                                                                                                                                                                  ^
      |                                                                                                                                                                                                                  ;
Language: Java

import java.io.*;
import java.util.*;
import java.math.*;
class Main{
    public static void main(String[] args){
    BufferedReader sc=new BufferedReader(new InputStreamReader(System.in));
    try {
	while(true){
	String[] st = sc.readLine().split(" ");
	int a = Integer.valueOf(st[0]),b = Integer.valueOf(st[1]),c = Integer.valueOf(st[2]);
	if(a==-1 && b==-1 && c==-1)
		break;
	
	boolean flag = false;
	root:
	for(int i=2; i<16; i++){
		String p = Integer.toString(a, i);
		if(p.matches("[0-9]+")){
			int num = Integer.valueOf(p);
			if(num==b){
				flag = true;
				break root;
			}
		}
	}
	if(flag){
		System.out.println(min);
		continue;
	}
	int min = Integer.MAX_VALUE;
	for(int i=2; i<=16; i++){
		String p = Integer.toString(c, i);
		if(p.matches("[0-9]+")){
			int num = Integer.valueOf(p);
			if(num >= c-a+b-1)
				min = Math.min(min, num);
		}
	}
	if(min == Integer.MAX_VALUE)
	System.out.println(-1);
	else
	System.out.println(min);
	}
    }catch(Exception e){
        System.out.println("Error");
    }
    }
}

Compiler output:
Main.java:27: error: cannot find symbol
		System.out.println(min);
		                   ^
  symbol:   variable min
  location: class Main
1 error
Language: C++

#include<iostream>
#include<complex>
#include<vector>
#include<cmath>
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)   REP(i,0,n)
#define NEXT(i,n)  ((i+1)%(n))
#define mp         make_pair
#define pb         push_back
using namespace std;

typedef complex<double> P;

const double pi = acos(-1);

pair<double,double> check(double dx,double dy,double rx,double ry,double r,
			  bool &flag){
  double a=(dx*dx+dy*dy),b=-2*rx*dx-2*ry*dy,c=rx*rx+ry*ry-r*r;
  double D=b*b-4*a*c;
  if (D < 0)return mp(-1,-1);
  flag=true;
  return mp((-b-sqrt(D))/(2*a),(-b+sqrt(D))/(2*a));
}

inline P getnorm(P a){
  return a/abs(a);
}

bool isp(P a,P b,P c){
  return abs(a-c)+abs(b-c) < abs(a-b)+1e-10;
}


void getdata(vector<P> &p,vector<P> &e,vector<double> &a,bool flag){
  rep(i,p.size()){
    double r = abs(p[i]);
    double ori=arg(p[i]);
    rep(j,e.size()){
      bool cansolve=false;
      P norm=getnorm(e[NEXT(j,e.size())]-e[j]);
      pair<double,double> tmp=check(norm.real(),norm.imag(),-e[j].real(),-e[j].imag(),r,cansolve);
      if (!cansolve)continue;
      rep(k,2){
	P point=e[j]+tmp.first*norm;
	if (isp(e[j],e[NEXT(j,e.size())],point)){
	  double t = arg(point);
	  if (flag){
	    if (t <ori)t+=2*pi;
	    a.pb(t-ori);
	  }else {
	    if (ori < t)t-=2*pi;
	    a.pb(ori-t);
	  }
	}
	swap(tmp.first,tmp.second);
      }
    }
  }
}

double solve(vector<P> &p,vector<P> &e){//cx,cy=0,0
  vector<double> a;
  a.pb(2*pi);
  getdata(p,e,a,true);
  getdata(e,p,a,false);
  sort(a.begin(),a.end());
  return a[0]*180/pi;
}


main(){
  int n,m;
  while(cin>>n>>m && n){
    vector<P> e(n),p(m);
    rep(i,e.size()){
      double x,y;cin>>x>>y;e[i]=P(x,y);
    }
    rep(i,p.size()){
      double x,y;cin>>x>>y;p[i]=P(x,y);
    }
    double cx,cy;
    cin>>cx>>cy;
    P minus=P(cx,cy);
    rep(i,e.size())e[i]-=minus;
    rep(i,p.size())p[i]-=minus;
    printf("%.7lf\n",solve(p,e));
  }

}

Compiler output:
a.cc: In function 'double solve(std::vector<std::complex<double> >&, std::vector<std::complex<double> >&)':
a.cc:66:3: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   66 |   sort(a.begin(),a.end());
      |   ^~~~
      |   sqrt
a.cc: At global scope:
a.cc:71:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   71 | main(){
      | ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<cmath>
using namespace std; 
typedef long long ll;
ll prime[1000001];
ll length = 0;
void insert(ll p) { prime[length] = p; length++; return; }
int main() {
	insert(2);
	for (ll i = 3; i < 1000000; i += 2) {
		for (ll j = 0; j < length; j++)
			if (i%prime[j] == 0)goto cont;
			else if (prime[j] > sqrt(i))break;
			insert(i);
		cont:;
	}
	ll a, b;
	while (cin >> a >> b){
		if (!a && !b)return 0;
		ll am, bm, ac = 0, bc = 0;
		int i = 0;
		while (prime[i] <= a){
			if (a%prime[i] == 0) {
				am = prime[i];
				ac += [i];
			}
			i++;
		}
		ac -= am; am -= ac;
		i = 0;
		while (prime[i] <= b) {
			if (b%prime[i] == 0) {
				bm = prime[i];
				bc += prime[i];
			}
			i++;
		}
		bc -= bm; bm -= bc;
		if (am > bm)cout << "a\n";
		else cout << "b\n";
	}
}

Compiler output:
a.cc: In lambda function:
a.cc:26:42: error: expected '{' before ';' token
   26 |                                 ac += [i];
      |                                          ^
a.cc: In function 'int main()':
a.cc:26:36: error: no match for 'operator+=' (operand types are 'll' {aka 'long long int'} and 'main()::<lambda()>')
   26 |                                 ac += [i];
      |                                 ~~~^~~~~~
Language: C++

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

int rem[1000000];

void solve(int x, int y){
  int a, b;
  memset(rem, -1, sizeof(rem));
  for (int i = 0; ; i++) {
    if (rem[x] != -1) {
      if (x == 0) {
        a = i - 1; b = 0;
      } else {
        a = rem[x]; b = i - rem[x];
      }
      break;
    }
    rem[x] = i;
    x *= 10;
    x %= y;
  }
  cout << a << " " << b << endl;
}

int main(void) {
  int x, y;
  while (cin >> x >> y, x && y) {
    solve(x, y);
  }
  return 0;
}

Compiler output:
a.cc: In function 'void solve(int, int)':
a.cc:10:3: error: 'memset' was not declared in this scope
   10 |   memset(rem, -1, sizeof(rem));
      |   ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <cmath>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

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

int rem[1000000];

void solve(int x, int y){
  int a, b;
  memset(rem, -1, sizeof(rem));
  for (int i = 0; ; i++) {
    if (rem[x] != -1) {
      if (x == 0) {
        a = i - 1; b = 0;
      } else {
        a = rem[x]; b = i - rem[x];
      }
      break;
    }
    rem[x] = i;
    x *= 10;
    x %= y;
  }
  cout << a << " " << b << endl;
}

int main(void) {
  int x, y;
  while (cin >> x >> y, x && y) {
    solve(x, y);
  }
  return 0;
}

Compiler output:
a.cc: In function 'void solve(int, int)':
a.cc:10:3: error: 'memset' was not declared in this scope
   10 |   memset(rem, -1, sizeof(rem));
      |   ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <cstdlib>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

#include <fstream>
#include <iostream>
#include <string>
#include <sstream>

using namespace std;

int main(){
	int test; cin >> test;
	string s;
	string str[] = {"R1......", "R1.....", "R1....", "R1...", "R1..", "R1.", "R16..", "R16.", "R16", "R1", 
				    "R2....." , "R2...." , "R2...", "R2..", "R2.", "R2", "R32.", "R32",
			    	"R4....", "R4...", "R4..", "R4.", "R4", "R64", "R8...", "R8..", "R8.", "R8" };
	int back[] = {127, 126, 124, 120, 112, 96, 7, 6, 4, 64, 63, 62, 60, 56, 48, 32, 3, 2, 31, 30, 28, 24, 16, 1, 15, 14, 12, 8};
	static int dp[3200001][28];
	static int length[3200001];
	for(int i=0;i<28;i++) dp[0][i] = 0;
	length[0] = 0;
	for(int i=1;i<=3200001;i++){
		for(int j=0;j<28;j++) dp[i][j] = dp[i-1][j] + (j==23);
		int curLen = 0;
		for(int j=0;j<28;j++) curLen += dp[i][j]*str[j].size();
		for(int j=0;j<28;j++){
			if(i-back[j]<0) continue;
			int newLen = length[i-back[j]]+str[j].size();
			bool flag = false;
			if(newLen < curLen) flag = true;
			else if(newLen==curLen){
				for(int k=0;k<28;k++){
					if(dp[i][k] < dp[i-back[j]][k]) flag = true;
					if(dp[i][k] != dp[i-back[j]][k]) break;
				}
			}
			if(flag){
				for(int k=0;k<28;k++){
					dp[i][k] = dp[i-back[j]][k] + (k==j);
				}
				curLen = newLen;
			}
		}
		length[i] = curLen;
	}
	while(test--){
		cin >> s;
		for(int i=0;i<s.size();i++) if(s[i]=='R') s[i] = ' ';
		istringstream iss(s);
		string tmp;
		vector<string> vs;
		int len = 0;
		while(iss >> tmp){
			tmp = "R"+tmp;
			for(int i=0;i<28;i++)
				if(tmp == str[i]) len += back[i];
		}
		string ans;
		for(int i=0;i<28;i++){
			for(int j=0;j<dp[len][i];j++) ans += str[i];
		}
		cout << ans << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:17: error: 'vector' was not declared in this scope
   48 |                 vector<string> vs;
      |                 ^~~~~~
a.cc:5:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    4 | #include <sstream>
  +++ |+#include <vector>
    5 | 
a.cc:48:30: error: expected primary-expression before '>' token
   48 |                 vector<string> vs;
      |                              ^
a.cc:48:32: error: 'vs' was not declared in this scope; did you mean 's'?
   48 |                 vector<string> vs;
      |                                ^~
      |                                s
Language: C++

#include<cstdio>
#include<string>
#include<vector>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

const int INF=1<<29;

int NUM[28];
string SYM[28];

int ub;
pair< int,vector<string> > dfs(int a,int cur){
// printf("a=%d, ub=%d\n",a,ub);
	if(a==0){
		ub=min(ub,cur);
		return make_pair(0,vector<string>());
	}
	if(cur>=ub) return make_pair(INF,vector<string>());

	pair< int,vector<string> > S_opt(INF,vector<string>());
	rep(i,28) if(NUM[i]<=a) {
		pair< int,vector<string> > S=dfs(a-NUM[i],cur+SYM[i].length());
		S.first+=SYM[i].length();
		S.second.push_back(SYM[i]);
		if(S.first<S_opt.first){
			S_opt=S;
		}
// printf("%d\n",i_opt);
	}
	return S_opt;
}

int main(){
	int n=0;
	SYM[n]="R1......"; NUM[n++]=64+32+16+8+4+2+1;
	SYM[n]="R1.....";  NUM[n++]=64+32+16+8+4+2;
	SYM[n]="R1....";   NUM[n++]=64+32+16+8+4;
	SYM[n]="R1...";    NUM[n++]=64+32+16+8;
	SYM[n]="R1..";     NUM[n++]=64+32+16;
	SYM[n]="R1.";      NUM[n++]=64+32;
	SYM[n]="R16..";    NUM[n++]=4+2+1;
	SYM[n]="R16.";     NUM[n++]=4+2;
	SYM[n]="R16";      NUM[n++]=4;
	SYM[n]="R1";       NUM[n++]=64;
	SYM[n]="R2.....";  NUM[n++]=32+16+8+4+2+1;
	SYM[n]="R2....";   NUM[n++]=32+16+8+4+2;
	SYM[n]="R2...";    NUM[n++]=32+16+8+4;
	SYM[n]="R2..";     NUM[n++]=32+16+8;
	SYM[n]="R2.";      NUM[n++]=32+16;
	SYM[n]="R2";       NUM[n++]=32;
	SYM[n]="R32.";     NUM[n++]=2+1;
	SYM[n]="R32";      NUM[n++]=2;
	SYM[n]="R4....";   NUM[n++]=16+8+4+2+1;
	SYM[n]="R4...";    NUM[n++]=16+8+4+2;
	SYM[n]="R4..";     NUM[n++]=16+8+4;
	SYM[n]="R4.";      NUM[n++]=16+8;
	SYM[n]="R4";       NUM[n++]=16;
	SYM[n]="R64";      NUM[n++]=1;
	SYM[n]="R8...";    NUM[n++]=8+4+2+1;
	SYM[n]="R8..";     NUM[n++]=8+4+2;
	SYM[n]="R8.";      NUM[n++]=8+4;
	SYM[n]="R8";       NUM[n++]=8;

	int T; scanf("%d ",&T);
	while(T--){
		int sum=0;
		while(getchar()=='R'){
			int a; scanf("%d",&a);
			sum+=64/a;
		}

		int one=max(sum/64-5,0)/3*3;
		sum-=64*one;

// printf("sum=%d, one=%d\n",sum,one,0);
		ub=INF;
		vector<string> S=dfs(sum,0).second;
// printf("ub=%d, sz=%d\n",ub,S.size());
		reverse(S.begin(),S.end());

		bool b=true;
		rep(i,S.size()){
			if(b && one>0 && "R1."<S[i]){
				rep(j,one/3) printf("R1.");
				b=false;
			}
			printf("%s",S[i].c_str());
		}
		putchar('\n');
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:82:17: error: 'reverse' was not declared in this scope
   82 |                 reverse(S.begin(),S.end());
      |                 ^~~~~~~
Language: C++

// Problem E : Optimal Rest
#include <fstream>
#include <iostream>
#include <string>
#include <sstream>

using namespace std;

int main(){
	int test; cin >> test;
	string s;
	// x\»ðÅãÉRðÁ¦½êÌ«ÅSÊèðÀ×½àÌ
	string str[] = {"R1......", "R1.....", "R1....", "R1...", "R1..", "R1.", "R16..", "R16.", "R16", "R1", 
				    "R2....." , "R2...." , "R2...", "R2..", "R2.", "R2", "R32.", "R32",
			    	"R4....", "R4...", "R4..", "R4.", "R4", "R64", "R8...", "R8..", "R8.", "R8" };
	// ãÌÅx\»Ì·³ð«ºµ½àÌ
	int back[] = {127, 126, 124, 120, 112, 96, 7, 6, 4, 64, 63, 62, 60, 56, 48, 32, 3, 2, 31, 30, 28, 24, 16, 1, 15, 14, 12, 8};
	// dp[length][type] : lengthÌxð\»·é½ßÉtypeÌxð½Âg¤©
	static int dp[3200001][28];
	// length[i] : ·³iÌx\»Ég¤¶ñ·
	static int length[3200001];
	for(int i=0;i<28;i++) dp[0][i] = 0;
	length[0] = 0;
	// OÅ¦ðSÊèßÄ¨­
	for(int i=1;i<=3200001;i++){
		// ·³i-1ÉR64ðvXµ½ê
		for(int j=0;j<28;j++) dp[i][j] = dp[i-1][j] + (j==23);
		// bèÌÅZ\»Ì·³
		int curLen = 0;
		for(int j=0;j<28;j++) curLen += dp[i][j]*str[j].size();
		for(int j=0;j<28;j++){
			// jÔÚÌxÌ·³ªßÁ½É·³ª}CiXÈçcontinue
			if(i-back[j]<0) continue;
			// ·³i-back[j]Ì\»ÉjÔÚÌxð«µ½Ì·³ð²×é
			int newLen = length[i-back[j]]+str[j].size();
			bool flag = false;
			// æèZ¢ê
			if(newLen < curLen) flag = true;
			// ¯¶·³Èç«är
			else if(newLen==curLen){
				for(int k=0;k<28;k++){
					// «æªÌx\»ð½­g¤ûª«ÅOÌ\»ÉÈé
					if(dp[i][k] < dp[i-back[j]][k]) flag = true;
					if(dp[i][k] != dp[i-back[j]][k]) break;
				}
			}
			// \ÌXV
			if(flag){
				for(int k=0;k<28;k++){
					dp[i][k] = dp[i-back[j]][k] + (k==j);
				}
				curLen = newLen;
			}
		}
		length[i] = curLen;
	}
	while(test--){
		cin >> s;
		// üÍ¶ñª\»·éxÌ·³ð²×é
		for(int i=0;i<s.size();i++) if(s[i]=='R') s[i] = ' ';
		istringstream iss(s);
		string tmp;
		vector<string> vs;
		int len = 0;
		while(iss >> tmp){
			tmp = "R"+tmp;
			for(int i=0;i<28;i++)
				if(tmp == str[i]) len += back[i];
		}
		// Î·é¶ñðoÍ·é
		string ans;
		for(int i=0;i<28;i++){
			for(int j=0;j<dp[len][i];j++) ans += str[i];
		}
		cout << ans << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:63:17: error: 'vector' was not declared in this scope
   63 |                 vector<string> vs;
      |                 ^~~~~~
a.cc:6:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    5 | #include <sstream>
  +++ |+#include <vector>
    6 | 
a.cc:63:30: error: expected primary-expression before '>' token
   63 |                 vector<string> vs;
      |                              ^
a.cc:63:32: error: 'vs' was not declared in this scope; did you mean 's'?
   63 |                 vector<string> vs;
      |                                ^~
      |                                s
Language: C++

#include <cstdio>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

template <unsigned T>
bool prevSubset(bitset<T>& bs, const bitset<T>& mask)
{
    bs = bs.to_ulong() - 1ull;
    bs &= mask;
    if(bs.none())
        return false;
    return true;
}

int n, m;
vector<vector<int> > r;

vector<vector<vector<int> > > memo;

int solve(int d, int win, bitset<16> rest)
{
    if(rest.count() == 1)
        return 1;
    if(d == -1)
        return 0;

    if(memo[d][win][rest.to_ulong()] != -1)
        return memo[d][win][rest.to_ulong()];

    int ret = 0;
    bitset<16> bs1 = rest;
    while(prevSubset(bs1, rest)){
        bitset<16> bs2 = rest ^ bs1;
        if(bs1.count() > (1<<d) || bs2.count() > (1<<d))
            continue;
        if(!bs1[win])
            continue;

        for(int i=0; i<n; ++i){
            if(bs2[i] && r[win][i] == 1)
                ret += solve(d-1, win, bs1) * solve(d-1, i, bs2);
        }
    }

    return memo[d][win][rest.to_ulong()] = ret;
}

int main()
{
    for(;;){
        cin >> n >> m;
        if(n == 0)
            return 0;

        r.assign(n, vector<int>(n));
        for(int i=0; i<n; ++i){
            for(int j=0; j<n; ++j){
                cin >> r[i][j];
            }
        }

        int d = 1;
        while((1 << d) < n)
            ++ d;

        memo.assign(d, vector<vector<int> >(n, vector<int>(1<<n, -1)));
        cout << solve(d-1, m-1, (1<<n)-1) << endl;
    }
}

Compiler output:
a.cc: In function 'int solve(int, int, std::bitset<16>)':
a.cc:47:21: error: no matching function for call to 'prevSubset(std::bitset<16>&, std::bitset<16>&)'
   47 |     while(prevSubset(bs1, rest)){
      |           ~~~~~~~~~~^~~~~~~~~~~
a.cc:21:6: note: candidate: 'template<unsigned int T> bool prevSubset(std::bitset<T>&, const std::bitset<T>&)'
   21 | bool prevSubset(bitset<T>& bs, const bitset<T>& mask)
      |      ^~~~~~~~~~
a.cc:21:6: note:   template argument deduction/substitution failed:
a.cc:47:21: note:   mismatched types 'unsigned int' and 'long unsigned int'
   47 |     while(prevSubset(bs1, rest)){
      |           ~~~~~~~~~~^~~~~~~~~~~
Language: C++

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

double circle[100001][3];

double distance(i,j){
return sqrt((circle[i][0]-circle[j][0])*(circle[i][0]-circle[j][0])+(circle[i][1]-circle[j][1])*(circle[i][1]-circle[j][1]))
-circle[i][2]-circle[j][2];
}

int main(){
	int n,i,j;
double min;

while(0<=scanf("%d",&n)){
if(n==0)break;

for(i=0;i<n;i++){
scanf("%lf%lf%lf",&circle[i][2],&circle[i][1],&circle[i][0]);
}
min=distance(0,1);
for(i=0;i<n-1;i++){
for(j=i+1;j<n;j++){
if(min>distance(i,j))min=distance(i,j);
}
}
printf("%lf\n",min);
}
return 0;
}

Compiler output:
a.cc:7:17: error: 'i' was not declared in this scope
    7 | double distance(i,j){
      |                 ^
a.cc:7:19: error: 'j' was not declared in this scope; did you mean 'jn'?
    7 | double distance(i,j){
      |                   ^
      |                   jn
a.cc:7:20: error: expression list treated as compound expression in initializer [-fpermissive]
    7 | double distance(i,j){
      |                    ^
a.cc: In function 'int main()':
a.cc:22:13: error: 'distance' cannot be used as a function
   22 | min=distance(0,1);
      |     ~~~~~~~~^~~~~
a.cc:25:16: error: 'distance' cannot be used as a function
   25 | if(min>distance(i,j))min=distance(i,j);
      |        ~~~~~~~~^~~~~
a.cc:25:34: error: 'distance' cannot be used as a function
   25 | if(min>distance(i,j))min=distance(i,j);
      |                          ~~~~~~~~^~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<vector>
#include<cmath>
#define EPS 1e-10
#define F first
#define S second
#define INF 1<<29
using namespace std;

typedef pair<double,double> Pos;
typedef pair<Pos,double> P;

bool cmp_y(const P &a,const P &b){
  return a.F.S < b.F.S;
}

double rec(P *a,int n){
  if(n<=1)return INF;
  int m = n/2;
  double x = a[m].F.F;
  double r = a[m].S;
  double d = min(rec(a,m),rec(a+m,n-m));  
  inplace_merge(a,a+m,a+n,cmp_y);

  vector<P> b;
  for(int i=0;i<n;i++){
    if(a[i].F.F < x){
      if(fabs( (a[i].F.F+a[i].S)-(x-r) ) >= d)continue;
    }
    else{
      if( fabs((x+r)-(a[i].F.F+a[i].S)) >= d)continue;
    }

    for(int j=0;j<b.size();j++){
      double dx = a[i].F.F - b[b.size()-j-1].F.F;
      double dy = a[i].F.S - b[b.size()-j-1].F.S;
    
      if(a[i].F.S < b[b.size()-j-1].F.S){
	if( fabs( (b[b.size()-j-1].F.S-b[b.size()-j-1].S)-(a[i].F.S+a[i].S)     )   >= d )break;
      }
      else{
	if( fabs( (a[i].F.S-a[i].S)-(b[b.size()-j-i].F.S+b[b.size()-j-1].S)     )  >= d)break;
      } 
    
      d = min(d,sqrt(dx*dx+dy*dy)-a[i].S-b[b.size()-j-1].S);
    }
    b.push_back(a[i]);
  }
  return d;
}

int main(){
  int N;
  double R,X,Y;
 
  while(cin >> N && N){
    vector<P> p(N);
    for(int i=0;i<N;i++){
      cin >> R >> X >> Y;
      p.push_back(P(Pos(X,Y),R));
    }
    sort(p.begin(),p.end());
    printf("%.6f\n",rec(p,N));
  }
 
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:65:25: error: cannot convert 'std::vector<std::pair<std::pair<double, double>, double> >' to 'P*' {aka 'std::pair<std::pair<double, double>, double>*'}
   65 |     printf("%.6f\n",rec(p,N));
      |                         ^
      |                         |
      |                         std::vector<std::pair<std::pair<double, double>, double> >
a.cc:19:15: note:   initializing argument 1 of 'double rec(P*, int)'
   19 | double rec(P *a,int n){
      |            ~~~^
Language: C++

#include<iostream>
#include<vector>
#include<cmath>
#include<cstdio>
#include<cstdlib>

using namespace std;

const int DIFF = 2000;

struct Circle{
  double x,y,r;
  bool operator < (const Circle& c) const{
    return sqrt(x*x+y*y) < sqrt(c.x*c.x+c.y*c.y);
  }
};

double dist(const Circle& c1, const Circle& c2){
  return sqrt((c1.x-c2.x)*(c1.x-c2.x) + (c1.y-c2.y)*(c1.y-c2.y))-c1.r-c2.r;
}

int main(){
  int n;
  while(cin >> n && n){
    vector<Circle> V(n);
    for(int i = 0; i < n; i++) cin >> V[i].r >> V[i].x >> V[i].y;
    
    sort(V.begin(),V.end());

    double ans = 1e50;

    for(int i = 0; i < n; i++)
      for(int j = max(0,i-DIFF); j < min(n, i+DIFF); j++){
	if(i == j) continue;
	ans = min(ans,dist(V[i],V[j]));
      }
   
    printf("%.5f\n",ans);
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   28 |     sort(V.begin(),V.end());
      |     ^~~~
      |     sqrt
Language: C++

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

enum EVENT{ORDER, COOKED};

class Event
{
public:
	int c,t,s,id;
	EVENT e;
	
	Event(int c, int t, int s, int id, EVENT e)
	:c(c),t(t),e(e),s(s),id(id)
	{}
	
	bool operator<(const Event& a) const
	{
		if(t!=a.t) return t>a.t;
		if(e!=a.e) return e<a.e;
		if(c==a.c) return s>a.s;
		return c>a.c;
	}
};

class Order
{
public:
	int id,pt;
	Order(int id, int pt)
	:id(id),pt(pt)
	{}
	
	bool operator<(const Order& a) const
	{
		if(pt!=a.pt) return pt>a.pt;
		return id<a.id;
	}
};

int main()
{
	bool f=true;
	int M,N;
	while(cin >> M >> N, (M||N))
	{
		if(!f) cout << endl;
		f=false;
		
		int limit[20], time[20];
		map<string, int> d;
		for(int i=0; i<M; i++)
		{
			int l,t;
			string n;
			cin >> n >> l >> t;
			d[n]=i;
			
			limit[i]=l; time[i]=t;
		}
		
		priority_queue<Event> q;
		
		int order[100],cooked[100]={0},cookid=-1,cooking=0,cooktime=-1,served[100],pretime=-1;
		for(int i=0; i<N; i++)
		{
			int t,o;
			cin >> t >> o;
			order[i]=o;
			vector<Order> seq;
			for(int j=0; j<o; j++)
			{
				string n;
				cin >> n;
				seq.push_back(Order(d[n], time[d[n]]));
			}
			sort(seq.begin(), seq.end());
			for(int j=0; j<seq.size(); j++)
			{
				q.push(Event(i,t,j,seq[j].id,ORDER));
			}
		}
		while(!q.empty())
		{
			Event e=q.top(); q.pop();
			if(e.e==ORDER)
			{
				if(cookid==e.id&&cooking<limit[e.id]&&pretime==e.t||cooking==0)
				{
					int tm=e.t+time[e.id];
					pretime=e.t;
					cooktime=tm;
					cooking++;
					cookid=e.id;
					q.push(Event(e.c, tm,e.s, e.id,COOKED));
				}
				else
				{
					q.push(Event(e.c, cooktime,e.s, e.id,e.e));
					continue;
				}
			}
			else
			{
				cooking--;
				cooked[e.c]++;
				if(cooked[e.c]==order[e.c])
					served[e.c]=e.t;
			}
		}
		
		for(int i=0; i<N; i++)
			cout << served[i] << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:79:25: error: 'sort' was not declared in this scope; did you mean 'short'?
   79 |                         sort(seq.begin(), seq.end());
      |                         ^~~~
      |                         short
Language: C

#include<iostream>
#include<cmath>
#include<complex>
#include<iomanip>

using namespace std;

typedef complex<double> point;
typedef pair<point,point> line;


bool makeable(int a, int b, int c)
{
  return a+b>c && b+c>a && c+a>b;
}

inline double my_pow(int a, double b)
{
  return pow(a, b);
}

inline double vofh(int a, int b, int c, int p, int q, int r)
{
  double s = -2.0 * my_pow(a, 2) * my_pow(b, 2) * my_pow(p, 2)+2 * my_pow(a, 2) * my_pow(c, 2) * my_pow(p, 2)+2 * my_pow(b, 2) * my_pow(c, 2) * my_pow(p, 2)-2 * my_pow(c, 4) * my_pow(p, 2)-2 * my_pow(c, 2) * my_pow(p, 4)+2 * my_pow(a, 2) * my_pow(b, 2) * my_pow(q, 2)-2 * my_pow(b, 4) * my_pow(q, 2)-2 * my_pow(a, 2) * my_pow(c, 2) * my_pow(q, 2)+2 * my_pow(b, 2) * my_pow(c, 2) * my_pow(q, 2)+2 * my_pow(b, 2) * my_pow(p, 2) * my_pow(q, 2)+2 * my_pow(c, 2) * my_pow(p, 2) * my_pow(q, 2)-2 * my_pow(b, 2) * my_pow(q, 4)-2 * my_pow(a, 4) * my_pow(r, 2)+2 * my_pow(a, 2) * my_pow(b, 2) * my_pow(r, 2)+2 * my_pow(a, 2) * my_pow(c, 2) * my_pow(r, 2)-2 * my_pow(b, 2) * my_pow(c, 2) * my_pow(r, 2)+2 * my_pow(a, 2) * my_pow(p, 2) * my_pow(r, 2)+2 * my_pow(c, 2) * my_pow(p, 2) * my_pow(r, 2)+2 * my_pow(a, 2) * my_pow(q, 2) * my_pow(r, 2)+2 * my_pow(b, 2) * my_pow(q, 2) * my_pow(r, 2)-2 * my_pow(p, 2) * my_pow(q, 2) * my_pow(r, 2)-2 * my_pow(a, 2) * my_pow(r, 4);
  return sqrt(s / 288);
}

const double pi = 2*acos(0.0);

int main()
{
  int N;
  while(cin>>N)
  {
    double res = 0;
    if( N == 0 ) break;
    int a[N];

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

    int comb = (1<<3) - 1;
    while(comb<(1<<N)){
      int x = comb & -comb;
      int y = comb + x;
      comb = ((comb & ~y) / x >> 1 ) | y;
      
      int cnt = 0;
      int e[3];
      bool used[N];
      for(int b = 0; b < N; ++b){
        if( comb & (1<<b) ){
          e[cnt++] = a[b];
          used[b] = true;
        }else{
          used[b] = false;
        }
      }
      
      if( makeable( e[0], e[1], e[2] ) ){
        for(int i = 0; i < N; ++i){
          for(int j = i+1; j < N; ++j){
            if( !used[i] && !used[j] ){
              
              for(int k = 0; k < 3; ++k){
                int f0 = e[k];
                int f1 = e[(k+1)%3];
                int f2 = e[(k+2)%3];
                
                if( a[i] + a[j] > f0 ){
                  double f = f1;
                  double h = a[i];
                  
                  for(int l = 0; l < N; ++l){
                    if( l != i && l != j && !used[l] ){
                      int x = a[l];
                      double theta = acos((x*x - f*f - h*h)/(2.*f*h));
                      if( 0 < theta  && theta < pi ){
                        res = max(res , vofh(f0,f1,f2,a[i],a[j],a[l]));
                      }
                    }
                  }
                }

              }

            }
          }
        }
      }
      
    }

    cout << fixed << setprecision(11) << res << endl;

    
  }
  return 0;
}

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

#include <algorithm>
#include<string>
#include<set>
#include<vector>
#include <sstream>
#include <cmath>
#include <cstdio>
#include<cassert>

using namespace std;

typedef long double ld;

ld circumscribed_sphere(ld a,ld b,ld c,ld x,ld y,ld z){
#define sqr(x) ((x)*(x))
  ld tv=sqr(a*x)*(sqr(b)+sqr(c)-sqr(a)+sqr(y)+sqr(z)-sqr(x))
    +sqr(b*y)*(sqr(c)+sqr(a)-sqr(b)+sqr(z)+sqr(x)-sqr(y))
    +sqr(c*z)*(sqr(a)+sqr(b)-sqr(c)+sqr(x)+sqr(y)-sqr(z))
    -sqr(a*y*z)-sqr(b*z*x)-sqr(c*x*y)-sqr(a*b*c);
  ld res=sqrt(tv/144.0);
  if(res!=res)return -1;
  return res;
#undef sqr
}

int main(void){

  int N;
  while(cin >> N,N){
    vector<ld>a(N);
    for(int i=0;i<N;i++)cin >> a[i];
    sort(a.begin(),a.end(),greater<ld>());
    ld ans=-1;
    for(int i=0;i<N;i++){
      vector<ld>b;
      for(int j=0;j<6;j++)b.push_back(a[i+j]);
      sort(b.begin(),b.end());
      do{
        ld res=circumscribed_sphere(b[0],b[1],b[2],b[3],b[4],b[5]);
        ans=max(ans,res);
      }while(next_permutation(b.begin(),b.end()));
      if(ans>0)break;
    }

    assert(ans>0);
    printf("%.6Lf\n",ans);

  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:9: error: 'cin' was not declared in this scope
   29 |   while(cin >> N,N){
      |         ^~~
a.cc:9:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    8 | #include<cassert>
  +++ |+#include <iostream>
    9 |
Language: C++

#include <algorithm>
#include<string>
#include<set>
#include<vector>
#include <sstream>
#include <cmath>
#include <cstdio>
#include<cassert>

using namespace std;

typedef long double ld;

ld circumscribed_sphere(ld a,ld b,ld c,ld x,ld y,ld z){
#define sqr(x) ((x)*(x))
  ld tv=sqr(a*x)*(sqr(b)+sqr(c)-sqr(a)+sqr(y)+sqr(z)-sqr(x))
    +sqr(b*y)*(sqr(c)+sqr(a)-sqr(b)+sqr(z)+sqr(x)-sqr(y))
    +sqr(c*z)*(sqr(a)+sqr(b)-sqr(c)+sqr(x)+sqr(y)-sqr(z))
    -sqr(a*y*z)-sqr(b*z*x)-sqr(c*x*y)-sqr(a*b*c);
  ld res=sqrt(tv/144.0);
  if(res!=res)return -1;
  return res;
#undef sqr
}

int main(void){

  int N;
  while(cin >> N,N){
    vector<ld>a(N);
    for(int i=0;i<N;i++)cin >> a[i];
    sort(a.begin(),a.end(),greater<int>());
    ld ans=-1;
    for(int i=0;i<N;i++){
      vector<ld>b;
      for(int j=0;j<6;j++)b.push_back(a[i+j]);
      sort(b.begin(),b.end());
      do{
        ld res=circumscribed_sphere(b[0],b[1],b[2],b[3],b[4],b[5]);
        ans=max(ans,res);
      }while(next_permutation(b.begin(),b.end()));
      if(ans>0)break;
    }

    assert(ans>0);
    printf("%.6Lf\n",ans);

  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:9: error: 'cin' was not declared in this scope
   29 |   while(cin >> N,N){
      |         ^~~
a.cc:9:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    8 | #include<cassert>
  +++ |+#include <iostream>
    9 |
Language: C++

#include <cstdio>
#include <string>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;

typedef vector<int> lang;
vector<lang> people;

int N,M,L;
bool v[30][30];

bool check(vector<int> ret)
{
	for(int i=0; i<people.size(); i++)
	{
		bool g=false;
		for(int j=0; j<people[i].size(); j++)
		for(int k=0; k<ret.size(); k++)
		{
			if(people[i][j]==ret[k]) g=true;
		}
		
		if(!g) return false;
	}
	for(int i=0; i<ret.size(); i++)
	for(int j=i+1; j<ret.size(); j++)
	{
		if(!v[ret[i]][ret[j]]) return false;
	}
	return true;
}

bool conb(int p, int l, int pv, vector<int>& ret)
{
	if(p==l) 
	{
		if(check(ret)) return true;
		return false;
	}
	for(int i=pv+1; i<=N; i++)
	{
		ret.push_back(i);
		if(conb(p+1,l,i,ret)) return true;
		ret.pop_back();
	}
	return false;
}


int main()
{
	bool f=true;
	while(scanf("%d%d",&N,&M),(N||M))
	{
		if(!f) puts("");
		f=false; 
		memset(v,0,sizeof(v));
		people.clear();
		
		map<string, int> d;
		map<int, string> rd;
		for(int i=0; i<N; i++)
		{
			char buf[30];
			scanf("%s", buf);
			d.insert(make_pair(string(buf), i));
			rd.insert(make_pair(i, string(buf)));
		}
		
		
		vector<lang> People;
		while(M--)
		{
			lang per;
			scanf("%d", &L);
			while(L--)
			{
				char buf[30];
				scanf("%s", buf);
				map<string, int>::iterator it=d.find(string(buf));
				per.push_back(it->second);
			}
			people.push_back(per);
		}
		vector<int> ret;
		
		for(int i=0; i<people.size(); i++)
		{
			for(int j=0; j<people[i].size(); j++)
			for(int k=j+1; k<people[i].size(); k++)
			{
				v[people[i][j]][people[i][k]]=1;
				v[people[i][k]][people[i][j]]=1;
			}
		}
		
		for(int i=1; i<=5; i++)
		{
			if(conb(0,i,-1,ret)) break;
			ret.clear();
		}
		
		if(ret.empty()) puts("Impossible");
		else
		{
			vector<string> ans;
			map<int, string>::iterator it;
			for(int i=0; i<ret.size(); i++)
			{
				it=rd.find(ret[i]);
				ans.push_back(it->second);
			}
			
			sort(ans.begin(), ans.end());
			
			printf("%d\n", ans.size());
			for(int i=0; i<ans.size(); i++)
			{
				puts(ans[i].c_str());
			}
		}
	
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:59:17: error: 'memset' was not declared in this scope
   59 |                 memset(v,0,sizeof(v));
      |                 ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include <algorithm>
  +++ |+#include <cstring>
    6 | using namespace std;
Language: C++

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

typedef pair<int,int> P;

int n, ans;
int t[1002];
vector<P> g[1002];
map<string,int> name;
bool used[1002], loop[1002];

int getId(string s){
  if(name.find(s) != name.end()){
    return name[s];
  }
  int size = name.size();
  return name[s] = size;
}

void solve(){
  memset(used, 0, sizeof(used));

  for(int i = 0; i < n; i++){
    if(used[i]) continue;

    memset(loop, 0, sizeof(loop));

    int id = i;
    bool flg = true;

    while(!loop[id]){
      if(used[id]){
	flg = false;
	break;
      }

      loop[id] = true;
      used[id] = true;
      id = g[id][0].first;
    }
    if(!flg) continue;

    int start = id;
    int minId = start;

    id = g[start][0].first;

    while(id != start){
      if(t[minId] - g[minId][0].second > t[id] - g[id][0].second){
	minId = id;
      }
      id = g[id][0].first;
    }

    ans += t[minId] - g[minId][0].second;
  }

  cout << ans << endl;
}

int main(){
  while(cin >> n, n){
    ans = 0;
    name.clear();

    for(int i = 0; i < 1002; i++){
      g[i].clear();
    }

    for(int i = 0; i < n; i++){
      string FROM, TO;
      int a, b;
      cin >> FROM >> a >> TO >> b;

      int from = getId(FROM);
      int to = getId(TO);
      t[from] = a;
      g[from].push_back(P(to, b));
      ans += b;
    }

    solve();
  }
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:24:3: error: 'memset' was not declared in this scope
   24 |   memset(used, 0, sizeof(used));
      |   ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include <climits>
  +++ |+#include <cstring>
    5 | using namespace std;
Language: C++

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

using namespace std;

#define MAX_N 50
#define MAX 50001
#define INF 1e9
int n, c[MAX_N];

int getNum(){
  int cost[MAX];

  memset(cost,0,sizeof(cost));
  cost[0] = 1;
  for(int i = 0 ; i < n ; i++){
    for(int j = 0 ; j < MAX-c[i] ; j++){
      cost[c[i]+j] += cost[j];
    }
  }

  for(int i = 0 ; i < MAX ; i++){
    if(cost[i] == 0){
      return 1;
    }
  }

  fill(cost,cost+MAX,INF);
  cost[0] = 0;
  for(int i = 0 ; i < n ; i++){
    for(int j = c[i] ; j < MAX ; j++){
      cost[j] = min(cost[j], cost[j-c[i]]+ 1);
    }
  }

  int s = MAX-1;
  for(int i = s ; i >= 1 ; i--){
    int rem = i, cnt = 0;
    for(int j = n-1 ; j >= 0 ; j--){
      if(rem >= c[j]){
        cnt += rem / c[j];
        rem %= c[j];
      }
    }
    if(cost[i] != cnt){
      return 2;
    }
  }

  return 3;
}

int main(){
  int Tc = 1;

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

    int num = getNum();

    printf("Case #%d: " ,Tc++);
    if(num == 1){
      puts("Cannot pay some amount");
    }else if(num == 2){
      puts("Cannot use greedy algorithm");
    }else{
      puts("OK");
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int getNum()':
a.cc:15:3: error: 'memset' was not declared in this scope
   15 |   memset(cost,0,sizeof(cost));
      |   ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <algorithm>
  +++ |+#include <cstring>
    4 |
Language: C++

#include<iostream>

using namespace std;

bool cangGreedy(int c[1001]){
	int len=c.size();

	for(int i=len-1;i>0;i--;){
		for(int j=i-1;j>=0;j--){
			if(c[i]%c[j]!=0)return false;
		}
	}
	return true;
}


int main(){
	int c[1001];
	int Time=0;
	whwile(1){
		Time++;
		cin>>n;
		if(n==0)return 0;

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

		cout<<"Case #"<<Time<<": ";
		if(cantGreedy(c)){
			cout<<"Cannot use greedy algorithm"<<endl;
		}
		else if(c[0]!=0){
			cout<<"Cannot pay some amount"<<endl;
		}
		else{
			cout<<"OK"<<endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'bool cangGreedy(int*)':
a.cc:6:19: error: request for member 'size' in 'c', which is of non-class type 'int*'
    6 |         int len=c.size();
      |                   ^~~~
a.cc:8:32: error: expected ')' before ';' token
    8 |         for(int i=len-1;i>0;i--;){
      |            ~                   ^
      |                                )
a.cc:8:33: error: expected primary-expression before ')' token
    8 |         for(int i=len-1;i>0;i--;){
      |                                 ^
a.cc: In function 'int main()':
a.cc:20:9: error: 'whwile' was not declared in this scope
   20 |         whwile(1){
      |         ^~~~~~
Language: C++

#include<iostream>
#include<string>


using namespace std;

bool cangGreedy(int c[1001]){
	int len=c.size();

	for(int i=len-1;i>0;i--){
		for(int j=i-1;j>=0;j--){
			if(c[i]%c[j]!=0)return false;
		}
	}
	return true;
}


int main(){
	int c[1001];
	int Time=0;
	whwile(1){
		Time++;
		cin>>n;
		if(n==0)return 0;

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

		cout<<"Case #"<<Time<<": ";
		if(cantGreedy(c)){
			cout<<"Cannot use greedy algorithm"<<endl;
		}
		else if(c[0]!=0){
			cout<<"Cannot pay some amount"<<endl;
		}
		else{
			cout<<"OK"<<endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'bool cangGreedy(int*)':
a.cc:8:19: error: request for member 'size' in 'c', which is of non-class type 'int*'
    8 |         int len=c.size();
      |                   ^~~~
a.cc: In function 'int main()':
a.cc:22:9: error: 'whwile' was not declared in this scope
   22 |         whwile(1){
      |         ^~~~~~
Language: C++

#include<iostream>
#include<string>
#include<cstring>
#include<cstdlib>

using namespace std;

bool cangGreedy(int c[1001]){
	int len=c.size();

	for(int i=len-1;i>0;i--){
		for(int j=i-1;j>=0;j--){
			if(c[i]%c[j]!=0)return false;
		}
	}
	return true;
}


int main(){
	int c[1001];
	int n;
	int Time=0;
	while(1){
		Time++;
		cin>>n;
		if(n==0)return 0;

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

		cout<<"Case #"<<Time<<": ";
		if(cantGreedy(c)){
			cout<<"Cannot use greedy algorithm"<<endl;
		}
		else if(c[0]!=0){
			cout<<"Cannot pay some amount"<<endl;
		}
		else{
			cout<<"OK"<<endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'bool cangGreedy(int*)':
a.cc:9:19: error: request for member 'size' in 'c', which is of non-class type 'int*'
    9 |         int len=c.size();
      |                   ^~~~
a.cc: In function 'int main()':
a.cc:34:20: error: 'cantGreedy' was not declared in this scope; did you mean 'cangGreedy'?
   34 |                 if(cantGreedy(c)){
      |                    ^~~~~~~~~~
      |                    cangGreedy
Language: C++

import java.util.Scanner;
import java.math.BigDecimal;

public class Main{
    BigDecimal mx = new BigDecimal(9999);
    BigDecimal mn = new BigDecimal(1);
    int l;
    Main(){
	Scanner sc = new Scanner(System.in);

	while(sc.hasNext()){
	    String str = sc.next(), s1, s2;
	    char[] ch = str.toCharArray();
	    l = 0;
	    s1 = s2 = "";
	    while(!func(ch[l])){
		s1 += String.valueOf(ch[l++]);
	    }
	    if(s1.length() == 0){
		s1 = "0";
	    }
	    boolean f = true;
	    while(true){
		char c = ch[l++];
		if(comp(s1)){
		    System.out.println("E");
		    break;
		} 
		if(c == '='){
		    if(f){
			System.out.println("E");
		    } else {
			System.out.println(s1);
		    }
		    break;
		}

		while(!func(ch[l])){
		    s2 += String.valueOf(ch[l++]);
		}
		if(s2.length() == 0){
		    s2 = "0";
		}
		/*
		if(c == '+' && ch[l] == '*'){
		    s2 = calc2(s2, ch);
		}
		*/
		s1 = calc(s1, s2, c);
		s2 = "";
		f = false;
	    }
	}
    }

    boolean func(char w){
	if(w >= '0' && w <= '9'){
	    return false;
	}
	return true;
    }

    boolean comp(String str){
	BigDecimal r = new BigDecimal(str);
	if(r.compareTo(mx) == 1 || r.compareTo(mn) == -1){
	    return true;
	}

	return false;
    }

    String calc(String s1, String s2, char c){
	BigDecimal n = new BigDecimal(s1);
	BigDecimal m = new BigDecimal(s2);
	if(c == '+'){
	    n = n.add(m);
	} else if(c == '-'){
	    n = n.subtract(m);
	} else if(c == '*'){
	    n = n.multiply(m);
	}

	return n.toString();
    }

    String calc2(String str, char[] ch){
	String s1 = str, s2 = "";

	while(ch[l] == '*'){
	    l++;
	    while(!func(ch[l])){
		s2 += String.valueOf(ch[l++]);
	    }
	    if(s2.length() == 0){
		s2 = "0";
	    }
	    s1 = calc(s1, s2, '*');
	    s2 = "";
	}

	return s1;
    }

    public static void main(String[] args){
	new Main();
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.math.BigDecimal;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Main{
      | ^~~~~~
Language: C++

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

#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define rep(i, n) FOR(i, 0, n)

#define debug(x) cout << #x << " is " << x << endl;

using namespace std;

typedef pair<int, int> P;

const int INF = 1 << 29;

struct edge{
	int to, cap, rev;
	edge(int t, int c, int r):to(t), cap(c), rev(r){}
};

const int N = 101;
vector<vector<edge> > G;
int visit[N];

void add_edge(int from, int to, int cap){
	G[from].push_back(edge(to, cap, G[to].size()));
	G[to].push_back(edge(from, 0, G[from].size()-1));
}

int dfs(int s, int g, int f){
	if(s == g) return f;
	visit[s] = 1;
	rep(i, G[s].size()){
		if(visit[G[s][i].to] || G[s][i].cap <= 0) continue;
		int d = dfs(G[s][i].to, g, min(f, G[s][i].cap));
		if(d > 0){
			G[s][i].cap -= d;
			G[G[s][i].to][G[s][i].rev].cap += d;
			return d;
		}
	}
	return 0;
}

int ford_fulkerson(int s, int g){
	int flow = 0;
	while(1){
		memset(visit, 0, sizeof(visit));
		int f = dfs(s, g, INF);
		if(f == 0) return flow;
		flow += f;
	}
}

int v[N];
int dist[N][N];
int main(){
	int n, m, l;
	while(cin >> n >> m >> l){
		rep(i, n) rep(j, n) dist[i][j] = INF;
		rep(i, m){
			int a, b, d;
			cin >> a >> b >> d;
			a--, b--;
			dist[a][b] = dist[b][a] = d;
		}
		rep(i, n) rep(j, n) rep(k, n) dist[j][k] = min(dist[j][k], dist[j][i]+dist[i][k]);

		//rep(i, n){
		//	rep(j, n) cout << dist[i][j] << ' ';
		//	cout << endl;
		//}cout << endl;

		G.clear();
		G.resize(2*n+2);
		int s = 2*n, g = 2*n+1;
		rep(i, n){
			int p;
			cin >> p;
			add_edge(s, i, p);
		}
		rep(i, n){
			int k;
			cin >> k;
			add_edge(n+i, g, k);
		}
		rep(i, n) rep(j, n){
			if(i == j || dist[i][j] < l){
				add_edge(i, j+n, INF);
			}
		}
		cout << ford_fulkerson(s, g) << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int ford_fulkerson(int, int)':
a.cc:49:17: error: 'memset' was not declared in this scope
   49 |                 memset(visit, 0, sizeof(visit));
      |                 ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include <map>
  +++ |+#include <cstring>
    5 |
Language: C

char c[1<<17],n;main(f,i){for(gets(c);gets(c);puts(f?"Yes":"No"))for(f=i=1;c[++i];)c[i]==c[i-1]&&f=0;}

Compiler output:
main.c:1:17: error: return type defaults to 'int' [-Wimplicit-int]
    1 | char c[1<<17],n;main(f,i){for(gets(c);gets(c);puts(f?"Yes":"No"))for(f=i=1;c[++i];)c[i]==c[i-1]&&f=0;}
      |                 ^~~~
main.c: In function 'main':
main.c:1:17: error: type of 'f' defaults to 'int' [-Wimplicit-int]
main.c:1:17: error: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:1:31: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
    1 | char c[1<<17],n;main(f,i){for(gets(c);gets(c);puts(f?"Yes":"No"))for(f=i=1;c[++i];)c[i]==c[i-1]&&f=0;}
      |                               ^~~~
main.c:1:47: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
    1 | char c[1<<17],n;main(f,i){for(gets(c);gets(c);puts(f?"Yes":"No"))for(f=i=1;c[++i];)c[i]==c[i-1]&&f=0;}
      |                                               ^~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'puts'
  +++ |+#include <stdio.h>
    1 | char c[1<<17],n;main(f,i){for(gets(c);gets(c);puts(f?"Yes":"No"))for(f=i=1;c[++i];)c[i]==c[i-1]&&f=0;}
main.c:1:99: error: lvalue required as left operand of assignment
    1 | char c[1<<17],n;main(f,i){for(gets(c);gets(c);puts(f?"Yes":"No"))for(f=i=1;c[++i];)c[i]==c[i-1]&&f=0;}
      |                                                                                                   ^
Language: C++

#include <bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
main(){
	int n;
	cin>>n;
	while(n--){
		string s;
		cin>>s;
		int f=0;
		r(i,s.size()-1)if(s[i]==s[i+1])f++;
		cout<<f?"No":"Yes"<<endl;
	}
}

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:12:35: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<'
   12 |                 cout<<f?"No":"Yes"<<endl;
      |                              ~~~~~^~~~~~