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

#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<stdio.h>
#include<string.h>

using namespace std;

const int N = 2010;

int r[N*2],l[N*2],h[N*2];
char map[N][N];

inline int cal(int l,int r)
{
    return r/2-(l-1)/2;
}

int rec(int h[],int n,int flag)
{
    h[0]=h[n+1]=-1;
    for(int i=1;i<=n;i++)l[i]=r[i]=i;
    for(int i=1;i<=n;i++){
        while(h[l[i]-1]>=h[i]){l[i]=l[l[i]-1];}
    }
    for(int i=n;i>=1;i--){
        while(h[r[i]+1]>=h[i])r[i]=r[r[i]+1];
    }
    int ans=0;
    if(flag==0){
        for(int i=1;i<=n;i++){
            if(h[i]==0)continue;
            ans = max(h[i]*2+(r[i]-l[i]+1)*2,ans);
        }
    }
    else{
        for(int i=1;i<=n;i++){
            if(h[i]==0)continue;
            ans = max(h[i]*2+(r[i]-l[i]+1-cal(l[i],r[i]))*2,ans);
        }
    }
    return ans;
}

int solve1(int r,int c,char v)
{
    int ans=0;
    for(int i=1;i<=c;i++)h[i]=0;
    for(int i=1;i<=r;i++){
        for(int j=1;j<=c;j++)if(map[i][j]==v)h[j]++;else h[j]=0;
        for(int j=1;j<=c;j++)printf("%d ",h[j]);printf("\n");
        ans=max(ans,rec(h,c,0));
    }
    printf("%d\n",ans);
    return ans;
}

int solve2(int r,int c)
{
    int ans=0,up=2*c-1;
    for(int i=1;i<=up;i++)h[i]=0;
    for(int i=1;i<=r;i++){
        for(int j=1;j<=c;j++)
            if(i==1||map[i][j]!=map[i-1][j])h[j*2-1]++;
            else h[j*2-1]=1;
        for(int j=1;j<c;j++)
            if(map[i][j]!=map[i][j+1])h[j*2]++;
            else h[j*2]=0;
        for(int j=1;j<=up;j++)printf("%d ",h[j]);printf("\n");
        ans=max(ans,rec(h,up,1));
    }
    printf("%d\n",ans);
    return ans;    
}

