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

#include<stdio.h>
#define N 100

int main(){

  int n, i, j, A[N][N], s, t, u;
 
  scanf("%d",&n);

  for ( i = 0; i < n; i++ ) {
    for ( j = 0; j < n; j++ ) {
      A[i][i] = 0;
    }
  }

  for ( i = 0; i < n; i++ ) {
    scanf("%d %d", &s, &t);
    for ( j = 0; j < t; j++ ) {
      scanf("%d",&u); 
      A[s-1][u-1] = 1;
    }
  }

  for ( i = 0; i < n; i++ ) {
    for ( j = 0; j < n; j++ ) {
      if ( j != 0 ) printf(" "):
      printf("%d", A[i][j]);
    }
    printf("\n");
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:26:32: error: expected ';' before ':' token
   26 |       if ( j != 0 ) printf(" "):
      |                                ^
      |                                ;
Language: C

#include<stdio.h>
#define N 100

int main(){

  int n, i, j, A[N][N], s, t, u;
 
  scanf("%d",&n);

  for ( i = 0; i < n; i++ ) {
    for ( j = 0; j < n; j++ ) {
      A[i][i] = 0;
    }
  }

  for ( i = 0; i < n; i++ ) {
    scanf("%d %d", &s, &t);
    for ( j = 0; j < t; j++ ) {
      scanf("%d",&u); 
      A[s][u] = 1;
    }
  }

  for ( i = 0; i < n; i++ ) {
    for ( j = 0; j < n; j++ ) {
      if ( j != 0 ) printf(" "):
      printf("%d", A[i][j]);
    }
    printf("\n");
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:26:32: error: expected ';' before ':' token
   26 |       if ( j != 0 ) printf(" "):
      |                                ^
      |                                ;
Language: C

#include<stdio.h>
#define N 100

int main(){

  int n, i, j, A[N][N], s, t, u;
 
  scanf("%d",&n);

  for ( i = 0; i < n; i++ ) {
    for ( j = 0; j < n; j++ ) {
      A[i][i] = 0;
    }
  }

  for ( i = 0; i < n; i++ ) {
    scanf("%d %d", &s, &t);
    for ( j = 0; j < t; j++ ) {
      scanf("%d",&u); 
      A[s-1][u-1] = 1;
    }
  }

  for ( i = 0; i < n; i++ ) {
    for ( j = 0; j < n; j++ ) {
      if ( j!= 0 ) printf(" "):
      printf("%d", A[i][j]);
    }
    printf("\n");
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:26:31: error: expected ';' before ':' token
   26 |       if ( j!= 0 ) printf(" "):
      |                               ^
      |                               ;
Language: C


#include<stdio.h>
#define N 100
??
int main(){
??
  int n, i, j, A[N][N], s, t, u;
??
  scanf("%d",&n);
??
  for ( i = 0; i < n; i++ ) {
    for ( j = 0; j < n; j++ ) {
      A[i][i] = 0;
    }
  }
??
  for ( i = 0; i < n; i++ ) {
    scanf("%d %d", &s, &t);
    for ( j = 0; j < t; j++ ) {
      scanf("%d",&u); 
      A[s-1][u-1] = 1;
    }
  }
??
  for ( i = 0; i < n; i++ ) {
    for ( j = 0; j < n; j++ ) {
      if ( j!= 0 ) printf(" ");
      printf("%d", A[i][j]);
    }
    printf("\n");
  }
??
  return 0;
}

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

#include<stdio.h>
#define N 100
??
int main(){
??
  int n, i, j, A[N][N], s, t, u;
??
  scanf("%d",&n);
??
  for ( i = 0; i < n; i++ ) {
    for ( j = 0; j < n; j++ ) {
      A[i][i] = 0;
    }
  }
??
  for ( i = 0; i < n; i++ ) {
    scanf("%d %d", &s, &t);
    for ( j = 0; j < t; j++ ) {
      scanf("%d",&u); 
      A[s-1][u-1] = 1;
    }
  }
??
  for ( i = 0; i < n; i++ ) {
    for ( j = 0; j < n; j++ ) {
      if ( j!= 0 ) printf(" ");
      printf("%d", A[i][j]);
    }
    printf("\n");
  }
??
  return 0;
}

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

#include<stdio.h>
#define N 100
??
int main(){
??
????int n, i, j, A[N][N], s, t, u;
????
????scanf("%d",&n);
??
????for ( i = 0; i < n; i++ ) {
????????for ( j = 0; j < n; j++ ) {
????????????A[i][i] = 0;
????????}
????}
??
????for ( i = 0; i < n; i++ ) {
????????scanf("%d %d", &s, &t);
????????for ( j = 0; j < t; j++ ) {
????????????scanf("%d",&u); 
????????????A[s-1][u-1] = 1;
????????}
????}
??
????for ( i = 0; i < n; i++ ) {
????????for ( j = 0; j < n; j++ ) {
????????????if ( j!= 0 ) printf(" ");
????????????printf("%d", A[i][j]);
????????}
????????printf("\n");
????}
??
????return 0;
}

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

#include <stdio.h>
??
int main( )
{
int n, i, j, a, b, c;
int M[100][100];
scanf("%d", &n);
??for ( i = 0; i < n; i++ ) {
????for ( j = 0; j < n; j++ ) {
????????M[i][j] = 0;
}
}
??????for ( i = 0; i < n; i++ ) {
????????????scanf("%d%d", &a, &b);
????????????if ( b != 0 ) {
??????????????????for ( j = 0; j < b; j++ ) {
????????????????????????scanf("%d", &c);
????????????????????????M[a-1][c-1] = 1;
??????????????????}
????????????}
??????}
??????for ( i = 0; i < n; i++ ) {
????????????for ( j = 0; j < n; j++ ) {
??????????????????printf("%d", M[i][j]);
??????????????????if( j != n - 1 ) printf(" ");
????????????}
??????printf("\n");
??????}
??????return 0;

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

#include <stdio.h>
??
int main( )
{
int n, i, j, a, b, c;
int M[100][100];
scanf("%d", &n);
??for ( i = 0; i < n; i++ ) {
????for ( j = 0; j < n; j++ ) {
????????M[i][j] = 0;
}
}
??????for ( i = 0; i < n; i++ ) {
????????????scanf("%d%d", &a, &b);
????????????if ( b != 0 ) {
??????????????????for ( j = 0; j < b; j++ ) {
????????????????????????scanf("%d", &c);
????????????????????????M[a-1][c-1] = 1;
??????????????????}
????????????}
??????}
??????for ( i = 0; i < n; i++ ) {
????????????for ( j = 0; j < n; j++ ) {
??????????????????printf("%d", M[i][j]);
??????????????????if( j != n - 1 ) printf(" ");
????????????}
??????printf("\n");
??????}
??????return 0;
}

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

#include<stdio.h>

int main(){
    int k,u,l,n,m,i,j;
    int a[101][101];
    int b[101][101];
    scanf("%d",&n);
    for(i=1; i<=n; i++){
        scanf("%d", &u);
        a[i][1]=u;
        scanf(" %d", &k);
        a[i][2]=k;
        for(j=3; j<=k+2; j++){
            scanf(" %d", &a[i][j]);
            b[i][a[i][j]] = 1;
        }
    }
    printf("\n");

    for(l=1; l<=n; l++){
        for(m=1; m<=n; m++){
            printf("%d%c",b[l][m],(j < N-1 ? ' ' : '\n'));
        }
        printf("\n");
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:22:40: error: 'N' undeclared (first use in this function)
   22 |             printf("%d%c",b[l][m],(j < N-1 ? ' ' : '\n'));
      |                                        ^
main.c:22:40: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(){
    int k,u,l,n,m,i,j;
    int a[101][101];
    int b[101][101];
    scanf("%d",&n);
    for(i=1; i<=n; i++){
        scanf("%d", &u);
        a[i][1]=u;
        scanf(" %d", &k);
        a[i][2]=k;
        for(j=3; j<=k+2; j++){
            scanf(" %d", &a[i][j]);
            b[i][a[i][j]] = 1;
        }
    }
    printf("\n");

    for(l=1; l<=n; l++){
        for(m=1; m<=n; m++){
            if(l==n && m==n){
                printf("%d",b[l][m]);
            } else {
                printf("%d ",b[l][m]);
        }
        printf("\n");
    }
    return 0;
}


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

#include<iostream>

#define MAX 105

int main(){
  int n,u,k;
  int adj[MAX][MAX] = {{0}};
  int A[MAX][MAX] = {{0}};
  std::cin >> n;
  for(int i=0;i<n;i++){
    std::cin >> u >> k;
    for(int j=0;j<k;j++){
      std::cin >> adj[u-1][j];
    }
    adj[u][k] = -1;
  }
  //std::cout << "入力\n";

  for(int i=0;i<n;i++){
    int j=0;
    while(adj[i][j] != -1){
      A[i][adj[i][j]-1] = 1;
      j++;
    }
    std::cout << A[i][0] ;
    for(j=1;j<n;j++){
      std::cout << ' ' << A[i][j] ;
    }
    std::cout << '\n';
  }

  return 0;
}




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

#include<stdio.h>

int main(void){
  int n,i,j,s;
  int A[100][105];
  int B[100][105];

  for(i=1;i<=n;i++){
    for(j=1;j<=n+1;j++){
      B[i][j]=0;
    }
  }

  scanf("%d",&n);
  for(i=1;i<=n;i++){
    for(j=1;j<=n+1;j++){
      scanf("%d",&A[i][j]);
      if(j == 2)s=A[i][j];
      if(s+2 == j)break;
    }
  }

  for(i=1;i<=n;i++){
    for(j=3;j<=n+1;j++){
      if(A[i][j]!=0){
	B[i][A[i][j]]=1;
      }
    }
  }

  for(i=1;i<=n;i++){
    for(j=1;j<=n;j++){
      if(j!=1)printf(" ");
      printf("%d",B[i][j]);
    }
    printf("\n");
  }

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

#include<stdio.h>

int main(void){
  int n,i,j,s;
  int A[110][115];
  int B[110][115];

  scanf("%d",&n);




  for(i=1;i<=n;i++){
    for(j=1;j<=n+1;j++){
      A[i][j]=0;
      B[i][j]=0;
    }
  }




  for(i=1;i<=n;i++){
    for(j=1;j<=n+1;j++){
      scanf("%d",&A[i][j]);
      if(j == 2)s=A[i][j];
      if(s+2 == j)break;
    }
  }

  for(i=1;i<=n;i++){
    for(j=3;j<=n+1;j++){
      if(A[i][j]!=0){
	B[i][A[i][j]]=1;
      }
    }
  }

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

#include <stdio.h>

int main(void){
int mp[105][105]={0};
int n=0;
scanf("%d",&n);
int i=0,j=0;;
for(i=0;<n;i++){
int u=0;
int k=0;
scanf("%d%d",&u,&k);
int p=0;
int m=0;
for(p=0;p<k;p++){
scanf("%d",&m);
mp[u-1][m-1]=1;
}
}
for(i=0;i<n;i++){
printf("%d",mp[0][j]);
for(j=1;j<n;j++){
printf("\x0020%d",mp[i][j]);
}
printf("\n");
}

Compiler output:
main.c: In function 'main':
main.c:8:9: error: expected expression before '<' token
    8 | for(i=0;<n;i++){
      |         ^
main.c:25:1: error: expected declaration or statement at end of input
   25 | }
      | ^
Language: C

#include <stdio.h>

int main(void){
int mp[105][105]={0};
int n=0;
scanf("%d",&n);
int i=0,j=0;;
for(i=0;<n;i++){
int u=0;
int k=0;
scanf("%d%d",&u,&k);
int p=0;
int m=0;
for(p=0;p<k;p++){
scanf("%d",&m);
mp[u-1][m-1]=1;
}
}
for(i=0;i<n;i++){
printf("%d",mp[0][j]);
for(j=1;j<n;j++){
printf("\x0020%d",mp[i][j]);
}
printf("\n");
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:9: error: expected expression before '<' token
    8 | for(i=0;<n;i++){
      |         ^
Language: C

#include <iostream>
using namespace std;
int main(){
  int n,a,b,c;
  int G[100][100] = {0};
  cin >> n;
  for(int i = 0 ; i < n ; i++){
    cin >> a >> b;
    a--;
    for(int i = 0 ; i < b ; i++){
      cin >> c;
      c--;
      G[a][c] = 1;
    }
    }
  for(int i = 0 ; i < n ; i++){
    for(int j = 0 ; j < n ; j++){
      if(j == 0)cout << G[i][j];
      else cout <<" "<< G[i][j];
    }
    cout << 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 <iostream>
using namespace std;
int main(){
  int n,a,b,c;
  int G[100][100];

  cin >> n;
  for(int i = 0 ; i < n ; i++){
    for(int j = 0 ; j < n ; j++){
      G[i][j] = 0;
    }
  }
  for(int i = 0 ; i < n ; i++){
    cin >> a >> b;
    a--;
    for(int i = 0 ; i < b ; i++){
      cin >> c;
      c--;
      G[a][c] = 1;
    }
    }
  for(int i = 0 ; i < n ; i++){
    for(int j = 0 ; j < n ; j++){
      if(j == 0)cout << G[i][j];
      else cout <<" "<< G[i][j];
    }
    cout << 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 <iostream>
using namespace std;
int main(){
  int n,a,b,c;
  int G[200][200];

  cin >> n;
  for(int i = 0 ; i < n ; i++){
    for(int j = 0 ; j < n ; j++){
      G[i][j] = 0;
    }
  }
  for(int i = 0 ; i < n ; i++){
    cin >> a >> b;
    a--;
    for(int i = 0 ; i < b ; i++){
      cin >> c;
      c--;
      G[a][c] = 1;
    }
  }
  for(int i = 0 ; i < n ; i++){
    for(int j = 0 ; j < n ; j++){
      if(j == 0)cout << G[i][j];
      else cout <<" "<< G[i][j];
    }
    cout << 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<iostream>
using namespace std;
static const int N=100;

int main()
{
  int M[N][N];
  int n,u,k,v;

  cin>>n;

  for(int i=0;i<n;i++)
    {
      for(int j=0;j<n;j++)
	{
	  M[i][j]=0;
	}
    }

  for(int i=0;i<n;i++)
    {
      cin>>u>>k;
      u--;
      for(int j =0;j<k;j++)
	cin>>v;
      v--;
      M[u][v]=1;
    }
}

for(int i=0;i<n;i++)
  {
    for(int j=0;j<n;j++)
      {
	if(j)cout<<"";
	cout<<M[i][j];
      }
    cout<<endl;
  }

return0;
}




Compiler output:
a.cc:31:1: error: expected unqualified-id before 'for'
   31 | for(int i=0;i<n;i++)
      | ^~~
a.cc:31:13: error: 'i' does not name a type
   31 | for(int i=0;i<n;i++)
      |             ^
a.cc:31:17: error: 'i' does not name a type
   31 | for(int i=0;i<n;i++)
      |                 ^
a.cc:41:1: error: 'return0' does not name a type
   41 | return0;
      | ^~~~~~~
a.cc:42:1: error: expected declaration before '}' token
   42 | }
      | ^
Language: C++

#include<iostream>
#include<windows.h>
using namespace std;
int graph[105][105];
int main()
{
	int n;
	cin>>n;
	memset(graph,0,sizeof(graph));
	for(int i=1;i<=n;i++)
	{
		int v;
		cin>>v;
		int num;
		cin>>num;
		while(num--)
		{
			int aa;
			cin>>aa;
			graph[v-1][aa-1]=1;
			//cout<<v-1<<" "<<aa<<endl;
		}
	}
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<n;j++)
		{
			if(j>0)
			cout<<" ";
			cout<<graph[i][j];
		}
		cout<<endl;
	}
	return 0;
} 


Compiler output:
a.cc:2:9: fatal error: windows.h: No such file or directory
    2 | #include<windows.h>
      |         ^~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
using namespace std;


static const int N=100;

int main()
{
    int M[N][N] //0 origin Adjacency matrix
    int n,u,k,v;

    cin　>> n;

    for(int i = 0; i < n; i++)
    {
        for(int j = 0; j < n; j++) M[i][j]=0;
    }

    for(int i = 0; i < n; i++)
    {
        cin >> u >> k;
        u--; //0 origin
        for(int j = 0; j < k; j++)
        {
            cin >> v;
            v--; //0 origin
            M[u][v]=1;//uとvの間に辺を張る
        }
    }


    for(int i = 0; i < n; j++)
    {
        for(int j = 0; j < n; j++)
        {
            if(j) cout << " ";
            cout << M[i][j];
        }
        cout << endl;
    }
    return 0;
}


Compiler output:
a.cc:12:5: error: extended character 　 is not valid in an identifier
   12 |     cin　>> n;
      |     ^
a.cc: In function 'int main()':
a.cc:10:5: error: expected initializer before 'int'
   10 |     int n,u,k,v;
      |     ^~~
a.cc:12:5: error: 'cin\U00003000' was not declared in this scope
   12 |     cin　>> n;
      |     ^~~~~
a.cc:12:13: error: 'n' was not declared in this scope
   12 |     cin　>> n;
      |             ^
a.cc:16:36: error: 'M' was not declared in this scope
   16 |         for(int j = 0; j < n; j++) M[i][j]=0;
      |                                    ^
a.cc:21:16: error: 'u' was not declared in this scope
   21 |         cin >> u >> k;
      |                ^
a.cc:21:21: error: 'k' was not declared in this scope
   21 |         cin >> u >> k;
      |                     ^
a.cc:25:20: error: 'v' was not declared in this scope
   25 |             cin >> v;
      |                    ^
a.cc:27:13: error: 'M' was not declared in this scope
   27 |             M[u][v]=1;//uとvの間に辺を張る
      |             ^
a.cc:32:27: error: 'j' was not declared in this scope
   32 |     for(int i = 0; i < n; j++)
      |                           ^
a.cc:37:21: error: 'M' was not declared in this scope
   37 |             cout << M[i][j];
      |                     ^
Language: C++

#include<iostream>
using namespace std;

int n;
int ad_list[101][101];

void print(){
    for(int i=1;i<n+1;i++){
        for(int j=1;j<n+1;j++){
            cout << ad_list[i][j];
            if(j==n)cout << "\n";
            else cout << " ";
        }
    }
}

int main(){
    cin  >> n;
    for(int i=1;i<n+1; i++){
        for(int j=1; j<n+1; j++){
            ad_list[i][j]=0
        }
    }
    int v,k, in;
    for(int i=1; i<n+1; i++){
        cin >> v >> k;
        for (int j=0;j<k;j++){
            cin >> in;
            ad_list[v][in]=1;
        }
    }
    print();
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:28: error: expected ';' before '}' token
   21 |             ad_list[i][j]=0
      |                            ^
      |                            ;
   22 |         }
      |         ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,k,u,d;
    cin>>n;
    vector<vector<int>> Adj(n,vector<int>(n));
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            Adj[i][j]=0;
        }
    }
    for(int i=0;i<n;i++){
        cin>>k>>u;
        for(int j=0;j<u,j++){
            cin>>d;
            Adj[k-1][d-1]=1;
        }
    }
    
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            cout<<Adj[i][j]<<" ";
        }
        cout<<"\n";
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:28: error: expected ';' before ')' token
   14 |         for(int j=0;j<u,j++){
      |                            ^
      |                            ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,k,u,d;
    cin>>n;
    vector<vector<int>> Adj(n,vector<int>(n,0));
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            Adj[i][j]=0;
        }
    }
    for(int i=0;i<n;i++){
        cin>>k>>u;
        for(int j=0;j<u,j++){
            cin>>d;
            Adj[k-1][d-1]=1;
        }
    }
    
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            cout<<Adj[i][j]<<" ";
        }
        cout<<"\n";
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:28: error: expected ';' before ')' token
   14 |         for(int j=0;j<u,j++){
      |                            ^
      |                            ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,k,u,d;
    cin>>n;
    vector<vector<int> > Adj(n,vector<int>(n,0));
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            Adj[i][j]=0;
        }
    }
    for(int i=0;i<n;i++){
        cin>>k>>u;
        for(int j=0;j<u,j++){
            cin>>d;
            Adj[k-1][d-1]=1;
        }
    }
    
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            cout<<Adj[i][j]<<" ";
        }
        cout<<"\n";
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:28: error: expected ';' before ')' token
   14 |         for(int j=0;j<u,j++){
      |                            ^
      |                            ;
Language: C++

#include <iostream>
#include <vector>
#include <cassert>
#include <algorithm>
#include <functional>

using namespace std;
    
#include <iostream>
#include <vector>
#include <cassert>
#include <algorithm>
#include <functional>
#include <cmath>
#include <iomanip>
#include <limits>
#include <bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin >> n;
    vector<vector<int>> vec(n);
    vector<int> SIZE;
    for(int i=0;i<n;i++){
        int x;
        cin >> x;
        int num;
        cin >> num;
        SIZE.push_back(num);
        for(int j = 0;j< num;j++){
            int y;
            cin >> y;
            vec[x-1].push_back(y-1) ;
        }
    }
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            bool hantei=0;
            for(int k=0;k<SIZE[i];k++){
                if(vec[i][k]==j) {cout << 1 <<" "; hantei=1;}
            }
            if(hantei==0) cout <<0<<" ";
        }cout << endl;
    }cout << endl;
}cout << endl;





Compiler output:
a.cc:45:2: error: 'cout' does not name a type
   45 | }cout << endl;
      |  ^~~~
Language: C++

#include <iostream>
using namespace std;

int a[100][100];
int n;
int main() {
	cin >> n;
	int p,q,r;
	for (int i=0; i<n; ++i) {
		int >> p >> q;
		for (int i=0; i<q; ++i) {
			cin >> r;
			a[p][r] = 1;
		}
	}
	for (int i=0; i<n; ++i) {
		for (int j=0; j<n-1; ++j) {
			cout << a[i+1][j+1] << " ";
		}
		cout << a[i+1][n] << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: expected unqualified-id before '>>' token
   10 |                 int >> p >> q;
      |                     ^~
Language: C++

#include <iostream>
#include <stdio>

using namespace std;

int main(){
  int g[10010][10010]={};//要素を0で初期化
  int n,a,b,c;
  cin >> n;
  for (int i = 0; i < n; ++i)
   {
     cin >> a >> b ;
     for (int i = 0; i < b; ++i)
     {
       cin >> c
       g[a-1][c-1]=1;/* code */
     }
   }
   for (int i = 0; i < n; ++i)
   {
     for (int j = 0; j < n; ++i)
     {
      if (j==n-1)
      {
        cout << g[i][j] << endl;
      }else{
        cout << g[i][j] <<" " 
      }
     }
   }

}

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

#include <iostream>
#include <stdio>

using namespace std;

int main(){
  int g[10010][10010]={};//要素を0で初期化
  int n,a,b,c;
  cin >> n;
  for (int i = 0; i < n; ++i)
   {
     cin >> a >> b ;
     for (int i = 0; i < b; ++i)
     {
       cin >> c;
       g[a-1][c-1]=1;/* code */
     }
   }
   for (int i = 0; i < n; ++i)
   {
     for (int j = 0; j < n; ++i)
     {
      if (j==n-1)
      {
        cout << g[i][j] << endl;
      }else{
        cout << g[i][j] <<" ";
      }
     }
   }

}

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

#include <iostream>
#include <stdio>

using namespace std;

int main(){
  int g[10010][10010]={{0}};//要素を0で初期化
  int n,a,b,c;
  cin >> n;
  for (int i = 0; i < n; ++i)
   {
     cin >> a >> b ;
     for (int i = 0; i < b; ++i)
     {
       cin >> c;
       g[a-1][c-1]=1;/* code */
     }
   }
   for (int i = 0; i < n; ++i)
   {
     for (int j = 0; j < n; ++i)
     {
      if (j==n-1)
      {
        cout << g[i][j] << endl;
      }else{
        cout << g[i][j] <<" ";
      }
     }
   }

}

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

#include<iostream>
using namespace std;
static const int N=100;

int main( void ){
  int M[N][N];
  int n,m,l,k;
 
  cin >> n;

  for( int i = 0 ; i < n ; i++ ){
    for( int j = 0 ; j < n ; j++ ){
      M[i][j];
    }
  }
  for( int i = 0 ; i < n ; i++ ){
    cin >> m >> l;
    m--;
    for( j = 0 ; j < n ; j++ ){
      cin >> k;
      k--;
      M[m][k]; = 1;
    }
  }
  for( int i = 0 ; i < n ; i++ ){
    for( int j = 0 ; j < n ; j++ ){
      if( j ) cout << " ";
      cout << M[i][j];
    }
    cout << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:10: error: 'j' was not declared in this scope
   19 |     for( j = 0 ; j < n ; j++ ){
      |          ^
a.cc:22:16: error: expected primary-expression before '=' token
   22 |       M[m][k]; = 1;
      |                ^
Language: C++

N = int(raw_input())
A = [0] * N
for i in range(N):
  A[i] = [0] * N

for line in sys.stdin:
  values = line.split()
  u = int(values[0]) - 1
  k = int(values[1])
  nodes = values[2:]
  for i in range(int(k)):
    v = int(nodes[i]) - 1
    A[u][v] = 1

for i in range(N):
  print " ".join([str(x) for x in A[i]])

Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N = int(raw_input())
      | ^
Language: C++

#include <iostream>
#include <algorithm>
#include <stack>
#include <string>
#include <queue>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <vector>
#include <list>
#include <string.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include <map>
#define INFTY (1<<30)
#define MAX 100000000

using namespace std;

int main() {
	int n, m[101][101] = {};
	cin >> n;
	for( int i = 1; i <= n; i++) {
		int u, k;
		cin >> u >> k;
		for( int j = 1; j <= k; j++) {
			int v;
			cin >> v;
			m[i][v] = 1;
		}
	}
	for( int i = 1; i <= n; i++) {
		for( int j = 1; j <= n; j++) {
			if( j < n) cout << m[i][j] << ' ';
			else cout << m[i][j]
		}
		cout << endl;
	}

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:45: error: expected ';' before '}' token
   35 |                         else cout << m[i][j]
      |                                             ^
      |                                             ;
   36 |                 }
      |                 ~
Language: C++

int main(){ //??°???????????£??\??????????????£??\?????????????????????????????°??????
    
    int n,k,v,w;
    
    cin >> n; //??°????????????????????\???
    
    Matrix M(n,Array(n,0)); //??£??\??????????????????
    
    for (int i=0; i<n; i++) { //??????????¬???°?????????????????\??? ???????????\??????????????£??\??????????????£??\?????????????´?
        cin >> w >> k;
        for (int j=0; j<k; j++) {
            cin >> v;
            M[w-1][v-1] = 1; //?????????
        }
    }
    
    for (int i=0; i<n; i++) { //????????¢?????§??????
        for (int j=0; j<n; j++) {
            cout << M[i][j];
            if (j!=n-1) {
                cout << " ";
            }
        }
        cout << endl;
    }
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> n; //??°????????????????????\???
      |     ^~~
a.cc:7:5: error: 'Matrix' was not declared in this scope
    7 |     Matrix M(n,Array(n,0)); //??£??\??????????????????
      |     ^~~~~~
a.cc:13:13: error: 'M' was not declared in this scope
   13 |             M[w-1][v-1] = 1; //?????????
      |             ^
a.cc:19:13: error: 'cout' was not declared in this scope
   19 |             cout << M[i][j];
      |             ^~~~
a.cc:19:21: error: 'M' was not declared in this scope
   19 |             cout << M[i][j];
      |                     ^
a.cc:24:9: error: 'cout' was not declared in this scope
   24 |         cout << endl;
      |         ^~~~
a.cc:24:17: error: 'endl' was not declared in this scope
   24 |         cout << endl;
      |                 ^~~~
Language: C++

#include <iostream>
using namespace std;
const int N = 100;

int main (){
    int M[N][N] = {0};
    int n,u,k,v;
    cin >> n;

    for (int i = 0; i < n ; ++i) {
     cin >> u >> k;
        u--; //0?????????????????????
        for (int j = 0; j < k ; ++j) {
            cin >> v;
            v -- ; // 0?????????????????????
            M[u][v] = 1; //u??¨v?????????????????????
        }
    }

    for (int i = 0; i < n ; ++i) {
        for (int j = 0; j < ; ++j) {
            if (j)  cout << " ";
            cout << M[i][j];
        }
        cout << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:29: error: expected primary-expression before ';' token
   21 |         for (int j = 0; j < ; ++j) {
      |                             ^
Language: C++

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

int n;


int main(void){

	cin >> n;
	int suji[n];
	int	num[n];
	int adj[n][num];
	int ans[n][n];

	

	for(int i = 0; i < n; i++){
		
		cin >> suji[i] >> num[i];

		
		for(int j = 0; j < num[i]; j++){
			cin >> adj[i][j];
			adj[i][j] -= 1;
		}
	}

	for(int i = 0; i < n; i++){
		for(int j = 0; j < n; j++){
			ans[i][j] = 0;
		}
	}

	for(int i = 0; i < n; i++){
		for(int j = 0; j < num[i]; j++){
			ans[i][adj[i][j]] = 1;
		}
	}

	for(int i = 0; i < n; i++){
		for(int j = 0; j < n; j++){
			if(j == n - 1){
				cout << ans[i][j] << endl;
			}else{
				cout << ans[i][j] << " ";
			}
		}
	}



	
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:20: error: conversion from 'int*' to 'long unsigned int' in a converted constant expression
   19 |         int adj[n][num];
      |                    ^~~
a.cc:19:20: error: could not convert 'num' from 'int [n]' to 'long unsigned int'
   19 |         int adj[n][num];
      |                    ^~~
      |                    |
      |                    int [n]
a.cc:19:20: error: size of array 'adj' has non-integral type 'int [n]'
Language: C++


#include<iostream>
using namespace std;

int main()
{
    int n,k,x;
    int A[100][100]={};
    cin>>n;
    for(int i=0;i<n;i++)
    {
        cin>>u>>k;
        if(k===0)
            continue;
        for(int j=0;j<k;j++)
        {
            cin>>x;
            A[u][x-1]=1;
        }
    }
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
                cout<<A[i][j];
            if(j!=n-1)
                cout<<" ";
        }
        cout<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: 'u' was not declared in this scope
   12 |         cin>>u>>k;
      |              ^
a.cc:13:15: error: expected primary-expression before '=' token
   13 |         if(k===0)
      |               ^
Language: C++



#include <iostream>
using namespace std;

int main(){
        int n,m,l,i,j;
        cin >> n;
        int f[100][100] =
        for ( i = 0; i < n; i++){
                cin >> m;
                for ( j = 0; j < m; j++){
                        cin >> l;
                        f[m][l] = 1;
                }
        }
        for ( i = 0; i < n; i++){
                for ( j = 0; j < n-1; j++){
                        cout << f[i][j] << " ";
                }
                cout << f[i][n] << endl;
        }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: expected primary-expression before 'for'
   10 |         for ( i = 0; i < n; i++){
      |         ^~~
a.cc:10:32: error: expected ';' before ')' token
   10 |         for ( i = 0; i < n; i++){
      |                                ^
      |                                ;
Language: C++

#include <iostream>
#include <string>
#include <vector>


using namespace std;


int main(){
  int n;
  cin >> n;


  vector< vector<int> > a;
  for(int i=0;i<n;i++){
    int u;
    int k;
    cin >> u >> k;
    vector<int> tmpa;
    for(int j=0;j<k;j++){
      int tmp;
      cin >> tmp;
      tmpa.push_back(tmp);
    }

    a.push_back(tmpa);
  }

  
  
  // int a2[n][n]={0};

  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++){
      a2[i][j]=0;
    }
  }
  
  for(int i=0;i<n;i++){
    for(int j=0;j<(int)a[i].size();j++){
      a2[i][a[i][j]-1] = 1;
    }
  }

  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++){
      if(j!=0)cout << " ";
      cout << a2[i][j];
    }
    cout << endl;
  }
      
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:7: error: 'a2' was not declared in this scope; did you mean 'a'?
   35 |       a2[i][j]=0;
      |       ^~
      |       a
a.cc:41:7: error: 'a2' was not declared in this scope; did you mean 'a'?
   41 |       a2[i][a[i][j]-1] = 1;
      |       ^~
      |       a
a.cc:48:15: error: 'a2' was not declared in this scope; did you mean 'a'?
   48 |       cout << a2[i][j];
      |               ^~
      |               a
Language: C++

#iunclude<iostream>
using namespace std;
static const int N = 100;

int main(){
  int M[N][N];
  int n,u,k,v;

  cin >> n;

  for(int i = 0; i < n; i++){
    for(int j = 0; j <n j++)M[i][j]=0;
  }

  for(int i = 0;i <n; i++){
    cin >> u >> k;
    u--;
    for(int j =0; j <k; j++){
      cin >> v;
      v--;
      M[u][v] = 1;
    }
  }

  for( int i =0;i<n;i++){
    for(int j =0;i<n;j++){
      if(j)cout << " ";
      cout << M[i][j];
    }
    cout << endl;
  }

  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #iunclude; did you mean #include?
    1 | #iunclude<iostream>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   cin >> n;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #iunclude<iostream>
a.cc:12:24: error: expected ';' before 'j'
   12 |     for(int j = 0; j <n j++)M[i][j]=0;
      |                        ^~
      |                        ;
a.cc:27:12: error: 'cout' was not declared in this scope
   27 |       if(j)cout << " ";
      |            ^~~~
a.cc:27:12: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:28:7: error: 'cout' was not declared in this scope
   28 |       cout << M[i][j];
      |       ^~~~
a.cc:28:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:30:5: error: 'cout' was not declared in this scope
   30 |     cout << endl;
      |     ^~~~
a.cc:30:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:30:13: error: 'endl' was not declared in this scope
   30 |     cout << endl;
      |             ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #iunclude<iostream>
Language: C++

#define scanf_s scanf
#include <string>
#include <stdio.h>
#include <math.h>
#include <stack>
#include <queue>
#include <list>
#include <vector>
#include <iostream>
using namespace std;

#define MAX 100
//#define MAX_ 1000
int time = 0;
int main(void)
{
	int G[MAX][MAX] = { false };
	int n, u, k, v;
	scanf_s("%d", &n);
	for (int i = 0; i < n; ++i) {
		scanf_s("%d %d", &u, &k);
		for (int j = 0; j < k; ++j) {
			scanf_s("%d", &v);
			G[u - 1][v - 1] = true;
		}
	}
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < n; ++j) {
			if (j != 0) printf(" ");
			printf("%d", G[i][j]);
		}
		if (i != n - 1) printf("\n");
	}
}

Compiler output:
a.cc:14:5: error: 'int time' redeclared as different kind of entity
   14 | int time = 0;
      |     ^~~~
In file included from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
                 from /usr/include/c++/14/ext/atomicity.h:35,
                 from /usr/include/c++/14/bits/ios_base.h:39,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:9:
/usr/include/time.h:76:15: note: previous declaration 'time_t time(time_t*)'
   76 | extern time_t time (time_t *__timer) __THROW;
      |               ^~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
    int n;
    cin >> n;
    vector<vector<int> > a(n, vector<int>(n, 0));
    for (int i=0; i<n; i++) {
        int u, k, v;
        cin >> u;
        for (int j=0; j<k; j++) {
            cin >> v;
            a[u-1][v-1] = 1;
        }
    }
    
    for (int i=0; i<n; i++) {
        for (int j=0; j<n-1; j++) {
            cout << a[i][j] << " ";
        }
        cout << a[i][n-1] << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'vector' was not declared in this scope
    7 |     vector<vector<int> > a(n, vector<int>(n, 0));
      |     ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:7:19: error: expected primary-expression before 'int'
    7 |     vector<vector<int> > a(n, vector<int>(n, 0));
      |                   ^~~
a.cc:13:13: error: 'a' was not declared in this scope
   13 |             a[u-1][v-1] = 1;
      |             ^
a.cc:19:21: error: 'a' was not declared in this scope
   19 |             cout << a[i][j] << " ";
      |                     ^
a.cc:21:17: error: 'a' was not declared in this scope
   21 |         cout << a[i][n-1] << endl;
      |                 ^
Language: C++

#include<iostream>
using namespace std;
int main(){
    int N;
    int u[101],k[101],a[101],d[101][101];
    memset(d,0,sizeof(d));
    cin>>N;
    for(int i=0;i<N;++i){
        cin>>u[i]>>k[i];
        for(int j=0;j<k[i];++j){
            cin>>a[j];
            d[u[i]][a[j]]=1;
        }
        for(int m=1;m<=N;++m){
            cout<<d[i][m]<<' ';
        }
        cout<<endl;
    }
}
#include<iostream>
using namespace std;
int main(){
    int N;
    int u[101],k[101],a[101],d[101][101];
    memset(d,0,sizeof(d));
    cin>>N;
    for(int i=0;i<N;++i){
        cin>>u[i]>>k[i];
        for(int j=0;j<k[i];++j){
            cin>>a[j];
            d[u[i]][a[j]]=1;
        }
        for(int m=1;m<=N;++m){
            cout<<d[i][m]<<' ';
        }
        cout<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'memset' was not declared in this scope
    6 |     memset(d,0,sizeof(d));
      |     ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
a.cc: At global scope:
a.cc:22:5: error: redefinition of 'int main()'
   22 | int main(){
      |     ^~~~
a.cc:3:5: note: 'int main()' previously defined here
    3 | int main(){
      |     ^~~~
a.cc: In function 'int main()':
a.cc:25:5: error: 'memset' was not declared in this scope
   25 |     memset(d,0,sizeof(d));
      |     ^~~~~~
a.cc:25:5: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;

int g[100][100];
int main(){
	int n;cin>>n;
	rep(i,n){
		int u,k;cin>>u>>k;u--;
		rep(j,k){
			int v;cin>>v;v--;
			g[u][v]=1;
		}
	}
	rep(i,n){
		rep(j,n){
			if(j)cout<<" ";
			cout<<a[i][j];
		}
		cout<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:31: error: 'a' was not declared in this scope
   18 |                         cout<<a[i][j];
      |                               ^
Language: C++

#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;

int g[100][100];
int main(){
	int n;cin>>n;
	rep(i,n){
		int u,k;cin>>u>>k;u--;
		rep(j,k){
			int v;cin>>v;v--;
			g[u][v]=1;
		}
	}
	rep(i,n){
		rep(j,n){
			if(j)cout<<" ";
			cout<<[i][j];
		}
		cout<<endl;
	}
}

Compiler output:
a.cc: In lambda function:
a.cc:18:34: error: expected '{' before '[' token
   18 |                         cout<<[i][j];
      |                                  ^
a.cc: In function 'int main()':
a.cc:18:34: error: no match for 'operator[]' (operand types are 'main()::<lambda()>' and 'int')
Language: C++

#include <iostream>
using namespace std;
static const int N = 100;

int main() {
	int N[N][N];
	int n, u, k, v, i, j;

	cin >> n;

	for ( i = 0; i < n; i++ ) {
		for ( j = 0; j < n; j++ ) {
			M[i][j] = 0;
		}
	}

	for ( i = 0; i < n; i++ ) {
		cin >> u >> k;
		u--;
		for ( j = 0; j < k; j++ ) {
			scanf("%d", &v);
			v--;
			M[u][v] = 1;
		}
	}

	for ( i = 0; i < n; i++ ) {
		for ( j = 0; j < n; j++ ) {
			if( j ) cout << " ";
			cout << M[i][j];
		}
		cout << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: 'M' was not declared in this scope
   13 |                         M[i][j] = 0;
      |                         ^
a.cc:23:25: error: 'M' was not declared in this scope
   23 |                         M[u][v] = 1;
      |                         ^
a.cc:30:33: error: 'M' was not declared in this scope
   30 |                         cout << M[i][j];
      |                                 ^
Language: C++

#include <iostream>

#define REP(i,n) for (int i=0;i<(n);i++)
using namespace std;

int n;
typedef vector<vector<int> > AdjMatrix;
AdjMatrix graph;


int main()
{
    int u,k,v;
    cin >> n;
    graph = AdjMatrix(n, vector<int>(n, 0));
    REP(i,n){
        cin >> u >> k;
        REP(j,k){
            cin >> v;
            graph[u-1][v-1] = 1;
        }
    }


    REP(i, n){
        REP(j, n){
            cout << graph[i][j] << " ";
        }
        cout << endl;
    }
    return 0;
}

Compiler output:
a.cc:7:9: error: 'vector' does not name a type
    7 | typedef vector<vector<int> > AdjMatrix;
      |         ^~~~~~
a.cc:8:1: error: 'AdjMatrix' does not name a type
    8 | AdjMatrix graph;
      | ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:15:5: error: 'graph' was not declared in this scope; did you mean 'isgraph'?
   15 |     graph = AdjMatrix(n, vector<int>(n, 0));
      |     ^~~~~
      |     isgraph
a.cc:15:26: error: 'vector' was not declared in this scope
   15 |     graph = AdjMatrix(n, vector<int>(n, 0));
      |                          ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | 
a.cc:15:33: error: expected primary-expression before 'int'
   15 |     graph = AdjMatrix(n, vector<int>(n, 0));
      |                                 ^~~
a.cc:15:13: error: 'AdjMatrix' was not declared in this scope
   15 |     graph = AdjMatrix(n, vector<int>(n, 0));
      |             ^~~~~~~~~
Language: C++

#include <iostream>
using namespace std;
static const int N=100;

int main(){
    //0 0 ??????????????\??????
    int M[N][N];
    int n,u,k,v;

    cin>>n;

    for(int i=0;i<n;i++)
        for(int j=0;j<n;j++)
            N[i][j]=0;

    for(int i=0;i<n;i++){
        cin>>u>>k;
        //??¬??¢???0??????
        u--;
        for(int j=0;j<k;j++){
            cin>>v;
            //??¬??¢???0??????
            v--;
            //??¨u???v?????´????????????
            M[u][v]=1;
        }
    }

    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            if(j)
                cout<<" ";
            cout<<M[i][j];
        }
        cout<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: invalid types 'const int[int]' for array subscript
   14 |             N[i][j]=0;
      |              ^
Language: C++

int main(){
    int n;
    cin >> n;
    vector<vector<int> > A(n, vector<int>(n, 0));
    for(int i=0; i<n; ++i){
        int k;
        cin >> k;
        // 1~n???index?????¨????????????????????????????????????1????????????0~n-1????????????
        k -= 1;
        int u;
        cin >> u;
        for(int j=0; j<u; ++j){
            int v;
            cin >> v;
            v -= 1;
            A[k][v] = 1;
        }
    }
    
    for(int i=0; i<n; ++i){
        for(int j=0; j<n; ++j){
            cout << A[i][j] << " ";
        }
        cout << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> n;
      |     ^~~
a.cc:4:5: error: 'vector' was not declared in this scope
    4 |     vector<vector<int> > A(n, vector<int>(n, 0));
      |     ^~~~~~
a.cc:4:19: error: expected primary-expression before 'int'
    4 |     vector<vector<int> > A(n, vector<int>(n, 0));
      |                   ^~~
a.cc:16:13: error: 'A' was not declared in this scope
   16 |             A[k][v] = 1;
      |             ^
a.cc:22:13: error: 'cout' was not declared in this scope
   22 |             cout << A[i][j] << " ";
      |             ^~~~
a.cc:22:21: error: 'A' was not declared in this scope
   22 |             cout << A[i][j] << " ";
      |                     ^
a.cc:24:9: error: 'cout' was not declared in this scope
   24 |         cout << endl;
      |         ^~~~
a.cc:24:17: error: 'endl' was not declared in this scope
   24 |         cout << endl;
      |                 ^~~~
Language: C++

#include <iostream>

int main(){
	int n,k,u,v;
	bool G[100][100] = {};
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>u>>k;
		for(int j=0;j<k;j++){
			cin>>v;
			G[u-1][v-1]=1;
		}
	}

	for(int i=0;i<n;i++){
		for(int j=0;j<n;j++){
			cout<<G[i][j];
			if(j<n-1)cout<<" ";
		}
		cout<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin>>n;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:17:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |                         cout<<G[i][j];
      |                         ^~~~
      |                         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:20:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 |                 cout<<endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:20:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   20 |                 cout<<endl;
      |                       ^~~~
      |                       std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++


#include<iostream>
using namespace std;

//??£??\?????????????¬??????????????¨???¶???	array[i][j] i??????j???????????????
//??£??\?????????????????????????????????????????????,?????????????¨???¶
//ALDS1_11-A
int n,u,k,a;
int map[101][101];
int main(){
	for(int i=0;i<101;i++){
		for(int j=0;j<101;j++){
			map[i][j]=0;
		}
	}
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>u;
		cin>>k;
		for(int j=0;j<k;j++){
			cin>>a;
			map[u][a]=1;
		}
	}
	for(int i=1;i<n+1;i++){
		for(int j=1;j<n+1;j++){
			cout<<map[i][j];
			if(j!=n) cout<<" ";
			if(j==n&) cout<<endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:33: error: expected primary-expression before ')' token
   29 |                         if(j==n&) cout<<endl;
      |                                 ^
Language: C++

#include<iostream>

using namespace std;

#define ll long long

int main(){
    ll n, u, k, v;
    cin >> n;
    ll A[n][n];
    for (ll i=0; i<n; i++){
        for(ll j=0; j<n; j++){
            A[i][j] = 0;
        }
    }
    for(ll i=0; i<n; i++){
        cin >> u;
        cin >> k;
        for(ll j=0; j<k; j++){
            cin >> v;
            A[u-1][v-1] = 1;
        }
    }

    for (ll i=0; i<n; i++){
        for(ll j=0; j<n; j++){
            cout << A[i][j];
            if(j<n-1){
                cout << ' ';
            }
        }
        cout << '\n';
        }
    }
}

Compiler output:
a.cc:35:1: error: expected declaration before '}' token
   35 | }
      | ^
Language: C++

#include<iostream>
#include<queue>
using namespace std;
void bfs(int src)
{
  queue<int>Q;
  Q.
}

int main()
{
  int n,u,k,v,**M;
  cin>>n;
  M=new int*[n];
  for(int i=0;i<n;i++)
    {
      M[i]=new int[n];
      for(int j=0;j<n;j++)
	M[i][j]=0;
    }
  int count=0;
  while(count<n)
    {
      count++;
      cin>>u>>k;
      for(int i=0;i<k;i++)
	{
	  cin>>v;
	  M[u-1][v-1]=1;
	}
    }
  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++)
      cout<<' '<<M[i][j];
    cout<<endl;
  }
  delete M;
}

Compiler output:
a.cc: In function 'void bfs(int)':
a.cc:8:1: error: expected unqualified-id before '}' token
    8 | }
      | ^
Language: C++

#include<iostream>

using namespace std;
 
void main() {
	int Adj[100][100];
	int n, u, k, v;
	cin >> n;

	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			Adj[i][j] = 0;
		}
	}
	for (int i = 0; i < n; i++) {
		cin >> u >> k;
		u--;
		for (int j = 0; j < k; j++) {
			cin >> v;
			v--;
			Adj[u][v] = 1;
		}
	}
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			if (j != 0) cout << " ";
			cout << Adj[i][j];
		}
		cout << endl;
	}
}
	

Compiler output:
a.cc:5:1: error: '::main' must return 'int'
    5 | void main() {
      | ^~~~