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

#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<vector>
#include<map>
#include<set>

using namespace std;

const int maxn = 10010;
int first[maxn], ma1[maxn], ma2[maxn], dist[maxn], cnt, n, du[maxn];
struct Arc{
	int v, a, b, next;
}arc[maxn * 2];

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

void dfs1(int fa,int u)
{
	for(int i = first[u]; i + 1; i = arc[i].next)
	{
		int v = arc[i].v;
		if(v == fa)	continue;
		dfs1(u, v);
		int tmp = arc[i].a + ma1[v];
		if(tmp > ma1[u])
			ma2[u] = ma1[u], ma1[u] = tmp;
		else
			if(tmp > ma2[u])
				ma2[u] = tmp;
	}
}

void dfs2(int fa, int u,int fadist)
{
	dist[u] = max(fadist, ma1[u]);
	for(int i = first[u]; i + 1; i = arc[i].next)
	{
		int v = arc[i].v;
		if(v == fa)	continue;
		if(ma1[u] == arc[i].a + ma1[v])
			dfs2(u, v, max(fadist, ma2[u]) + arc[i].a);
		else
			dfs2(u, v, max(fadist, ma1[u]) + arc[i].a);
	}
}

char flag;
int high;
void dfs(int fa,int u)
{
	if(du[u] == 1)
		flag = 0;
	for(int i = first[u]; flag && (i + 1); i = arc[i].next)
	{
		int v = arc[i].v;
		if(v == fa)	continue;
		if(arc[i].b <= high)	continue;

		dfs(u, v);
	}	
}

char check(int u, int mid)
{
	flag = 1;
	high = mid;

	dfs(0, u);

	return flag;
}