int main()
{
    int t,r,c;
    scanf("%d",&t);
    for(int cs=1;cs<=t;cs++){
        scanf("%d %d",&r,&c);
        for(int i=1;i<=r;i++)scanf("%s",map[i]+1);
        int ans=solve1(r,c,'B');
        ans=max(ans,solve1(r,c,'R'));
        ans=max(ans,solve2(r,c));
        printf("Case #%d: %d\n",cs,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 <cstdio>
#include <cstring>
#include <string>
#include <cstdlib>
#include <ctime>
#include <cmath>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
using namespace std;
#define N 300
typedef long long LL;
LL a[10][N];
LL val1[N*N],val2[N*N];
int main()
{
    int t,n;
//    freopen("d.in","r",stdin);
    scanf("%d",&t);
    for(int cas=1;cas<=t;cas++)
    {
        scanf("%d",&n);
        for(int i=0;i<5;i++)
            for(int j=0;j<n;j++)
                scanf("%I64d",&a[i][j]);
        int cnt=0;
        for(int i=0;i<n;i++)
            for(int j=0;j<n;j++)
                val1[cnt++]=a[1][i]+a[2][j];
        cnt=0;
        for(int i=0;i<n;i++)
            for(int j=0;j<n;j++)
                val2[cnt++]=a[3][i]+a[4][j];
        sort(val1,val1+cnt);
        sort(val2,val2+cnt);
        int l1=unique(val1,val1+cnt)-val1;
        int l2=unique(val2,val2+cnt)-val2;
//        for(int i=0;i<l1;i++) cout<<val1[i]<<' ';
//        puts("");
//        for(int i=0;i<l2;i++) cout<<val2[i]<<' ';
//        puts("");
        bool f=1;
        LL tmp;
        for(int i=0;i<n&&f;i++){
            int id=-1;
            for(int j=0;j<l1&&f;j++)
            {
                LL tmp=val1[j]+a[0][i];
                if(id==-1) id=lower_bound(val2,val2+l2,-tmp)-val2;
                else {
                    while(val2[id]<tmp&&id<l2) id++;
                }
                if(val2[id]==-tmp&&id!=l2) f=0;
            }
        }
        if(!f) puts("YES");
        else puts("NO");
    }
    return 0;
}

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

#include<cstdio>
#include<cstring>
const int N = 205;
typedef long long ll;
int a[5][N],rd,ed;
ll q[N*N*20];
int u[N*N*20];
int f(ll v)
{
	int rt=(v%rd)*(v%rd+1)%rd;
	if(rt<0)rt+=rd;
	return rt;
}
void hash(int x,ll v)
{
	if(u[x]==-1)
	{
		u[x]=0;
		q[x]=v;
		return;
	}
	while(u[x]!=0)
		x=u[x];
	u[x]=ed;
	x=u[x];
	ed++;
	u[x]=0;
	q[x]=v;
}
bool find(int x,ll v)
{
	if(u[x]==-1)
		return false;
	if(q[x]==v)
		return true;
	while(u[x]!=0)
	{
		x=u[x];
		if(q[x]==v)
			return true;
	}
	return false;
}
int main()
{
	int T,n,i,j,k;
	scanf("%d",&T);
	while(T--)
	{
		scanf("%d",&n);
		for(i=0;i<5;i++)
		{
			for(j=0;j<n;j++)scanf("%d",&a[i][j]);
		}
		//puts("ok");
		rd=(n*n+1)*10;
		ed=rd;
		memset(u,-1,sizeof(u));
		for(i=0;i<n;i++)
		{
			for(j=0;j<n;j++)
			{
				ll v=a[0][i]+a[1][j];
				int tp=f(v);
				hash(tp,v);
				//printf("i:%d j:%d v:%lld \n",i,j,v);
			}
		}
		int flag=0;
		for(i=0;i<n;i++)
		{
			for(j=0;j<n;j++)
			{
				for(k=0;k<n;k++)
				{
					ll v=a[2][i]+a[3][j]+a[4][k];
					int tp=f(v);
					flag=find(tp,v);
					//printf("i:%d j:%d k:%d v:%lld flag:%d \n",i,j,k,v,flag);
					if(flag)break;
				}
				if(flag)break;
			}
			if(flag)break;
		}
		if(flag)puts("Yes");
		else puts("No");
	}
	return 0;
}

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

#include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
using namespace std;
#define maxn 201001
int wa[maxn],wb[maxn],wv[maxn],WS[maxn];
int cmp(int *r,int a,int b,int l)
{
	return r[a]==r[b]&&r[a+l]==r[b+l];
}
void da(int *r,int *sa,int n,int m)
{
	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*=2,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<n;i++)wv[i]=x[y[i]];
		for(i=0;i<m;i++)WS[i]=0;
		for(i=0;i<n;i++)WS[wv[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];
		for(t=x,x=y,y=t,p=1,x[sa[0]]=0,i=1;i<n;i++)
			x[sa[i]]=cmp(y,sa[i-1],sa[i],j)?p-1:p++;
	}
	return ;
}
int rank[maxn],height[maxn];
void calheight(int *r,int *sa,int n)
{
	int i,j,k=0;
	for(i=1;i<=n;i++)rank[sa[i]]=i;
	for(i=0;i<n;height[rank[i++]]=k)
		for(k?k--:0,j=sa[rank[i]-1];r[i+k]==r[j+k];k++);
	return ;
}
char str[maxn],s[maxn];
int arr[maxn],SA[maxn];
int main()
{
	int T,i,ca=1;
	scanf("%d",&T);
	while(T--)
	{
		scanf("%s",str);
		s[0]='\0';
		strcat(s,str);
		strcat(s,str);
		int n=strlen(s);
		for(i=0;i<n;i++)arr[i]=s[i];
		arr[n]=0;
		da(arr,SA,n+1,500);
		calheight(arr,SA,n);
		/*for(i=0;i<=n;i++)
		{
			printf("i:%d height:%d SA:%d rank:%d \n",i,height[i],SA[i],rank[i]);
		}*/
		int id=rank[0],r1,r2,r3;
		r1=r2=r3=0;
		for(i=id-1;i>=0;i--)
		{
			if(height[i+1]<n/2)break;
			if(SA[i]<n/2)r2++;
		}
		for(;i>=0;i--)
		{
			if(SA[i]<n/2)r1++;
		}
		for(i=id+1;i<=n;i++)
		{
			if(height[i]<n/2)break;
			if(SA[i]<n/2)r2++;
		}
		for(;i<=n;i++)
		{
			if(SA[i]<n/2)r3++;
		}
		printf("Case %d: %d %d %d\n",ca++,r1,r2+1,r3);
	}
	return 0;
}

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

30
1
2
1000000000
41
19028315
927
193885869
22394
765366
100700763
1000000000
999999999
999999998
999999997
999999996
999999995
999999994
999999993
999999992
999999991
874
304205
4764
823832483
118
371
678
163028
504110219
132780

















Case 1: 2
Case 2: 49
Case 3: 400157471
Case 4: 339006498
Case 5: 580740930
Case 6: 761800138
Case 7: 99063167
Case 8: 78923991
Case 9: 746913587
Case 10: 495906670
Case 11: 400157471
Case 12: 283354241
Case 13: 405175527
Case 14: 663918505
Case 15: 951188325
Case 16: 450497356
Case 17: 281341835
Case 18: 145180425
Case 19: 647022352
Case 20: 367552360
Case 21: 834279117
Case 22: 661125772
Case 23: 346363535
Case 24: 619359982
Case 25: 615054731
Case 26: 898929287
Case 27: 5080816
Case 28: 356010430
Case 29: 815239060
Case 30: 188469457

Compiler output:
main.c:1:1: error: expected identifier or '(' before numeric constant
    1 | 30
      | ^~
Language: C

qweqewqrgvl
vmebnklvndkls
vm slafnkdvn 
mvsl;adfk
vmsl;adfmngv
v,s;adfl

Compiler output:
main.c:1:1: error: unknown type name 'qweqewqrgvl'
    1 | qweqewqrgvl
      | ^~~~~~~~~~~
main.c:3:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'vm'
    3 | vm slafnkdvn
      | ^~
main.c:3:1: error: unknown type name 'vm'
main.c:4:6: error: unknown type name 'adfk'
    4 | mvsl;adfk
      |      ^~~~
main.c:5:6: error: unknown type name 'adfmngv'
    5 | vmsl;adfmngv
      |      ^~~~~~~
main.c:6:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
    6 | v,s;adfl
      | ^
Language: C

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
using namespace std;


const int MAXN = 400100;
const int m = 10;

int val[MAXN], mp[11][11];
bool l[MAXN][10], r[MAXN][10], flag[MAXN][10];

void init(){
    for(int i = 0; i < m; ++i){
        for(int j = 0; j < m; ++j)
            mp[i][j] = (i + j) % 10;
    }
}

void update(int id, int lc, int rc){

    for(int i = 0; i < m; ++i){
        flag[id][i] = flag[lc][i] | flag[rc][i];
        l[id][i] = l[lc][i];
        r[id][i] = r[rc][i];
        if(id == 3)  printf(">>%d %d\n", i, flag[id][i]);
    }
    for(int i = 0; i < m; ++i){
        if(r[lc][i]){
            for(int j = 0; j < m; ++j)
                flag[id][mp[i][j]] |= l[lc][j];
        }
    }
    for(int i = 0; i < 10; ++i){
        if(l[rc][i])  l[id][mp[val[lc]][i]] = 1;
        if(r[lc][i])  r[id][mp[val[rc]][i]] = 1;
    }
    val[id] = (val[lc] + val[rc]) % 10;
}
void build(int id, int lt, int rt){

//    printf("%d %d %d", id, lt, rt);
    if(lt == rt){
        for(int i = 0; i < m; ++i){
            l[id][i] = r[id][i] = flag[id][i] = 0;
        }
        l[id][val[lt]] = r[id][val[lt]] = flag[id][val[lt]] = 1;
        return;
    }
    int mid = (lt + rt) / 2, lc(id<<1), rc = (id<<1) + 1;
    build(lc, lt, mid);
    build(rc, mid + 1, rt);
    update(id, lc, rc);
}
bool ans[11];
void query(int id, int lt, int rt, int ql, int qr){
    if(qr < lt || ql > rt)  return;
    if(ql <= lt && qr >= rt){
        for(int i = 0; i < m; ++i){
            ans[i] |= flag[id][i];
//            if(ql == 4 && qr == 5){
//                printf("%d  %d\n", i, flag[id][i]);
//            }
        }
//        printf("%d  %d  %d  %d\n", lt, rt, ql, qr);
        return;
    }

    int mid = (lt + rt) / 2, lc(id<<1), rc = (id<<1) + 1;

    query(lc, lt, mid, ql, qr);
    query(rc, mid + 1, rt, ql, qr);
}
int b[10];
int main() {

    freopen("1002.in", "r", stdin);
    init();
    int test, cas(1), n, m;
    scanf("%d", &test);

    while(test--){
        if(cas != 1)  puts("");
        scanf("%d", &n);
        for(int i = 1; i <= n; ++i){
            scanf("%d", &val[i]);
            if(val[i] > 9)  val[i] %= 9;
        }
//        puts("222");
        build(1, 1, n);

        printf("Case #%d:\n", cas++);
        scanf("%d", &m);
//        printf("m:%d\n", m);
        for(int i = 0, ql, qr; i < m; ++i){
            scanf("%d%d", &ql, &qr);
            memset(ans, 0, sizeof(ans));
            query(1, 1, n, ql, qr);
            int cnt = 0;
            for(int i = 9; i >= 0; --i){
                if(ans[i])  b[cnt++] = i;
            }
            for(int i = 0; i < 5; ++i){
                if(cnt <= i)  printf("%d", -1);
                else printf("%d", b[i]);
                if(i != 4)  putchar(' ');
                else  puts("");
            }
        }
    }





    return 0;
}

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

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

using namespace std;
const int N=50005;
const double inf=1e15;
const double eps=1e-12;
struct A
{
    int a,b,c,d;
}l[N],r[N];
double x[N],w[N];

void init(int n)
{
    int i;
    l[0].a=l[0].b=l[0].c=l[0].d=0;
    for (i=1; i<=n; i++)
    {
        l[i].a=l[i-1].a+w[i];
        l[i].b=l[i-1].b-3.0*w[i]*x[i];
        l[i].c=l[i-1].c+3.0*w[i]*x[i]*x[i];
        l[i].d=l[i-1].d-w[i]*x[i]*x[i]*x[i];
    }
    r[n+1].a=r[n+1].b=r[n+1].c=r[n+1].d=0;
    for (i=n; i>=1; i--)
    {
        r[i].a=r[i+1].a-w[i];
        r[i].b=r[i+1].b+3.0*w[i]*x[i];
        r[i].c=r[i+1].c-3.0*w[i]*x[i]*x[i];
        r[i].d=r[i+1].d+w[i]*x[i]*x[i]*x[i];
    }
}

double f(double a,double b,double c,double d,double x)
{
    double res=a*x*x*x+b*x*x+c*x+d;
    //cout<<x<<' '<<res<<endl;
    return res;
}

double func(double a,double b,double c,double d,double x1,double x2)
{
    //cout<<a<<' '<<b<<' '<<c<<' '<<d<<endl;
    double res=min(f(a,b,c,d,x1),f(a,b,c,d,x2));
    double temp=b*b-3*a*c;
    if (temp>-eps)
    {
        double y1=(-b+sqrt(temp))/(3*a),y2=(-b-sqrt(temp))/(3*a);
        if (y1>x1 && y1<x2) res=min(res,f(a,b,c,d,y1));
        if (y2>x1 && y2<x2) res=min(res,f(a,b,c,d,y2));
        //cout<<x1<<' '<<x2<<' '<<y1<<' '<<y2<<endl;
    }
    //cout<<x1<<' '<<x2<<' '<<res<<endl;
    return res;
}

int main()
{
    int o,i,cas=0,n;
    double res;
    scanf("%d",&o);
    while (o--)
    {
        scanf("%d",&n);
        for (i=1; i<=n; i++) scanf("%lf%lf",&x[i],&w[i]);
        init(n);
        if (n==1) res=0; else res=inf;
        for (i=1; i<n; i++)
        {
            double a=l[i].a+r[i+1].a;
            double b=l[i].b+r[i+1].b;
            double c=l[i].c+r[i+1].c;
            double d=l[i].d+r[i+1].d;
            res=min(res,func(a,b,c,d,x[i],x[i+1]));
        }
        printf("Case #%d: %.0lf\n",++cas,res);
    }
}

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

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

using namespace std;

const int maxn = 100100;
int n, first[maxn], cnt;
struct Arc
{
	int v, next;
}arc[maxn*2];
int w[maxn], K;
int ans[maxn];
int q[maxn];
int state[maxn];
int mymp[maxn];
map<int,int>mp[maxn][2];

void add(int u, int v)
{
	arc[cnt].v = v;	
	arc[cnt].next = first[u];
	first[u] = cnt++;
}

void bfs(int s)
{
	for(int i = 1; i <= n; i++)
		state[i] = 0;
	
	state[s] = 1;
	int head = 0, tail = 0;
	q[tail++] = s;
	while(head < tail)
	{
		int u = q[head++];
		for(int i = first[u]; i + 1; i = arc[i].next)
		{
			int v = arc[i].v;
			if(state[v] == 0)
			{
				state[v] = state[u] + 1;
				q[tail++] = v;
			}
		}
	}
}

void deal(int u)
{
	printf("u=%d ", u);
	int xx = mymp[u];
	mp[xx][0][w[u]]++;
	mp[xx][0][1]++;
	for(int i = first[u]; i + 1; i = arc[i].next)
	{
		int v = arc[i].v;
		if(state[v] <= state[u])	continue;
		
		int x = mymp[u], y = mymp[v];
		if(mp[x][0].size() >= mp[y][0].size())
		{
			map<int,int>::iterator it;
			for(it = mp[y][0].begin(); it != mp[y][0].end(); it++)
			{
				int y0 = (*it).first, y1 = (*it).second;
				int tmp = mp[x][0][y0];
				mp[x][1][tmp]--;
				mp[x][0][y0] += y1;
				mp[x][1][mp[x][0][y0]]++;
			}
			
			mp[y][0].clear();
			mp[y][1].clear();
		}
		else
		{
			swap(x, y);
			map<int,int>::iterator it;
			for(it = mp[y][0].begin(); it != mp[y][0].end(); it++)
			{
				int y0 = (*it).first, y1 = (*it).second;
				int tmp = mp[x][0][y0];
				mp[x][1][tmp]--;
				mp[x][0][y0] += y1;
				mp[x][1][mp[x][0][y0]]++;
			}
			
			mp[y][0].clear();
			mp[y][1].clear();
			
			mymp[u] = x;
		}
	}
	
	int x = mymp[u];
	ans[u] = mp[x][1][K];
}

int main()
{	
	int T;
	
	scanf("%d", &T);
	for(int cas = 1; cas <= T; cas++)
	{
		scanf("%d%d", &n, &K);	
		for(int i = 1; i <= n; i++)
			scanf("%d", w + i);
		
		cnt = 0;
		for(int i = 1; i <= n; i++)
		{
			mymp[i] = i;
			mp[i][0].clear();
			mp[i][1].clear();
			first[i] = -1;
		}
		
		for(int i = 1; i <n ; i++)
		{
			int u, v;
			scanf("%d%d", &u, &v);
			add(u, v);
			add(v, u);
		}
		
		bfs(1);
		for(int i = n - 1; i >= 0; i--)
			deal(q[i]);
			
		int Q;
		scanf("%d", &Q);
		
		printf("Case #%d:\n", cas);
		while(Q-->0)
		{
			int u;
			scanf("%d", &u);
			printf("%d\n", ans[u]);
		}
	}
	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>

main()
{
 int  l, m;
 for(l=1; l<=9; l++)
 for(m=1; m<=9; m++)

 printf(" %d x %d = %d", l, m. l*m);
 return(0);
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main()
      | ^~~~
main.c: In function 'main':
main.c:9:30: error: request for member 'l' in something not a structure or union
    9 |  printf(" %d x %d = %d", l, m. l*m);
      |                              ^
Language: C

#include<stdio.h>

main()
{
 int l, m;
 for(l=1; l<=9; l++)
 for(m=1; m<=9; m++)

 printf( %d x %d = %d, l, m. l*m,);
 return(0);
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main()
      | ^~~~
main.c: In function 'main':
main.c:9:10: error: expected expression before '%' token
    9 |  printf( %d x %d = %d, l, m. l*m,);
      |          ^
Language: C

#include<stdio.h>

main()
{
 int n, m;
 for(n=1; n<=9; l++)
 for(m=1; m<=9; m++)

 printf( %d x %d = %d, n, m. n*m,);
 return(0);
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main()
      | ^~~~
main.c: In function 'main':
main.c:6:17: error: 'l' undeclared (first use in this function)
    6 |  for(n=1; n<=9; l++)
      |                 ^
main.c:6:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:10: error: expected expression before '%' token
    9 |  printf( %d x %d = %d, n, m. n*m,);
      |          ^
Language: C

#include<stdio.h>

main()
{
 int n, m;
 for(n=1; n<=9; n++){}
 for(m=1; m<=9; m++){}

 printf( %d x %d = %d, n, m, n*m,);
 return(0);
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main()
      | ^~~~
main.c: In function 'main':
main.c:9:10: error: expected expression before '%' token
    9 |  printf( %d x %d = %d, n, m, n*m,);
      |          ^
Language: C

#include<stdio.h>

main()
{
 int n, m;
 for(n=1; n<=9; n++){}
 for(m=1; m<=9; m++){}

 printf( %d\n x %d\n = %d\n, n, m, n*m,);
 return(0);
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main()
      | ^~~~
main.c: In function 'main':
main.c:9:10: error: expected expression before '%' token
    9 |  printf( %d\n x %d\n = %d\n, n, m, n*m,);
      |          ^
main.c:9:12: error: stray '\' in program
    9 |  printf( %d\n x %d\n = %d\n, n, m, n*m,);
      |            ^
main.c:9:19: error: stray '\' in program
    9 |  printf( %d\n x %d\n = %d\n, n, m, n*m,);
      |                   ^
main.c:9:26: error: stray '\' in program
    9 |  printf( %d\n x %d\n = %d\n, n, m, n*m,);
      |                          ^
Language: C

#include<stdio.h>

main()
{
 int n, m;
 for(n=1; n<=9; n++){}
 for(m=1; m<=9; m++){}

 printf( %d\n x %d\n =%d\n, n, m, n*m,);
 return(0);
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main()
      | ^~~~
main.c: In function 'main':
main.c:9:10: error: expected expression before '%' token
    9 |  printf( %d\n x %d\n =%d\n, n, m, n*m,);
      |          ^
main.c:9:12: error: stray '\' in program
    9 |  printf( %d\n x %d\n =%d\n, n, m, n*m,);
      |            ^
main.c:9:19: error: stray '\' in program
    9 |  printf( %d\n x %d\n =%d\n, n, m, n*m,);
      |                   ^
main.c:9:25: error: stray '\' in program
    9 |  printf( %d\n x %d\n =%d\n, n, m, n*m,);
      |                         ^
Language: C

#include<stdio.h>

main()
{
 int n, m;
 for(n=1; n<=9; n++){
 for(m=1; m<=9; m++){
 printf( %d x %d =%d\n, n, m, n*m,);
}
}
 return(0);
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main()
      | ^~~~
main.c: In function 'main':
main.c:8:10: error: expected expression before '%' token
    8 |  printf( %d x %d =%d\n, n, m, n*m,);
      |          ^
main.c:8:21: error: stray '\' in program
    8 |  printf( %d x %d =%d\n, n, m, n*m,);
      |                     ^
Language: C

#include<stdio.h>

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

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:7:33: error: expected expression before ')' token
    7 |  printf("%dx%d=%d\n", n, m, n*m,);
      |                                 ^
Language: C

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

using namespace std;

const int maxn = 2100;
int n, C, K, M,first[maxn], cnt;
struct Arc
{
	int v, next;
}arc[maxn*2];
int q[maxn];
int state[maxn];
pair<int,int> city[5100];
const int inf = (-1u)>>2;
int dp[maxn][2];
char visit[maxn];

void add(int u, int v)
{
	arc[cnt].v = v;	
	arc[cnt].next = first[u];
	first[u] = cnt++;
}

void bfs(int s,int &begin)
{
	state[s] = 1;
	int head = begin, tail = begin;
	q[tail++] = s;
	while(head < tail)
	{
		int u = q[head++];
		for(int i = first[u]; i + 1; i = arc[i].next)
		{
			int v = arc[i].v;
			if(state[v] == 0)
			{
				state[v] = state[u] + 1;
				q[tail++] = v;
			}
		}
	}
	
	begin = tail;
}

int deal(int u)
{
	visit[u] = 1;
	for(int i = first[u]; i + 1; i = arc[i].next)
	{
		int v = arc[i].v;
		if(state[v] <= state[u])	continue;
		
		dp[u][0] = max(dp[u][0], dp[u][0] + max(dp[v][0], dp[v][1]));
		dp[u][1] = max(dp[u][1], dp[u][1] + dp[v][0]);
	}
	
	return max(dp[u][0], dp[u][1]);
}

char check(int mid, int start)
{
	for(int i = 0; i <= n; i++)
	{
		dp[i][0] = 0;
		dp[i][1] = -inf;
		visit[i] = 0;
	}
	
	int tx = mid + city[start].first;
	for(int i = start; i < C; i++)
		if(tx >= city[i].first)
		{
			dp[city[i].second][1] = 1;
		}
		
	int sum = 0;
	for(int i = n - 1; i >= 0; i--)
	if(visit[q[i]] == 0)
	{
		sum += deal(q[i]);
	}
	
	printf("mid %d start%d\n", mid, start);
	for(int i = 1; i <= n; i++)
	{
		printf("%d %d %d]\n", i, dp[i][0], dp[i][1]);
	}
	
	return sum >= K;
}
/*
3 3 2 1
0 1
2 2
5 3
1 2
mid 2 start0
1 1 1]
2 0 1]
3 0 -1073741823]
2 1]

*/
char check(int mid)
{
	for(int i = 0; i < C; i++)
	{
		if(i == 0 || city[i].first != city[i - 1].first)
		{
			if(check(mid, i))	return 1;
		}		
	}
	
	return 0;
}

int main()
{
	int T;
	scanf("%d", &T);
	for(int cas = 1; cas <= T; cas++)
	{
		scanf("%d%d%d%d", &C, &n, &K, &M);
		for(int i = 0; i < C; i++)
			scanf("%d%d", &city[i].first, &city[i].second);
		
		cnt = 0;
		for(int i = 1; i <= n; i++)
		{
			first[i] = -1;
			state[i] = 0;
		}
		
		
		for(int i = 0; i < M; i++)
		{
			int u, v;
			scanf("%d%d", &u, &v);
			add(u, v);
			add(v, u);
		}
		
		int begin = 0;//bfs
		for(int i = 1; i <= n; i++)
			if(state[i] == 0)
				bfs(i, begin);
	
		sort(city, city + C);
		int l = city[0].first, r = city[C - 1].first;
		
		//printf("3 %d]\n", check(3));
		printf("2 %d]\n", check(2));
		return 0;
		r = r - l, l = 0;
		int tmp = r;
		while(l <= r)
		{
			int mid = (r - l)/2 + l;
			if(check(mid))
				r = mid - 1;
			else
				l = mid + 1;
		}
		
		if(r + 1 < 0 || r + 1 > tmp)	r = -2;
		
		printf("Case #%d: %d\n", cas, r + 1);
	}
	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;
 for(i=1;i<10;i++){
  for(j=1;j<10;j++){
   printf(%dx%d=%d\n,i,j,i*j);
  }
 }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:11: error: expected expression before '%' token
    7 |    printf(%dx%d=%d\n,i,j,i*j);
      |           ^
main.c:7:19: error: stray '\' in program
    7 |    printf(%dx%d=%d\n,i,j,i*j);
      |                   ^
Language: C

#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
#include<vector>
using namespace std;
const int N = 100010;
int sz[N],dep[N],fa[N],son[N],val[N],top[N];
int g[N],d[N];
vector<int> edge[N],pos[N];
int loc=0;
void dfs(int x,int dp,int pa)
{
    fa[x]=pa;
    sz[x]=1;
    dep[x]=dp;
    son[x]=0;
    for(int i=0;i<edge[x].size();i++)
    {
        int u=edge[x][i];
        if(u!=pa)
        {
            dfs(u,dp+1,x);
            sz[x]+=sz[u];
            if(sz[son[x]]<sz[u])
            {
                son[x]=u;
            }
        }
    }
}
void find_link(int x,int tp)
{
    val[x]=++loc;
    d[loc]=g[x];
    top[x]=tp;
    if(son[x]!=0)
    {
        find_link(son[x],tp);
    }
    for(int i=0;i<edge[x].size();i++)
    {
        int u=edge[x][i];
        if(u!=son[x]&&fa[u]==x)
        {
            find_link(u,u);
        }
    }
}  
bool gao(int x,int l,int r)
{
	vector<int>::iterator iter=lower_bound(pos[x].begin(),pos[x].end(),l);
	if((*iter)<=r)
	{
		return true;
	}
	return false;
}
int query(int va,int vb,int v)
{
    if(pos[v].size()==0) return 0;
    int f1=top[va],f2=top[vb];
    while(f1!=f2)
    {
        if(dep[f1]<dep[f2])
        {
            swap(f1,f2);
            swap(va,vb);
        }
        if(gao(v,val[f1],val[va]))
        {
			return 1;
		}     
        va=fa[f1];f1=top[va];
    }   
    if(dep[va]<dep[vb]) swap(va,vb);
    if(gao(v,val[vb],val[va]))
    {
		return 1;
	}
	else return 0;
}
int main(void)
{
    int T,n,m,x,y,w;
    scanf("%d",&T);
    while(T--)
    {
		scanf("%d%d",&n,&m);
		for(int i=1;i<=n;i++)
		{
			pos[i].clear();
		}
		for(int i=1;i<=n;i++)
		{
			scanf("%d",&g[i]);
			edge[i].clear();
		}
		for(int i=1;i<n;i++)
		{
			scanf("%d%d",&x,&y);
			edge[x].push_back(y);
			edge[y].push_back(x);
		}
		dfs(1,0,-1);
		find_link(1,1);
		for(int i=1;i<=loc;i++)
		{
			pos[d[i]].push_back(i);
		}
		for(int i=1;i<=m;i++)
		{
			scanf("%d%d%d",&x,&y,&w);
			if(query(x,y,w))
			{
				printf("Find\n");
			}
			else
			{
				printf("NotFind\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 <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <cstdlib>
#include <ctime>
#include <cmath>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
using namespace std;

#define min(x , y) ((x) > (y) ? (y) : (x))
#define max(x , y) ((x) > (y) ? (x) : (y))
#define abs(x) ((x) > 0 ? (x) : -(x))

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

#define db double
#define rt return
#define cs const

cs db eps = 1e-8;

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

#define cp const P&
#define op operator

#define LL long long

cs int N = 211 , mod = 1000000007;
LL fib[N*N];

struct P{
    db x , y;
    P(db a = 0 , db b = 0):x(a),y(b){}
    void in(){scanf("%lf%lf" , &x , &y);}
    bool op<(cp a)cs{rt x < a.x;}
    P op+(cp a)cs{rt P(x+a.x , y+a.y);}
    P op-(cp a)cs{rt P(x-a.x , y-a.y);}
    db op^(cp a)cs{rt x*a.y - a.x*y;}
    db cross(P a , P b){rt a-*this ^ b-*this;}
}p[N];

int n , down[N][N] , up[N][N] , K[N*N];

int read() {
   if(scanf("%d" , &n) == -1)  return 0;
   for(int i = 1 ; i <= n ; i++) p[i].in();
   return 1;
}
LL exp_mod(LL a,LL b){
    LL ret = 1 , base = a % mod;
    while(b) {
        if(b&1) ret = ret * base % mod;
        b >>= 1;
        base = base * base % mod;
    }
    return ret;
}

void solve() {
    sort(p + 1 , p + n + 1);
    for(int i = 1 ; i <= n ; i++)
        for(int j = i + 1 ; j <= n ; j++) {
            down[i][j] = up[i][j] = 0;
            for(int k = 1 ; k <= n ; k++) if(k != i && k != j) {
                if(p[i].x == p[j].x) {
                    if(p[k].y < min(p[i].y , p[j].y) ||
                       p[k].y > max(p[i].y , p[j].y)) continue;
                }
                else {
                    if(p[k].x < min(p[i].x , p[j].x) ||
                       p[k].x > max(p[i].x , p[j].x)) continue;
                }
                if(p[i].cross(p[j] , p[k]) < -eps) down[i][j]++;
                else up[i][j]++;
            }
        }
    int cnt = 0;
    for(int i = 1 ; i <= n ; i++)
        for(int j = i + 1 ; j <= n ; j++) K[++cnt] = down[i][j] * up[i][j];
    LL res = 1;
    for(int i = 1 ; i <= cnt ; i++) {
        LL tmp=exp_mod(K[i] , fib[K[i]])+1;
        res = res * tmp % mod;
    }
    if(n < 2) res = 0;
    printf("%I64d\n" , res);
}

int main() {
    int T;
    fib[0] = fib[1] = 1;
    for(int i = 2 ; i < N*N ; i++)
        fib[i] = (fib[i-1] + fib[i-2]) % (mod - 1);
    while(read()) {
        solve();
    }
    return 0;
}

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

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
using namespace std;
#define M 40

const int MOD=1000000007;

int f[M+5][M+5][5][5][5][5][2];
int cs[5][5][5][5];
int n,m;

void init(void);
void fz(int i,int j,int a,int b,int c,int d,int st);

int main()
{
	freopen("data.in","r",stdin);
	freopen("data.out","w",stdout);
	int ca;
	int i,j,k,a,b,c,d,e;
	init();
	for (i=1;i<=M;i++)
		for (j=1;j<=M;j++)
		{
			for (a=0;a<5;a++)
				for (b=0;b<5;b++)
					for (c=0;c<5;c++)
						for (d=0;d<5;d++)
						{
							if (f[i][j][a][b][c][d][0]==-1)
							{
								f[i][j][a][b][c][d][0]=cs[a][b][c][d];
								//====================================
								for (k=1;k<i;k++)
								{
									for (e=1;e<5;e++)
									{
										if (e!=a && e!=b && e!=d)
										{
											f[i][j][a][b][c][d][0]+=f[i-k][j][e][b][c][d][1];
											f[i][j][a][b][c][d][0]%=MOD;
										}
										if (e!=b && e!=c && e!=d)
										{
											f[i][j][a][b][c][d][0]+=(f[k][j][a][b][e][d][1]+MOD-cs[a][b][e][d])%MOD;
											f[i][j][a][b][c][d][0]%=MOD;
										}
									}
								}
								fz(i,j,a,b,c,d,0);
							}
							if (f[i][j][a][b][c][d][1]==-1)
							{
								f[i][j][a][b][c][d][1]=cs[a][b][c][d];
								//====================================
								for (k=1;k<j;k++)
								{
									for (e=1;e<5;e++)
									{
										if (e!=a && e!=b && e!=c)
										{
											f[i][j][a][b][c][d][1]+=f[i][j-k][a][e][c][d][0];
											f[i][j][a][b][c][d][1]%=MOD;
										}
										if (e!=a && e!=c && e!=d)
										{
											f[i][j][a][b][c][d][1]+=(f[i][k][a][b][c][e][0]+MOD-cs[a][b][c][e])%MOD;
											f[i][j][a][b][c][d][1]%=MOD;
										}
									}
								}
								//====================================
								fz(i,j,a,b,c,d,1);
							}
						}
		}
	scanf("%d",&ca);
	while (ca--)
	{
		scanf("%d%d",&n,&m);
		printf("%d\n",f[n][m][0][0][0][0][0]%MOD);
	}
	return 0;
}

void init(void)
{
	int a,b,c,d,e;
	memset(f,-1,sizeof(f));
	memset(cs,0,sizeof(cs));
	for (a=0;a<5;a++)
		for (b=0;b<5;b++)
			for (c=0;c<5;c++)
				for (d=0;d<5;d++)
				{
					for (e=1;e<5;e++)
						if (e!=a && e!=b && e!=c && e!=d)
							cs[a][b][c][d]++;
				}
}

void fz(int i,int j,int a,int b,int c,int d,int st)
{
	f[i][j][c][b][a][d][st]=f[i][j][a][b][c][d][st];
	f[i][j][a][d][c][b][st]=f[i][j][a][b][c][d][st];
	f[i][j][c][d][a][b][st]=f[i][j][a][b][c][d][st];
	//======================================
	f[j][i][b][c][d][a][1-st]=f[i][j][a][b][c][d][st];
	f[j][i][d][c][b][a][1-st]=f[i][j][a][b][c][d][st];
	f[j][i][d][a][b][c][1-st]=f[i][j][a][b][c][d][st];
	f[j][i][b][a][d][c][1-st]=f[i][j][a][b][c][d][st];
}

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

#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
int a[110][1010],sum[110][1010],dp[110][1010];
struct node{
    int cc;
    int id;
}tmp1[1010],tmp2[1010];
int cmp(node aa,node bb){
    return aa.cc>bb.cc;
}
main(){
    int n,m,x,t;
    scanf("%d%d%d%d",&n,&m,&x,&t);
    memset(a,0,sizeof(a));
    for(int i=1;i<=n;i++){
        for(int j=1;j<=m;j++){
            scanf("%d",&a[i][j]);
        }
    }
    memset(sum,0,sizeof(sum));
    for(int i=1;i<=n;i++){
        for(int j=1;j<=m;j++){
            sum[i][j]=sum[i][j-1]+a[i][j];
        }
    }
    for(int i=1;i<=n+1;i++){
        for(int j=1;j<=m;j++)
            dp[i][j]=-600000000;
    }
    dp[1][x]=0;
    for(int i=2;i<=n+1;i++){
        for(int p=1;p<=m;p++){
            tmp1[p].cc=dp[i-1][p]-sum[i-1][p-1];
            tmp1[p].id=p;
        }
        sort(tmp1+1,tmp1+1+m,cmp);
        for(int p=1;p<=m;p++){
            tmp2[p].cc=dp[i-1][p]+sum[i-1][p];
            tmp2[p].id=p;
        }
        sort(tmp2+1,tmp2+m+1,cmp);
        for(int j=1;j<=m;j++){
            for(int k=1;k<=m;k++){
                if(tmp1[k].id<=j && (tmp1[k].id+t)>=j && dp[i-1][tmp1[k].id]!=-600000000){
                    dp[i][j]=tmp1[k].cc+sum[i-1][j];
                    break;
                }
            }
            for(int k=1;k<=m;k++){
                if(tmp2[k].id>=j && (tmp2[k].id-t)<=j && dp[i-1][tmp2[k].id]!=-600000000){
                    dp[i][j]=max(dp[i][j],tmp2[k].cc-sum[i-1][j-1]);
                    break;
                }
            }
            printf("%d\n",dp[i][j]);
        }
        printf("\n");
    }
    int ans=dp[n+1][1];
    for(int i=1;i<=m;i++){
        if(dp[n+1][i]>ans)
            ans=dp[n+1][i];
    }
    printf("%d\n",ans);
}

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

#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
const int N = 1005;
const int M = 52;
const int INF = 2000000011;
struct P
{
    int p,e;
}data[M][N];
bool cmp(P a,P b)
{
    return a.p<b.p;
}
int dp[M][N],q[N],top,tail;
int abs(int x){return x>0?x:-x;}
int cost(int i,int k,int j)
{
    return dp[i-1][k]+abs(data[i-1][k].p-data[i][j].p);
}
int main()
{
    freopen("data.in", "r", stdin);
    freopen("data1.out", "w", stdout);
    int T,m,n,l,i,j,k,t;
    scanf("%d",&T);
    while(T--)
    {
        scanf("%d%d%d",&m,&n,&l);
        for(i=1;i<=m;i++)
        {
            for(j=1;j<=n;j++)
            {
                scanf("%d",&data[i][j].p);
            }
        }
		for(i=1;i<=m;i++)
        {
            for(j=1;j<=n;j++)
            {
                scanf("%d",&data[i][j].e);
            }
            sort(data[i]+1,data[i]+1+n,cmp);
        }
        for(i=1;i<=n;i++)dp[1][i]=abs(l-data[1][i].p)+data[1][i].e;
        for(i=2;i<=m;i++)
        {
            top=0;
            tail=-1;
            for(k=j=1;j<=n;j++)
            {
                dp[i][j]=INF;
                while(k<=n&&data[i-1][k].p<=data[i][j].p)
                {
                    t=cost(i,k,j);
                    while(tail>=top&&cost(i,q[tail],j)>=t)tail--;
                    q[++tail]=k;
                    k++;
                }
                if(tail>=top)dp[i][j]=cost(i,q[top],j);
            }
            top=0;
            tail=-1;
            for(k=j=n;j>0;j--)
            {
                while(k>0&&data[i-1][k].p>data[i][j].p)
                {
                    t=cost(i,k,j);
                    while(tail>=top&&cost(i,q[tail],j)>=t)tail--;
                    q[++tail]=k;
                    
                    k--;
                }
                if(tail>=top)
                {
                    t=cost(i,q[top],j);
                    if(dp[i][j]>t)dp[i][j]=t;
                }
            }
            for(j=1;j<=n;j++)dp[i][j]+=data[i][j].e;
        }
        t=INF;
        for(i=1;i<=n;i++)if(t>dp[m][i])t=dp[m][i];
        printf("%d\n",t);
    }
    return 0;
}

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

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <queue>
#include <algorithm>
#define DBLE 1e-8
#define PI 3.1415926535898
#define MAXN 310
#define INF 800000000
using namespace std;
int matrix[MAXN][MAXN],n;
int dp[MAXN];
int SPFA()
{
    bool visit[MAXN]={0};
    int now;
    queue<int> que;
    que.push(0);
    while(!que.empty())
    {
        now=que.front();
        que.pop();
        visit[now]=0;
        if(now==n-1)    continue;
        for(int i=1;i<n;++i)
            if(dp[now]+matrix[now][i]<dp[i])
            {
                dp[i]=dp[now]+matrix[now][i];
                if(visit[i]==0) que.push(i);
                visit[i]=1;
            }
        if(now==0)    continue;
        for(int i=1;i<n-1;++i)
            if(dp[now]+matrix[now][0]+matrix[n-1][i]<dp[i])
            {
                dp[i]=dp[now]+matrix[now][0]+matrix[n-1][i];
                if(visit[i]==0) que.push(i);
                visit[i]=1;
            }
    }
    return 0;
}
int main()
{
    while(scanf("%d",&n)==1)
    {
        for(int i=0;i<n;++i)
        {
            for(int j=0;j<n;++j)    scanf("%d",&matrix[i][j]);
            dp[i]=INF;
        }
        dp[0]=0;
        SPFA();
        cout<<dp[n-1]<<endl;
    }
    return 0;
}

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

#include<cstdio>
#include<iostream>
#include<cstring>
#include<cmath>
#define REP(i,n) for(int i=0;i<n;i++)
#define N 32

using namespace std;
int A,B,C,D,E;
int alla,allb,allc,alld,alle;

double dp[N][N][N][N][2];

const int base=16;

double f(int a,int b,int c,int d,int e)
{
	if (a<=0 && b<=0 && c<=0 && d<=0) return 0;
	if (dp[a+base][b+base][c+base][d+base][e+base]>=0) 
		return dp[a+base][b+base][c+base][d+base][e+base];
	double ret=1;
	int lefta=alla-(A-a),leftb=allb-(B-b),leftc=allc-(C-c),leftd=alld-(D-d),lefte=alle-(E-e);
	int unuse=(lefta>0?lefta:0)+(leftb>0?leftb:0)+(leftc>0?leftc:0)+(leftd>0?leftd:0)+(lefte>0?lefte:0);
//	printf("%d %d %d %d %d\n",a,b,c,d,e);

	if (lefta>0) ret+=lefta*1.0/unuse*f(a-1,b,c,d,e);
	if (leftb>0) ret+=leftb*1.0/unuse*f(a,b-1,c,d,e);
	if (leftc>0) ret+=leftc*1.0/unuse*f(a,b,c-1,d,e);
	if (leftd>0) ret+=leftd*1.0/unuse*f(a,b,c,d-1,e);

	if (lefte>0)
	{
		double t1,t2;
		t1=min(f(a-1,b,c,d,e-1),f(a,b-1,c,d,e-1));
		t2=min(f(a,b,c-1,d,e-1),f(a,b,c,d-1,e-1));
		ret+=lefte*1.0/unuse*min(t1,t2);
	}
	dp[a+base][b+base][c+base][d+base][e+base]=ret;
	return ret;
}
int main()
{
	int runs;
	cin>>runs;
	for (int r=1;r<=runs;r++)
	{
		double ans=0;
		REP(i,N) REP(j,N) REP(k,N) REP(l,N) REP(m,2) dp[i][j][k][l][m]=-1;

		cin>>A>>B>>C>>D; E=2;

		alla=allb=allc=alld=13;alle=2;

		if (A>13) E-=(A-13),alla+=(A-13); if (B>13) E-=(B-13),allb+=(B-13);
		if (C>13) E-=(C-13),allc+=(A-13); if (D>13) E-=(D-13),alld+=(D-13);

		alle=E;
		if (E<0) ans=-1;
		else ans=f(A,B,C,D,E);

		if (fabs(ans)<1e-8) ans=0; // fix
		printf("Case %d: %.3f\n",r,ans);
	}
	return 0;
}

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

j;main(i){for(;j>8?j=i++<9:++j;printf("%dx%d=%d\n",i,j,i*j));}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | j;main(i){for(;j>8?j=i++<9:++j;printf("%dx%d=%d\n",i,j,i*j));}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'j' [-Wimplicit-int]
main.c:1:3: error: return type defaults to 'int' [-Wimplicit-int]
    1 | j;main(i){for(;j>8?j=i++<9:++j;printf("%dx%d=%d\n",i,j,i*j));}
      |   ^~~~
main.c: In function 'main':
main.c:1:3: error: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:1:32: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | j;main(i){for(;j>8?j=i++<9:++j;printf("%dx%d=%d\n",i,j,i*j));}
      |                                ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | j;main(i){for(;j>8?j=i++<9:++j;printf("%dx%d=%d\n",i,j,i*j));}
main.c:1:32: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    1 | j;main(i){for(;j>8?j=i++<9:++j;printf("%dx%d=%d\n",i,j,i*j));}
      |                                ^~~~~~
main.c:1:32: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <cstdio>
#include <cstring>
using namespace std;

const int Prime[16] = {0, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47};
const int Orz = 64;

long long N, MaxAP;
int MaxFacNum;

void DFS(int i, int FacNum, int MaxPow, long long AP)
{
	if (FacNum>MaxFacNum || (FacNum==MaxFacNum && AP<MaxAP))
	{
		MaxFacNum = FacNum;
		MaxAP = AP;
	}
	for (int p = 1; p <= MaxPow; ++p)
	{
		AP = AP * Prime[i];
		if (AP > N) return;
		DFS(i+1, FacNum*(p+1), p, AP);
	}
}

int main()
{
	//freopen("D.in", "r", stdin);
	//freopen("D.out", "w", stdout);
	while (~scanf("%I64d", &N))
	{
		MaxAP = 0;
		MaxFacNum = 0;
		DFS(1, 1, Orz, 1);
		printf("%I64d\n%d\n", MaxAP, MaxFacNum);
	}
	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 <cstdio>
#include <cmath>

using namespace std;

int gcd(int a,int b){
    return b ? gcd(b, a%b) : a;
}

void ExGcd(int a,int b,int &d,int &x,int &y){
    if(!b)  {d = a;x = 1;y = 0;}
    else    {ExGcd(b, a%b, d, y, x); y -= x*(a/b);}
}

int main()
{
    freopen("in.txt","r",stdin);
    int T,a,m;
    scanf("%d",&T);
    for(int t = 0;t < T;t++){
        scanf("%d %d",&a,&m);
        if(gcd(a,m) != 1)
            puts("Not Exist");
        else{
            int x,y,d;
            ExGcd(a,m,d,x,y);
            //printf("%d %d %d %d %d\n",a,m,d,x,y);
            int st = ceil(1.0*x/m) - 1;
            x += st*m;
            printf("%d\n",x);
        }
    }
    return 0;
}

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

#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
double dp[1010][1010][2];
double t[1010][1010][2];
struct node{
    double x,c;
    int id;
    node(){
        id=-1;
    }
};
node g[1010];
int cmp(node a,node b){
    return a.x<b.x;
}
main(){
    int n;
    double v,p;
    while(scanf("%d%lf%lf",&n,&v,&p)!=-1){
        memset(dp,0,sizeof(dp));
        memset(t,0,sizeof(t));
        g[0].x=p/v;g[0].c=0;g[0].id=0;
        for(int i=1;i<=n;i++){
            scanf("%lf%lf",&g[i].x,&g[i].c);
            g[i].x=g[i].x/v;
        }
        sort(g,g+1+n,cmp);
        int tmp;
        for(int i=0;i<=n;i++){
            if(g[i].id==0)
                tmp=i;
        }
        int left=tmp;
        int right=n-tmp;
        printf("%d %d\n",left,right);
        for(int i=0;i<=left;i++){
            for(int j=0;j<=right;j++){
                double cnt;
                if((i-1)>=0){
                    cnt=dp[i-1][j][0]+g[tmp-i].c*(t[i-1][j][0]+fabs(g[tmp-i+1].x-g[tmp-i].x));
                    dp[i][j][0]=cnt;
                     t[i][j][0]=t[i-1][j][0]+fabs(g[tmp-i+1].x-g[tmp-i].x);
                    if(dp[i-1][j][1]+g[tmp-i].c*(t[i-1][j][1]+fabs(g[tmp+j].x-g[tmp-i].x))<cnt ||(cnt==dp[i-1][j][1]+g[tmp-i].c*(t[i-1][j][1]+fabs(g[tmp+j].x-g[tmp-i].x)) && t[i-1][j][1]+fabs(g[tmp+j].x-g[tmp-i].x)<t[i][j][0]) ){
                        dp[i][j][0]=dp[i-1][j][1]+g[tmp-i].c*(t[i-1][j][1]+fabs(g[tmp+j].x-g[tmp-i].x));
                        t[i][j][0]=t[i-1][j][1]+fabs(g[tmp+j].x-g[tmp-i].x);

                    }
                }
                if((j-1)>=0){
                   //printf("%d %d %lf\n",i,j-1,dp[i][j-1][0]);
                    cnt=dp[i][j-1][0]+g[tmp+j].c*(t[i][j-1][0]+fabs(g[tmp-i].x-g[tmp+j].x));
                    dp[i][j][1]=cnt;
                    t[i][j][1]=t[i][j-1][0]+fabs(g[tmp-i].x-g[tmp+j].x);
                    printf("%d %d %lf\n",i,j,t[i][j][1]);
                    if(dp[i][j-1][1]+g[tmp+j].c*(t[i][j-1][1]+fabs(g[tmp+j-1].x-g[tmp+j].x))<cnt ||(dp[i][j-1][1]+g[tmp+j].x*(t[i][j-1][1]+fabs(g[tmp+j-1].x-g[tmp+j].x))==cnt && t[i][j][1]>t[i][j-1][1]+fabs(g[tmp+j-1].x-g[tmp+j].x))){
                        dp[i][j][1]=dp[i][j-1][1]+g[tmp+j].c*(t[i][j-1][1]+fabs(g[tmp+j-1].x-g[tmp+j].x));
                        t[i][j][1]=t[i][j-1][1]+fabs(g[tmp+j-1].x-g[tmp+j].x);
                    }
                }
                printf("%lf\n",dp[i][j][1]);
            }
        }
        double ans=dp[left][right][0];
        if(dp[left][right][1]<ans)
            ans=dp[left][right][1];
        printf("%lf\n",ans);
    }
}

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

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <queue>
#define M (1<<15)
#define MAX (1<<16)
using namespace std;
int Tree[MAX];
void add(int s,int t) {
  int i(1);
  for(s = s+M-1,t = t+M+1;s^t^1;s>>=1,t>>=1,i<<=1) {
    if(~s&1) Tree[s^1]+=i;
    if( t&1) Tree[t^1]+=i;
  }
}
int query(int s) {
  int res(0);
  s+=M;
  while(s) res+=Tree[s], s>>=1;
  return res;
}
int main() {
  int _,n,Q,cd,ca(0),left;
  char op[10];
  queue<int> q;
  cin>>_;
  while(_--) {
    memset(Tree,0,sizeof(Tree));
    cin>>n>>Q>>cd;
    left = n;
    printf("Case %d:\n",++ca);
    while(!q.empty()) q.pop();
    for(int i(0);i!=Q;++i) {
      scanf("%s",op);
      if(op[0]=='A') {
        int s,t;
        scanf("%d%d",&s,&t);
        if(q.size()==cd) left+=q.front(), q.pop();
        if(t-s+1<=left) q.push(t-s+1), left-=(t-s+1);
        else q.push(left), add(s+left,t), left = 0;
      } else {
        int s;
        scanf("%d",&s);
        printf("%d\n",query(s));
      }
    }
  }
  return 0;
}

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

#include <cstdio>
#include <cmath>
#define eps 1e-4

double len[110],PI=acos(-1.0);
int n;

double cals(double bc)
{
    int i;
    double p,ans=0;
    for(i=1;i<n;i++)
    {
        p=(len[i]+len[i+1]+bc)/2.0;
        ans+=sqrt(p*(p-len[i])*(p-len[i+1])*(p-bc));
    }
    p=(len[1]+len[n]+bc)/2.0;
    ans+=sqrt(p*(p-len[1])*(p-len[n])*(p-bc));
    return ans;
}

int main()
{
    int nt,z,flag;
    int i,j;
    double l,r,mid,midmid,s,ss,midv,midmidv,tmp;
    double ans,nowans;
    double a,b,c,t;
    scanf("%d",&nt);
    for(z=1;z<=nt;z++)
    {
        scanf("%d",&n);
        for(i=1;i<=n;i++) scanf("%lf",&len[i]);
        l=0,r=20000,mid=30000;
        while(r-l>eps)
        {
            mid=(l+r)/2.0;
            tmp=0;
            for(i=1;i<n;i++)
                tmp+=acos((len[i]*len[i]+len[i+1]*len[i+1]-mid*mid)/2.0/len[i]/len[i+1]);
            tmp+=acos((len[1]*len[1]+len[n]*len[n]-mid*mid)/2.0/len[1]/len[n]);
            if(tmp>2*PI) r=mid-eps;
            else l=mid+eps;
        }
        ans=mid;
        flag=1;
        if(mid<eps||mid>20000-eps) flag=0;
        for(i=1;i<n&&flag;i++)
        {
            a=len[i],b=len[i+1],c=ans;
            if(a<b) t=a,a=b,b=t;
            if(a<c) t=a,a=c,c=t;
            if(b<c) t=b,b=c,c=t;
            if(b+c<=a) flag=0;
        }
        a=len[1],b=len[n],c=ans;
        if(a<b) t=a,a=b,b=t;
        if(a<c) t=a,a=c,c=t;
        if(b<c) t=b,b=c,c=t;
        if(b+c<=a) flag=0;
        if(1) printf("Case %d: %.3lf\n",z,ans);
        else printf("Case %d: impossible\n",z);
    }
    return 0;
}

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

#include<stdio.h>
int main(void){
int i,j;
for(i=1;i<9;i++){
     for(j=1;j<9;j++){
    printf("%d×%d=%d",i,j,i*j)
   }
}
return 0;

}

Compiler output:
main.c: In function 'main':
main.c:6:31: error: expected ';' before '}' token
    6 |     printf("%d×%d=%d",i,j,i*j)
      |                               ^
      |                               ;
    7 |    }
      |    ~