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

#include <iostream>
#include <cstdio>
#include <cassert>
#include <cstring>
#include <vector>
#include <valarray>
#include <array>
#include <queue>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <cmath>
#include <complex>
#include <random>

using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;

const ll MD = 1e9+7;

int n;
string st;


P expr(int &s);

P numb(int &s) {
//    printf("numb %d\n", s);
    while (isdigit(st[s])) s++;
    return P(1, 1);
}

P fact(int &s) {
//    printf("fact %d\n", s);
    P a;
    switch (st[s]) {
    case 'x':
        s++;
        a = numb(s);
        break;
    case '~':
        s++;
        a = fact(s);
        swap(a.first, a.second);
        break;
    case '(':
        s++;
        a = expr(s);
        s++;
        break;
    }
    return a;
}

P term(int &s) {
//    printf("term %d\n", s);
    P p = P(0, 1);
    while (true) {
        P d = fact(s);
//        printf("term_res %lld %lld\n", d.first, d.second);
        p.first = (p.first+p.second)*(d.first+d.second);
        p.first -= p.second*d.second;
        p.first = (p.first % MD + MD) % MD;
        p.second *= d.second;
        p.second %= MD;
        if (s >= n) break;
        if (st[s] != '&') break;
        s++;
    }
    return p;
}

P expr(int &s) {
//    printf("expr %d\n", s);
    P p = P(1, 0);
    while (true) {
        P d = term(s);
        p.second = (p.first+p.second) * (d.first+d.second);
        p.second -= p.first * d.first;
        p.second = (p.second % MD + MD) % MD;
        p.first *= d.first;
        p.first %= MD;
        if (s >= n) break;
        if (st[s] != '|') break;
        s++;
    }
    return p;
}


void main2() {
    cin >> st;
    n = st.size();
    int s = 0;
    cout << expr(s).second << endl;
}

/*stack size???????????????*/
int main() {
    const int SZ = 128*1024*1024;
    static ll eord, enew;
    void *p = malloc(SZ);
    enew = (long long)p + SZ - 1;

    __asm__("mov %rsp, eorg");
    __asm__("mov enew, %rsp");

    main2();

    __asm__("mov eorg, %rsp");
}

Compiler output:
/usr/bin/ld: /tmp/ccxbtkZV.o: relocation R_X86_64_32S against undefined symbol `eorg' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <cstdio>
#include <cassert>
#include <cstring>
#include <vector>
#include <valarray>
#include <array>
#include <queue>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <cmath>
#include <complex>
#include <random>

using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;

const ll MD = 1e9+7;

int n;
string st;


P expr(int &s);

P numb(int &s) {
//    printf("numb %d\n", s);
    while (isdigit(st[s])) s++;
    return P(1, 1);
}

P fact(int &s) {
//    printf("fact %d\n", s);
    P a;
    switch (st[s]) {
    case 'x':
        s++;
        a = numb(s);
        break;
    case '~':
        s++;
        a = fact(s);
        swap(a.first, a.second);
        break;
    case '(':
        s++;
        a = expr(s);
        s++;
        break;
    }
    return a;
}

P term(int &s) {
//    printf("term %d\n", s);
    P p = P(0, 1);
    while (true) {
        P d = fact(s);
//        printf("term_res %lld %lld\n", d.first, d.second);
        p.first = (p.first+p.second)*(d.first+d.second);
        p.first -= p.second*d.second;
        p.first = (p.first % MD + MD) % MD;
        p.second *= d.second;
        p.second %= MD;
        if (s >= n) break;
        if (st[s] != '&') break;
        s++;
    }
    return p;
}

P expr(int &s) {
//    printf("expr %d\n", s);
    P p = P(1, 0);
    while (true) {
        P d = term(s);
        p.second = (p.first+p.second) * (d.first+d.second);
        p.second -= p.first * d.first;
        p.second = (p.second % MD + MD) % MD;
        p.first *= d.first;
        p.first %= MD;
        if (s >= n) break;
        if (st[s] != '|') break;
        s++;
    }
    return p;
}


void main2() {
    cin >> st;
    n = st.size();
    int s = 0;
    cout << expr(s).second << endl;
}

/*stack size???????????????*/
int main() {
    const int SZ = 128*1024*1024;
    static ll eord, enew;
    void *p = malloc(SZ);
    enew = (long long)p + SZ - 1;

    __asm__("mov %rsp, eord");
    __asm__("mov enew, %rsp");

    main2();

    __asm__("mov eord, %rsp");
}

Compiler output:
/usr/bin/ld: /tmp/cceeoNk9.o: relocation R_X86_64_32S against undefined symbol `eord' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
Language: C++

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

typedef long long ll;
typedef pair<ll, ll> TF;

const ll MOD = 1000000007;

string expr;
int p;

TF expression();
TF term();
TF factor();

void parseInt()
{
	while(isdigit(expr[p])) p++;
}

TF not(TF a)
{
	return make_pair(a.second, a.first);
}

TF and(TF a, TF b)
{
	ll x = a.first * b.first % MOD;
	ll y = a.first * b.second % MOD;
	ll z = a.second * b.first % MOD;
	ll zz = a.second * a.second % MOD;
	ll zzz = ( y + z + zz ) %MOD;

	return make_pair(x, zzz);
}

TF or(TF a, TF b)
{
	ll x = a.first * b.first % MOD;
	ll y = a.first * b.second % MOD;
	ll z = a.second * b.first % MOD;
	ll zz = a.second * a.second % MOD;
	ll zzz = ( x + y + z ) %MOD;

	return make_pair(zzz, zz);
}

TF Variable()
{
	p++;
	parseInt();

	return make_pair(1,1);
}

TF expression()
{
	TF a = term();
	while(expr[p] == '|') {
		p++;

		TF b = term();
		a = or(a,b);
	}

	return a;
}

TF term()
{
	TF a = factor();
	while(expr[p] == '&') {
		p++;

		TF b = factor();
		a = and(a,b);
	}

	return a;
}

TF factor()
{
	if(expr[p]=='x') {
		return Variable();
	}
	else if(expr[p]=='~') {
		p++;
		return not(factor());
	}

	p++;
	TF res = expression();
	p++;

	return res;
}

int main()
{
	cin >> expr;

		expr+='$';
		p = 0;

		cout << expression().first << endl;
	
}

Compiler output:
a.cc:22:4: error: expected unqualified-id before 'not' token
   22 | TF not(TF a)
      |    ^~~
a.cc:27:10: error: expected ')' before 'a'
   27 | TF and(TF a, TF b)
      |       ~  ^~
      |          )
a.cc:38:4: error: expected unqualified-id before 'or' token
   38 | TF or(TF a, TF b)
      |    ^~
a.cc: In function 'TF expression()':
a.cc:64:21: error: expected primary-expression before 'or' token
   64 |                 a = or(a,b);
      |                     ^~
a.cc: In function 'TF term()':
a.cc:77:24: error: expected identifier before '(' token
   77 |                 a = and(a,b);
      |                        ^