int main()
{
	while(scanf("%d", &n) == 1)
	{
		for(int i = 0; i <= n; i++)
		{
			first[i] = -1;
			du[i] = 0;
			ma1[i] = ma2[i] = dist[i] = 0;
		}
		cnt = 0;

		for(int i = 1; i < n; i++)
		{
			int u, v, a, b;
			scanf("%d%d%d%d", &u, &v, &a, &b);
			du[u]++;
			du[v]++;
			add(u, v, a, b);
			add(v, u, a, b);
		}

		dfs1(0, 1);
		dfs2(0, 1, 0);
		int u = 1;
		for(int i = 1; i <= n; i++)
			if(dist[i] < dist[u])
				u = i;

		int l = 0, r = 100000010;
		while(l <= r)
		{
			int mid = (l + r)>>1;
			if(check(u, mid))	r = mid - 1;
			else	l = mid + 1;
		}

		printf("%d\n", 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<iostream>
void main()
{
	printf("1x1=1\n");
	printf("1x2=2\n");
	printf(".\n");
	printf(".\n");
	printf("9x8=72\n");
	printf("9x9=81\n");
}

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

#include<iostream>
void main()
{
	printf("1*1=1\n");
	printf("1*2=2\n");
	printf(".\n");
	printf(".\n");
	printf("9*8=72\n");
	printf("9*9=81\n");
}

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

#include <iostream>
#include <math.h>
using namespace std;
int main()
{
    for( int i=1;i<=9;i++)
    {
         for(int j=1;j<=10;j++)
         {
                 cout << i << "*" << j << "="<<i*j <<endl;
         }
    }
    return 0;
}
        

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

int main(){
int i,j;

for (i=1;i<=9;++i)
for (j=1;j<=9;++j) printf("%dx%d=%d\n",i,j,i*j)
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:20: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    5 | for (j=1;j<=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 | int main(){
main.c:5:20: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    5 | for (j=1;j<=9;++j) printf("%dx%d=%d\n",i,j,i*j)
      |                    ^~~~~~
main.c:5:20: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:5:48: error: expected ';' before 'return'
    5 | for (j=1;j<=9;++j) printf("%dx%d=%d\n",i,j,i*j)
      |                                                ^
      |                                                ;
    6 | return 0;
      | ~~~~~~
Language: C

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

#define MAXN	100100
#define MAXT	100100

int f[MAXN];
int last[MAXN];
int n, t, tn;
struct node{
	int type;
	int a, b;
} work[MAXT];

int query(int loc){
	if(f[loc] == loc) return loc;
	
	int fat = f[loc];
	int ret = query(f[loc]);
	if(last[loc]<tn) f[loc] = f[fat];
	return ret;
}
bool ask(int loc, int fat){
	if(loc == fat) return false;
	int _fat = f[loc];
	bool ret = ask(f[loc], fat);
	if(last[loc]<tn) f[loc] = f[_fat];
	if(ret == false) return false;
	return true;
}
int main()
{
	int cnt = 0;
	while(scanf("%d", &n)!=EOF){
		if(cnt)printf("\n");
		cnt++;
		for(int i=0; i<n; i++){
			int add;
			scanf("%d", &add);
			if(add == 0) f[i+1] = i+1;
			else		 f[i+1] = add;
		}

		for(int i=1; i<=n; i++)
			last[i] = 0;
		scanf("%d", &t);
		for(int i=1; i<=t; i++){
			char add[10];
			scanf("%s", add);
			if(add[0] == 'Q'){
				work[i].type = 0;
				scanf("%d", &work[i].a);
			}
			else{
				work[i].type = 1;
				scanf("%d%d", &work[i].a, &work[i].b);
				last[work[i].a] = i;
			}
		}
		for(tn = 1; tn<=t; tn++){
			if(work[tn].type == 0) {
				printf("%d\n", query(work[tn].a));
			}
			else{
				if(work[tn].b!=0)
					f[work[tn].a] = work[tn].b;
				else
					f[work[tn].a] = work[tn].a;
			//	for(int i=1; i<=6; i++)
			//		cout<<f[i]<<' '
			}
		}
	}
}

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

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;
#define maxn 100005

int n;
map <long long int, int> mp1, mp2;
vector <long long> a, b;
int x, sum;
long long index[maxn];

int bs1(long long k,vector<long long> vec)
{
        int l=0,r=vec.size()-1,mid;
        while(l<r)
        {
                mid=(l+r+1)/2;
                if(vec[mid]<=k)
                        l=mid;
                else    r=mid-1;
        }
        while(l>=1&&vec[l]==k)
                --l;
        return l;
}

int bs2(long long k, vector<long long> vec)
{
        int l=0,r=vec.size()-1,mid;
        while(l<r)
        {
                mid=(l+r)/2;
                if(vec[mid]>=k)
                        r=mid;
                else    l=mid+1;
        }
        int s=vec.size();
        while(l<s&&vec[l]==k)
                ++l;
        return l;
}

int cal(long long k)
{
        int res=mp1[k]+sum-mp2[k];
        res+=bs1(k, a)+1;
        if (k==7) printf("%d\n",res);
        int s=b.size();
        res+=s-bs2(k, b);
        if (k==7) printf("%d\n",res);
        return res;
}

int main()
{
        scanf("%d", &n);
        for (int i=1; i<=n; i++)
        {
                scanf("%d%I64d", &x, &index[i]);
                if (x==1) a.push_back(index[i]);
                else if (x==2) b.push_back(index[i]);
                else if (x==3) mp1[index[i]]++;
                else if (x==4)
                {
                        sum++;
                        mp2[index[i]]++;
                }
        }
        sort(index+1,index+1+n);
        sort(a.begin(), a.end());
        sort(b.begin(), b.end());
        int ans=-1;
        long long num;
        for (int i=1; i<=n; i++)
        {
                int tmp=cal(index[i]);
                if (tmp>ans) ans=tmp, num=index[i];
                tmp=cal(index[i]+1);
                if (tmp>ans) ans=tmp, num=index[i]+1;
        }
        int tmp=cal(1000000000000000001LL);
        if (tmp>ans) ans=tmp, num=1000000000000000001LL;
        tmp=cal(0);
        if (tmp>ans) ans=tmp, num=0;
        printf("%d %I64d\n", ans, num);
        return 0;
}

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

3 
20  30  35 
37 24   29 
60 20 13 
cnt=6
{2.500000 0.000000}
{22.500000 0.000000}
{37.500000 0.000000}
{51.500000 0.000000}
{53.500000 0.000000}
{66.500000 0.000000}

Compiler output:
main.c:1:1: error: expected identifier or '(' before numeric constant
    1 | 3
      | ^
main.c:7:1: error: expected identifier or '(' before '{' token
    7 | {22.500000 0.000000}
      | ^
main.c:8:1: error: expected identifier or '(' before '{' token
    8 | {37.500000 0.000000}
      | ^
main.c:9:1: error: expected identifier or '(' before '{' token
    9 | {51.500000 0.000000}
      | ^
main.c:10:1: error: expected identifier or '(' before '{' token
   10 | {53.500000 0.000000}
      | ^
main.c:11:1: error: expected identifier or '(' before '{' token
   11 | {66.500000 0.000000}
      | ^
Language: C

#include<cstdio>
#include<iostream>
#include<algorthm>
#include<cmath>
#include<cstring>
#include<queue>
#include<stack>
#include<string>
using namespace std;
const int N=55;
const double eps=1e-6;
double a[N][N],double x[N];
inline int sig(double x) {return (x>eps)-(x<-eps);}
int gauss()
{
    int row,col;
    for(row=col=0;row<equ&&col<var;++row,++col)
    {
        int mx_r=row;
        for(int i=row+1;i<equ;i++)
            if(fabs(a[mx_r][col])<fabs(a[i][col]))
                mx_r=i;
        if(sig(a[mx_r][col])==0)
        {
            --row;
            continue;
        }
        if(mx_r!=row)
            for(int j=col;j<=var;++j)
                swap(a[row][j],a[mx_r][j]);
        for(int j=var;j>=col;--j)
        {
            a[row][j]/=a[row][col];
            for(int i=row+1;i<=euq;++i)
                a[i][j]-=a[row][j]*a[i][col];
        }
    }
    for(int i=row;i<equ;++i)
        if(sig(a[i][var]))
            return -1;
    if(row<var)
        return var-row;
    for(int i=row-1;i>=0;--i)
    {
        x[i]=a[i][var];
        for(int j=i+1;j<var;++j)
            x[i]-=a[i][j]*x[j];
    }
    return 0;
}
inr main()
{
    return 0;
}

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

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<iostream>
#include<math.h>
#include<vector>
#include<queue>
#include<set>
#include<string>
#include<map>
#include<stack>
#define op operator
#define db double
#define cp const Point&
#define rt return
#define cn const
#define INF 1e-18
using namespace std;

double const eps=1e-10;
double const PI=acos(-1);
int sig(double x) {return (x>eps)-(x<-eps);}

struct Point
{
    double x,y,z;
    Point(db a=0,db b=0,db c=0):x(a),y(b),z(c){}
    Point op - (cp a) cn{rt Point(x-a.x,y-a.y,z-a.z);}
    double op *(cp a) cn{rt x*a.x+y*a.y+z*a.z;}
    double dis(Point b)
    {
        return sqrt((x-b.x)*(x-b.x) + (y-b.y)*(y-b.y) + (z-b.z)*(z-b.z));
    }
     double dis()
    {
        return sqrt(x*x + y*y + z*z);
    }
};

struct cicrl
{
    Point p;
    double r;
}c[2100];


bool judge(cicrl c,Point a,Point b)
{
   Point v1,v2,v3,v4;
   v1=b-a; v2=c.p-a;
   v3=a-b; v4=c.p-b;

   double u1,u2;
   u1=( v1*v2 )/(v1.dis() * v2.dis());
   u2=(v3*v4)/(v3.dis() * v4.dis());

   double ans=INF;
   if(sig(u1) >0 || sig(u2) >0 )
      ans=min(c.p.dis(a), c.p.dis(b) );
    else
      ans= u1* v1.dis();

    if(sig(ans-c.r)<0) return false;
    else return true;
}


Point h[20];
double g[20];
int main()
{
    int n,m,r;
    Point q;
    while(scanf("%d%d%d",&n,&m,&r)!=EOF)
    {
        for(int i=0;i<n;i++)
        {
            scanf("%lf%lf%lf%lf",&c[i].p.x,&c[i].p.y,&c[i].p.z, &c[i].r);
        }

        for(int i=0;i<m;i++)
        {
            scanf("%lf%lf%lf%lf",&h[i].x,&h[i].y,&h[i].z,&g[i]);
        }
        scanf("%lf%lf%lf",&q.x,&q.y,&q.z);

    }
    return 0;
}

Compiler output:
main.c:4:9: fatal error: iostream: No such file or directory
    4 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
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;
    printtf("%d×%d=%d\n",a,b,c);
    }
    }

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:5: error: implicit declaration of function 'printtf'; did you mean 'printf'? [-Wimplicit-function-declaration]
    8 |     printtf("%d×%d=%d\n",a,b,c);
      |     ^~~~~~~
      |     printf
Language: C

m;main(n){for(;++m<10||m=1,n++<10;)printf("%dx%d=%d\n",n,m,n*m);}

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

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#define DBLE 1e-8
#define PI 3.1415926535898
#define INF 1000000000
#define MAXN 1024
#define MOD 1000000009
#define MP(x,y) make_pair((x),(y))
using namespace std;
char str[MAXN][MAXN];
int len[MAXN][MAXN];
int tree[MAXN];
bool visit[MAXN];
map<int,int> ma;
int n,m;
void cal(int h)
{
    int tmp;
    for(int i=0;i<n;++i)
    {
        zero(1,0,MAXN-1,len[i][h]+1,MAXN);
        tmp=mfind(1,0,MAXN-1,0,len[i][h]);
        //++ma[max(tmp+2*(i+1),2+2*len[i][h])];
    }
}
int main()
{
    int ncase;
    scanf("%d",&ncase);
    while(ncase--)
    {
        scanf("%d%d",&n,&m);
        ma.clear();
        memset(len,0,sizeof(len));
        for(int i=0;i<n;++i)
            scanf("%s",str[i]);
        for(int i=0;i<n;++i)
            for(int j=m-1;>=0;--j)
                if(str[i][j]=='.')
                    len[j]=len[j+1]+1;
                else    len[j]=0;
        for(int i=0;i<m;++i)
        {
            memset(tree,0,sizeof(tree));
            cal(i);
        }
        for(map<int,int>::iterator ite=ma.begin();ite!=ma.end();++ite)
            printf("%d x %d\n",ite->second,ite->first);
    }
    return 0;
}

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

#include <stdio.h>
int main()
{
do{

int ax ,ay;
ax=1 ; ay=1 ;

do{
	printf("%dx%d=$d\n", ax,ay,ax*ay); ay=ay+1 ;
	} while (ay==10);

ax=ax+1 ;
} while (ax==10);

return(0);
}

Compiler output:
main.c: In function 'main':
main.c:14:10: error: 'ax' undeclared (first use in this function)
   14 | } while (ax==10);
      |          ^~
main.c:14:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int mian()
{
   printf("1x1=1\n");
   printf("1x2=2\n");
   printf(".\n");
   printf(".\n");
   printf("9x8=72\n");
   printf("9x9=81\n");

}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<string>
#include<cmath>
#include<queue>
#include<map>
using namespace std;
#define M 100017
#define inf 0x3f3f3f3f
#define ll long long
char s[110000];
int a[11][26],ans,l[11],all[26];
int n;
bool check()
{
    int tmp[26]={0};
    for (int i=1;i<=n;i++)
        if (l[i])
        for (int j=0;j<=25;j++)
        tmp[j]+=a[i][j];
    for (int i=0;i<=25;i++)
        if (tmp[i]>all[i]) return 0;
    return 1;
}
void dfs(int deep,int cnt)
{
    if (deep>n)
    {
        if (check())
        ans=max(ans,cnt);
        return;
    }
    l[deep]=1;
    dfs(deep+1,cnt+1);
    l[deep]=0;
    dfs(deep+1,cnt);
}

int main()
{
    int t,cnt=0;
    scanf("%d",&t);
    while (t--)
    {
        memset(a,0,sizeof(a));
        memset(all,0,sizeof(all));
        scanf("%s",&s);
        for (int i=0;i<strlen(s);i++)
            all[s[i]-'a']++;
        scanf("%d",&n);
        for (int i=1;i<=n;i++)
        {
            scanf("%s",&s);
            for (int j=0;j<strlen(s);j++)
                a[i][s[j]-'a']++;
        }
        ans=0;
        dfs(1,0);
        printf("Case #%d: %d\n",++cnt,ans);
    }
}

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 <string.h>
#include <algorithm>
#define clr(x, y) memset(x, y, sizeof(x))
#define ll __int64
using namespace std;

int a[200],b[200];
char sz[500010];
char c;

int main(){
#ifdef H403
    freopen("d:\\in.txt","r",stdin);
#endif
    while(~scanf("%c",&c)){
        clr(a,0);
        a[c]++;
        int cnt1=1;
        while((c=getchar())!='\n'){
            if(c==' '){
                scanf("%c",&c);
                a[c]++;
                cnt1++;
            }
        }
        scanf("%c",&c);sz[0]=c;
        int cnt2=1;
        while((c=getchar())!='\n')
            if(c==' ') sz[cnt2++]=getchar();
        if(cnt1>cnt2){
            puts("0");
            continue;
        }
        int tmp=0,ans=0;clr(b,0);
        for(int i=0;i<cnt1;i++) b[sz[i]]++;
        for(int i=33;i<123;i++) if(a[i]==b[i]) tmp++;
        if(tmp==90) ans++;
        for(int i=0,j=cnt1;j<cnt2;i++,j++)
        {
            if(a[sz[i]]==b[sz[i]]) tmp--;
            b[sz[i]]--;
            if(a[sz[i]]==b[sz[i]]) tmp++;
            if(a[sz[j]]==b[sz[j]]) tmp--;
            b[sz[j]]++;
            if(a[sz[j]]==b[sz[j]]) tmp++;
            if(tmp==90) ans++;
        }
        printf("%d\n",ans);
    }
    return 0;
}

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

#include <stdio.h>
#include <math.h>
#include <string.h>
#include <algorithm>
#include <map>
#define sqr(x) ((x)*(x))
#define clr(x, y) memset(x, y, sizeof(x))
#define forn(i, n) for(int i=0; i<n; i++)
#define ll __int64
using namespace std;

const double INF=1e50;
int n;
map<pair<int,int> ,int > ma;
map<pair<int,int> ,int >::iterator it;

int solv(double x){
    return (int)(x*1000+100000.3)%1000;;
}

double calc(int x,int y){
    double ret=INF;
    ret=min(ret,sqrt(1.0*sqr(x)+sqr(y))/1000);
    ret=min(ret,sqrt(1.0*sqr(x-1000)+sqr(y))/1000);
    ret=min(ret,sqrt(1.0*sqr(x)+sqr(y-1000))/1000);
    ret=min(ret,sqrt(1.0*sqr(x-1000)+sqr(y-1000))/1000);
    return ret;
}

int main(){
#ifdef H403
    freopen("c:\\in.txt","r",stdin);
#endif
    while(~scanf("%d",&n)){
        int ans=0;
        double dis=INF;
        ma.clear();
        for(int i=1;i<=n;i++){
            double x,y;
            scanf("%lf%lf",&x,&y);
            int xx,yy;
            xx=solv(x);yy=solv(y);
            if(ma.find(make_pair(xx,yy))==ma.end())
                ma[make_pair(xx,yy)]=1;
            else ma[make_pair(xx,yy)]++;
        }
        for(it=ma.begin();it!=ma.end();it++){
            int tmp=it->second;
            if(ans<=tmp){
                ans=tmp;
                dis=min(dis,calc(it->first.first,it->first.second));
            }
        }
        printf("%d %.8lf\n",ans,dis);
    }
    return 0;
}

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

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

int t;
double a,b,c;
const double EPS=1e-10;
double MIN=1, MAX=inf;
double cal(double k)
{
    double s=(a*k*k-a*k+b*k)*(a*k*k-a*k+b*k)-4*a*(k*(k-1)*b/2+k*c+a*(2*k-1)*k*(k-1)/6);
    return s;
}
double solve()
{
    double left=MIN,right=MAX;
    double mid1,mid2;
    while(left+EPS<right)
    {
        mid1=left+(right-left)*0.381966;
        mid2=left+(right-left)*0.618034;
        if(cal(mid1)<cal(mid2)) right=mid2; //豎よ栫蟆丞?
        // if(cal(mid1)>cal(mid2)) right=mid2; //豎よ栫螟ァ蛟シ
        else left=mid1;
    }
    return left;
}


int main()
{
  scanf("%d",&t);
  while(t--)
  {
      scanf("%lf %lf %lf",&a,&b,&c);
      printf("%lf\n",solve());
  }
}

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

#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
typedef long long LL;
const int N=22;
const LL mod=1e9+7;
struct node
{
	int cnt;
	LL sum,sum2;
	node(){}
	node(int cnt,LL sum,LL sum2) :
		cnt(cnt),sum(sum),sum2(sum2) {}
}dp[N][2][2][8][8];

LL pow_10[N];
char A[N],B[N];
bool vis[N][2][2][8][8];

void fun(char *str,LL valu)
{
    for(int i=19;i>=0;i--)
    {
        str[i]=('0'+valu%10);
        valu/=10;
    }
}

node dfs(int ind,int u,int d,int md1,int md2)
{
	if(ind==20)
	{
		if(md1!=0&&md2!=0) return node(1,0,0);
		else return node(0,0,0);
	}

	node &res=dp[ind][u][d][md1][md2];
	if(vis[ind][u][d][md1][md2]) return res;

	vis[ind][u][d][md1][md2]=1;
    res=node(0,0,0);

	int st=u?0:A[ind]-'0';
	int ed=d?9:B[ind]-'0';
	for(int i=st;i<=ed;i++) if(i!=7)
	{
		bool flag1=u||i>st;
		bool flag2=d||i<ed;
		node tmp=dfs(ind+1,flag1,flag2,(md1*10+i)%7,(md2+i)%7);

		if(tmp.cnt==0) continue;

		LL valu=(i*pow_10[19-ind])%mod;

		res.cnt=(res.cnt+tmp.cnt)%mod;
		res.sum=(res.sum+tmp.sum+tmp.cnt*valu)%mod;
		res.sum2=( (res.sum2+tmp.sum2+2*(tmp.sum*valu)%mod)%mod + (tmp.cnt*(valu*valu)%mod)%mod)%mod;
	}
	return res;
}
int main()
{
    freopen("4507.in","r",stdin);

    pow_10[0]=1;
    for(int i=1;i<N;i++) pow_10[i]=(pow_10[i-1]*10)%mod;

	int t;
	scanf("%d",&t);
	while(t--)
	{
	    memset(A,0,sizeof(A));
	    memset(B,0,sizeof(B));
		memset(vis,0,sizeof(vis));

		LL a,b;	cin>>a>>b;
		fun(A,a);   fun(B,b);
		//printf("%s %s\n",A,B);

		LL ans=dfs(0,0,0,0,0).sum2;
        cout<<ans<<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<stdio.h>
#include<string.h>
#include<algorithm>
#include<queue>
using namespace std;
int N,M;
struct bian
{
    int u,v,w;
    int next;
}E[60000],e[300000];
int dis[60000];
int vis[60000];
int dist[60000],vst[60000];
int head[60000];
int num;
int dfs(int u) {
    vst[u]=true;
    for(int h=head[u];h!=-1;h=e[h].next)
    {
        int v=e[h].v;
        int w=e[h].w;
        if(dist[v]>dist[u]+w){
            dist[v]=dist[u]+w;
            if(vst[v]) return v;
            int ret=dfs(v);
            if(ret!=-1) return ret;
        }
    }
    vst[u]=false;
    return -1;
}
int negcir() {
    memset(dist,0,sizeof(dist));
    memset(vst,0,sizeof(vst));
    for(int u=0;u<=N;u++){
        int ret=dfs(u);
        if(ret!=-1) return ret;
    }
    return -1;
}
void add(int u,int v,int w)
{
    e[num].v=v;
    e[num].next=head[u];
    e[num].w=w;
    head[u]=num++;
}
void build(int mid)
{
    num=0;
    memset(head,-1,sizeof(head));
    for(int i=1;i<=mid;i++)
    {
        add(E[i].v,E[i].u,E[i].w);
        add(E[i].u,E[i].v,E[i].w);
    }
    for(int i=0;i<N;i++)
        add(N,i,0);
}
bool ok(int mid)
{
    build(mid);
    if(negcir()==-1)
        return 1;
    return 0;
}
void spfa()
{
    build(M);
    memset(dis,63,sizeof(dis));
    memset(vis,0,sizeof(vis));
    dis[N]=0;
    queue<int>q;
    q.push(N);
    vis[N]=1;
    while(!q.empty())
    {
        int x=q.front();
        vis[x]=0;
        q.pop();
        for(int h=head[x];h!=-1;h=e[h].next)
        {
            int v=e[h].v;
            int w=e[h].w;
            if(dis[x]+w<dis[v])
            {
                dis[v]=dis[x]+w;
                if(!vis[v])
                {
                    q.push(v);
                    vis[v]=1;
                }
            }
        }
    }
}
int main()
{
    scanf("%d%d",&N,&M);
    for(int i=1;i<=M;i++)
        scanf("%d%d%d",&E[i].u,&E[i].v,&E[i].w);
    if(ok(M))
    {
        spfa();
        puts("Possible");
        for(int i=0;i<N;i++)
            printf("%d\n",dis[i]);
    }
    else
    {
        int l=1,r=M;
        int ans=M;
        if(l<r)
        {
            int mid=(l+r)>>1;
            if(ok(mid))
                l=mid+1;
            else
            {
                ans=min(ans,mid);
                r=mid;
            }
        }
        printf("%d\n",ans);
    }
}

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 <string.h>
#include <algorithm>

using namespace  std;

const int N = 110;

int n,sum,sumB;
int B[N],base[N],pt1[20],pt2[20];
int time[N][20],base1[20][N],base2[20][N];
int ww[N][20],vv[N][20],f[N][1100];

int main()
{
    freopen("C://in.txt","r",stdin);
    int t;
    scanf("%d",&t);
    while(t--)
    {
        scanf("%d %d",&n,&sum);
        sumB=0;
        for(int i=1; i<=n; i++)
        {
            scanf("%d",&B[i]);
            sumB+=B[i];
            for(int j=0; j<10; j++)
                scanf("%d",&time[i][j]);
        }

        memset(base1,0,sizeof(base1));
        memset(base2,0,sizeof(base2));
        memset(pt1,0,sizeof(pt1));
        memset(pt2,0,sizeof(pt2));

        for(int i=1; i<=3; i++)
        {
            scanf("%d",&pt1[i]);
            for(int j=1; j<=n; j++)
                scanf("%d",&base1[i][j]);
        }
        for(int i=1; i<=3; i++)
        {
            scanf("%d",&pt2[i]);
            for(int j=1; j<=n; j++)
                scanf("%d",&base2[i][j]);
        }


        int extra=0,tmp;
        double ans=-1;
        for(int i=0; i<=3; i++)
        {
            for(int j=0; j<=3; j++)
            {
                tmp=sum;
                extra=i+j;
                tmp-=pt1[i];
                tmp-=pt2[j];
                for(int k=1; k<=n; k++)
                    base[k]=max(base1[i][k],base2[j][k])*10;

                for(int k=1; k<=n; k++)
                {
                    int x=base[k]/10;
                    while(base[k]<60)
                    {
                        tmp-=time[k][x];
                        base[k]+=10;
                        x++;
                    }
                }
                if(tmp<=0)  continue;
                printf("%d %d %d \n",i,j,tmp);


                memset(ww,0,sizeof(ww));
                memset(vv,0,sizeof(vv));

                for(int k=1; k<=n; k++)
                {
                    for(int p=base[k]/10+1; p<=10; p++)
                    {
                        ww[k][p]=ww[k][p-1]+time[k][p-1];
                        vv[k][p]=p*10*B[k];
//                 printf("%d\n",vv[k][p]);
                    }
                }




                for(int k=1; k<=n; k++)
                    printf("%d  ",base[k]);
                puts("");
                memset(f,0,sizeof(f));
                for(int k=1; k<=n; k++)
                    for(int v=tmp; v>=0; v--)
                        for(int p=base[k]/10; p<=10; p++)
                            if(v>=ww[k][p])
                                f[k][v]=max(f[k-1][v],f[k-1][v-ww[k][p]]+vv[k][p]);
//                printf("@@%d %d\n",f[n][tmp]/sumB,extra);
                ans=max(ans,f[n][tmp]*1.0/sumB+extra);
//                printf("%lf\n",ans);
            }
        }
        printf("%lf\n",ans);
    }
    return 0;
}

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

#include <stdio.h>
#include <iostream>
#include <string.h>
#include <algorithm>
#include <string>
#include <iterator>
#include <map>

using namespace std;

char str[55][110];
int n;

map<string,int>mp;
map<string,int>::iterator p;

string ss[5500];
int slen[110];

int main()
{
    freopen("C://in.txt","r",stdin);
    int t;
    scanf("%d",&t);
    while(t--)
    {
        scanf("%d",&n);
        getchar();
        for(int i=0;i<n;i++)
        gets(str[i]);
        for(int i=0;i<n;i++)
        {
            int len=strlen(str[i]);
            for(int j=0;j<len;j++)
                if(str[i][j]>='A'&&str[i][j]<='Z')
                str[i][j]=str[i][j]+32;
        }

        int x;
        char s[110];
        for(int i=0;i<n;i++)
        {
            int len=strlen(str[i]);
            x=0;
            for(int j=0;j<=len;j++)
            {
                if(j==len||str[i][j]<'a'||str[i][j]>'z')
                {
                    if(x==0)  continue;
                    s[x]='\0';
                    if(mp.find((string)s)==mp.end())
                        mp[(string)s]=0;
                    else
                        mp[(string)s]++;
                    x=0;
                    continue;
                }
                s[x++]=str[i][j];
            }
        }
        int Max=-1;
        memset(slen,0,sizeof(slen));
        for(p=mp.begin();p!=mp.end();p++)
        {
                cout<<(p->first)<<"   "<<(p->second)<<endl;
            if(slen[(p->second)]<(p->first).length())
            slen[(p->second)]=(p->first).length();
            if(Max<(p->second))  Max=(p->second);
        }

        int cnt=0,flag=1;
        for(int i=Max;i>1;i--)
        {
            if(slen[i]==0)  continue;
            cnt=0;
            for(p=mp.begin();p!=mp.end();p++)
            {
                if(((p->second)==i)&&((p->first).length())==slen[i])
                {
                    ss[cnt++]=(p->first);
                }
            }
            if(cnt<2)
            {
                cout<<ss[cnt]<<" ";
                if(flag==0)
                cout<<" ";
                flag=1;
            }
            else
            {
                sort(ss,ss+cnt);
                cout<<ss[cnt-2]<<" ";
                if(flag==0)
                cout<<" ";
                flag=1;
            }
        }
        puts("");
    }
}

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

#include <stdio.h>
#include <string.h>
#include <algorithm>
#define inf 1e9
#define forn(i,n) for(int i=0;i<n;i++)
#define clr(a,b)    memset(a,0,sizeof(b));

using namespace std;

const int SIZE= 2100;

int in[SIZE],sum[SIZE],dp[SIZE][SIZE],s[SIZE][SIZE],n,len;
char sz[SIZE];

void print(int l,int r){
    if(l==r){
        for(int i=0;i<len;i++)
            printf("%c",sz[i]);
        puts("");
    }
    else{
        ++len;
        sz[len-1]='0';
        print(l,s[l][r]);
        sz[len-1]='1';
        print(s[l][r]+1,r);
        --len;
    }
}

void solve()
{
    sum[0]=0;
    clr(dp,0x0f);
    forn(i,n)
    {
        sum[i+1]=sum[i]+in[i];
        dp[i][i]=in[i];
        s[i][i]=i;
    }
    for(int step=1; step<n; step++)
        for(int i=0; i+step<n; i++)
        {
            int choice=-1;
            int tmp=inf;
            for(int k=s[i][i+step-1]; k<=s[i+1][i+step]; ++k)
            {
                if(tmp>dp[i][k-1]+dp[k][i+step]+sum[i+step+1]-sum[i])
                {
                    tmp=dp[i][k-1]+dp[k][i+step]+sum[i+step+1]-sum[i];
                    choice=k;
                }
            }
            dp[i][i+step]=tmp;
            s[i][i+step]=choice;
            printf("%d %d %d %d\n",i,step,s[i][i+step],dp[i][i+step]);
        }
    len=0;
    print(0,n-1);
}

void icpc(){
    freopen("C://in.txt","r",stdin);
    while(~scanf("%d",&n))
    {
        forn(i,n)   scanf("%d",in+i);
        solve();
//        printf("%d\n",solve());
    }

}

int main()
{
    icpc();
}

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

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

const int n=3;
const int mod=100;
struct my{
    int t,come,tt;
    bool operator <(const my &u)const{
        return come<u.come;
    }
}a[n+1];
void init(){
    srand(time(NULL));
    for(int i=0;i<n;i++)scanf("%d %d",&a[i].come,&a[i].t),a[i].tt=a[i].t;
//    for(int i=0;i<n;i++)a[i].t=rand()%mod+1,a[i].come=rand()%mod,a[i].tt=a[i].t;
}
void fcfs(){
    double aroundtime=0,paroundtime=0;
    sort(a,a+n);
    int now=a[0].come;
    for(int i=0;i<n;i++){
        aroundtime+=now+a[i].t-a[i].come;
        paroundtime+=1.0*(now+a[i].t-a[i].come)/a[i].t;
        now+=a[i].t;
    }
    aroundtime/=n;
    paroundtime/=n;
    printf("fcfs: %lf %lf\n",aroundtime,paroundtime);
}
struct cmp{
    bool operator ()(const my &a,const my &b)const{
        return a.t>b.t;
    }
};
void spn(){
    double aroundtime=0,paroundtime=0;
    sort(a,a+n);
    priority_queue <my,vector <my>, cmp> que;
    int now=a[0].come;
    for(int i=0;i<n;i++)if(a[i].come<=now)que.push(a[i]);
    else{
        if(!que.empty()){
            my tmp=que.top();que.pop();
            aroundtime+=now+tmp.t-tmp.come;
            paroundtime+=1.0*(now+tmp.t-tmp.come)/tmp.t;
            now+=tmp.t;
//            printf("%d\n",tmp.come);
        }else{
            now=a[i].come;
        }
        i--;
    }
    while(!que.empty()){
        my tmp=que.top();que.pop();
        aroundtime+=now+tmp.t-tmp.come;
        paroundtime+=1.0*(now+tmp.t-tmp.come)/tmp.t;
        now+=tmp.t;
//        printf("%d\n",tmp.come);
    }
    aroundtime/=n;
    paroundtime/=n;
    printf("spn: %lf %lf\n",aroundtime,paroundtime);
}
void rr(){
    double aroundtime=0,paroundtime=0;
    sort(a,a+n);
    queue <my> que;
    int round=1;
    int now=a[0].come;
    for(int i=0;i<n;)if(a[i].come<=now)que.push(a[i++]);
    else{
        if(!que.empty()){
            my tmp=que.front();que.pop();
            if(tmp.tt>round){
                now+=round;
                for(;i<n;)if(a[i].come<=now)que.push(a[i++]);
                else break;
                tmp.tt-=round;
                que.push(tmp);
            }
            else{
                aroundtime+=now+tmp.tt-tmp.come;
                paroundtime+=1.0*(now+tmp.tt-tmp.come)/tmp.t;
                now+=tmp.tt;
            }
        }else now=a[i].come;
    }
    while(!que.empty()){
        my tmp=que.front();que.pop();
        if(tmp.tt>round){
            now+=round;
            tmp.tt-=round;
            que.push(tmp);
        }
        else{
            aroundtime+=now+tmp.tt-tmp.come;
            paroundtime+=1.0*(now+tmp.tt-tmp.come)/tmp.t;
            now+=tmp.tt;
        }
    }
    aroundtime/=n;
    paroundtime/=n;
    printf("rr: %lf %lf\n",aroundtime,paroundtime);
}
int main(){
    init();
    fcfs();
    spn();
    rr();
    return 0;
}

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

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<vector>
#include<set>
#include<map>
#include<cmath>
#define MAXN 55
#define MAXM 100010
#define EPS 1e-7
using namespace std;
set<int> oldPro;
set<int> newPro;
map<string, int> team;
bool p[MAXM];
vector<int> rating;
int dbcmp(double x, double y) {
	if (fabs(x - y) < EPS) {
		return 0;
	} else {
		return x > y ? 1 : -1;
	}
}
struct Person {
	string name;
	string Team;
	string male;
	vector<int> solve;
	vector<int> contest;

	double val;
	friend bool operator<(Person a, Person b) {
		if (dbcmp(a.val, b.val) == 0) {
			return a.name < b.name;
		} else {
			return dbcmp(a.val, b.val) > 0;
		}
	}
} person[MAXN * 10];
void init() {
	oldPro.clear();
	newPro.clear();
	team.clear();
	rating.clear();
	int i, j;
	memset(p, true, sizeof(p));
	for (i = 2; i * i < MAXM; i++) {
		if (p[i]) {
			for (j = i * i; j < MAXN; j += i) {
				p[j] = false;
			}
		}
	}
	p[0] = p[1] = false;
}
double gao(int k) {
	double ans;
	int i;
	bool flag;
	ans = 0;
	for (i = 0; i < (int) person[k].solve.size(); i++) {
		flag = true;
		if (newPro.count(person[k].solve[i])) {
			ans += 2.5;
			flag = false;
		}
		if (oldPro.count(person[k].solve[i])) {
			ans += 1.5;
			flag = false;
		}
		if (p[person[k].solve[i]]) {
			ans++;
			flag = false;
		}
		if (flag) {
			ans += 0.3;
		}
	}
	i = team[person[k].Team];
	if (i == 1) {
		ans += 36;
	} else if (i == 2) {
		ans += 27;
	} else if (i == 3) {
		ans += 18;
	}

	ans += max(0, (rating[rating.size() - 3] - 1200) / 100) * 1.5;

	if (person[k].male == "F") {
		ans += 33;
	}
	return ans;
}
int main() {
	int T;
	int N, M;
	int R;
	int S;
	int Q;
	int P;
	int C;
	int i, j;
	int prize;
	string name;
	cin >> T;
	while (T--) {
		init();
		cin >> N >> M;
		cin >> R;
		for (i = 0; i < R; i++) {
			cin >> j;
			oldPro.insert(j);
		}
		cin >> S;
		for (i = 0; i < S; i++) {
			cin >> j;
			newPro.insert(j);
		}
		cin >> Q;
		for (i = 0; i < Q; i++) {
			cin >> name >> prize;
			team[name] = prize;
		}
		for (i = 0; i < N; i++) {
			cin >> person[i].name >> person[i].Team >> person[i].male >> P >> C;
			person[i].solve.clear();
			person[i].contest.clear();
			while (P--) {
				cin >> j;
				person[i].solve.push_back(j);
			}
			while (C--) {
				cin >> j;
				person[i].solve.push_back(j);
				rating.push_back(j);
			}
		}
		sort(rating.begin(), rating.end());

		for (i = 0; i < N; i++) {
			person[i].val = gao(i);
		}

		sort(person, person + N);
		for (i = 0; i < M; i++) {
			printf("%s %.3lf\n", person[i].name.c_str(), person[i].val);
		}
	}
	return 0;
}

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

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.*;
import java.math.*;
import java.util.ArrayList; 
class Solve
{
	final int MAXN=20010;
	final long INF=10000000000L;
	BigInteger []arr=new BigInteger[MAXN];
	Solve()
	{
		int he=0,tail=0,tmp,cnt=0;
		arr[tail++]=new BigInteger("1");
		arr[tail++]=new BigInteger("5");
		arr[tail++]=new BigInteger("6");
		BigInteger tt,wei=BigInteger.valueOf(1),we2=BigInteger.valueOf(10);
		for(int h=1;h<=1999&&tail<MAXN;++h)
		{
			tmp=tail;
			wei=wei.multiply(BigInteger.valueOf(10));
			we2=we2.multiply(BigInteger.valueOf(10));
			cnt=0;
			for(he=tmp-1;he>=0&&cnt<2;--he)
			{
				for(int i=1;i<=9;++i)
				{
					tt=arr[he].add(BigInteger.valueOf(i).multiply(wei));
					if(tt.multiply(tt).mod(we2).equals(tt))
					{
						arr[tail++]=tt;
						++cnt;
						break;
					}
				}
			}
			System.out.println(""+(h+1)+" "+tail);
		}
	}
}
public class Main
{

	public static void main(String []args)
	{
		new Solve();
		System.out.println("Over");
	}
}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.io.File;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.io.File;
      |            ^
main.c:2:1: error: unknown type name 'import'
    2 | import java.io.FileInputStream;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.io.FileInputStream;
      |            ^
main.c:3:1: error: unknown type name 'import'
    3 | import java.io.FileNotFoundException;
      | ^~~~~~
main.c:3:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    3 | import java.io.FileNotFoundException;
      |            ^
main.c:4:1: error: unknown type name 'import'
    4 | import java.util.*;
      | ^~~~~~
main.c:4:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    4 | import java.util.*;
      |            ^
main.c:5:1: error: unknown type name 'import'
    5 | import java.math.*;
      | ^~~~~~
main.c:5:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    5 | import java.math.*;
      |            ^
main.c:6:1: error: unknown type name 'import'
    6 | import java.util.ArrayList;
      | ^~~~~~
main.c:6:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    6 | import java.util.ArrayList;
      |            ^
main.c:7:1: error: unknown type name 'class'
    7 | class Solve
      | ^~~~~
main.c:8:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    8 | {
      | ^
main.c:42:1: error: unknown type name 'public'
   42 | public class Main
      | ^~~~~~
main.c:42:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
   42 | public class Main
      |              ^~~~
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:27: error: expected ':' before ';' token
    1 | j;main(i){for(;j>8?j=i++<9;++j;printf("%dx%d=%d\n",i,j,i*j));}
      |                           ^
      |                           :
Language: C

#include <stdio.h>

int main(void)
{
int n;

for(i=1;n*i==81;i++)
{

if(i==10)
  { 
    i=1;
    n++;
  }

printf("%d x %d = %d\n"n,i,i*n);

}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:5: error: 'i' undeclared (first use in this function)
    7 | for(i=1;n*i==81;i++)
      |     ^
main.c:7:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:24: error: expected ')' before 'n'
   16 | printf("%d x %d = %d\n"n,i,i*n);
      |       ~                ^
      |                        )
Language: C

9
1 5
0 0
3 2
4 5
5 1
0 4
5 2
1 2
5 3
3
1 3
9 7
1 2

4 2
9 2
6 5
1 5
4 8

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

#include<stdio.h>

int main(){
int a; intb;
scanf("%d %d"a ,b);
printf("%d"a x b);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:8: error: 'intb' undeclared (first use in this function); did you mean 'int'?
    4 | int a; intb;
      |        ^~~~
      |        int
main.c:4:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:14: error: expected ')' before 'a'
    5 | scanf("%d %d"a ,b);
      |      ~       ^
      |              )
main.c:6:12: error: expected ')' before 'a'
    6 | printf("%d"a x b);
      |       ~    ^
      |            )
Language: C

#include<stdio.h>

int main(){
int a; intb;
scanf("%d %d", &a ,&b);
printf("%d",a x b);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:8: error: 'intb' undeclared (first use in this function); did you mean 'int'?
    4 | int a; intb;
      |        ^~~~
      |        int
main.c:4:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:21: error: 'b' undeclared (first use in this function)
    5 | scanf("%d %d", &a ,&b);
      |                     ^
main.c:6:14: error: expected ')' before 'x'
    6 | printf("%d",a x b);
      |       ~      ^~
      |              )
Language: C

#include<stdio.h>

int main(){
int a; intb;
scanf("%d %d", &a ,&b);
printf("axb=%d",a * b);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:8: error: 'intb' undeclared (first use in this function); did you mean 'int'?
    4 | int a; intb;
      |        ^~~~
      |        int
main.c:4:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:21: error: 'b' undeclared (first use in this function)
    5 | scanf("%d %d", &a ,&b);
      |                     ^
Language: C

#include<stdio.h>

int main(void)
{
	int i,j,s,x;
	x=='*';
		for(i=1;i<=9;i++){
			for(j=1;j<=9;j++){
			s=ixj;
			printf("%dx%d=%d\n",i,j,s);
		}
	}
	 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:27: error: 'ixj' undeclared (first use in this function)
    9 |                         s=ixj;
      |                           ^~~
main.c:9:27: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void)
{
	int i,j,s,x;
	x=='*';
		for(i=1;i<=9;i++){
			for(j=1;j<=9;j++){
			s=i x j;
			printf("%d%d%d=%d\n",i,x,j,s);
		}
	}
	 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:28: error: expected ';' before 'x'
    9 |                         s=i x j;
      |                            ^~
      |                            ;
Language: C

#include<iostream>
#include<cstring>
#include<vector>
using namespace std;
const int maxn=110000;
long long f1[maxn][5],f2[maxn][5],g[maxn][5];
int rec1[maxn][5],rec2[maxn][5];
int kun[maxn];
long long a[maxn];
bool v[maxn];
vector<int>b[maxn];
int n,c;
void dp1(int x)
{
    if(v[x])return;
    v[x]=true;
    for(int i=0;i<b[x].size();i++)
    {
        int u=b[x][i];
        dp1(u);
     for(int j=0;j<=c;j++)
    {
        if(j-kun[x]>=0 && f1[u][j-kun[x]]+a[x]>f1[x][j])
        {
            f2[x][j]=f1[x][j];
            rec2[x][j]=rec1[x][j];

            f1[x][j]=f1[u][j-kun[x]]+a[x];
            rec1[x][j]=u;
        }
        else if(j-kun[x]>=0 && f1[u][j-kun[x]]+a[x]>f2[x][j])
        {
            f2[x][j]=f1[u][j-kun[x]]+a[x];
            rec2[x][j]=u;
        }
    }
    }
}
void dfs(int x,int father)
{
    if(v[x])return;
    v[x]=true;
    for(int j=0;j<=c;j++)
    if(j-kun[x]>=0)
    {
        if(rec1[father][j-kun[x]]!=x)
        g[x][j]=f1[father][j-kun[x]]+a[x];
        else if(rec2[father][j-kun[x]]!=x)
        g[x][j]=f2[father][j-kun[x]]+a[x];

        g[x][j]=max(g[x][j],g[father][j-kun[x]]+a[x]);
    }
    for(int i=0;i<b[x].size();i++)
    if(!v[b[x][i]])dfs(b[x][i],x);
}
int main()
{
    int sec;
    cin>>sec;
    while(sec--)
    {
        cin>>n>>c;
        for(int i=0;i<=n;i++)
        b[i].clear();
        for(int i=1;i<=n;i++)
        {
            cin>>a[i]>>kun[i];
        }
        for(int i=1;i<n;i++)
        {
            int x,y;
            cin>>x>>y;
            x++;y++;
            b[x].push_back(y);
            b[y].push_back(x);
        }
        memset(f1,0,sizeof(f1));
        memset(f2,0,sizeof(f2));
        memset(g,0,sizeof(g));
        memset(v,false,sizeof(v));
        memset(rec1,-1,sizeof(rec1));
        memset(rec2,-1,sizeof(rec2));

        for(int i=1;i<=n;i++)
        {
            f1[i][kun[i]]=a[i];
            g[i][kun[i]]=a[i];
            rec1[i][kun[i]]=i;
        }
        dp1(1);
        memset(v,false,sizeof(v));

        for(int i=0;i<b[1].size();i++)
        {
            v[1]=true;
            dfs(b[1][i],1);
        }

        long long ans=0;

        for(int i=1;i<=n;i++)
        if(kun[i]==0)
        {
            for(int j=0;j<=c;j++)
            {
                long long t=max(f1[i][j]+g[i][c-j]-a[i],f1[i][j]+f2[i][c-j]-a[i]);
                ans=max(ans,t);
            }
        }
        else
        {
            for(int j=1;j<=c;j++)
            {
                long long t=max(f1[i][j]+g[i][c+1-j]-a[i],f1[i][j]+f2[i][c+1-j]-a[i]);
                ans=max(ans,t);
            }
        }

        cout<<ans<<"\n";
    }
    return 0;
}

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