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

#include<iostream>
#include<cstdio>
#include<string.h>
#include<string>
#include<math.h>
#include<algorithm>
using namespace std;

string a,b,c;
int w[10];

int main(){
	int T;
	scanf("%d",&T);
	while(T--){
		cin >> a >> b >> c;
		int d[6];
		int res = 0;
		for(int i=0;i<5;i++) w[i] = 1;
		for(int i=0;i<a.size();i++)
			w[a[i]-'A'] = 10;
		for(int j=0;j<b.size();j++)
			w[b[j]-'A'] = 10;
		for(int i=0;i<c.size();i++)
			w[c[i]-'A'] = 10;
		for(d[0]=0;d[0]<w[0];d[0]++){
			if(w[0]==1) d[0] = 100;
			for(d[1]=0;d[1]<w[1];d[1]++){
				if(w[1]>1&&d[0]==d[1]) continue;
				if(w[1]==1) d[1] = 100;
				for(d[2]=0;d[2]<w[2];d[2]++){
					if(w[2]>1&&(d[0]==d[2]||d[1]==d[2])) continue;
					if(w[2]==1) d[2] = 100;
					for(d[3]=0;d[3]<w[3];d[3]++){
						if(w[3]>1&&(d[3]==d[0]||d[3]==d[1]||d[3]==d[2])) continue;
						if(w[3]==1) d[3] = 100;
						for(d[4]=0;d[4]<w[4];d[4]++){
							if(w[4]>1&&(d[4]==d[0]||d[4]==d[1]||d[4]==d[2]||d[4]==d[3])) continue;
							if(w[4]==1) d[4] = 100;
							int x = 0,y = 0,z = 0;
							for(int p=0;p<a.size();p++){
								x *= 10;
								x += d[a[p]-'A'];
							}
							for(int p=0;p<b.size();p++){
								y *= 10;
								y += d[b[p]-'A'];
							}
							for(int p=0;p<c.size();p++){
								z *= 10;
								z += d[c[p]-'A'];
							}
							if((x/a.size()==0&&a.size()!=1)||(y/b.size()==0&&b.size()!=1)||(z/c.size()==0&&c.size()!=1)) continue;
							if(x+y==z) res++;
							if(x-y==z) res++;
							if(x*y==z) res++;
							if(y) if(x/y==z) res++;
						}
					}
				}
			}
		}
		printf("%d\n",res);
	}
	return 0;
}

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

//============================================================================
// Name        : main.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include<cstdio>
#include<cstring>
using namespace std;
struct Data{
	long long r,k;
}tmp,ans1,ans2,ans;
long long inf = 1000000,n;
long long fun(long long x,long long r,long long val ){
	long long sum = val,tmp = 1;
	int i;
	for(i=1;i<=r;i++){
		tmp*=x,sum+=tmp;
		if(sum > n) return inf;
	}
	return sum;
}
bool check(Data tmp,Data ans1){
	return (ans1.k == 1 || (ans1.k*ans1.r > tmp.r*tmp.k)
						||(ans1.k*ans1.r == tmp.r*tmp.k && ans1.r>tmp.r) );
}
int main() {

	long long r;
	inf = inf*inf;
	while(cin>>n){
		ans1.k=ans2.k=ans.k = -1;
		for(r=1;r<=1000;r++){
			long long left = 2,right = inf,mid;
			while(left+1<right){
				mid = (left+right)/2;
				if(fun(mid,r,0) >n) right = mid;
				else left = mid;
			}
			if(fun(left,r,0) == n) tmp.r=r,tmp.k = left;
			else tmp.r=r,tmp.k = right;
			if(check(tmp,ans1))
				ans1 = tmp;
		}
		for(r=1;r<=1000;r++){
			long long left = 2,right = inf,mid;
			while(left+1<right){
				mid = (left+right)/2;
				if(fun(mid,r,1) >n) right = mid;
				else left = mid;
			}
			if(fun(left,r,1) == n) tmp.r=r,tmp.k = left;
			else tmp.r=r,tmp.k = right;
			if(check(tmp,ans1))
				ans2 = tmp;
		}
		if(check(ans1,ans)) ans = ans1;
		if(check(ans2,ans)) ans = ans2;
		printf("%lld %lld\n",ans.r,ans.k);
	}
	return 0;
}

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

//============================================================================
// Name        : main.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include<cstdio>
#include<cstring>
using namespace std;
struct Data{
	long long r,k;
}tmp,ans1,ans2,ans;
long long inf = 1000000,n;
long long fun(long long x,long long r,long long val ){
	long long sum = val,tmp = 1;
	int i;
	for(i=1;i<=r;i++){
		//tmp*=x,sum+=tmp;
		if(n/x +3 < tmp) return inf;
		tmp*=x,sum+=tmp;
		if(sum > n) return inf;
	}
	return sum;
}
bool check(Data tmp,Data ans1){
	return ((ans1.k*ans1.r > tmp.r*tmp.k)
						||(ans1.k*ans1.r == tmp.r*tmp.k && ans1.r>tmp.r) );
}
int main() {

	long long r;
	inf = inf*inf;
	while(cin>>n){
		ans1.k=ans2.k=ans.k = n-1;
		ans1.r = ans2.r = ans.r = 1;
		for(r=1;r<=1000;r++){
			long long left = 2,right = inf,mid;
			while(left+1<right){
				mid = (left+right)/2;
				if(fun(mid,r,0) >n) right = mid;
				else left = mid;
			}
			if(fun(left,r,0) == n) tmp.r=r,tmp.k = left;
			else if(fun(right,r,0) == n) tmp.r=r,tmp.k = right;
			else continue;
			if(check(tmp,ans1))
				ans1 = tmp;
		}
		for(r=1;r<=1000;r++){
			long long left = 2,right = inf,mid;
			while(left+1<right){
				mid = (left+right)/2;
				if(fun(mid,r,1) >n) right = mid;
				else left = mid;
			}
			if(fun(left,r,1) == n) tmp.r=r,tmp.k = left;
			else if(fun(right,r,1) == n) tmp.r=r,tmp.k = right;
			else continue;
			if(check(tmp,ans1))
				ans2 = tmp;
		}
		if(check(ans1,ans)) ans = ans1;
		if(check(ans2,ans)) ans = ans2;
		printf("%lld %lld\n",ans.r,ans.k);
	}
	return 0;
}

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

#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<vector>
using namespace std;

const int N=50005,M=N*4;
int n;
struct Node{
    int x1,x2,y1,y2;
    Node(){}
    Node(int a,int b,int c,int d):x1(a),y1(b),x2(c),y2(d){}
}node[N*5];
int le[M],ri[M],sum[M],c[M];
vector<int>in[N],ou[N];

void build(int rt,int l,int r){
    le[rt]=l;ri[rt]=r;int mid=(l+r)>>1;
    sum[rt]=0;c[rt]=0;
    if(l==r-1)return ;
    build(rt<<1,l,mid);
    build(rt<<1|1,mid,r);
}