a.cc: In function 'TF factor()':
a.cc:90:24: error: no match for 'operator!' (operand type is 'TF' {aka 'std::pair<long long int, long long int>'})
   90 |                 return not(factor());
      |                        ^~~~~~~~~~~~~
a.cc:90:24: note: candidate: 'operator!(bool)' (built-in)
a.cc:90:24: note:   no known conversion for argument 1 from 'TF' {aka 'std::pair<long long int, long long int>'} to 'bool'
Language: Java

import java.util.*;

public class Main {
	int n, k, max;
	int[] c;
	StringBuffer a, b;
	
	
	void loop(int id, int br, int kk){
		if(kk==k+1) return;
		if(id==n){
			int ans = 0;
			int ten = 1;
			for(int i=0;i<n;i++){
				ans += c[i]*ten;
				ten *= 10;
			}
			max = Math.max(max, ans);
			return;
		}
		
		int p = a.charAt(id) - b.charAt(id) - br;
		if(p>=0){
			c[id] = p;
			loop(id+1,0,kk);
		}else{
			c[id] = p+10;
			loop(id+1,1,kk);
			loop(id+1,0,kk+1);
		}
	}
	
	void run(){
		Scanner sc = new Scanner(System.in);
		
		a = new StringBuffer(sc.next()).reverse();
		b = new StringBuffer(sc.next()).reverse();
		k = sc.nextInt();
		n = a.length();
		int dif = n-b.length();
		for(int i=0;i<dif;i++) b.append(0);
		max = 0;
		c = new int[n];
		loop(0,0,0);
		System.out.println(max);
	}
	
	public static void main(String[] args) {
		new Main.run();
	}

}

Compiler output:
Main.java:49: error: cannot find symbol
		new Main.run();
		        ^
  symbol:   class run
  location: class Main
1 error
Language: C

#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<algorithm>
#define pb push_back
#define all(c) c.begin(),c.end()
#define uni(c) c.erase(unique(all(c)),c.end())
using namespace std;
int a,b;
int ret(int bow,int now,int k){
	int ans=0;
	int x=(int)a/(int)now,y=b/now;
	//cout<<now<<endl;
	if(!(x||y)){
		return 0;
	}
	x%=10,y%=10;
	//cout<<"  "<<x<<"   "<<y<<endl;
	
	if(x-bow>=y){
		ans=max(ans,ret(0,now*10,k)*10+x-bow-y);
	}else{
		if(k)
		ans=max(ans,ret(0,now*10,k-1)*10+x-bow-y+10);
		ans=max(ans,ret(1,now*10,k)*10+x-bow-y+10);
	}
	return ans;
}
int main(){
	int n;
	while(cin>>a>>b>>n){
		cout<<ret(0,1,n)<<endl;
		//bow,now,k
	}
	return 0;
}

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

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

int K;

int solve(const vector<int>& A, const vector<int>& B, vector<int> C, int i, int k, int borrow)
{
  int ret = 0;
  if (i >= C.size()) {
    reverse(C.begin(), C.end());
    for (i = 0; i < 10; ++i) {
      ret *= 10;
      ret += C[i];
    }
    return ret;
  }

  if (A[i] - borrow >= B[i]) {
    C[i] = A[i] - borrow - B[i];
    ret = max(ret, solve(A, B, C, i+1, k, 0));
  } else {
    C[i] = A[i] - borrow + 10 - B[i];
    if (k < K)
      ret = max(ret, solve(A, B, C, i+1, k+1, 0));
    ret = max(ret, solve(A, B, C, i+1, k, 1));
  }
  return ret;
}

