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

#include<cstdio>
int m,n,map[1005][1005],can;
int fx[]={1,-1,0,0};
int fy[]={0,0,1,-1};

int dfs(int x,int y,int wan,int dir)
{
    if(wan>2)return 0;
    int nx,ny;
    for(i=0;i<4;i++)
    {
        nx=x+fx[i];   ny=y+fy[i];
        if(nx<0||ny<0||nx>=n||ny>=m)continue;
        if(map[nx][ny]!=0)continue;
        if(dir!=-1)
        {
            if(dir!=i)
            wan++;
        }
        dfs(nx,ny,wan,i)
    }
}

int main()
{
    int i,j,x1,y1,x2,y2;
    while(scanf("%d%d",&n,&m))
    {
        if(n==0&&m==0)break;
        for(i=0;i<n;i++)
            for(j=0;j<m;j++)
                scanf("%d",&map[i][j]);
        for(i=0;i<m;i++)
        {
            scanf("%d %d %d %d",&x1,&y1,&x2,&y2);
            if(map[x1-1][y1-1]!=map[x2-1][y2-1])
            printf("NO\n");
            else 
            {
                can=0;
                dfs(x1,y1,0,-1);
            }
            
        }
    }
    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<queue>
#include<string>
#include<algorithm>
#include<cstring>
#include<set>
using namespace std;
const int maxn=20;
set<string>myset;
struct rec
{
    string s;
    int step;
};
string a[maxn][66536];
int num[maxn];
char ttm[20];
int ttl;
bool hw(string& s)
{
    int l=s.length();
    if(l%2==1)
    {
        int x=l/2;
        for(int i=1;x-i>=0;i++)
        {
            if(s[x-i]!=s[x+i])return false;
        }
        return true;
    }
    else
    {
        int x=l/2;
        for(int i=0;i<x;i++)
        if(s[i]!=s[i+x])return false;
        return true;
    }
    return false;
}
void dfs(int x,int lim,string &s)
{
    if(x==lim)
    {
        ttm[ttl]=0;
        string ts=ttm;
        if(ttl>0 && myset.count(ts)<=0 && hw(ts))
        {
            myset.insert(ts);
            num[ttl]++;
            a[ttl][num[ttl]]=ttm;
        }
        return;
    }
    dfs(x+1,lim,s);
    ttm[ttl]=s[x];ttl++;
    dfs(x+1,lim,s);
    ttl--;
}
void pre(string s)
{
    memset(num,0,sizeof(num));
    int l=s.length();
    ttl=0;
    myset.clear();
    dfs(0,l,s);
}
bool subq(string& s,string& fs)
{
    int l1=s.length();
    int l2=fs.length();
    int i=0,j=0;
    while(1)
    {
        while(j<l2 && fs[j]!=s[i])j++;
        if(j==l2)break;
        i++;
        if(i==l1)break;
    }
    if(i==l1)
    {
        //del
        i=0;j=0;
        while(1)
        {
            while(fs[j]!=s[i])j++;
            fs.erase(j,1);
            i++;
            if(i==l1)break;
        }
        return true;
    }
    else
        return false;
}
int bfs(string s)
{
    string fs;
    queue<rec>q;
    rec tmp;
    while(!q.empty())q.pop();
    q.push((rec){s,0});
    myset.clear();
    while(!q.empty())
    {
        tmp=q.front();q.pop();
        int l=tmp.s.length();
        for(int i=l;i>=1;i++)
        for(int j=1;j<=num[i];j++)
        {
            s=a[i][j];
            fs=tmp.s;
            if(subq(s,fs) && myset.count(fs)<=0)
            {
                if(fs.length()==0)return tmp.step+1;
                q.push((rec){fs,tmp.step+1});
            }
        }
    }
    return -1;
}
int main()
{
    int sec;
    scanf("%d",&sec);
    while(sec--)
    {
        string s;
        cin>>s;
        pre(s);
        for(int i=1;i<=2;i++)
         for(int j=1;j<=num[i];j++)
         cout<<a[i][j]<<endl;
        int ans=bfs(s);
        printf("%d\n",ans);
    }
    return 0;
}

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

56
5 349753 887257 417257 158120 699712 268352
52743  163008 &&&&&&
143252  46720 &&&&&&
21714778025 ****

317967  67200 &&&&&&
21714778025 ****

125712  161216 &&&&&&
5327686225 ****

162761  75392 &&&&&&
5327686225 ****

**143252   46720  317967  67200  30944761625**
**143252   46720  162761  75392  1202684665**
**143252   46720  52743  163008  21714778025**
**143252   46720  125712  161216  13416985616**
**317967   67200  162761  75392  24156011300**
**317967   67200  52743  163008  79522943040**
**317967   67200  125712  161216  45800993281**
**162761   75392  52743  163008  19780523780**
**162761   75392  125712  161216  8738387377**
**52743   163008  125712  161216  5327686225**
54084928500

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

#include<iostream>
#include<cstring>
#include<cstdio>
#include<cstring>
using namespace std;
int dp[2000][2000];
char str[2001];
int main()
{
	int _; cin>>_;
	while(_--) {
		scanf("%s",str);
		memset(dp,0,sizeof dp);
		int n = strlen(str);
		for(int i(n-1);i>=0;--i)
			for(int j(n-1);j>i;--j) {
				if(i==n-1||j==n-1)
					dp[i][j] = str[i]==str[j];
				else
					dp[i][j] = str[i]==str[j]?dp[i+1][j+1]+1:0;
			}
		for(int j(n-1);j>0;--j)
			for(int i(j-1);i>=0;--i)
				dp[i][j] = max(dp[i+1][j],dp[i][j]);
		int q,l,r; cin>>q;
		while(q--) {
			scanf("%d%d",&l,&r);
			--l, --r;
			int ans(r-l+1);
			for(int i(1);i+l<=r;++i)
				ans+=max(0,r-(i+l+dp[l][i+l])+1);
			cout<<ans<<'\n';
		}
	}
	return 0;
}

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

main(,k){for(i=1;i<=9;i++)for(k=1;k<=9;k++)printf("%dx%d=%d",i,k,i*k);return 0;}

Compiler output:
main.c:1:6: error: expected declaration specifiers or '...' before ',' token
    1 | main(,k){for(i=1;i<=9;i++)for(k=1;k<=9;k++)printf("%dx%d=%d",i,k,i*k);return 0;}
      |      ^
main.c:1:7: error: unknown type name 'k'
    1 | main(,k){for(i=1;i<=9;i++)for(k=1;k<=9;k++)printf("%dx%d=%d",i,k,i*k);return 0;}
      |       ^
Language: C

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

Compiler output:
main.c:1:6: error: expected declaration specifiers or '...' before ',' token
    1 | main(,k){for(i=1;i<=9;i++)for(k=1;k<=9;k++)printf("%dx%d=%d\n",i,k,i*k);return 0;}
      |      ^
main.c:1:7: error: unknown type name 'k'
    1 | main(,k){for(i=1;i<=9;i++)for(k=1;k<=9;k++)printf("%dx%d=%d\n",i,k,i*k);return 0;}
      |       ^
Language: C

#include<iostream>
#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
#define LL long long
LL gcd(LL a,LL b)
{
        while(a%=b)      swap(a,b);
        return b;
}
LL lcm(LL a,LL b)
{
        return a/gcd(a,b)*b;
}
int n,m;
int x[50];
LL ans;
void dfs(int id,int num,LL lcmn)
{
        if(id>m)
        {
                if(!num)        return;
                if(num%2)       ans+=n/lcmn;
                else    ans-=n/lcmn;
        }
        else
        {
                dfs(id+1,num,lcmn);
                dfs(id+1,num+1,lcm(x[id],lcmn));
        }
}
int main()
{
        int i,j,k;
        while(cin>>m>>n)
        {
                int cnt=1;
                for(i=1;i<=m;i++)
                {
                        cin>>x[cnt];
                        if(x[cnt])      cnt++;
                }
                m=cnt-1;
                ans=0;
                dfs(1,0,1);
                cout<<ans<<'\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 <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <set>
#include <vector>
#define MAXN 110
#define MAXM 110
using namespace std;
int to[MAXN][MAXN],link[MAXN];
int n,m,k,c;
bool vis[MAXN];
struct Edge{
    int v,next;
}edge[10005];
int head[MAXN],en;
void init()
{
    en = 0;
    memset(head,-1,sizeof(head));
}
void addedge(int u,int v)
{
    edge[en].v = v;
    edge[en].next = head[u];
    head[u] = en++;
}
bool dfs(int u)
{
    for(int i = head[u]; i!= -1; i=edge[i].next)
    {
        int v = edge[i].v;
        if(!vis[v]&&(link[v]==-1||dfs(link[v])))
        {
            link[v] = u;
            vis[v]=1;
            return 1;
        }
    }
    return 0;
}
int solve()
{
    memset(link,-1,sizeof(link));
    int sum=0;
    for(int i = 0; i < n; i++)
    {
        memset(vis,0,sizeof(vis));
        sum+=dfs(i);
    }
    return sum;
}
int cal(int mid)
{
    int cnt=0;
    for(int i=0;i<n;++i)
        for(int j=0;j<m;++j)
            if(to[i][j]<=mid)
                addedge(i,j);
    cnt=solve();
    init();
    if(cnt>=k)  return mid;
    else
    for(int i=0;i<n;++i)
        for(int j=0;link[i]==-1&&j<m;++j)
            if(to[i][j]<=mid+c)
                addedge(i,j);
    cnt+=solve();
    return cnt>=k?mid+c:-1;
}
int main()
{
    //freopen("/home/moor/Code/input","r",stdin);
    int ncase;
    vector<int> vec;
    scanf("%d",&ncase);
    while(ncase--)
    {
        int l=0,mid,r=0,tmp;
        scanf("%d%d%d%d",&n,&m,&k,&c);
        for(int i=0;i<n;++i)
            for(int j=0;j<m;++j)
                scanf("%d",&to[i][j]),r=max(r,to[i][j]+c);
        while(l<r)
        {
            mid=(l+r)/2;
            tmp=cal(mid);
            if(tmp>=0)  r=tmp;
            else    l=mid+1;
        }
        printf("%d\n",l);
    }
    return 0;
}

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

#include<cstdio>  
#include<cstring>  
#include<string>  
#include<iostream>  
#include<cmath>  
#include<algorithm>  
using namespace std;  
int sta[1<<16],a[16],dp[16][10000],n,m,num=0;  
void init()  
{  
    int sum=1<<m;  
    for(int i=0;i<sum;i++)  
        if(i&(i<<1))  
            continue;  
        else  
            sta[num++]=i;  
}  
bool fit(int x,int y)  
{  
    if(x&y)  
        return 0;  
    return 1;  
}  
void DP()  
{  
    for(int i=0;i<num;i++)  
        if(fit(sta[i],a[1]))  
          dp[1][i]=1;  `
    for(int i=2;i<=n;i++)  
        for(int j=0;j<num;j++)  
            if(!fit(sta[j],a[i]))  
                continue;  
            else  
            {  
                for(int k=0;k<num;k++)  
                {  
                    if(!fit(a[i-1],sta[k]))  
                        continue;  
                    if(!fit(sta[k],sta[j]))  
                        continue;  
                    dp[i][j]=(dp[i][j]+dp[i-1][k])%100000000;  
  
                }  
            }  
            int ans=0;  
            for(int i=0;i<num;i++)  
                ans=(ans+dp[n][i])%100000000;  
    printf("%d\n",ans);   
}  
int main()  
{  
    int tem;  
    scanf("%d%d",&n,&m);  
    for(int i=1;i<=n;i++)  
        for(int j=1;j<=m;j++)  
        {  
            scanf("%d",&tem);  
            if(tem==0)  
                a[i]+=1<<(m-j);  
        }  
        init();  
        DP();  
        return 0; 
    }

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

1 0
2 1
3 2
4 4
5 6
6 10
7 14
8 21
9 29
10 41
11 55
12 76
13 100
14 134
15 175
16 230
17 296
18 384
19 489
20 626
21 791
22 1001
23 1254
24 1574
25 1957
26 2435
27 3009
28 3717
29 4564
30 5603

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

#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>
#include<queue>
#include<stack>
#include<string>
#define db double
#define rt return
#define cn const
#define op operator
#define cp const P &
#define eps 1e-8
#define N 60
using namespace std;

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

struct P
{
  db x,y;
  P(db a=0.,db b=0.):x(a),y(b){}
  void in(){scanf("%lf%lf",&x,&y);}
  P op + (cp a){rt P(x+a.x,y+a.y);}
  P op - (cp a){rt P(x-a.x,y-a.y);}
  db op ^ (cp a){rt x*a.y -y*a.x;}
  db op * (cp a){ rt x*a.x + y*a.y;}
  P op * (cn db& a){rt P(x*a,y*a);}
  P T(){rt P(-y,x);}
  bool on(P a, P b)
  {
      P v1=a-*this,v2=b-*this;
      rt !sig(v1^v2) && sig(v1*v2)<=0;
  }

  db dis(P a)
  {
      rt sqrt(fabs((x-a.x)*(x-a.x) + (y-a.y)*(y-a.y)));
  }
  void out(){printf("%lf  %lf **\n",x,y);}
};

P jiao(P v1,P p1, P v2,P p2)
{
    db  x1=p1.x,y1=p1.y,x2=p2.x,y2=p2.y;
    P v;
    v.y=(v1.y*v2.y*(x2-x1) - v1.y*v2.x*y2 + v1.x*v2.y*y1)/(v1^v2);
    v.x=(v1.x*v2.x*(y2-y1) - v1.x*v2.y*x2 + v1.y*v2.x*x1)/(v2^v1);
    rt v;
}

P a[N],b[N];

P dp(P a,P b ,P p,P q,int & f)
{
    P v=p-q;
     p= q+ v*0.5;
     v=v.T();

     if(sig(v^(a-b))==0) {f=1;return NULL;}

    P c=jiao(a-b,a,v,p);
    if(c.on(a,b)) f=0;
    else f=1;
    rt c;
}

bool vis[N];

int solve(int s,int t,int m)
{
    int ans=1;
    memset(vis,0,sizeof vis);
    db mi=1e100,mn=1e100;
    int k=0,u=0;
    for(int i=0;i<m;i++)
    {
        if(sig(a[s].dis(b[i])-mi)<0)
           {
               mi=a[s].dis(b[i]);
               k=i;
           }
        if(sig(a[t].dis(b[i])-mn)<0)
           {
               mn=a[t].dis(b[i]);
               u=i;
           }
    }
    vis[k]=1;

    while(k!=u)
    {
        db res=1e100;
        int w=k;
        for(int i=0;i<m;i++)
        if(!vis[i])
        {  int f;
            P c=dp(a[s],a[t],b[k],b[i],f);
            if(f==1)continue;
            if(sig(b[k].dis(c)-res)<0)
            {
                res=b[k].dis(c);
                w=i;
            }
        }

        k=w;
        vis[k]=1;
        ans++;
    }
    return ans-1;
}
int main()
{
    int n,m,q;
    while(scanf("%d%d",&n,&m)!=EOF)
    {
        for(int i=0;i<n;i++) a[i].in();
        for(int i=0;i<m;i++) b[i].in();

        scanf("%d",&q);

        while(q--)
        {
            int x,y;
            scanf("%d%d",&x,&y);
            int ans=solve(x-1,y-1,m);
            printf("%d\n",ans);
        }
    }
    return 0;
}

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

i=0 0
i=1 0
i=2 1
i=3 1
i=4 2
i=5 0
i=6 3
i=7 1
i=8 1
i=9 0
i=10 3
i=11 3
i=12 2
i=13 2
i=14 4
i=15 0
i=16 5
i=17 2
i=18 2
i=19 3
i=20 3
i=21 0
i=22 1
i=23 1
i=24 3
i=25 0
i=26 2
i=27 1
i=28 1
i=29 0
i=30 4
i=31 5
i=32 2
i=33 7
i=34 4
i=35 0
i=36 1
i=37 1
i=38 2
i=39 0
i=40 3
i=41 1
i=42 1
i=43 0
i=44 3
i=45 3
i=46 2
i=47 2
i=48 4
i=49 4
i=50 5
i=51 5
i=52 2
i=53 3
i=54 3
i=55 0
i=56 1
i=57 1
i=58 3
i=59 0
i=60 2
i=61 1
i=62 1
i=63 0
i=64 4
i=65 5
i=66 3
i=67 7
i=68 4
i=69 8
i=70 1
i=71 1
i=72 2
i=73 0
i=74 3
i=75 1
i=76 1
i=77 0
i=78 3
i=79 3
i=80 2
i=81 2
i=82 4
i=83 4
i=84 5
i=85 5
i=86 9
i=87 3
i=88 3
i=89 0
i=90 1
i=91 1
i=92 3
i=93 0
i=94 2
i=95 1
i=96 1
i=97 0
i=98 4
i=99 5

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | i=0 0
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
main.c:1:5: error: expected ',' or ';' before numeric constant
    1 | i=0 0
      |     ^
Language: C

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

const int MAXN = 15010;

struct Node{
    int x;
    int y;
    int val;
    bool operator<(const Node& s)const{
        return val < s.val;
    }
};
Node node[MAXN];
Node ans[MAXN];

int n , m;
int father[MAXN];

void init(){
    for(int i = 0 ; i <= n ; i++)
        father[i] = i;
}

int find(int x){
    if(father[x] != x)
        father[x] = find(father[x]);
    return father[x];
}

void solve(){
    int sum = 0;
    int pos = 0;
    sort(node , node+m);
    for(int i = 0 ; i < m ; i++){
        int fx = find(node[i].x); 
        int fy = find(node[i].y); 
        if(fx != fy){
           father[fx] = fy;
           sum = max(sum , node[i].val);
           ans[pos].x = node[i].x;
           ans[pos++].y = node[i].y;
        }
    }
    printf("%d\n%d\n" , sum , pos);
    for(int i = 0 ; i < pos ; i++)
        printf("%d %d\n" , ans[i].x , ans[i].y);
}

int main(){
    int x , y , val;
    while(scanf("%d%d" , &n , &m) != EOF){
         init(); 
         for(int i = 0 ; i < m ; i++)
             scanf("%d%d%d" , &node[i].x , &node[i].y , &node[i].val); 
         solve();
    }
    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<stdio.h>
#include<string.h>
using namespace std;
typedef long long LL;
const int N = 300050;
const int mod = 1000000007;
LL fac[N];
LL exp_mod(int a,int b)
{
    if(a<0||b<0) return 0;
    LL ret=1,base=a;
    while(b)
    {
        if(b&1) ret=ret*base%mod;
        base=base*base%mod;
        b>>=1;
    }
    return ret;
}
void exgcd(LL a,LL b,LL &x,LL &y)
{
    if(b==0){
        x=1;y=0;
    }else{
        exgcd(b,a%b,y,x);
        y-=a/b*x;
    }
}
LL C(int n,int m)
{
    if(n<m) return 0;
    LL x,y;
//    exgcd(fac[n-m]*fac[m]%mod,mod,x,y);
//    x=x%mod;
//    if(x<0) x+=mod;
    x=exp_mod(fac[n-m]*fac[m]%mod,mod-2);
//    cout<<n<<" m="<<m<<" x="<<x<<" "<<fac[n]*x%mod<<endl;
    return fac[n]*x%mod;
}
int n,m,k,a[N];
LL ans[N];
int nm[N];
void solve()
{
    memset(nm,0,sizeof nm);
    for(int i=0;i<n;++i) {
        scanf("%d",&a[i]);
        for(int j=1;j*j<=a[i];++j){
            if(n%j!=0) return ;
            ++nm[j];
            if(j!=n/j) ++nm[n/j];
        }
    }
//    for(int i=1;i<=m;++i){
////        cout<<nm[i]<<" "<<n-k<<" "<<C(nm[i],n-k)<<endl;
//        nm[i]=C(nm[i],n-k);
//    }
    for(int i=m;i>=1;--i)
    {
        int tt=nm[i]-(n-k);
        ans[i]=exp_mod(m/i,k-tt)*C(nm[i],n-k)%mod*exp_mod(m/i-1,tt)%mod;
//        ans[i]=(ans[i]-exp_mod(m/i,k-1)*C(nm[i],n-k+1)%mod+mod)%mod;
        cout<<"i="<<i<<" ans="<<ans[i]<<endl;
        for(int j=2;j<=m/i;++j){
            ans[i]=(ans[i]-ans[i*j]+mod)%mod;
        }
    }
    for(int i=1;i<=m;++i)
        printf(i==m?"%d\n":"%d ",(int)ans[i]);
}
int main()
{
    fac[0]=1;
    for(int i=1;i<N;++i) fac[i]=fac[i-1]*i%mod;
    while(scanf("%d%d%d",&n,&m,&k)!=-1) solve();
    return 0;
}

3 5 3
1 2 3
i=5 ans=1
i=4 ans=1
i=3 ans=0
i=2 ans=8
i=1 ans=64
55 7 0 1 1

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

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

const int maxn=105;

struct TA{
    int sn, bn, n, m;
    int per[maxn][2];

    void init (int n, int m){
        this->n=n; this->m=m;

        int i=1, j=1;
        while(j<=m){
            per[j++][0]=i++;
            if(i>n) i=1;
        }
        sn=i-1; if(sn==0) sn=n;
        bn=n-sn;
        printf("sn %d %d\n", sn, bn);
    }

    void GetEqu (){
        for(int i=1; i<m; i++) per[i][1]=i+1;
        per[m][1]=1;
    }

    void GetBig (){
        for(int i=1; i<=m; i++) per[i][1]=m+1;
    }

    void GetSml (){
        int j=1, a1, a;
        a1=1; a=sn+1;
        bool which=false;
        while(j<=n){
            int i=j;
            while(i<=m){
                if(!which){
                    if(a==i) a++;
                    if(a>n){ a=sn+1; which=true;}
                }
                else{
                    if(a1==i) a1++;
                    if(a1>sn){ a1=1; which=false;}
                }
                if(which){ per[j][1]=a1;}
                else { per[j][1]=a;}
                i+=n;
            }
            j++;
        }
    }

    void Print (int r){
        int x=per[r][0], y=per[r][1];
        printf("%d %d", x, y);

        int j=3, i=1;
        while(j<=n){
            while(i==x || i==y) i++;
            printf(" %d", i++);
            j++;
        }
        printf("\n");
    }
}ta;

int main()
{
    int n, m;

    while(scanf("%d %d", &n, &m)==2){
        ta.init(n, m);
        if(n==m) ta.GetEqu();
        else if(n>m) ta.GetBig();
        else ta.GetSml();
        for(int i=1; i<=m; i++) ta.Print(i);
    }

    return 0;
}

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

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

const int maxn=105;

struct TA{
    int sn, bn, n, m;
    int per[maxn][2];

    void init (int n, int m){
        this->n=n; this->m=m;

        int i=1, j=1;
        while(j<=m){
            per[j++][0]=i++;
            if(i>n) i=1;
        }
        sn=i-1; if(sn==0) sn=n;
        bn=n-sn;
        //printf("sn %d %d\n", sn, bn);
    }

    void GetEqu (){
        for(int i=1; i<m; i++) per[i][1]=i+1;
        per[m][1]=1;
    }

    void GetBig (){
        for(int i=1; i<=m; i++) per[i][1]=m+1;
    }

    void GetSml (){
        int j=1, a1, a;
        a1=0; a=sn;
        bool which=false;
        while(j<=n){
            int i=j;
            while(i<=m){
                if(!which){
                    a++;
                    if(a==j) a++;
                    if(a>n){
                        a=sn;
                        which=true;
                    }
                }
                else{
                    a1++;
                    if(a1==j) a1++;
                    if(a1>sn){
                        a1=0;
                        which=false;
                    }
                }
                if(which){ per[i][1]=a1==0?a1=1:a1;}
                else{ per[i][1]=a==sn?a=sn+1:a;}
                i+=n;
            }
            j++;
        }
    }

    void Print (int r){
        int x=per[r][0], y=per[r][1];
        printf("%d %d", x, y);

        int j=3, i=1;
        while(j<=n){
            while(i==x || i==y) i++;
            printf(" %d", i++);
            j++;
        }
        printf("\n");
    }
}ta;

int main()
{
    int n, m;

    while(scanf("%d %d", &n, &m)==2){
        ta.init(n, m);
        if(n==m) ta.GetEqu();
        else if(n>m) ta.GetBig();
        else ta.GetSml();
        for(int i=1; i<=m; i++) ta.Print(i);
    }

    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>
#include<string.h>
#include<stdlib.h>
#define N 10000
int count[N];
char s[N];
int main(void)
{
  int tc;
  scanf("%d",&tc);
  while(tc--){
  int ct=0,i=1,tag=0;
  char  ch; 
  while(scanf("%s",s)&&s[0]!='@')
  {
   if(i>ct)
     count[++ct]=strlen(s)+1+(ct==1)?0:1;
  printf("%s",s);
    if(ch!='\n')
       {if(tag)
        {
          for(k=strlen(s)+(i==1)?0:1;k<count[i];k++)
            putchar(' ');
            }     
        else putchar(' ');}
    putchar(ch);
     i++;
}
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:15: error: 'k' undeclared (first use in this function)
   22 |           for(k=strlen(s)+(i==1)?0:1;k<count[i];k++)
      |               ^
main.c:22:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:30:1: error: expected declaration or statement at end of input
   30 | }
      | ^
Language: C

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

#define LL long long
#define defm int m=(l+r)>>1;
#define lson l,m,pos<<1
#define rson m+1,r,pos<<1|1

const int MOD=10007;
const int maxn=111111;
int add[maxn<<2],mul[maxn<<2],cov[maxn<<2];
int sum[maxn<<2][3];

void updateFather(int pos)
{
    for(int i=0;i<3;i++)
        sum[pos][i]=(sum[pos<<1][i]+sum[pos<<1|1][i])%MOD;
}

void build(int l,int r,int pos)
{
    mul[pos]=1;
    if(l==r)
        return;
    defm;
    build(lson);
    build(rson);
}

void Add(int v,int amount,int pos)
{
    sum[pos][2]=sum[pos][2]+(3*v*sum[pos][1])%MOD+(3*((v*v)%MOD)*sum[pos][0])%MOD+(((v*v)%MOD)*((v*amount)%MOD))%MOD;
    sum[pos][2]%=MOD;

    sum[pos][1]=sum[pos][1]+2*(v*sum[pos][0]%MOD)+(((v*v)%MOD)*amount)%MOD;
    sum[pos][1]%=MOD;

    sum[pos][0]=sum[pos][0]+(v*amount)%MOD;
    sum[pos][0]%=MOD;
    add[pos]=(add[pos]+v)%MOD;
}

void Mul(int v,int amount,int pos)
{
    sum[pos][2]=(((v*v)%MOD)*((v*sum[pos][2])%MOD))%MOD;
    sum[pos][1]=(((v*v)%MOD)*sum[pos][1])%MOD;;
    sum[pos][0]=(v*sum[pos][0])%MOD;

    mul[pos]=(mul[pos]*v)%MOD;
    add[pos]=(add[pos]*v)%MOD;
}

void Cov(int v,int amount,int pos)
{
    sum[pos][0]=(v*amount)%MOD;
    sum[pos][1]=(((v*v)%MOD)*amount)%MOD;
    sum[pos][2]=(((v*v)%MOD)*((v*amount)%MOD))%MOD;
    cov[pos]=v;
    mul[pos]=1;
    add[pos]=0;
}

void updateSon(int amount,int pos)
{
    if(cov[pos])
    {
        Cov(cov[pos],amount-amount/2,pos<<1);
        Cov(cov[pos],amount/2,pos<<1|1);
        cov[pos]=0;
    }
    if(mul[pos]!=1)
    {
        Mul(mul[pos],amount-amount/2,pos<<1);
        Mul(mul[pos],amount/2,pos<<1|1);
        mul[pos]=1;
    }
    if(add[pos])
    {
        Add(add[pos],amount-amount/2,pos<<1);
        Add(add[pos],amount/2,pos<<1|1);
        add[pos]=0;
    }
}

void update(int L,int R,int op,int v,int l,int r,int pos)
{
    if(L<=l && r<=R)
    {
        switch(op)
        {
        case 1: Add(v,r-l+1,pos);break;
        case 2: Mul(v,r-l+1,pos);break;
        case 3: Cov(v,r-l+1,pos);break;
        }
        return ;
    }
    updateSon(r-l+1,pos);
    defm;
    if(L<=m)
        update(L,R,op,v,lson);
    if(m<R)
        update(L,R,op,v,rson);
    updateFather(pos);
}

int query(int L,int R,int p,int l,int r,int pos)
{
    if(L<=l && r<=R)
        return sum[pos][p];
    updateSon(r-l+1,pos);
    defm;
    return ((L<=m?query(L,R,p,lson):0)+(m<R?query(L,R,p,rson):0))%MOD;
}

int main()
{
    int n,m;
    while(~scanf("%d%d",&n,&m) && (n|m))
    {
        memset(sum,0,sizeof(sum));
        memset(add,0,sizeof(add));
        memset(cov,0,sizeof(cov));

        build(1,n,1);

        while(m--)
        {
            int a,b,c,d;
            scanf("%d%d%d%d",&a,&b,&c,&d);
            if(a==4)
                printf("%d\n",query(b,c,d-1,1,n,1));
            else
                update(b,c,a,d,1,n,1);
        }
    }
}

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

#include<stdio.h>
#include<algorithm>
#include<string.h>
#include<string>
#include<iostream>
#include<vector>
#define N 100010
#define INF 0x3f3f3f3f
using namespace std;
int dp[N][2];
struct Node {
	int to, v, id;
	Node(int to = 0, int v = 0, int it = 0) :
			to(to), v(v), id(id) {
	}
};
vector<Node> tree[N];
void dfs1(int st, int f) {
	dp[st][0] = dp[st][1] = 0;
	for (int i = 0; i < (int) tree[st].size(); i++) {
		int to = tree[st][i].to;
		if (to == f)
			continue;
		dfs1(to, st);
		dp[st][1] = max(dp[to][0] + 1, dp[st][1]);
		if (dp[st][1] > dp[st][0]) {
			swap(dp[st][1], dp[st][0]);
		}
	}
}
void dfs2(int st, int f, int &ans_id, int &ans_min) {
	for (int i = 0; i < (int) tree[st].size(); i++) {
		int to = tree[st][i].to, v = tree[st][i].v, id = tree[st][i].id;
		if (to == f)
			continue;
		if (dp[to][0] + 1 == dp[st][0]) {
			if (ans_min > (dp[to][0] + dp[st][1] + 1) * v) {
				ans_min = (dp[to][0] + dp[st][1] + 1) * v;
				ans_id = id;
			} else if (ans_min == (dp[to][0] + dp[st][1] + 1) * v) {
				ans_id = min(id, ans_id);
			}
		} else {
			if (ans_min > (dp[to][0] + dp[st][0] + 1) * v) {
				ans_min = (dp[to][0] + dp[st][0] + 1) * v;
				ans_id = id;
			} else if (ans_min == (dp[to][0] + dp[st][0] + 1) * v) {
				ans_id = min(id, ans_id);
			}
		}

		if (dp[st][0] == dp[to][0] + 1) {
			dp[to][1] = max(dp[st][1] + 1, dp[to][1]);
		} else {
			dp[to][1] = max(dp[st][0] + 1, dp[to][1]);
		}
		if (dp[to][0] < dp[to][1]) {
			swap(dp[to][1], dp[to][0]);
		}
		dfs2(to, st, ans_id, ans_min);
	}
}
void init(int n) {
	for (int i = 1; i <= n; i++) {
		tree[i].clear();
	}
}
int main() {
	int t, cas = 1;
	scanf(" %d", &t);
	while (t--) {
		int n;
		scanf(" %d", &n);
		init(n);
		for (int i = 1; i < n; i++) {
			int x, y, v;
			scanf(" %d %d %d", &x, &y, &v);
			tree[x].push_back(Node(y, v, i));
			tree[y].push_back(Node(x, v, i));
		}
		dfs1(1, -1);
		int ans_id = -1, ans_min = INF;
		dfs2(1, -1, ans_id, ans_min);
		printf("Case #%d: %d\n", cas++, ans_id);
	}
	return 0;
}

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

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

using namespace std;

typedef long long ll ;

const int MAXN = 2*(int)1e5 + 10 ;

int n,L;
vector<int> v ;
int st[MAXN],ed[MAXN];
ll cost[MAXN] ;
map<int,int> num ;
vector< pair<int,int> > e[MAXN] ;
bool visit[MAXN] ;
ll d[MAXN] ;
map< pair<int,int> > ray ; 
int pre[MAXN] , px[MAXN] ; 

int main(){
    scanf("%d%d",&n,&L);
    v.push_back(0) ; v.push_back(L);
    for (int i=0;i<n;i++){
        int t,p;
        scanf("%d%d%d%d",&st[i],&ed[i],&t,&p);
        ed[i]+=st[i];
        st[i]-=p;
        cost[i] = t+p ;
        v.push_back(st[i]);
        v.push_back(ed[i]);
    }
    sort(v.begin() , v.end()) ;
    int N = 0 ;
    vector<int> list ;
    for (int i = 0 ; i < v.size() ; i++)
        if (i==0 || v[i]!=v[i-1]) num[v[i]] = N++ , list.push_back(v[i]);
    for (int i = 0 ; i < N-1 ; i++)
    {
        e[i].push_back(make_pair(-1,make_pair(i+1,list[i+1]-list[i])));
        e[i+1].push_back(make_pair(-1,make_pair(i,list[i+1]-list[i])));
    }
    for (int i=0;i<n;i++){
        if (st[i]<0) continue ;
        e[num[st[i]]].push_back(make_pair(i+1,make_pair(num[ed[i]],cost[i])));
    }
    priority_queue< pair<ll,int> > q ;
    for (int i = 0 ; i < N ; i++) d[i] = 1000000000LL*1000000000LL ;
    d[num[0]] = 0LL ; q.push(make_pair(0,num[0])) ; 
    px[num[0]] = -1 ; 
    while (!q.empty()){
        int u = q.top().second ; q.pop() ;
        if (visit[u]) continue ;
        visit[u] = true ;
        for (int i = 0 ; i < e[u].size() ; i++){
            int v = e[u][i].second.first ;
            if (visit[v]) continue ;
            if (d[v] > d[u] + e[u][i].second.second){
                d[v] = d[u] + e[u][i].second.second ;
                px[v] = u ;
                pre[v] = e[u][i].first ;
                q.push(make_pair(-d[v],v));
            }
        }
    }
    cout << d[num[L]] << endl ;
    int x = num[L] ; 
    vector<int> res ;
    while (x!=-1){
        if (px[x]==-1) break ;
        if (pre[x]!=-1) res.push_back(pre[x]) ; 
        x=px[x] ;
    }
    sort(res.begin(),res.end()) ;
    printf("%d\n",res.size()) ;
    for (int i = 0 ; i < res.size() ; i++)
        printf("%d\n",res[i]);
    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 m,n;
	
	for(m = 1; m < 10; ++m){
		for(n = 1; n < 10; ++n){
			printf("%dx%d=%d\n" ,m ,n ,m * n);
		}
	
	return 0;
}

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

#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
typedef long long LL;
const LL mod=1000000007;
typedef LL matrix[5][5];
LL pow_mod(LL a,LL n)
{
    if(n==0) return 1;
    LL ans=pow_mod(a,n/2);
    ans=ans*ans%mod;
    if(n%2==1) ans=ans*a%mod;
    return ans;
}
void mat_mul(matrix A,matrix B,matrix res)
{
    matrix C;
    memset(C,0,sizeof(C));
    for(int i=0;i<5;i++)
        for(int j=0;j<5;j++)
            for(int k=0;k<5;k++)
                C[i][j]=(C[i][j]+A[i][k]*B[k][j]%mod)%mod;
    memcpy(res,C,sizeof(C));
}
void mat_pow(matrix A,LL n,matrix res)
{
    matrix r,a;
    memset(r,0,sizeof(r));
    memcpy(a,A,sizeof(a));
    for(int i=0;i<5;i++) r[i][i]=1;
    while(n)
    {
        if(n&1) mat_mul(r,a,r);
        n>>=1;
        mat_mul(a,a,a);
    }
    memcpy(res,r,sizeof(r));
}
LL n,a0,AX,AY,b0,BX,BY;
int main()
{
    while(scanf("%lld",&n)!=EOF)
    {
        scanf("%lld%lld%lld%lld%lld%lld",&a0,&AX,&AY,&b0,&BX,&BY);
        if(n==0)
        {
            puts("0");continue;
        }
        a0%=mod;AX%=mod;AY%=mod;b0%=mod;BX%=mod;BY%=mod;
        //LL a1=((AX*a0%mod)+AY)%mod,b1=((BX*b0%mod)+BY)%mod;
        matrix A,B;
        memset(A,0,sizeof(A));
        A[0][0]=1;A[0][1]=AX*BX%mod;A[0][2]=AX*BY%mod;A[0][3]=AY*BX%mod;A[0][4]=1;
        A[1][1]=AX*BX%mod;A[1][2]=AX*BY%mod;A[1][3]=AY*BX%mod;
        A[2][2]=AX;A[2][4]=pow_mod(BY,mod-2);
        A[3][3]=BX;A[3][4]=pow_mod(AY,mod-2);
        A[4][4]=1;
        mat_pow(A,n-1,B);
        LL ans=((B[0][0]*a0%mod)*b0%mod+(B[0][1]*a0%mod)*b0%mod)%mod;
        printf("%lld\n",ans);
    }
    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<stdlib.h>
#include<math.h>
#define M 1000000007
int kkk=1;
double a,b;
__int64 sum=0;
__int64 s1,s2,s3;
__int64 n;
__int64 power(__int64 a,__int64 p)
{
    if(p==-1)  return 1;
    __int64 r=a%M;
    __int64 k=1;
    while(p)
    {
       if(p&1)
           k=(k*r)%M;

       r=(r*r)%M; p>>=1;
    }
    return k%M;
}
int main()
{
    double a0,a1,a2,b0,b1,b2,A,B;
    while(scanf("%I64d",&n)!=EOF)
    {
        scanf("%lf %lf %lf",&a0,&a1,&a2);
        scanf("%lf %lf %lf",&b0,&b1,&b2);
        sum=a0*b0;
        if(n==1)
            printf("%I64d\n",sum);
        else
        {
            a=a2/(a1-1);A=a1*b1;
            b=b2/(b1-1);
            s1=A*(1-power(A,n-1))/(1-A);
            s1=s1*(a0+a)*(b0+b);
            s1=s1%M;
            s2=b*(a0+a)*(a1*(1-power(a1,n-1))/(1-a1));
            s3=a*(b0+b)*(b1*(1-power(b1,n-1))/(1-b1));
            s2=s2%M;s3=s3%M;
            sum+=s1-s2-s3+a*b*(n-1);
            while(sum<0)
                sum+=M;
            sum=sum%M;
            printf("%I64d\n",sum);
        }
        sum=0;
    }
    return 0;
}

Compiler output:
main.c:8:1: error: unknown type name '__int64'; did you mean '__int64_t'?
    8 | __int64 sum=0;
      | ^~~~~~~
      | __int64_t
main.c:9:1: error: unknown type name '__int64'; did you mean '__int64_t'?
    9 | __int64 s1,s2,s3;
      | ^~~~~~~
      | __int64_t
main.c:10:1: error: unknown type name '__int64'; did you mean '__int64_t'?
   10 | __int64 n;
      | ^~~~~~~
      | __int64_t
main.c:11:1: error: unknown type name '__int64'; did you mean '__int64_t'?
   11 | __int64 power(__int64 a,__int64 p)
      | ^~~~~~~
      | __int64_t
main.c:11:15: error: unknown type name '__int64'; did you mean '__int64_t'?
   11 | __int64 power(__int64 a,__int64 p)
      |               ^~~~~~~
      |               __int64_t
main.c:11:25: error: unknown type name '__int64'; did you mean '__int64_t'?
   11 | __int64 power(__int64 a,__int64 p)
      |                         ^~~~~~~
      |                         __int64_t
main.c: In function 'main':
main.c:39:21: error: implicit declaration of function 'power' [-Wimplicit-function-declaration]
   39 |             s1=A*(1-power(A,n-1))/(1-A);
      |                     ^~~~~
Language: C

#include<iostream>
#include<stdio.h>
#define xlson ch[x][0]
#define xrson ch[x][1]
using namespace std;
const int N = 10010;
struct LCT
{
    int pre[N],ch[N][2];
    int rv[N];
    inline bool splay_root(int x){
        return (ch[pre[x]][0]!=x&&ch[pre[x]][1]!=x);
    }
    inline void up_rev(int x){
        swap(xlson,xrson);
        rv[x]^=1;
    }
    inline void push_up(int x){}
    inline void push_down(int x){
        if(rv[x]){
            if(xlson) up_rev(xlson);
            if(xrson) up_rev(xrson);
            rv[x]=0;
        }
    }
    inline void rotate(int x,int kind)
    {
        int y=pre[x];
        push_down(y);///remember
        push_down(x);
        if(pre[y]&&!splay_root(y)) ///remember splay_root
            ch[pre[y]][ ch[pre[y]][1]==y ]=x;
        pre[x]=pre[y];

        if(ch[x][kind]) pre[ch[x][kind]]=y;
        ch[y][!kind]=ch[x][kind];

        pre[y]=x;
        ch[x][kind]=y;
        push_up(x);
    }
    inline void splay(int x)
    {
        push_down(x);
        while(!splay_root(x))
        {
            int y=pre[x];
            if(splay_root(y))
                rotate(x,ch[y][1]!=x);
            else{
                int kind=(ch[pre[y]][1]==y);
                if(ch[y][kind]==x)
                    rotate(y,!kind),rotate(x,!kind);
                else
                    rotate(x,kind),rotate(x,!kind);
            }
        }
        push_up(x);
    }
    inline void access(int x)
    {
        int y=x; x=0;
        while(y){
            splay(y);
            ch[y][1]=x;
            x=y;
            y=pre[y];
        }
    }
    inline void evert(int x)///蟆?蜿倅クコ譬第?
    {
        access(x);
        splay(x);
        up_rev(x);
    }
    inline int find(int x)
    {
        access(x);
        splay(x);
        while(ch[x][0]) {
            x=ch[x][0];
            push_down(x);
        }
        return x;
    }
    inline void init(int n){
        for(int x=0;x<=n;++x)
            pre[x]=xlson=xrson=rv[x]=0;
    }
    inline void link(int x,int y){
        evert(x);
        pre[x]=y;
    }
    inline void cut(int x,int y){
        evert(x);
        access(y);
        splay(y);
        pre[ch[y][0]]=0;
        ch[y][0]=0;
    }
}lct;
char s[100];
int main()
{
    int n,m,a,b,type;
    while(scanf("%d",&n)!=-1)
    {
        lct.init(n+1);
        for(int i=1;i<=n;++i){
            scanf("%d",&a);
            lct.link(a,min(i+a,n+1));
        }
        for(int i=1;i<=m;++i)
        {
            scanf("%d%d",&type,&a);
            if(type==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>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <map>
#include <cstring>
#include <set>
using namespace std;
#define MAXN 50
#define MAXM 2500000
#define MP(x,y) make_pair(x,y)
#define FI first
#define SE second
struct _node
{
        bool hav;
        int to[26];
}no[MAXM];
const int dir[8][2]={{0,1},{1,0},{-1,0},{0,-1},{1,1},{1,-1},{-1,1},{-1,-1}};
const int score[]={0,0 ,0,1,1,2,3,5,11};
int ans,mlen,cnt,root,top=2;
char str[30],best[30];
bool vi[MAXN][MAXN],vno[MAXM];
char bog[MAXN][MAXN];
void add(int now,int h)
{
        if(!str[h])
        {
                no[now].hav=1;
                return ;
        }
        if(no[now].to[str[h]-'A']==0)   no[now].to[str[h]-'A']=top++;
        add(no[now].to[str[h]-'A'],h+1);
}
void dfs(int x,int y,int h,int pos)
{
        str[h]=bog[x][y];
        pos=no[pos].to[bog[x][y]-'A'];
        if(pos==0)      return ;
        if(no[pos].hav)
        {
                if(!vno[pos])
                {
                        ++cnt;
                        vno[pos]=1;
                        ans+=score[h+1];
                        str[h+1]='\0';
                        if(h+1>mlen||(h+1==mlen&&strcmp(str,best)<0))
                        {
                                mlen=h+1;
                                strcpy(best,str);
                        }
                }
        }
        for(int i=0;i<8;++i)
        {
                int tx=x+dir[i][0],ty=y+dir[i][1];
                if(!vi[tx][ty])
                {
                        vi[tx][ty]=1;
                        dfs(tx,ty,h+1,pos);
                        vi[tx][ty]=0;
                }
        }
}
int main()
{
       //freopen("/home/hg/譁?。」/input","r",stdin);
        int w,b;
        scanf("%d",&w);
        root=1;
        for(int i=0;i<w;++i)
        {
                scanf("%s",str);
                add(root,0);
        }
        scanf("%d",&b);
        while(b--)
        {
                ans=0,cnt=0,mlen=0;
                strcpy(best,"");
                for(int i=0;i<=5;++i)
                        for(int j=0;j<=5;++j)
                                vi[i][j]=1;
                memset(vno,0,sizeof(vno));
                for(int i=1;i<=4;++i)
                        for(int j=1;j<=4;++j)   vi[i][j]=0;
                for(int i=1;i<=4;++i)   scanf("%s",&bog[i][1]);
                for(int i=1;i<=4;++i)
                        for(int j=1;j<=4;++j)
                        {
                                vi[i][j]=1;
                                dfs(i,j,0,root);
                                vi[i][j]=0;
                        }

                printf("%d %s %d\n",ans,best,cnt);
        }
        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 <algorithm>
#include <cstring>
#define N 1001
#define L 502
using namespace std;
struct node{
    short num[L];
    short len;
} seg[N];
short tem[L+1],tem_len;
void add(node x, node y){
    int l;
    memset(tem,0,sizeof(0));
    if (l > x.len)
        l = x.len;
    else
        l = y.len;
    tem_len = l;
    for (int i = 0; i < l; i++){
        tem[i+1] = (tem[i] + x.num[i] + y.num[i]) / 10;
        tem[i] = (tem[i] + x.num[i] + y.num[i] ) % 10;
    }
    if (tem[l] != 0)
        tem_len++;
}
bool cmp(node y){
    if (tem_len != y.len)
        return tem_len > y.len;
    for (int i = tem_len-1; i >= 0; i++)
        if (tem[i] != y.num[i])
            return tem[i] > y.num[i];
    return false;
}
int main(){
    int i,j,k,l,n;
    cin >> n;
    getchar();
    char str[501];
    for (i = 1; i <= n; i++){
        gets(str);
        l = strlen(str);
        seg[i].len = l;
        for (j = 0; j < l; j++)
            seg[i].num[j] = str[l-j-1] - '0';
    }
    for (j = 1; j <= n; j++){
    for (i = seg[j].len-1; i >=0; i--)
        printf("%d",seg[j].num[i]);
    printf("\n");}
    for (i = 1; i <= n-2; i++)
        for (j = i+1; j <= n-1; j++)
            for (k = j+1; k <= n; k++){
                add(seg[i],seg[j]);
                if (!cmp(seg[k]))
                    break;
                add(seg[i],seg[k]);
                if (!cmp(seg[j]))
                    break;
                add(seg[j],seg[k]);
                if (!cmp(seg[i]))
                    break;
                for (l = seg[i].len-1; l >=0; l--)
                    printf("%d",seg[i].num[l]);
                printf(" ");
                for (l = seg[j].len-1; l >=0; l--)
                    printf("%d",seg[j].num[l]);
                printf(" ");
                for (l = seg[k].len-1; l >=0; l--)
                    printf("%d",seg[k].num[l]);
                printf(" ");
                return 0;
            }
    printf("0 0 0\n");
    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 <cstdlib>
#include <algorithm>
#include <cmath>

using namespace std;

const int MaxN = 10005;
int n, m;
const double eps = 1e-7;
int dcmp(double x) {
	return x < -eps ? -1 : x > eps;
}

struct Point {
	double x, y;
	Point(){}
	Point(double x, double y)
		: x(x), y(y) {}
	double operator * (const Point &b) {
		return x * b.y - y * b.x;
	}
	Point operator - (const Point &b) {
		return Point(x - b.x, y - b.y);
	}
	bool operator < (const Point &b) const {
		if (dcmp(y - b.y) != 0) return dcmp(y - b.y) < 0;
		return dcmp(x - b.x) < 0;
	}
	void init() {
		scanf("%lf%lf", &x, &y);
	}
	Point operator + (const Point &b) {
		return Point(x + b.x, y + b.y);
	}
	Point operator / (const double &b) {
		return Point(x / b, y / b);
	}
	Point operator * (const double &b) {
		return Point(x * b, y * b);
	}
} p[MaxN], q[MaxN], a[MaxN];
Point get(double d, Point a, Point b) {
	return (b - a) * (d / (b.y - a.y)) + a;
}
double getarea(Point a, Point b, Point c) {
	return fabs((a - b) * (a - c)) / 2;
}
bool check(double d, double nowarea, Point G, int l, int r) {
	double dl = d - p[l].y;
	Point t1 = get(dl, p[l], p[l+1]);
	double dr = d - q[r].y;
	Point t2 = get(dr, q[r], q[r+1]);
	
	G = G + (q[r] + p[l] + t2) / 3 * getarea(q[r], p[l], t2);
	G = G + (p[l] + t1 + t2) / 3 * getarea(p[l], t1, t2);
	nowarea += getarea(q[r], p[l], t2) + getarea(p[l], t1, t2);
	G = G / nowarea;
	
	if (dcmp(G.x - p[0].x) < 0 || dcmp(G.x - q[0].x) > 0) return 0;
	return 1;
}
int main() {
	//freopen("I.in","r",stdin);
	
	
	int cases; scanf("%d", &cases);
	
	while (cases--) {
		scanf("%d%d", &m,&n);
		int tot = n + m;
		for (int i = 0; i < m; ++i) {
			p[i].init();
		}
		for (int i = 0; i < n; ++i) {
			q[i].init();
		}
		
		int l = 0, r = 0;
		double ans = 0;
		double nowarea = 0;
		Point G = Point(0, 0);
		for (int i = 2; i < tot; ++i) {
			
			double L, R;
			if (r == n - 1 || (l < m && p[l+1].y < q[r+1].y)) {
				++l;
				L = p[l].y;
				Point tG = (p[l] + p[l-1] + q[r]) / 3;
				double area = getarea(p[l], p[l-1], q[r]);
				G = G + tG * area;
				nowarea += area;
			} else {
				++r;
				L = q[r].y;
				Point tG = (q[r] + q[r-1] + p[l]) / 3;
				double area = getarea(q[r], q[r-1], p[l]);
				G = G + tG * area;
				nowarea += area;
			}
			if (!check(L, nowarea, G, l, r)) continue;
			if (l == m - 1 && r == m - 1) {
				ans = L;
				continue;
			}
			R = min(p[l+1].y, p[r+1].y);
			for (int j = 0; j < 60; ++j) {
				double mid = (L + R) * 0.5;
				if (check(mid, nowarea, G, l, r)) L = mid; else R = mid;
			}
			ans = max(ans, L);
		}
		printf("%.3f\n", ans);
	}
	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(){
    int i,j;
	for(i=1;j<10;j++){
		printf("%dx%d=%d\n",i,j);
	}
   }  
    return 0;
}

Compiler output:
main.c:9:5: error: expected identifier or '(' before 'return'
    9 |     return 0;
      |     ^~~~~~
main.c:10:1: error: expected identifier or '(' before '}' token
   10 | }
      | ^
Language: C

#include<stdio.h>

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

Compiler output:
main.c:9:5: error: expected identifier or '(' before 'return'
    9 |     return 0;
      |     ^~~~~~
main.c:10:1: error: expected identifier or '(' before '}' token
   10 | }
      | ^
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#define fr(i,t,n) for(int i = t ; i <= n ; i++)
#define ft(i,t,n) for(int i = t ; i >= n ; i--)
#define sc scanf
#define pr printf
#define re return
#define ct continue
#define br break
#define me(a,i) memset(a,i,sizeof(a))
#define LL long long
using namespace std;
const int maxn = 220;
const int maxm = 1100;
struct node
{
    int online[maxm],sever,down,start;
}tes[maxn];
int n , T , num,v,id[maxm],times[maxm];
bool maps[maxn][maxm];
int trans[maxn][maxn],m;
void readin()
{
    sc("%d%d",&n,&T);
    sc("%d%d",&num,&v);//num 蠑?ァ区怏蜃?クェ莠コ?計邉サ扈滓枚莉カ螟ァ蟆?    int x;
    fr(i,1,n)tes[i].sever = 0;
    fr(i,1,num)
    {
        sc("%d",&x);
        tes[x].sever=1;
    }
    fr(i,1,n)
      fr(j,1,n)sc("%d",&trans[i][j]);
    fr(i,1,n)
    {
        sc("%d",&x);
        fr(j,0,T)tes[i].online[j] = 0;
        fr(j,1,x)
        {
            int a,  b;
            sc("%d%d",&a,&b);
            fr(k,a,b)tes[i].online[k]=1;
        }
    }
   // fr(i,1,n)
     // fr(j,0,T)pr("%d %d %d\n",i,j,tes[i].online[j]);
    me(maps,0);
    sc("%d",&m);
    fr(i,1,m)
    {
        int a , b;
        sc("%d%d",&a,&b);
        maps[b][a] = 1;
    }
}
bool falg[maxn];
void solve()
{
    fr(i,1,n)tes[i].down = 0;
    fr(i,1,n)tes[i].start = 0;
    fr(i,0,T)
    {
       // pr("%d\n",i);
        fr(j,1,n)
          if(tes[j].start && tes[j].online[i] && !tes[j].sever)
          {
              fr(k,1,n)
              if(tes[k].online[i] && tes[k].sever)
                tes[j].down += trans[k][j];
              if(tes[j].down >= v)tes[j].sever = 1;
          }
        //fr(j,1,n)if(!tes[j].online[i])tes[j].start = 0;
        fr(j,1,n)
        if(maps[j][i])tes[j].start = 1;
        pr("now = %d ",i);
        fr(j,1,n)pr("%d ",tes[j].down);
        puts("");
        //fr(j,1,n)
       // pr("T = %d i = %d   start ? %d online?  %d\n",i,j,tes[j].start,tes[j].online[i]);
    }
    fr(i,1,n)
    if(tes[i].sever)pr("100%%\n");
    else
    {
        double res = 1.0*tes[i].down / v;
        double pp = res * 1000/10;
        pr("%.0lf%%\n",pp);
    }
}
int main()
{
    int test;
    freopen("C.in","r",stdin);
    freopen("C.out","w",stdout);
    sc("%d",&test);
    while(test--)
    {
        readin();
        //while(1);
        solve();
    }
    re 0;
}

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