void pushup(int rt){
    if(le[rt]==ri[rt]-1){
        sum[rt]=0;
    }
    else{
        sum[rt]=sum[rt<<1]+sum[rt<<1|1];
    }
    if(c[rt])sum[rt]=ri[rt]-le[rt];
}

void update(int rt,int l,int r,int v){
    if(le[rt]==l&&ri[rt]==r){
        c[rt]+=v;
        pushup(rt);return ;
    }
    int mid=(le[rt]+ri[rt])>>1;
    if(r<mid)update(rt<<1,l,r,v);
    else if(l>=mid)update(rt<<1|1,l,r,v);
    else{
        update(rt<<1,l,mid,v);
        update(rt<<1|1,mid,r,v);
    }
    pushup(rt);
}

int main(){
    freopen("d:\\in.txt","r",stdin);
    while(scanf("%d",&n)==1){
        if(n==0)break;
        int lx=1000000,rx=-1,ly=1000000,ry=-1;
        for(int i=0;i<n;i++){
            int a,b,c,d;
            int aa,bb,cc,dd;
            scanf("%d%d%d%d%d%d%d%d",&a,&b,&c,&d,&aa,&bb,&cc,&dd);
            node[i*4]=Node(a,b,c,bb);
            node[i*4+1]=Node(a,bb,aa,dd);
            node[i*4+2]=Node(cc,dd,c,dd);
            node[i*4+3]=Node(a,dd,c,d);
            lx=min(a,lx);rx=max(c,rx);
            ly=min(b,ly);ry=max(d,ry);
        }
        for(int i=lx;i<=rx;i++){
            in[i].clear();ou[i].clear();
        }
        for(int i=0;i<4*n;i++){
            in[node[i].x1].push_back(i);
            ou[node[i].x2].push_back(i);
        }
        build(1,0,ry);
        int ans=0;
        for(int i=lx;i<rx;i++){
            for(int j=0;j<ou[i].size();j++){
                int a=ou[i][j];
                update(1,node[a].y1,node[a].y2,-1);
            }
            for(int j=0;j<in[i].size();j++){
                int a=in[i][j];
                update(1,node[a].y1,node[a].y2,1);
            }
            ans+=sum[1];
        }
        printf("%d\n",ans);
    }
    return 0;
}

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

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<algorithm>
using namespace std;
#define maxn 105

int a[maxn][maxn];
bool vis[maxn][maxn];
bool prime[maxn*maxn];
struct node
{
	int x,y;
}c[maxn*maxn];
struct Node
{
	int x,y;
	int dis;
}q[maxn*maxn];

void init()
{
	int i,j;
	prime[1]=true;
	for (i=2;i<=10000;i++)
		if (!prime[i])
		{
			j=2;
			while (i*j<=10000)
			{
				prime[i*j]=true;
				j++;
			}
		}
	for (i=0;i<maxn;i++)
		a[0][i]=a[i][0]=a[i][101]=a[101][i]=10005;
	int x=1,y=1;
	int cnt=10000;
	for (i=100;i>=1;i--)
	{
		while (a[x][y]==0)
		{
			a[x][y]=cnt;
			c[cnt].x=x;c[cnt].y=y;
			cnt--;
			y++;	
		}
		y--;x++;
		while (a[x][y]==0)
		{
			a[x][y]=cnt;
			c[cnt].x=x;c[cnt].y=y;
			cnt--;
			x++;
		}
		x--;y--;
		while (a[x][y]==0)
		{
			a[x][y]=cnt;
			c[cnt].x=x;c[cnt].y=y;
			cnt--;
			y--;
		}
		y++,x--;
		while (a[x][y]==0)
		{
			a[x][y]=cnt;
			c[cnt].x=x;c[cnt].y=y;
			cnt--;
			x--;
		}
		x++,y++;
	}
}

int d[4][2]={{1,0},{-1,0},{0,1},{0,-1}};
void bfs(int s,int t)
{
	memset(vis,0,sizeof(vis));
	q[1].x=c[s].x;
	q[1].y=c[s].y;
	q[1].dis=0;
	vis[c[s].x][c[s].y]=0;
	int head=1,tail=1;
	int i,x,y,xx,yy;
	while (head<=tail)
	{
		x=q[head].x;
		y=q[head].y;
		for (i=0;i<4;i++)
		{
			xx=x+d[i][0];
			yy=y+d[i][1];
			if (a[xx][yy]>10000) continue;
			if (vis[xx][yy]||!prime[a[xx][yy]]) continue;
			if (a[xx][yy]==t)
			{
				printf("%d\n",q[head].dis+1);
				return;
			}
			q[++tail].x=xx;
			q[tail].y=yy;
			q[tail].dis=q[head].dis+1;
			vis[xx][yy]=true;
		}
		head++;
	}
	printf("impossible\n");
}

int main()
{
	init();
	int cnt=0;
	int s,t;
	while (scanf("%d %d",&s,&t)!=-1)
	{
		printf("Case %d: ",++cnt);
		if (s==t)
			printf("0\n");
		else
			bfs(s,t);
	}
	return 0;
}

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