int main()
{
  string A, B;
  while (cin >> A >> B >> K) {
    vector<int> AA(10, 0), BB(10, 0), C(10, 0);
    for (int i = 0; i < A.size(); ++i)
      AA[i] = A[A.size()-i-1] - '0';
    for (int i = 0; i < B.size(); ++i)
      BB[i] = B[B.size()-i-1] - '0';

    cout << solve(AA, BB, C, 0, 0, 0) << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int solve(const std::vector<int>&, const std::vector<int>&, std::vector<int>, int, int, int)':
a.cc:12:5: error: 'reverse' was not declared in this scope
   12 |     reverse(C.begin(), C.end());
      |     ^~~~~~~
Language: C++

#include <cmath>
#include <cstdio>
#include <climits>
#include <vector>
#include <algorithm>
using namespace std;

bool ne(int* a, int* b){
	for(int i=0; i<4; i++){
		if(a[i]!=b[i]) return true;
	}
	return false;
}
double dot(int* a, int* b){
	return (a[1] - a[0]) * (b[1] - b[0]) + (a[3] - a[2]) * (b[3] - b[2]);
}
double cross(int* a, int* b){
	return (a[1] - a[0]) * (b[3] - b[2]) - (a[3] - a[2]) * (b[1] - b[0]);
}
double chk(vector<int*> vs){
    double mn=LONG_MAX;
    for(int i=0; i<vs.size(); i++) for(int j=0; j<vs.size(); j++) if(ne(vs[i], vs[j])) for(int k=0; k<2; k++){
        int p1q1[4] = { vs[i][0],vs[j][0+k],vs[i][2],vs[j][2+k] };
        int p2q1[4] = { vs[i][1],vs[j][0+k],vs[i][3],vs[j][2+k] };
        int p1q2[4] = { vs[i][0],vs[j][1],vs[i][2],vs[j][3] };
        int q1p1[4] = { vs[j][0],vs[i][0],vs[j][2],vs[i][2] };
        int q1p2[4] = { vs[j][0],vs[i][1],vs[j][2],vs[i][3] };
        if(cross(vs[i], p1q1)*cross(vs[i], p1q2)<0 && cross(vs[j], q1p1)*cross(vs[j], q1p2)<0){
            return 0;
        }
		double p1p2_p1p2 = dot(vs[i],vs[i]);
        double p1q1_p1p2 = dot(p1q1, vs[i]);
        if(p1q1_p1p2 <= 0){
            mn=min(mn,dot(p1q1,p1q1));
        }else if(p1q1_p1p2 >= p1p2_p1p2){
            mn=min(mn,dot(p2q1,p2q1));
        }else{
			double p1q1_x_p1p2 = cross(vs[i], p1q1);
            mn=min(mn,p1q1_x_p1p2*p1q1_x_p1p2/p1p2_p1p2);
        }
    }
    return mn;
}
int main(){
	int N;
	scanf("%d", &N);
	vector<int*> vs(N);
	for(int i=0; i<N; i++){
		vs[i] = new int[4];
		scanf("%d %d %d %d", &vs[i][0], &vs[i][2], &vs[i][1], &vs[i][3]);
	}
	double mn=LONG_MAX;
	for(int split=20; mn==LONG_MAX && split>0; split/=2){
		vector<vector<int*>> area(split*split, vector<int*>());
		if(area.size() == 1){
			area[0] = vs;
		}else{
			for(int i=0;i<N;i++){
				int sx = min(split-1,split*min(vs[i][0],vs[i][1])/100);
				int ex = split*max(vs[i][0],vs[i][1])/100;
				int sy = min(split-1,split*min(vs[i][2],vs[i][3])/100);
				int ey = split*max(vs[i][2],vs[i][3])/100;
				for(int x=sx; x<split && x<=ex; x++){
					for(int y=sy; y<split && y<=ey; y++){
						area[x+split*y].push_back(vs[i]);
					}
				}
			}
		}
		for(int x=0; x<split; x++){
			for(int y=0; y<split; y++){
				if(area[x+split*y].size()){
					sort(area[x+split*y].begin(), area[x+split*y].end(), [](int* a,int* b){ return min(a[0]+a[2],a[1]+a[3]) > min(b[0]+b[2],b[1]+b[3]); });
					if(x>0) area[(x-1)+split*y].push_back(area[x+split*y][0]);
					if(y>0) area[x+split*(y-1)].push_back(area[x+split*y][0]);
					if(x*y>0) area[(x-1)+split*(y-1)].push_back(area[x+split*y][0]);
				}
			}
		}
		for(int i=0;i<area.size();i++){
			mn=min(mn,chk(area[i]));
		}
	}
	printf("%f\n", sqrt(mn));

Compiler output:
a.cc: In function 'int main()':
a.cc:84:34: error: expected '}' at end of input
   84 |         printf("%f\n", sqrt(mn));
      |                                  ^
a.cc:44:11: note: to match this '{'
   44 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<sstream>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#include<complex>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cassert>
using namespace std;

#define rep(i,n) for(int i=0;i<(int)n;i++)
#define fr(i,c) for(__typeof(c.begin()) i=c.begin();i!=c.end();i++)
#define pb push_back
#define mp make_pair
#define all(c) c.begin(),c.end()
#define dbg(x) cerr<<#x<<" = "<<(x)<<endl

typedef vector<int> vi;
typedef pair<int,int> pi;
typedef long long ll;
const int inf=(int)1e9;
const double EPS=1e-9, INF=1e12;

typedef complex<double> P;
namespace std {
  bool operator < (const P& a, const P& b) {
    return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
  }
}
inline double cross(const P& a, const P& b) {
  return imag(conj(a)*b);
}
inline double dot(const P& a, const P& b) {
  return real(conj(a)*b);
}
struct L : public vector<P> {
  L(const P &a, const P &b) {
    push_back(a); push_back(b);
  }
};
inline int ccw(P a, P b, P c) {
  b -= a; c -= a;
  if (cross(b, c) > 0)   return +1;       // counter clockwise
  if (cross(b, c) < 0)   return -1;       // clockwise
  if (dot(b, c) < 0)     return +2;       // c--a--b on line
  if (norm(b) < norm(c)) return -2;       // a--b--c on line
  return 0;
}
inline bool intersectSS(const L &s, const L &t) {
  return ccw(s[0],s[1],t[0])*ccw(s[0],s[1],t[1]) <= 0 &&
         ccw(t[0],t[1],s[0])*ccw(t[0],t[1],s[1]) <= 0;
}
inline bool intersectSP(const L &s, const P &p) {
  return abs(s[0]-p)+abs(s[1]-p)-abs(s[1]-s[0]) < EPS; // triangle inequality
}
inline P projection(const L &l, const P &p) {
  double t = dot(p-l[0], l[0]-l[1]) / norm(l[0]-l[1]);
  return l[0] + t*(l[0]-l[1]);
}
inline double distanceSP(const L &s, const P &p) {
  const P r = projection(s, p);
  if (intersectSP(s, r)) return abs(r - p);
  return min(abs(s[0] - p), abs(s[1] - p));
}
inline double distanceSS(const L &s, const L &t) {
  if (intersectSS(s, t)) return 0;
  return min(min(distanceSP(s, t[0]), distanceSP(s, t[1])),
             min(distanceSP(t, s[0]), distanceSP(t, s[1])));
}

bool use[101][101]

int main(){
	int n; cin>>n;
	if(n>5100){
		cout<<0<<endl; return 0;
	}
	vector<L> ls;
	rep(i,n){
		int x1,y1,x2,y2;
		cin>>x1>>y1>>x2>>y2;
		if(use[x1][y1]||use[x2][y2]){
			cout<<0<<endl; return 0;
		}
		use[x1][y1]=use[x2][y2]=1;
		ls.pb(L(P(x1,y1),P(x2,y2)));
	}
	double ans=INF;
	rep(i,n)rep(j,i)ans=min(ans,distanceSS(ls[i],ls[j]));
	printf("%.9f\n",ans);
	return 0;
}

Compiler output:
a.cc:77:1: error: expected initializer before 'int'
   77 | int main(){
      | ^~~
Language: C++

#include <iostream>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <cstdio>
#include <complex>
using namespace std;

const double eps = 1.0e-8;
typedef complex<double> P;
struct L { P pos,dir; };

inline int signum(double x) { return (abs(x) < eps ? 0 : x > 0 ? 1 : -1); }
inline double inp(const P &a,const P &b) { return (conj(a)*b).real(); }
inline double outp(const P &a,const P &b) { return (conj(a)*b).imag(); }
inline P proj(const P &p,const P &b) { return b*inp(p,b)/norm(b); }

inline int ccw(const P &p,const P &r,const P &s) {
    P a(r-p), b(s-p);
    int sgn = signum(outp(a,b));
    if(sgn != 0) return sgn;
    if(a.real() * b.real() < -eps || a.imag()*b.imag() < -eps) return -1;
    if(norm(a) < norm(b) - eps) return 1;
    return 0;
}


inline P perf(const L &l,const P &p) {
    L m = {l.pos - p, l.dir};
    return (p + (m.pos - proj(m.pos, m.dir)));
}

bool ss_intersects(const L &s,const L &t) {
    return (ccw(s.pos, s.pos+s.dir, t.pos)
            * ccw(s.pos, s.pos+s.dir, t.pos+t.dir) <= 0 &&
            ccw(t.pos, t.pos+t.dir, s.pos)
            * ccw(t.pos, t.pos+t.dir, s.pos+s.dir) <= 0);
}

double sp_distance(const L &s,const P &p) {
    const P r = perf(s, p);
    const double pos = ((r-s.pos)/s.dir).real();
    if(-eps <= pos && pos <= 1+eps) return abs(r-p);
    return min(abs(s.pos-p), abs(s.pos+s.dir - p));
}

double ss_distance(const L &s,const L &t) {
    if(ss_intersects(s,t)) return 0;

    double res = min(sp_distance(s, t.pos), sp_distance(s, t.pos+t.dir));
    res = min(res, sp_distance(t, s.pos));
    res = min(res, sp_distance(t, s.pos+s.dir));
    return res;
}

int main() {
    int n,x1,x2,y1,y2;
    cin>>n;

    if(n > 5001) {
        printf("%.12f\n", 0.0);
        return 0;
    }

    vector<L> pv;
    for(int i=0; i<n; ++i) {
        cin>>x1>>y1>>x2>>y2;
        pv.push_back((L){P(x1,y1),P(x2-x1,y2-y1)});
    }

    sort(pv.begin(), pv.end());

    double ans = 1e9;
    for(int i=0; i<n; ++i)
        for(int j=0; j<i; ++j) {
            if(pv[i].real() - pv[j].real() > ans) continue;
            ans = min(ans, ss_distance(pv[i],pv[j]));
        }
    printf("%.12f\n", ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:71:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   71 |     sort(pv.begin(), pv.end());
      |     ^~~~
      |     sqrt
a.cc:76:22: error: '__gnu_cxx::__alloc_traits<std::allocator<L>, L>::value_type' {aka 'struct L'} has no member named 'real'
   76 |             if(pv[i].real() - pv[j].real() > ans) continue;
      |                      ^~~~
a.cc:76:37: error: '__gnu_cxx::__alloc_traits<std::allocator<L>, L>::value_type' {aka 'struct L'} has no member named 'real'
   76 |             if(pv[i].real() - pv[j].real() > ans) continue;
      |                                     ^~~~
Language: C++

#include <cstdio>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;

const double EPS = 1e-8;
struct P{
	double x, y;
	P(double x_, double y_){ x = x_; y = y_; }
	P(){}
	P operator-(const P& p){
		return P(x - p.x, y - p.y); 
	}
};
bool operator<(const P& a, const P& b){
	if( a.x < b.x + EPS ) return true;
	if( a.x + EPS > b.x ) return false;
	return a.y < b.y;
}

struct Segment{
	P a, b;
	Segment(P a_, P b_){
		if( b_ < a_ ) swap(a_, b_);
		a = a_; b = b_;
	}
	Segment(){}
};
bool operator<(const Segment& a, const Segment& b){
	if( a.a < b.a ){
		return true;
	}else if( b.a < a.a ){
		return false;
	}
	if( a.b < b.b ){
		return true;
	}
	return false;
}

double dot(P a, P b){
	return a.x * b.x + a.y * b.y;
}
double cross(P a, P b){
	return a.x * b.y - a.y * b.x;
}
double dist(P a){
	return sqrt(a.x * a.x + a.y * a.y);
}
double dist(P a, P b){
	return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
double dist(P a, P b, P x){
	if( dot(b-a, x-a) < EPS ) return dist(x-a);
	if( dot(a-b, x-b) < EPS ) return dist(x-b);
	return abs(cross(b-a, x-a)) / dist(b-a);
}
double dist(Segment a, Segment b){
	return min( min(dist(a.a, a.b, b.a), dist(a.a, a.b, b.b)), min(dist(b.a, b.b, a.a), dist(b.a, b.b, a.b)));
}
bool is_intersect(P a1, P a2, P b1, P b2) {
  return ( cross(a2-a1, b1-a1) * cross(a2-a1, b2-a1) < EPS ) &&
         ( cross(b2-b1, a1-b1) * cross(b2-b1, a2-b1) < EPS );
}
bool is_parallel(P a1, P a2, P b1, P b2){
	return fabs(cross(a1-a2, b1-b2)) < EPS;
}

//Segment v[5001];

int main(){
	int n, h[101][101] = {0};
	
	scanf("%d", &n);
	if( n > 5000 ){
		printf("%.8f\n", 0.0);
		return 0;
	}
	
	for(int i=0 ; i < n ; i++ ){
		int ax, ay, bx, by;
		scanf("%d %d %d %d", &ax, &ay, &bx, &by);
		h[ay][ax]++;
		h[by][bx]++;
		v[i] = Segment(P(ax,ay), P(bx,by));
	}
	
	bool flag = false;
	for(int y=0 ; y < 101 && !flag ; y++ ){
		for(int x=0 ; x < 101 && !flag ; x++ ){
			if( h[y][x] >= 2 ){
				flag = true;
			}
		}
	}
	
	// 解が0のとき
	if( flag ){
		printf("%.8f\n", 0.0);
		return 0;
	}
	
	double ans = 200;
	for(int i=0 ; i < n ; i++ ){
		for(int j=i+1 ; j < n ; j++ ){
			double d = dist(v[i], v[j]);
			ans = min(ans, d);
			if( !is_parallel(v[i].a, v[i].b, v[j].a, v[j].b) && is_intersect(v[i].a, v[i].b, v[j].a, v[j].b) ){
				ans = 0.0;
				break;
			}
		}
	}
	printf("%.8f\n", ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:86:17: error: 'v' was not declared in this scope
   86 |                 v[i] = Segment(P(ax,ay), P(bx,by));
      |                 ^
a.cc:107:41: error: 'v' was not declared in this scope
  107 |                         double d = dist(v[i], v[j]);
      |                                         ^
Language: Java

import java.util.*;
import java.math.*;
class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		BigInteger v = new BigInteger("1");
		BigInteger w = new BigInteger("1");
		for(int i = 0; i < n; i++) {
			int a = sc.nextInt(), b = sc.nextInt();
			if(a == 1) v += b * w;
			if(a == 2) v -= b * w;
			if(a == 3) v *= b;
			if(a == 4) w *= b;
		}
		System.out.println(v / w);
	}
}

Compiler output:
Main.java:11: error: bad operand types for binary operator '*'
			if(a == 1) v += b * w;
			                  ^
  first type:  int
  second type: BigInteger
Main.java:12: error: bad operand types for binary operator '*'
			if(a == 2) v -= b * w;
			                  ^
  first type:  int
  second type: BigInteger
Main.java:13: error: bad operand types for binary operator '*'
			if(a == 3) v *= b;
			             ^
  first type:  BigInteger
  second type: int
Main.java:14: error: bad operand types for binary operator '*'
			if(a == 4) w *= b;
			             ^
  first type:  BigInteger
  second type: int
Main.java:16: error: bad operand types for binary operator '/'
		System.out.println(v / w);
		                     ^
  first type:  BigInteger
  second type: BigInteger
5 errors
Language: Java

import java.util.Scanner;
import java.math.*;

class Main{

    public static void main(String[] args){

	int N,o;

	Scanner in = new Scanner(System.in);
	N = in.nextInt();
	BigDecimal x = new BigDecimal("0.0");	

	for(int i = 0; i<N; i++){
	    o = in.nextInt();
	    BigInteger a = in.nextBigInteger();
	    BigDecimal y = new BigDecimal(a);
	   

	    if(o == 1){
		x = x.add(y);
	
	    }
	    else if(o == 2){
		x = x.subtract(y);
		//	System.out.println(x.toString());
	    }
	    else if(o == 3){
		x = x.multiply(y);
		//System.out.println(x.toString());
	    }
	    else if(o == 4){
		x = x.divide(y);
	    }
	    
	}
	BigInteger as = new BigInteger(x); 

	System.out.println(as);
       
    }

}

Compiler output:
Main.java:37: error: no suitable constructor found for BigInteger(BigDecimal)
	BigInteger as = new BigInteger(x); 
	                ^
    constructor BigInteger.BigInteger(byte[]) is not applicable
      (argument mismatch; BigDecimal cannot be converted to byte[])
    constructor BigInteger.BigInteger(int[]) is not applicable
      (argument mismatch; BigDecimal cannot be converted to int[])
    constructor BigInteger.BigInteger(String) is not applicable
      (argument mismatch; BigDecimal cannot be converted to String)
    constructor BigInteger.BigInteger(long) is not applicable
      (argument mismatch; BigDecimal cannot be converted to long)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: Java

import java.util.Scanner;
import java.math.*;

class Main{

    public static void main(String[] args){

	int N,o;

	Scanner in = new Scanner(System.in);
	N = in.nextInt();
	BigDecimal x = new BigDecimal("0.0");	

	for(int i = 0; i<N; i++){
	    o = in.nextInt();
	    BigInteger a = in.nextBigInteger();
	    BigDecimal y = new BigDecimal(a);
	   

	    if(o == 1){
		x = x.add(y);
	
	    }
	    else if(o == 2){
		x = x.subtract(y);
		//	System.out.println(x.toString());
	    }
	    else if(o == 3){
		x = x.multiply(y);
		//System.out.println(x.toString());
	    }
	    else if(o == 4){
		x = x.divide(y);
	    }
	    
	}
	BigInteger as = x.toBigInteger(); 

	System.out.println(as);
       return 0;
    }

}

Compiler output:
Main.java:40: error: incompatible types: unexpected return value
       return 0;
              ^
1 error
Language: Java

import java.util.Scanner;
import java.math.*;

class Main{

    public static void main(String[] args){

	int N,o;

	Scanner in = new Scanner(System.in);
	N = in.nextInt();
	BigInteger ans = new BigInteger("0")

	for(int i = 0; i<N; i++){
	    o = in.nextInt();
BigDecimal x = new BigDecimal("0.0");	
	    BigInteger a =  in.nextBigInteger();
	    BigDecimal y = new BigDecimal(a);
	    if(o == 1){
		x = x.add(y);
		ans = ans.add(x.toBigInteger());
	    }
	    else if(o == 2){
		x = x.subtract(y);
		ans  = ans.add(x.toBigInteger());
		//	System.out.println(x.toString());
	    }
	    else if(o == 3){
		x = x.multiply(y);
		ans = ans.add(x.toBigInteger());
		//System.out.println(x.toString());
	    }
	    else if(o == 4){
		x = x.divide(y);
		ans = ans.add(x.toBigInteger());
	    }
	    
	}
 
	System.out.println(ans);
       
    }

}

Compiler output:
Main.java:12: error: ';' expected
	BigInteger ans = new BigInteger("0")
	                                    ^
1 error
Language: Java

import java.util.Scanner;
import java.math.BigInteger;

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

	int n = in.nextInt();
	BigInteger ue   = BigInteger.ZERO;
	BigInteger sita = BigInteger.ONE;

	for(int i = 0; i < n; ++i){
	    int o = in.nextInt();
	    int y = in.nextInt();
	    BigInteger yy = new BigInteger(String.valueOf(y));

	    if(o == 1){ // +
		ue = ue.add(sita.multiply(yy));
	    }else if(o == 2){ // -
		ue = ue.subtract(sita.multiply(yy));
	    }else if(o == 3){ // *
		BigInteger gcd = yy.gcd(sita);
		ue   = ue.multiply(yy.divide(gcd));
		sita = sita.divide(gcd);
	    }else if(o == 4){
		BigInteger gcd = yy.gcd(ue);
		sita = sita.multiply(yy.divide(gcd));
		ue   = ue.divide(gcd);
	    }
	    // System.out.println(ue + " " + sita);
	}
	System.out.println("" + ue);
    }
}

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

#include <iostream>
#include <algorithm>

#define ll long long

using namespace std;

ll extgcd(ll a, ll b, ll &x, ll &y){
    ll d=a;
    if(b != 0){
        d = extgcd(b,a%b,y,x);
        y -= (a/b)*x;
    }else{
        x=1;
        y=0;
    }
    return d;
}

ll mod_inverse(ll a,ll m){
    ll x,y;
    extgcd(a,m,x,y);
    return (x%m+m)%m;
}

int main(){
    int n;
    cin >> n;
//    ll m1 = 99989, m2 = 99991;
    ll m1 = 2077753, m2 = 2077769;
    ll t1=0,t2=0;
    int op,y;
    for(int i=0;i<n;i++){
        cin >> op >> y;
        if(op == 1){
            t1 = (t1+y)%m1;
            t2 = (t2+y)%m2;
        }else if(op == 2){
            t1 = (t1-y%m1+m1)%m1;
            t2 = (t2-y%m2+m2)%m2;
        }else if(op == 3){
            t1 = (t1*y)%m1;
            t2 = (t2*y)%m2;
        }else{
            t1 = (t1*mod_inverse(y,m1))%m1;
            t2 = (t2*mod_inverse(y,m2))%m2;
        }
    }
    ll a,b;
    extgcd(m1,m2,a,b);
    ll res = (m1*t2*a+m2*t1*b)%((ll)m1*m2);
    while(res >= (1ll<<31)){
        res -= (ll)m1 * m2;
    }
    cout << res << endl;
}

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

#!/bin/ruby
x=0.to_r
gets.to_i.times do
  o,y=gets.split.map(&:to_i)
  if o==1 then
    x+=y
  elsif o==2 then
    x-=y
  elsif o==3 then
    x*=y
  else
    x/=y
  end
end
puts x.to_i

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/bin/ruby
      |  ^
a.cc:2:1: error: 'x' does not name a type
    2 | x=0.to_r
      | ^
Language: C++

#include<iostream>
#include<cmath>

using namespace std;

int main(){
  __float128 x=0;
  int N;
  cin>>N;
  while(N--){
    int o,Y;
    cin>>o>>Y;
    if(o==1){
      x+=Y;
    }else if(o==2){
      x-=Y;
    }else if(o==3){
      x*=Y;
    }else{
      x/=Y;
    }
  }
  cout<<lrint(x)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:14: error: call of overloaded 'lrint(__float128&)' is ambiguous
   23 |   cout<<lrint(x)<<endl;
      |         ~~~~~^~~
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683,
                 from /usr/include/c++/14/bits/requires_hosted.h:31,
                 from /usr/include/c++/14/iostream:38,
                 from a.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:350:1: note: candidate: 'long int lrint(double)'
  350 | __MATHDECL (long int,lrint,, (_Mdouble_ __x));
      | ^~~~~~~~~~
In file included from a.cc:2:
/usr/include/c++/14/cmath:2571:3: note: candidate: 'constexpr long int std::lrint(long double)'
 2571 |   lrint(long double __x)
      |   ^~~~~
/usr/include/c++/14/cmath:2567:3: note: candidate: 'constexpr long int std::lrint(float)'
 2567 |   lrint(float __x)
      |   ^~~~~
Language: C++

#include<iostream>

using namespace std;

int main(void){
  int n;
  while(cin>>n){
  long long double ans = 0.0;
  while(n--){
    int o,y;
      cin>>o>>y;
      switch(o){
        case 1:ans += y;break;
        case 2:ans -= y;break;
        case 3:ans *= y;break;
        case 4:ans /= y;break;
        
      }
  }
  cout<<ans<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'long long' specified with 'double'
    8 |   long long double ans = 0.0;
      |        ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <cmath>

using namespace std;

typedef long long ll;
typedef long double ld;

#define EPS 1e-12
//#define B 1000000

bool isPrime(ll n) {
	if (n == 1) return false;
	if (n == 2) return true;

	for (ll i = 2; i*i <= n; ++i) {
		if (n % i == 0) return false;
	}
	return true;
}

ll MOD = 4294967311LL, D;
ll mod(ll x) {
	return (x % MOD + MOD) % MOD;
}

ll mul(ll x, ll n) {
	ll ret = 0;

	if (x+n <= (1LL << 31)) {
		return x * n % MOD;
	}

	for (int i = 0; (1LL << i) <= n; ++i) {
		if (n & (1LL << i)) {
			ret = mod(ret + x);
		}
		x = mod(x + x);
	}
	return ret;
}
ll power(ll x, ll n) {
	ll ret = 1;
/*
	for (int i = 0; i < n; ++i) {
		ret = (ret * x) % MOD;
	}
	return ret;
*/
	for (int i = 0; (1LL << i) <= n; ++i) {
		if (n & (1LL << i)) {
			ret = mod( mul(ret, x) );
		}
		x = mod( mul(x, x) );
	}
	return ret;
}

//ll abs(ll n) {
//	return n >= 0 ? n : MOD-n;
//	return n > 0 ? n : -n;
//}
ll div(ll x, ll n) {
	return mul(x, power(n, MOD-2));
}
ll cal(vector<ll> op, vector<ll> Y) {
	ll Z = 1;
	ll X = 0;
	int N = op.size();
	bool zf = false;
	for (int i = N-1; i >= 0; --i) {
		bool f = zf ^ (Y[i] < 0);
		ll y = abs(Y[i]);
		switch (op[i]) {
			case 2: f = !f;
			case 1:
				X = mod(X + (f ? -1 : 1) * mul(Z, y));
				break;

			case 3: Z = mod( mul(Z, y) ); zf = f; break;
			case 4: Z = mod( div(Z, y) ); zf = f; break;
		}
//		cout << Z << endl;
	}
	return X;
}

int main() {
//	while ( !isPrime(MOD) ) ++MOD;
//	cout << MOD << endl;
//	return 0;
	ll X = 0;

	int N; cin >> N;
	vector<ll> op(N), Y(N);
	for (int i = 0; i < N; ++i) {
		cin >> op[i] >> Y[i];
	}

	ll ans = cal(op, Y);

	if (ans >= (1LL << 31)) cout << ans-MOD << endl;
	else cout << ans << endl;
}

Compiler output:
a.cc: In function 'll cal(std::vector<long long int>, std::vector<long long int>)':
a.cc:82:45: error: call of overloaded 'div(ll&, ll&)' is ambiguous
   82 |                         case 4: Z = mod( div(Z, y) ); zf = f; break;
      |                                          ~~~^~~~~~
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:1:
/usr/include/stdlib.h:992:14: note: candidate: 'div_t div(int, int)'
  992 | extern div_t div (int __numer, int __denom)
      |              ^~~
a.cc:64:4: note: candidate: 'll div(ll, ll)'
   64 | ll div(ll x, ll n) {
      |    ^~~
/usr/include/c++/14/cstdlib:219:3: note: candidate: 'lldiv_t __gnu_cxx::div(long long int, long long int)'
  219 |   div(long long __n, long long __d)
      |   ^~~
/usr/include/c++/14/cstdlib:181:3: note: candidate: 'ldiv_t std::div(long int, long int)'
  181 |   div(long __i, long __j) _GLIBCXX_NOTHROW { return ldiv(__i, __j); }
      |   ^~~
Language: C++

#include<bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>
using namespace std;

#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define ALL(a) (a).begin(),(a).end()
#define INF INT_MAX/3
#define EPS 1e-14

typedef int128_t lli;
typedef pair<lli,lli> P;
typedef tuple<int,int,int> Triple;

void add(P &x, int y) {
  x.first += x.second *y;
}

void sub(P &x, int y) {
  x.first -= x.second * y;
}

void mul(P &x, int y) {
  x.first *= y;
}

lli gcd(lli x, lli y) {
  return (y == 0 ? x : gcd(y, x % y));
}

void simplify(P &x) {
  lli g = gcd(x.first, x.second);
  x.first /= g;
  x.second /= g;
}

void div(P &x, lli y) {
  x.second *= y;
  simplify(x);
}

int main() {
  P x(0, 1);
  int n;
  cin >> n;
  REP(i, n) {
    cout << x.first << "/" << x.second << endl;
    int o, y;
    cin >> o >> y;
    if (o == 1) add(x, y);
    else if (o == 2) sub(x, y);
    else if (o == 3) mul(x, y);
    else if (o == 4) div(x, y);
    else throw 1;
  }
  cout << x.first / x.second << endl;
  return 0;
}

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

n = gets.to_i
v = 0; w = 1
for i in 0 .. n - 1 do
	a, b = gets.split.map &:to_i
	if a == 1 then
		v += b * w
	elsif a == 2 then
		v -= b * w
	elsif a == 3 then
		v *= b
	else
		w *= b
	end
end
p (1.0 * v / w).to_i

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = gets.to_i
      | ^
a.cc:2:8: error: 'w' does not name a type
    2 | v = 0; w = 1
      |        ^
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <numeric>
#include <list>


using namespace std;

#ifdef _MSC_VER
#define __typeof__ decltype
template <class T> int __builtin_popcount(T n) { return n ? 1 + __builtin_popcount(n & (n - 1)) : 0; }
#endif

#define foreach(it, c) for (__typeof__((c).begin()) it=(c).begin(); it != (c).end(); ++it)
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define CLEAR(arr, val) memset(arr, val, sizeof(arr))

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

template <class T> void max_swap(T& a, const T& b) { a = max(a, b); }
template <class T> void min_swap(T& a, const T& b) { a = min(a, b); }

typedef long long ll;
typedef pair<int, int> pint;

const double EPS = 1e-8;
const double PI = acos(-1.0);
const int dx[] = { 0, 1, 0, -1 };
const int dy[] = { 1, 0, -1, 0 };
bool valid_pos(int x, int y, int w, int h) { return 0 <= x && x < w && 0 <= y && y < h; }


ll mod_mul(ll x, ll n, ll mod)
{
	if (n == 0)
		return 0;
	if (x < 0)
		x = (x + mod) % mod;
	if (y < 0)
		y = (y + mod) % mod;
	//bool nega = n < 0;
	//if (nega)
	//	n = -n;

	ll res = 0;
	while (n > 0)
	{
		if (n & 1)
			res = (res + x) % mod;
		x = x * 2 % mod;
		n /= 2;
	}

	//if (nega)
	//	res = (mod - res) % mod;
	return res;
}
ll ext_gcd(ll a, ll b, ll &x, ll &y)
{
	if (b)
	{
		ll g = ext_gcd(b, a % b, y, x);
		y -= (a / b) * x;
		return g;
	}
	else
	{
		x = 1, y = 0;
		return a;
	}
}
ll mod_inverse(ll a, ll mod)
{
	ll x, y;
	if (ext_gcd((a + mod) % mod, mod, x, y) == 1)
		return (mod + x % mod) % mod;
	else
		return 0;
}
int main()
{
	ios::sync_with_stdio(false);

	const ll mod = 9999999967LL;

	int n;
	cin >> n;
	ll x = 0;
	while (n--)
	{
		int o, y;
		cin >> o >> y;
		if (o == 1)
			x += y;
		else if (o == 2)
			x -= y;
		else if (o == 3)
			x = mod_mul(x, (y + mod)%mod, mod);
		else
			x = mod_mul(x, mod_inverse(y, mod), mod);

		x = (x + mod) % mod;
	}
	if (x >= 1LL << 31)
		x -= mod;
	cout << x << endl;
}

Compiler output:
a.cc: In function 'll mod_mul(ll, ll, ll)':
a.cc:59:13: error: 'y' was not declared in this scope
   59 |         if (y < 0)
      |             ^
Language: C

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

#define EPS 1e-9

using namespace std;

int n;
double W;

bool pred(pair<int,int> a, pair<int,int> b){
    return a.first * b.second < a.second * a.first;
}

int main(){
    cin >> n >> W;
    vector<pair<int,int> > vp;
    double ret=0;
    double w,v;
    for(int i=0;i<n;i++){
        cin >> w >> v;
        if(w <= 0 && v >= 0){
            W += w;
            ret += v;
        }else if(w >=0 && v <= 0){
            //do nothing
        }else if(v < 0 && w < 0){
            W -= w;
            ret += v;
            vp.push_back(make_pair(-v,-w));
        }else{
            vp.push_back(make_pair(v,w));
        }
    }
    sort(vp.begin(), vp.end(), pred);
    for(int i=0;i<vp.size();i++){
        if(W - vp[i].second >= EPS){
            ret += vp[i].first;
            W -=vp[i].second;
        }else{
            ret += vp[i].first * (W / vp[i].second);
            break;
        }
    }
    printf("%.9f\n", ret);
}

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

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

#define EPS 1e-9

using namespace std;

int n;
double W;

bool pred(pair<int,int> a, pair<int,int> b){
    return a.first * b.second < a.second * a.first;
}

int main(){
    cin >> n >> W;
    vector<pair<int,int> > vp;
    double ret=0;
    double w,v;
    for(int i=0;i<n;i++){
        cin >> w >> v;
        if(w <= 0 && v >= 0){
            W -= w;
            ret += v;
        }else if(w >=0 && v <= 0){
            //do nothing
        }else if(v < 0 && w < 0){
            W -= w;
            ret += v;
            vp.push_back(make_pair(-v,-w));
        }else{
            vp.push_back(make_pair(v,w));
        }
    }
    sort(vp.begin(), vp.end(), pred);
    for(int i=0;i<vp.size();i++){
        double tmp = min(1.0, W/vp[i].second);
        ret += vp[i].first * tmp;
        W -= tmp * vp[i].second;
        if(W < EPS) break;
    }
    printf("%.9f\n", ret);
}

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

#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<algorithm>
#define pb push_back
#define all(c) c.begin(),c.end()
#define uni(c) c.erase(unique(all(c)),c.end())
using namespace std;
typedef __int64 ll;
int main(){
	string s;
	while(cin>>s){
		map<char,ll> m;
		for(ll i=0;i<s.size();i++){
			m[s[i]]++;
		}
		
		ll odd=0,even=0;
		map<char,ll>::iterator ite=m.begin();
		vector<ll> v;
		for(ite=m.begin();ite!=m.end();ite++){
			if(ite->second%2==1){
				odd++;
				if(ite->second>=3)
				v.pb((ite->second-1)/2);
			}else{
				even++;
				v.pb((ite->second)/2);
			}
		}
		if(odd>1){
			cout<<0<<endl;
			continue;
		}
		int ans=1;
		for(int i=1;i<=s.size()/2;i++){
			//cout<<ans<<endl;
			if(find(all(v),i)!=v.end()){
				v.erase(find(all(v),i));
			}else
			ans*=i;
		}
		cout<<ans<<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 <iostream>
#include <map>
using namespace std;

long long fact(int n){
  long long x=1;
  for(int i=1;i<=n;++i)x*=i;
  return x;
}

int main(){
  string s;cin>>s;
  map<char,int> c;
  for(int i=0;i<s.size();++i){
    ++c[s[i]];
  }
  int odd=0;
  for(map<char,int>::iterator it=c.begin();it!=c.end();++it){
    odd+=((it->second) % 2)? 1 : 0;
  }
  
  if(odd<=1){
  	if(odd==1&&len%2==0) cout<<0<<endl;
    int len=s.size()/2+((s.size()%2)?1:0);
    long long ans=fact(len);
    for(map<char,int>::iterator it=c.begin();it!=c.end();++it){
      ans/=fact(((it->second%2)?1:it->second/2));
    }
    cout<<ans<<endl;
  }else{
    cout<<0<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:20: error: 'len' was not declared in this scope; did you mean 'mblen'?
   23 |         if(odd==1&&len%2==0) cout<<0<<endl;
      |                    ^~~
      |                    mblen
Language: C++

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

using namespace std;

#define ALL(T) T.begin(),T.end()

unsigned nCk(unsigned n, unsigned k);

int main(){
	string S; cin >> S;
	map<char, int> chrs;

	for (char c = 'a'; c <= 'z'; c++) { chrs[c] = 0; }

	for (int i = 0; i < S.size(); i++) { chrs[S[i]]++; }

	int odd = 0, even = 0;
	vector<int> hchrc;
	for (map<char, int>::iterator it = chrs.begin(); it != chrs.end(); it++) {
		if (it->second % 2) {
			odd++;
		} else {
			if (it->second) {
				hchrc.push_back((it->second)/2);
				even++;
			}
		}
	}

	int res = 0;

	if (odd < 2) {
		string s;
		for (map<char, int>::iterator it = chrs.begin(); it != chrs.end(); it++) {
			if (it->second || !(it->second%2)) {
				for (int i = 0; i < it->second/2; i++) {
					s += it->first;
				}
			}
		}
		sort(ALL(s));
		set<string> strs;
		do {
			strs.insert(s);
		} while (next_permutation(ALL(s)));
		res = strs.size();
	}

	cout << res << endl;


	return 0;
}

unsigned nCk(unsigned n, unsigned k){
	if (k > n) return 0;
	if (k * 2 > n) k = n-k;
	if (k == 0) return 1;

	int res = n;
	for (int i = 2; i <= k; ++i) {
		res *= (n-i+1);
		res /= i;
	}
	return res;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:17: error: 'sort' was not declared in this scope; did you mean 'short'?
   45 |                 sort(ALL(s));
      |                 ^~~~
      |                 short
a.cc:49:26: error: 'next_permutation' was not declared in this scope
   49 |                 } while (next_permutation(ALL(s)));
      |                          ^~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<sstream>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#include<complex>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cassert>
using namespace std;

#define rep(i,n) for(int i=0;i<(int)n;i++)
#define fr(i,c) for(__typeof(c.begin()) i=c.begin();i!=c.end();i++)
#define pb push_back
#define mp make_pair
#define all(c) c.begin(),c.end()
#define dbg(x) cerr<<#x<<" = "<<(x)<<endl
#define F first
#define S second

typedef vector<int> vi;
typedef pair<int,int> pi;
typedef long long ll;
const int inf=(int)1e9;
const double EPS=1e-8, INF=1e12;

typedef complex<double> P;
bool sameline(int a,int b,int c,int p,int q,int r){
	if(a*q!=b*p)return 0;
	if(a==0)return b*r==c*q;
	return a*r==c*p;
}
void push(vector<P> &v,const P &p){
	rep(i,v.size())if(abs(v[i]-p)<EPS)return;
	v.pb(p);
}
P crosspoint(const pair<pi,int> &a,const pair<pi,int> &b){
	int a1=a.F.F,b1=a.F.S,c1=a.S,a2=b.F.F,b2=b.F.S,c2=b.S;
	double x=(-b2*c1+b1*c2)*1.0/(a1*b2-a2*b1),y=(a2*c1-a1*c2)*1.0/(a1*b2-a2*b1);
	return P(x,y);
}

int n,a,b,c,d,e,f;
vector<pair<pi,int> > ls;
vector<P> cps[20],cp;
vector<P> pts;

vector<P> cpLC(const pair<pi,int> &l){
	int a1=a,b1=b,c1=c,d1=d,e1=e,f1=f,d2=l.F.F,e2=l.F.S,f2=l.S;
	if(e2==0){
		swap(a1,c1); swap(d1,e1); swap(d2,e2);
	}
	vector<P> res;
	int p=a1*e2*e2-b1*e2*d2+c1*d2*d2;
	int q=-b1*e2*f2+2*c1*d2*f2+d1*e2*e2-e1*e2*d2;
	int r=c1*f2*f2-e1*e2*f2+f1*e2*e2;
	if(p==0){
		double x=-r*1.0/q, y=(-f2-d2*x)/e2;
		res.pb(P(x,y));
	}
	else{
		ll D=(ll)q*q-4ll*p*r;
		if(D==0){
			double x=-q/2.0/p,y=(-f2-d2*x)/e2;
			res.pb(P(x,y));
		}
		else if(D>0){
			double x1=(-q+sqrt(q*1.0*q-4.0*p*r))/2/p,y1=(-f2-d2*x1)/e2;
			double x2=(-q-sqrt(q*1.0*q-4.0*p*r))/2/p,y2=(-f2-d2*x2)/e2;
			res.pb(P(x1,y1)); res.pb(P(x2,y2));
		}
	}
	if(e2==0)rep(i,res.size())swap(res.real(),res.imag());
	
	return res;
}

int main(){
	cin>>n>>a>>b>>c>>d>>e>>f;
	rep(i,n){
		int a,b,c;
		cin>>a>>b>>c;
		rep(j,ls.size())if(sameline(ls[j].F.F,ls[j].F.S,ls[j].S,a,b,c)){
			n--;
			goto NEXT;
		}
		ls.pb(mp(mp(a,b),c)); NEXT:;
	}
	rep(i,n)rep(j,i)if(ls[i].F.F*ls[j].F.S!=ls[i].F.S*ls[j].F.F){
		push(cps[i],crosspoint(ls[i],ls[j]));
		push(cps[j],crosspoint(ls[i],ls[j]));
	}
	rep(i,n){
		vector<P> tmp=cpLC(ls[i]);
		rep(j,tmp.size())push(cp,tmp[j]), push(cps[i],tmp[j]);
	}
	rep(i,n)rep(j,cps[i].size())push(pts,cps[i][j]);

	int ans=1-(int)pts.size();
	rep(i,n)ans+=cps[i].size()+1;
	if(b*b<4*a*c)ans+=max(1,(int)cp.size());
	else if(b*b==4*a*c)ans+=cp.size()+1;
	else ans+=cp.size()+2;
	
	cout<<ans<<endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'std::vector<std::complex<double> > cpLC(const std::pair<std::pair<int, int>, int>&)':
a.cc:76:44: error: 'class std::vector<std::complex<double> >' has no member named 'real'
   76 |         if(e2==0)rep(i,res.size())swap(res.real(),res.imag());
      |                                            ^~~~
a.cc:76:55: error: 'class std::vector<std::complex<double> >' has no member named 'imag'
   76 |         if(e2==0)rep(i,res.size())swap(res.real(),res.imag());
      |                                                       ^~~~
Language: C

#include<iostream>
#include<functional>
#include<queue>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<algorithm>
#define pb push_back
#define all(c) c.begin(),c.end()
#define uni(c) c.erase(unique(all(c)),c.end())
using namespace std;
typedef __int64 ll;
typedef pair<int,vector<int> > P;
int main(){
	int n;
	while(cin>>n){
		vector<vector<int> > c(n,vector<int>(n));
		for(int i=0;i<n;i++){
			for(int j=0;j<n;j++){
				cin>>c[i][j];
			}
		}
		priority_queue<P,vector<P> , greater<P> > que;
		vector<int> v(n);
		for(int i=0;i<n;i++){
			v[i]=i;
		}
		int ans=0;
		map<vector<int>,bool> used;
		que.push(P(0,v));
		while(!que.empty()){
			
			P p=que.top();
			que.pop();
			vector<int> now=p.second;
			int np=p.first;
			if(used[now]){
				continue;
			}
			used[now]=true;
			ans=max(ans,np);
			
			for(int i=0;i<n;i++)
			for(int j=i+1;j<n;j++){
				
				swap(now[i],now[j]);
				if(used[now]){
					swap(now[i],now[j]);
					continue;
				}
				//cout<<"--------"<<endl;
				que.push(P(np+c[now[i]][now[j]],now));
				swap(now[i],now[j]);
			}
			
			
		}
		cout<<ans<<endl;
	}
	return 0;
}

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