#include<iostream>
#include<stdio.h>
#include<set>
#include<string.h>
#include<math.h>
#include<string>
#include<queue>
#include<algorithm>
#define LL long long
#define N 2
using namespace std;
int a,b,mod,n;
struct mat
{
    int a[N][N],n,m;
    mat(int n=2,int m=2,int val=0):n(n),m(m)
    {
        for(int i=0;i<n;i++)
            for(int j=0;j<m;j++)
                a[i][j]=(i==j?val:0);
    }
    mat operator *(mat tmp)
    {
       mat ret(n,tmp.m);
       for(int i=0;i<n;i++)
            for(int j=0;j<tmp.m;++j)
                for(int k=0;k<m;++k)
                    ret.a[i][j]=(1ll*a[i][k]*tmp.a[k][j]+ret.a[i][j])%mod;
        return ret;
    }
    mat operator ^(int b)
    {
        mat ret(n,m,1),base=(*this);
        while(b)
        {
            if(b&1) ret=ret*base;
            base=base*base;
            b>>=1;
        }
        return ret;
    }
    void print(){
        for(int i=0;i<n;++i,puts(""))
            for(int j=0;j<m;++j)
                cout<<a[i][j]<<' ';
    }
}e(2,2,1),base(2,2),m1(1,2),m2(1,2);
void test()
{
     mod=10000;
     mat m1=(2,2);
     (e*m1).print();
//    e.print();
//    (e*e).print();
    (e^10).print();
}
void init()
{
//    mod=10;
//    (e^1).print();
    base.a[0][0]=1; base.a[0][1]=1; base.a[1][0]=1; base.a[1][1]=0;
    m1.a[0][0]=0; m1.a[0][1]=1;
    m2.a[0][0]=1; m2.a[0][1]=0;
//    (base^0).print();
//    m1.print(); m2.print();
}
int exp_mod(int a,int b)
{
    LL ret=1,base=a%mod;
    while(b)
    {
        if(b&1) ret=ret*base%mod;
        base=base*base%mod;
        b>>=1;
    }
    return (int) ret;
}
int main()
{
//    test();
    int t,cas=0;
    init();
    freopen("b.in","r",stdin);
    scanf("%d",&t);
    while(t--)
    {
        scanf("%d%d%d%d",&a,&b,&mod,&n);
        --n;
        mat m=base^n;
        mat tmp=m1*m;
//        m.print();
//        m1.print();
//        tmp.print();
        LL ans=exp_mod(a,tmp.a[0][1]);
//        cout<<ans<<endl;
        tmp=m2*m;
//        m2.print();
//        tmp.print();
        ans=ans*exp_mod(b,tmp.a[0][1])%mod;
        printf("Case #%d: %d\n",++cas,(int)ans);
    }
    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<stdio.h>
#include<set>
#include<string.h>
#include<math.h>
#include<string>
#include<queue>
#include<algorithm>
#define LL long long
#define N 2
using namespace std;
int a,b,mod,n,p;
struct mat
{
    int a[N][N],n,m;
    mat(int n=2,int m=2,int val=0):n(n),m(m)
    {
        for(int i=0;i<n;i++)
            for(int j=0;j<m;j++)
                a[i][j]=(i==j?val:0);
    }
    mat operator *(mat tmp)
    {
       mat ret(n,tmp.m);
       for(int i=0;i<n;i++)
            for(int j=0;j<tmp.m;++j)
                for(int k=0;k<m;++k){
                    LL tt=1ll*a[i][k]*tmp.a[k][j]+ret.a[i][j];
                    if(tt>mod) tt=tt%mod+mod;
                    ret.a[i][j]=(int)tt;
                }
        return ret;
    }
    mat operator ^(int b)
    {
        mat ret(n,m,1),base=(*this);
        while(b)
        {
            if(b&1) ret=ret*base;
            base=base*base;
            b>>=1;
        }
        return ret;
    }
    void print(){
        for(int i=0;i<n;++i,puts(""))
            for(int j=0;j<m;++j)
                cout<<a[i][j]<<' ';
    }
}e(2,2,1),base(2,2),m1(1,2),m2(1,2);
void test()
{
     mod=10000;
     mat m1=(2,2);
     (e*m1).print();
//    e.print();
//    (e*e).print();
    (e^10).print();
}
void init()
{
//    mod=10;
//    (e^1).print();
    base.a[0][0]=1; base.a[0][1]=1; base.a[1][0]=1; base.a[1][1]=0;
    m1.a[0][0]=0; m1.a[0][1]=1;
    m2.a[0][0]=1; m2.a[0][1]=0;
//    (base^0).print();
//    m1.print(); m2.print();
}
int exp_mod(int a,int b)
{
    LL ret=1,base=a%p;
    while(b)
    {
        if(b&1) ret=ret*base%p;
        base=base*base%p;
        b>>=1;
    }
    return (int) ret;
}
void get_mod(int n)
{
    mod=n;
    for(int i=2;i*i<=n;++i)
    {
        if(n%i==0) mod=mod/i*(i-1);
        while(n%i==0) n/=i;
    }
    if(n>1) mod=mod/n*(n-1);
}
int main()
{
//    test();
    int t,cas=0;
    init();
    freopen("b.in","r",stdin);
    scanf("%d",&t);
    while(t--)
    {
        init();
        scanf("%d%d%d%d",&a,&b,&p,&n);
        get_mod(p);
        cout<<mod<<' '<<p<<endl;
        --n;
        mat m=base^n;
        mat tmp=m1*m;
//        m.print();
//        m1.print();
//        tmp.print();
        LL ans=exp_mod(a,tmp.a[0][1]);
//        cout<<ans<<endl;
        tmp=m2*m;
//        m2.print();
//        tmp.print();
        ans=ans*exp_mod(b,tmp.a[0][1])%mod;
        printf("Case #%d: %d\n",++cas,(int)ans);
    }
    return 0;
}

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

//#include<stdio.h>
//#include<stdlib.h>
//#include<algorithm>
//using namespace std;
//int n,d1,d2;
//
//int main(){
//    scanf("%d%d%d",&n,&d1,&d2);
//    int t1=d1,t2=d2,num=2;
//    while(1){
//        int t=min(t1,t2);
//        if(num>=n) break;
//        if(t==t1) t1+=d1,num++;
//        if(t==t2) t2+=d2,num++;
//    }
//    printf("%d %d\n",num,max(t1,t2));
//    return 0;
//}

#include<stdio.h>
#include<stdlib.h>
#include<algorithm>
#include <vector>
#include <set>
#include <string.h>
#define clr(a,b) memset(a,b,sizeof(a))
using namespace std;

int n,k;
int num[4005],val[4005][4005];
struct Node{
    int a,b;
    bool operator<(const Node&x)const{
        return b>x.b;
    }
    Node(int aa,int bb):a(aa),b(bb){}
    Node(){}
}node[4005];
int uu[4005];

int main(){
    freopen("d:\\in.txt","r",stdin);
    while(scanf("%d%d",&n,&k)==2){
        clr(num,0);
        for(int i=1;i<=n;i++){
            int a,b;scanf("%d%d",&a,&b);
            val[a][num[a]++]=b;
        }
        for(int i=1;i<=4000;i++){
            sort(val[i],val[i]+num[i],greater<int>);
            node[i]=Node(i,num[i]);
        }
        sort(node+1,node+1+4000);
        int cnt=node[k].b;
        if(cnt==0){
            put("0 0");continue;
        }
        for(int i=1;i<=k;i++){
            int id=node[i].a;
            int sum=0;
            for(int j=0;j<cnt;j++)sum+=val[id][j];
            uu[i]=sum;
        }
        int i=k+1;
        for(;i<=4000;i++)
            if(node[i].b==cnt){
                int id=node[i].a;
                int sum=0;
                for(int j=0;j<cnt;j++)sum+=val[id][j];
                uu[i]=sum;
            }
        sort(uu+1,uu+i);
        int sum=0;
        for(int i=1;i<=k;i++)sum+=uu[i];
        printf("%d %d\n",cnt,sum);
    }
}

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

#include<iostream>
using namespace std;

int main()
{
    int i,j;
    int s;

    for(i=1;i<=9;i++)
    {
        for(j=1;j<=9;j++)
        {
            s=i*j;
            cout<<i<<"x"<<j<<"="<<s<<"\n";
        }
    }
    return 0;
}

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

#include<stdio.h>
int main(void)
{
for(int f1=1;f1<=9;f1++){
for(int f2=1;f2<=9;f2++){
printf("%dx%d=%d\n",f1,f2,f1*f2);
return 0;
}

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

struct SuffixArray {
    int wa[LEN] , wb[LEN] , wv[LEN] , ws[LEN];
    int n , m , r[LEN] , sa[LEN] , rank[LEN] , h[LEN];
    void init(char *str) {
        // r[] : the string
        // n : length of the string
        // m : kind of character
        // Tips : r[n] = 0
        n = strlen(str);
        for(int i = 0 ; i < n ; i++) r[i] = str[i] - 'a' + 1;
        r[n] = 0;
        m = 27;
    }
    inline int cmp(int *y , int a , int b , int l) {
        return y[a] == y[b] && y[a+l] == y[b+l];
    }
    void get_sa(int n) { 
        // sa[i]:蟄怜?蠎冗ャャi螟ァ逧?錘郛?噪襍キ蟋倶ス咲スョ (1 <= i <= n , 0 <= sa[i] < n)
        int i , j , p , *x = wa , *y = wb , *t;
        for(i = 0 ; i < m ; i++) ws[i] = 0;
        for(i = 0 ; i < n ; i++) ws[x[i] = r[i]]++;
        for(i = 1 ; i < m ; i++) ws[i] += ws[i-1];
        for(i = n - 1 ; i >= 0 ; i--) sa[--ws[x[i]]] = i;
        for(j = 1 , p = 1 ; p < n ; j <<= 1 , m = p) {
            for(p = 0 , i = n - j ; i < n ; i++) y[p++] = i;
            for(i = 0 ; i < n ; i++) if(sa[i] >= j) y[p++] = sa[i]-j;
            for(i = 0 ; i < m ; i++) ws[i] = 0;
            for(i = 0 ; i < n ; i++) ws[wv[i] = x[y[i]]]++;
            for(i = 1 ; i < m ; i++) ws[i] += ws[i-1];
            for(i = n - 1 ; i >= 0 ; i--) sa[--ws[wv[i]]] = y[i];
            swap(x , y) , p = 1 , x[sa[0]] = 0;
            for(i = 1 ; i < n ; i++)
                x[sa[i]] = cmp(y , sa[i-1] , sa[i] , j) ? p - 1 : p++;
        }
    }
    void get_h() {
        // rank[i]:莉主次荳イi蠑?ァ狗噪蜷守シ?噪謗貞錐?? <= i < n??        // h[i]:謗貞錐隨ャi螟ァ逧?錘郛?ク取賜蜷咲ャャi-1螟ァ逧?錘郛?噪譛?柄蜈ャ蜈ア蜑咲シ?シ? <= i <= n??        int i , j , k = 0;
        for(i = 1 ; i <= n ; i++) rank[sa[i]] = i;
        for(i = 0 ; i < n ; h[rank[i++]] = k)
            for(k?k--:0 , j = sa[rank[i]-1] ; r[i+k] == r[j+k] ; k++) ;
    }
    int lcp(int x , int y) { //霑泌屓蛟シ荳コ蜷守シ?蜥悟錘郛?逧?怙髟ソ蜈ャ蜈ア蜑咲シ?        x = rank[x] , y = rank[y];
        if(x > y) swap(x , y);
        return rmq.query(x + 1 , y);
    }
    void out() {
        get_sa(n + 1);
        get_h();
        puts("rank array:");
        for(int i = 0 ; i < n ; i++) printf("%d " , rank[i]);
        puts("\nsa array");
        for(int i = 1 ; i <= n ; i++) printf("%d " , sa[i]);
        puts("\nheight array");
        for(int i = 1 ; i <= n ; i++) printf("%d " , h[i]);
        puts("");
    }
    void debug() {
        char str[LEN];
        scanf("%s" , str);
        init(str);
        out();
        /*
            莉・"aabaaaab"荳コ萓具シ檎嶌蠎皮噪霎灘?荳コ??            rank array:
            4 6 8 1 2 3 5 7
            sa array
            3 4 5 0 6 1 7 2
            height array
            0 3 2 3 1 2 0 1
        */
    }
}sf;

Compiler output:
main.c:2:12: error: 'LEN' undeclared here (not in a function)
    2 |     int wa[LEN] , wb[LEN] , wv[LEN] , ws[LEN];
      |            ^~~
main.c:4:26: error: expected ':', ',', ';', '}' or '__attribute__' before '{' token
    4 |     void init(char *str) {
      |                          ^
Language: C

#include<stdio.h>
#include<string.h>
#include<algorithm>
#define clr(x,y) memset(x,y,sizeof(x))
#define ll long long
using namespace std;

const int inf = 1000000000;
ll dp[1005][1005];
ll a[1005],p;
int q[1005][1005],bg[1005],ed[1005];
int i,j,n;

ll f1(int l,int k,int j){
    return dp[j][l]-dp[k][l];
}
ll f2(int l,int k,int j){
    return j-k;
}
ll g(int l,int i,int j){
    return dp[j][l]+a[i]*(i-j);
}

int main(){
    freopen("d:\\in.txt","r",stdin);
    scanf("%d%lld",&n,&p);
    for(i=1;i<=n;i++) scanf("%lld",&a[i]);
    sort(a+1,a+n+1);
    ll sum=0;
    for(i=1;i<=n;i++){
        sum+=a[i];
        if(sum>p) break;
    }
    n=i-1;
    clr(bg,0);clr(ed,-1);
    for(i=0;i<=n;i++) q[i][++ed[i]]=0,dp[0][i]=0;
    for(i=1;i<=n;i++){
        for(j=1;j<=i;j++){
            while(ed[j-1]>bg[j-1]&&f2(j-1,q[j-1][bg[j-1]],q[j-1][bg[j-1]+1])*a[i]>=
                  f1(j-1,q[j-1][bg[j-1]],q[j-1][bg[j-1]+1])) bg[j-1]++;
            dp[i][j]=g(j-1,i,q[j-1][bg[j-1]]);
            while(ed[j]>bg[j]&&f1(j,q[j][ed[j]-1],q[j][ed[j]])*f2(j,q[j][ed[j]],i)>=
                  f1(j,q[j][ed[j]],i)*f2(j,q[j][ed[j]-1],q[j][ed[j]])) ed[j]--;
            q[i][++ed[j]]=i;
        }
    }
    int ans=inf;
    for(i=1;i<=n;i++){
        if(dp[n][i]<=p) ans=min(ans,i);
    }
    printf("%d %d\n",n,ans);
    return 0;
}

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

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

#define db double
#define rt return

const db eps = 1e-8 , pi = acos(-1.);

inline int sig(db x){rt (x>eps)-(x<-eps);}

db calc(db a , db b , db c) {
    db delta = b*b - 4.*a*c;
    rt (-b - sqrt(delta)) / (2. * a);
}

int n;

db v[211] , H , l1 , r1 , l2 , r2;

int main() {
    freopen("d.in" , "r" , stdin);
    while(scanf("%d" , &n) , n) {
        scanf("%lf%lf%lf%lf%lf" , &H , &l1 , &r1 , &l2 , &r2);
        for(int i = 0 ; i < n ; i++) scanf("%lf" , &v[i]);
        int res = 0;
        db di = pi / 30000 , x = 0.;
        int cnt = 0;
        for(db i = 0 ; i < 30000 ; i++) {
//            cnt++;
            int tmp = 0;
            for(int j = 0 ; j < n ; j++) {
                db a = 4.9 , b = -v[j]*sin(i) , c = H;
                db t = calc(a , b , c) , x = t * v[j] * cos(i);
                if(sig(x - l1) >= 0 && sig(r1-x) >= 0 &&
                   (sig(x-l2) < 0 || sig(x-r2) > 0)) tmp++;
            }
            if(tmp > res) res = tmp;
            x += di;
        }
//        printf("cnt = %d\n" , cnt);
        printf("%d\n" , res);
    }

    rt 0;
}

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

compareTo荳ュ?瑚ソ泌屓-1邀サ莨シC++荳ュ驥崎スス逧?<'
import java.io.*;
import java.util.*;
import java.math.*;
import java.text.*;
class Node implements Comparable
{
    public int val;
    public Node(int v){this.val=v;}
    public int compareTo(Object obj)
    {
        if(obj instanceof Node){
            Node oo=(Node)obj;
            if(this.val<oo.val)
                return -1;
            if(this.val>oo.val)
                return 1;
        }
        return 0;
    }
}
public class Main {
    public static void main(String args[]) throws Exception
    {
        int i;
        Scanner cin=new Scanner(System.in);
        Node a[]=new Node[4];
        for(i=0;i<4;i++)a[i]=new Node(i+1);
        Arrays.sort(a);
        for(i=0;i<4;i++)
            System.out.print(a[i].val+((i==3)?"\n":" "));
    }
}


Arrays.sort(long A[],int L,int R);

Compiler output:
main.c:1:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '?' token
    1 | compareTo荳ュ?瑚ソ泌屓-1邀サ莨シC++荳ュ驥崎スス逧?<'
      |              ^
main.c:1:24: error: invalid suffix "邀サ莨シC" on integer constant
    1 | compareTo荳ュ?瑚ソ泌屓-1邀サ莨シC++荳ュ驥崎スス逧?<'
      |                        ^~~~~~~~~~
main.c:1:52: warning: missing terminating ' character
    1 | compareTo荳ュ?瑚ソ泌屓-1邀サ莨シC++荳ュ驥崎スス逧?<'
      |                                                    ^
main.c:1:52: error: missing terminating ' character
main.c:3:1: error: unknown type name 'import'
    3 | import java.util.*;
      | ^~~~~~
main.c:3:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    3 | import java.util.*;
      |            ^
main.c:4:1: error: unknown type name 'import'
    4 | import java.math.*;
      | ^~~~~~
main.c:4:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    4 | import java.math.*;
      |            ^
main.c:5:1: error: unknown type name 'import'
    5 | import java.text.*;
      | ^~~~~~
main.c:5:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    5 | import java.text.*;
      |            ^
main.c:6:1: error: unknown type name 'class'
    6 | class Node implements Comparable
      | ^~~~~
main.c:6:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'implements'
    6 | class Node implements Comparable
      |            ^~~~~~~~~~
main.c:6:12: error: unknown type name 'implements'
main.c:22:1: error: unknown type name 'public'
   22 | public class Main {
      | ^~~~~~
main.c:22:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
   22 | public class Main {
      |              ^~~~
main.c:36:7: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
   36 | Arrays.sort(long A[],int L,int R);
      |       ^
Language: C

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

#define N 500010
#define Max(a, b) ((a)>(b))?(a):(b)
#define Min(a, b) ((a)<(b))?(a):(b)
#define inf 0x7fffffff
#define PB	push_back

vector<int> edge[N], length[N];
bool col[N];
int mn[N], mx[N];

void dfs(int loc){
	col[loc]=true;
	int s=0;
	for(int i=0; i<edge[loc].size(); i++){
		int to = edge[loc][i];
		if(!col[to])
			dfs(to),
				s++;
	}
	if(!s) {
		mn[loc]=mx[loc]=0;
		return;
	}
	mx[loc] = 0, mn[loc]=inf;
	for(int i=0; i<edge[loc].size(); i++){
		int to = edge[loc][i];
		if(!col[to]){
			mn[loc] = Min(mn[loc], length[loc][i]+mx[to]);
			mx[loc] = Max(mx[loc], length[loc][i]+mn[to]);
		}
	}
	col[loc] = false;
}
int n, l, r;
int main()
{
	while(scanf("%d%d%d", &n, &l, &r)!=EOF){
		int a, b, c;
		for(int i=0; i<n-1; i++){
			scanf("%d%d%d", &a, &b, &c);
			edge[a].PB(b);
			length[a].PB(c);
		}
		dfs(0);
		if(mx[0]<l || mx[0]>r){
			printf("on, my god!\n");
		}
		else{
			printf("%d\n", mx[0]);
		}
		for(int i=0; i<n; i++)
			edge[i].clear(), length[i].clear();
	}
}

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

#include<stdio.h>
int main()
{
printf("1x1=1\n1x2=2\n.\n.\n9x8=72\n9x9=81\n"};
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:46: error: expected ')' before '}' token
    4 | printf("1x1=1\n1x2=2\n.\n.\n9x8=72\n9x9=81\n"};
      |       ~                                      ^
      |                                              )
main.c:4:46: error: expected ';' before '}' token
    4 | printf("1x1=1\n1x2=2\n.\n.\n9x8=72\n9x9=81\n"};
      |                                              ^
      |                                              ;
main.c: At top level:
main.c:5:1: error: expected identifier or '(' before 'return'
    5 | return 0;
      | ^~~~~~
main.c:6:1: error: expected identifier or '(' before '}' token
    6 | }
      | ^
Language: C

#include<stdio.h>

int main(){
    int a,b,c;
    for(a=1;a<=9;a++)
      for(b=1;b<=9;b++
      {
          c=a*b;
          printf("%d*%d=%d\n",a,b,c);
      }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:23: error: expected ')' before '{' token
    6 |       for(b=1;b<=9;b++
      |          ~            ^
      |                       )
    7 |       {
      |       ~                
main.c:12:1: error: expected expression before '}' token
   12 | }
      | ^
Language: C

#include<stdio.h>

int main(){
   int i;
     for(i=1;i<=9;i++)
     printf("%d*%d=%d\n",i,i,i*i);

    return 0;
}
~           

Compiler output:
main.c:10:1: error: expected identifier or '(' before '~' token
   10 | ~
      | ^
Language: C

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <vector>
#include <string>
#include <map>

using namespace std;

const int maxn = 1000010;
const int maxk = 26;
char s1[maxn], s2[maxn];
int con[maxk], pre[maxn];
int rev[maxk];

inline bool equal(char a, char b) {
    if (islower(a) && islower(b)) return true;
    return a == b;
}

bool check(int p1, int l) {
    memset(con, -1, sizeof(con));
    memset(rev, -1, sizeof(rev));
    for (int c = 0; c < l; ++c) {
        if (islower(s2[l-c-1])) {
            if (!islower(s1[p1 - c])) return false;
            int u = s2[l- c - 1] - 'a';
            int v = s1[p1 - c] - 'a';
            if (con[u] == v && rev[v] == u);
            else if (con[u] == -1 && rev[v] == -1) {
                con[u] = v, rev[v] = u;
            } else {
                return false;
            }
        }
    }
    return true;
}

void solved(int nT) {
    scanf("%s %s", s1, s2);
    int l2 = strlen(s2);
    int k = pre[0] = -1;
    for (int i = 1; i < l2; ++i) {
        while (k != -1 && !equal(s2[k + 1], s2[i])) k = pre[k];
        if (equal(s2[k + 1], s2[i])) ++k;
        pre[i] = k;
    }
    int l1 = strlen(s1); k = -1;
    int cnt = 0;
    for (int i = 0; i < l1; ++i) {
        while (k != -1 && !equal(s2[k + 1], s1[i])) k = pre[k];
        if (equal(s2[k + 1], s1[i])) ++k;
        if (k == l2 - 1) {
            if (check(i, l2)) ++cnt;
            k = pre[k];
        }
    }
    printf("Case %d: %d\n", nT, cnt);
}

int main() {
    int T = 1;
    scanf ("%d", &T);
    for (int nT = 1; nT <= T; nT++) {
        solved(nT);
    }
    return 0;
}

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

/*
 * P.cpp
 *
 *  Created on: Dec 2, 2012
 *      Author: carber
 */

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <vector>
#include <string>
#include <map>
#include <queue>

using namespace std;
int mpp[16][16], use[16][1<<15], n, dis[16][1<<15];
vector<int> vec[16];
struct node {
    int l, st, v;
    node() {}
    node (int _v, int _st, int _l) : v(_v), st(_st), l(_l) {}
    bool friend operator < (const node &a, const node &b) {
        return a.l > b.l;
    }
};
node pre[16][1<<15], uu;
queue<node> qu;
void pus(int v, int st, int l) {
    if (use[v][st]) return ;
    dis[v][st] = l;
    use[v][st] = 1;
    pre[v][st] = uu;
    qu.push(node(v, st, l));
}
int how(int x) {
    int ans = -1;
    while (x) {
        ans ++;
        x >>= 1;
    }
    return ans;
}
void find(int s, int st, int t) {
    int ss = s, stt = st;
    memset(use, 0, sizeof(use));
    while (!qu.empty()) qu.pop();
    pus(s, st, 0);
    while (!qu.empty()) {
        uu = qu.front();
        qu.pop();
        int l = uu.l;
        //if (uu.v == t) break;
        st = uu.st;
        for (int i = 0; i < n; ++i) {
            if (i == uu.v || (1<<i & st)) {
                for (int j = 0; j < vec[i].size(); ++j) {
                    int v = vec[i][j];
                    if (v == uu.v || (1<<v & st)) continue;
                    if (i == uu.v) pus(v, st, l + 1);
                    else pus(uu.v, st ^ 1<<i ^ 1<<v, l + 1);
                }
            }
        }
    }
    int ans = 1000000000;
    st = -1;
    for (int i = 0; i < 1<<n; ++i) {
        if (!use[t][i]) continue;
        if (ans > dis[t][i]) {
            ans = dis[t][i];
            st = i;
        }
    }
    if (st == -1) {
        printf("-1\n");
        return ;
    }
    printf("%d\n", ans);
    vector<pair<int, int> > res;
    while (t != ss || st != stt) {
        int tt = st, tv = t;
        t = pre[tv][tt].v;
        st = pre[tv][tt].st;
        if (tv != t) res.push_back(make_pair(t, tv));
        else {
            int ss = st & tt;
            res.push_back(make_pair(how(st ^ ss), how(tt ^ ss)));
        }
        //t = tv, st = tt;
    }
    for (int i = res.size() - 1; i >= 0; --i)
        printf("%d %d\n", res[i].first + 1, res[i].second + 1);
}
void solve(int cs) {
    //if (cs - 1) puts("");
    int m, s, t, st = 0;
    memset(mpp, 0, sizeof(mpp));
    scanf("%d%d%d%d", &n, &m, &s, &t);
    s--, t--;
    for (int i = 0; i < m; ++i) {
        int a;
        scanf("%d", &a);
        a--;
        st |= 1<<a;
    }
    for (int i = 0; i < n; ++i)
        vec[i].clear();
    for (int i = 1; i < n; ++i) {
        int a, b;
        scanf("%d%d", &a, &b);
        a--, b--;
        vec[a].push_back(b);
        vec[b].push_back(a);
    }
    printf("Case %d: ", cs);
    find(s, st, t);
}
int main() {
    int T;
    scanf("%d", &T);
    for (int cs = 1; cs <= T; ++cs)
        solve(cs);
    return 0;
}

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

/*
 * Y.cpp
 *
 *  Created on: Oct 25, 2012
 *      Author: carber
 */

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>

using namespace std;

typedef pair<int, int> PII;
#define mp make_pair

#include <queue>
const int V = 17;
const int E = V << 1;

int head[V], cur[E], nxt[E], ne;
int step[V][1 << V], pre[V][1<<V], cv[V][1<<V];
int n, m, s, t, tot;

void init(int n) {
    ne = 0, memset(head, -1, sizeof(head));
}
inline void addEdge(int u, int v) {
    cur[ne] = v, nxt[ne] = head[u], head[u] = ne++;
}
queue<int> Q;

inline void push(int stone, int state, int ps, int l, int u, int v) {
    if (step[stone][state] != -1) return;
    step[stone][state] = l;
    cv[stone][state] = u * n + v;
    pre[stone][state] = ps;
    Q.push(stone * tot + state);
}

int bfs(int cs) {
    while (!Q.empty()) Q.pop();
    tot = 1 << n;
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < tot; ++j) {
            step[i][j] = -1;
        }
    }
    step[s][cs] = 0;

    Q.push(s * tot + cs);
    while (!Q.empty()) {
        int ps = Q.front();
        int stone = Q.front() / tot, state = Q.front() % tot;
        Q.pop();
        if (stone == t) {
            return stone * tot + state;
        }
        for (int u = 0; u < n; ++u) {
            if (!(state & (1 << u))) continue;
            for (int i = head[u]; i != -1; i = nxt[i]) {
                int v = cur[i];
                if (state & (1 << v)) continue;
                int ns = (state ^ (1 << u)) ^ (1 << v);
                if (stone == u) {
                    push(v, ns, ps, step[stone][state] + 1, u, v);
                } else {
                    push(stone, ns, ps, step[stone][state] + 1, u, v);
                }
            }
        }
    }
    return -1;
}
void solved(int nT) {
    scanf("%d %d %d %d", &n, &m, &s, &t);
    --s, --t;
    int ns = 1 << s, c;
    for (int i = 0; i < m; ++i) {
        scanf("%d", &c); --c;
        ns |= 1 << c;
    }
    init(n);
    for (int i = 1; i < n; ++i) {
        int u, v;
        scanf("%d %d", &u, &v);
        --u, --v;
        addEdge(u, v);
        addEdge(v, u);
    }
    printf("Case %d: ", nT);
    int result = bfs(ns);
    if (result == -1) {
        puts("-1");
    } else {
        printf("%d\n", step[result/tot][result%tot]);
        vector<PII> ret;
        while (result != ns) {
            int stone = result / tot, state = result % tot;
            ret.push_back(mp(cv[stone][state] / n, cv[stone][state] % n));
            result = pre[stone][state];
        }
        reverse(ret.begin(), ret.end());
        for (int i = 0; i < (int)ret.size(); ++i) {
            printf("%d %d\n", ret[i].first + 1, ret[i].second + 1);
        }
    }
    puts("");
}

int main() {
    int T = 1;
    scanf("%d", &T);
    for (int nT = 1; nT <= T; ++nT) {
        solved(nT);
    }
    return 0;
}

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

#include <cstdio>
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;

typedef pair<double, double> PDD;
const double eps = 1e-8;

double val(PDD a)
{
    return sqrt(a.first * a.first + a.second * a.second);
}

int main()
{
    double x1, x2, y1, y2, vax, vay, vbx, vby, ra, rb, ma, mb;
    double t;
    scanf ("%lf %lf %lf %lf %lf %lf", &x1, &y1, &vax, &vay, &ra, &ma);
    scanf ("%lf %lf %lf %lf %lf %lf", &x2, &y2, &vbx, &vby, &rb, &mb);
    scanf ("%lf", &t);
    double tx = x2 - x1;
    double ty = y2 - y1;
    double tvx = vbx - vax;
    double tvy = vby - vay;
    double A = tvx * tvx + tvy * tvy;
    double B = 2 * tx * tvx + 2 * ty * tvy;
    double C = tx * tx + ty * ty - (ra + rb) * (ra + rb);
    double deta = B * B - 4 * A * C;
    if (deta < -eps)
    {
        printf ("%.3lf %.3lf %.3lf %.3lf\n", x1 + t * vax + eps, y1 + t * vay + eps, x2 + t * vbx + eps, y2 + t * vby + eps);
        return 0;
    }
    double ans1 = (-B + sqrt(deta)) / (2 * A);
    double ans2 = (-B - sqrt(deta)) / (2 * A);
    double ans;
    if ((ans1 < -eps || ans1 > t + eps) && (ans2 < -eps || ans2 > t + eps))
    {
        printf ("%.3lf %.3lf %.3lf %.3lf\n", x1 + t * vax + eps, y1 + t * vay + eps, x2 + t * vbx + eps, y2 + t * vby + eps);
        return 0;
    }
    else if (ans1 < -eps || ans1 > t + eps)
        ans = ans2;
    else if (ans2 < -eps || ans2 > t + eps)
        ans = ans1;
    else
        ans = min(ans1, ans2);
    printf ("%lf\n", ans);
    x1 = x1 + vax * ans;
    x2 = x2 + vbx * ans;
    y1 = y1 + vay * ans;
    y2 = y2 + vby * ans;
    if (fabs(val(va)) < eps)
    {
        
    }
    PDD AB = make_pair(x2 - x1, y2 - y1);
    PDD BA = make_pair(x1 - x2, y1 - y2);
    PDD va = make_pair(vax, vay);
    PDD vb = make_pair(vbx, vby);
    double cosa = (va.first * AB.first + va.second * AB.second) / (val(va) * val(AB));
    double cosb = (vb.first * BA.first + vb.second * BA.second) / (val(vb) * val(BA));
    PDD v1 = make_pair(AB.first * (val(va) * cosa / val(AB)), AB.second * (val(va) * cosa / val(AB)));
    PDD v2 = make_pair(BA.first * (val(vb) * cosb / val(BA)), BA.second * (val(vb) * cosb / val(BA)));
    PDD v3 = make_pair(vb.first - v2.first, vb.second - v2.second);
    PDD v4 = make_pair(va.first - v1.first, va.second - v1.second);
    PDD vva = make_pair(v1.first + v3.first, v1.second + v3.second);
    PDD vvb = make_pair(v2.first + v4.first, v2.second + v4.second);
    t -= ans;
    printf ("%.3lf %.3lf %.3lf %.3lf\n", x1 + vva.first * t + 1e-8, y1 + vva.second * t + 1e-8,
            x2 + vvb.first * t + 1e-8, y2 + vvb.second * t + 1e-8);
    return 0;
}

/*
0 1 1 0 2 1
5 0 0 0 2 1
5
*/

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

#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>

using namespace std;
const double eps=1e-6;
double c[100][100],p[100],s[100];

void init()
{
	memset(c,0,sizeof(c));
	c[0][0]=1;
	for (int i=1; i<=50; i++)
	{
		c[i][0]=1;
		for (int j=1; j<=i; j++) c[i][j]=c[i-1][j]+c[i-1][j-1];
	}	
}

double cc(int i,int j)
{
	if (i<j) return 0; else return c[i][j];
}

double cal(int n,int i,int l1,int l2,int l)
{
	return cc(i,l1)*cc(n-i,l2)/cc(n,l);
}

int main()
{
	int n,l1,l2,q,i,j;
	scanf("%d%d%d%d",&n,&l1,&l2,&q);
	init();
	int l=l1+l2;
	double pb=0;
	for (i=0; i<=n; i++)
	{
		p[i]=cal(n,i,l1,l2,l);
		pb+=p[i]/(n+1);
		cout<<i<<' '<<p[i]<<endl;
	}
	for (i=0; i<=n; i++) p[i]=p[i]/pb/(n+1);
	s[0]=p[0];
	for (i=1; i<=n; i++) s[i]=s[i-1]+p[i];
	int flag=0,ans1,ans2;
	for (i=0; i<=n; i++)
	 for (j=i; j<=n; j++)
	  if (s[j]-s[i]+p[i]>(double)q/100-eps)
	  {
	  	if (flag=0) {flag=1; ans1=i; ans2=j;}
	  	else if (j-i<ans2-ans1 || i<ans1) {ans1=i; ans2=j;}
	  }
	cout<<ans1<<' '<<ans2<<endl;
}
/*50 1 24 100
0 0
1 0.5
2 0.510204
3 0.382653
4 0.249674
5 0.149262
6 0.0835866
7 0.0443262
8 0.022384
9 0.0107923
10 0.00497206
11 0.00218771
12 0.000917919
13 0.000366362
14 0.000138624
15 4.95084e-05
16 1.65971e-05
17 5.1866e-06
18 1.49773e-06
19 3.95235e-07
20 9.39439e-08
21 1.97282e-08
22 3.56339e-09
23 5.32194e-10
24 6.17037e-11
25 4.94421e-12
26 2.05679e-13
27 0
28 0
29 0
30 0
31 0
32 0
33 0
34 0
35 0
36 0
37 0
38 0
39 0
40 0
41 0
42 0
43 0
44 0
45 0
46 0
47 0
48 0
49 0
50 0
1 18
*/

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

void f(int *a, int *b){
	if(&a + 1 == &b) return;
	if(&a + 2 == &b) while(1);
	*a = 1 / 0;
}

int main(void){
	f();
	return 0;
}

Compiler output:
main.c: In function 'f':
main.c:4:16: warning: division by zero [-Wdiv-by-zero]
    4 |         *a = 1 / 0;
      |                ^
main.c: In function 'main':
main.c:8:9: error: too few arguments to function 'f'
    8 |         f();
      |         ^
main.c:1:6: note: declared here
    1 | void f(int *a, int *b){
      |      ^
Language: C

#include <stdio.h>
#include <iostream>
using namespace std;
int main()
{
	int i,j,temp;
	for (i=1;i<10;i++)
	{
		for (j=1;j<10;j++)
		{
			temp=i * j;
			printf("%dx%d=%d\n",i,j,temp);
		}
	}
	system ("pause");
	return 0;
}

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

#include<iostream>
using namespace std;

int main(){
	int i,j;
	for(i = 1;i <= 9;i++ )
		for(j = 1; j <= i; j++)
			cout<<j<<"*"<<i<<"="<<i*j<<endl;
    return 0;
}

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

http://d.pr/f/9luv

"QAAQAQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ"

Compiler output:
main.c:1:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    1 | http://d.pr/f/9luv
      |     ^
Language: C

#include<stdio.h>

int main(void){
	int printf(1x1=1,1x2=2,..9x8=72,9x9=81)

		return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:20: error: invalid suffix "x1" on integer constant
    4 |         int printf(1x1=1,1x2=2,..9x8=72,9x9=81)
      |                    ^~~
main.c:4:20: error: expected declaration specifiers or '...' before numeric constant
main.c:4:26: error: invalid suffix "x2" on integer constant
    4 |         int printf(1x1=1,1x2=2,..9x8=72,9x9=81)
      |                          ^~~
main.c:4:26: error: expected declaration specifiers or '...' before numeric constant
main.c:4:32: error: expected declaration specifiers or '...' before '.' token
    4 |         int printf(1x1=1,1x2=2,..9x8=72,9x9=81)
      |                                ^
main.c:4:33: error: invalid suffix "x8" on floating constant
    4 |         int printf(1x1=1,1x2=2,..9x8=72,9x9=81)
      |                                 ^~~~
main.c:4:41: error: invalid suffix "x9" on integer constant
    4 |         int printf(1x1=1,1x2=2,..9x8=72,9x9=81)
      |                                         ^~~
main.c:4:41: error: expected declaration specifiers or '...' before numeric constant
Language: C

#include<stdio.h>

int main(){
    int i,j,x;
    for(i=1;i<=9;i++)
    {
        for(j=1;j<=9;j++)
        {
             x=i*j;
             printf("%dx%d=%d",i,j,x);
        }

    return 0;
}

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

#include <functional>
#include <algorithm>
#include <stdexcept>
#include <iostream>
#include <sstream>
#include <fstream>
#include <numeric>
#include <iomanip>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <cctype>
#include <vector>
#include <string>
#include <bitset>
#include <queue>
#include <stdio.h>
#include <stack>
#include <ctime>
#include <list>
#include <map>
#include <set>
#include <assert.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define TR(i,x) for(typeof(x.begin()) i=x.begin();i!=x.end();i++)
#define ALL(x) x.begin(),x.end()
#define SORT(x) sort(ALL(x))
#define CLEAR(x) memset(x,0,sizeof(x))
#define FILL(x,c) memset(x,c,sizeof(x))

using namespace std;

const double eps = 1e-8;

#define PB push_back
#define MP make_pair

typedef map<int,int> MII;
typedef map<string,int> MSI;
typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<long double> VD;
typedef pair<int,int> PII;
typedef long long int64;
typedef long long ll;
typedef unsigned int UI;
typedef long double LD;
typedef unsigned long long ULL;

const int V = 55;
int a[V];
int p;
int n;

double solve(int absent) {
    int base = 0;
    
    vector< vector<double> > f(n+1, vector<double>(2*V, 0.0));
    vector< vector<double> > g(n+1, vector<double>(2*V, 0.0));
    
    f[0][0] = 1.0;
    REP(i, n) 
    if (i != absent) {
        ++base;
        for (int j = 0; j < base; ++j)
            for (int sum = 0; sum <= p; ++sum)
            if (f[j][sum] > 0.0)
            {
                g[j+1][sum + a[i]] += f[j][sum] * (double)(j+1) / base;
                g[j][sum] += f[j][sum] * (1.0 - (double)j / base);
            }
        f = g;
        REP(j, n+1) REP(k, 2*V) g[j][k] = 0.0;
    }
    
    double exp = 0.0;
    REP(j, n) {
        for (int sum = p-a[absent]+1; sum <= p; ++sum)
            exp += f[j][sum] * (double)(j+1) / n;
    }
    return exp;
}
int main() {
    cin >> n;
    REP(i, n) scanf("%d",&a[i]);
    cin >> p;
    
    double exp = 0.0;
    REP(i, n) {
        exp += solve(i);
    }
    printf("%.5f\n",exp);
}

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

#include <cstdio>
int main(){
    for(int i=1;i<10;i++){
        for(int j=1;j<10;j++){
            printf("%dx%d=%d\n",i,j,i*j);
        }   
    }   
    return 0;
}

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

#include<iostream>
#include<cstring>
using namespace std;
int pow[15],num[15];
int f[15][15][15][3];
int dfs(int l,int pre,int k,int flag,int e)
{
    if(l==-1) return (k==0)&&flag;
    if(!e && f[l][pre][k][flag]!=-1)return f[l][pre][k][flag];

    int u=(e?num[l]:9),res=0;

    for(int i=0;i<=u;i++)
        res+=dfs(l-1,i,(pow[l]*i+k)%13,flag||(pre==1 && i==3),e&&i==u);
    return e?res:f[l][pre][k][flag]=res;
}
int solve(int x)
{
    int l=0;
    memset(f,-1,sizeof(f));
    while(x!=0)
    {
        num[l++]=x%10;
        x=x/10;
    }
    return dfs(l-1,0,0,0,1);
}
int main()
{
    int x=1;
    for(int i=0;i<=9;i++)
    {
        pow[i]=x;
        x=x*10;
    }
    int n;
    while(cin>>n)
    {
        cout<<solve(n)<<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 "stdio.h"
int main()
{int i j,s;
for(i=1;i<=9;i++)
{for(j=1;j<=9;j++)
{s=i*j;
printf("%d*%d=*d",i,j,s);}
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'j'
    3 | {int i j,s;
      |        ^
main.c:3:8: error: 'j' undeclared (first use in this function)
main.c:3:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:3:10: error: 's' undeclared (first use in this function)
    3 | {int i j,s;
      |          ^
main.c:4:5: error: 'i' undeclared (first use in this function)
    4 | for(i=1;i<=9;i++)
      |     ^