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

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define ull unsigned long long int
#define Endl endl
#define mod  1000000007
#define mkp make_pair
#define pb push_back
#define cin(n) scanf("%d",&n)
#define cout(n) printf("%d ",n)
#define sf(n) scanf("%d",&n)
#define pf(n) printf("%d ",n)
#define bitget(n) __builtin_popcountll(n)
#define maxi 500111

ll dx[] = {1,1,0,-1,-1,-1,0,1};
ll dy[] = {0,-1,-1,-1,0,1,1,1};
ll dxx[] = {1,-1,0,0};
ll dyy[] = {0,0,-1,1};
ll modexpo(ll x,ll y){if(y==0)return 1;if(y%2){ll viky=modexpo(x,y/2);
return (((x*viky)%mod)*viky)%mod;}else{ll viky=modexpo(x,y/2);return (viky*viky)%mod;
}}
ll intpoint(ll x1, ll y1, ll x2, ll y2) { return ( __gcd(abs(x1-x2),abs(y1-y2))+1); }
bool isvalid(ll x,ll y,ll n,ll m) { return (x>=0&&x<n&&y>=0&&y<m); }
// mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
// int pp = uniform_int_distribution<int>(0, kk-1)(rng);
// ---------------------///////////////---------------------------------
// ---------------------///////////////----------------------------------
// -------------/////////////////---------------------------------///////

ll ap[1900];

int main() {
   
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    ll n,m;

    cin>>n>>m;

    for(ll i=0;i<n;i++){
      cin>>k;
      for(ll j=0;j<k;j++){
        cin>>l;
        ap[l]++;
      }
    }
    ll ans = 0;
    for(ll i = 1;i<=m;i++){
      if(ap[i] == n){
        ans++;
      }
    }

    cout<<ans;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:12: error: 'k' was not declared in this scope
   43 |       cin>>k;
      |            ^
a.cc:45:14: error: 'l' was not declared in this scope
   45 |         cin>>l;
      |              ^
Language: C++

#include <iostream>
using namespace std ;
int main () {
	int N , M ;
	cin >> N >> M ;
	vector <int> cnt (M);
	for ( int i = 0; i < N ; ++ i ) {
		int K;
 		cin >> K ;
		for ( int j = 0; j < K ; ++ j ) {
			int A; cin >> A ;
  			--A ;
			cnt [ A ]++;
		}
	}
	int ans = 0;
	for ( int i = 0; i < M ; ++ i ) {
		if ( cnt [ i ] == N ) {
			++ ans ;
		}
	}
	cout << ans << endl ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'vector' was not declared in this scope
    6 |         vector <int> cnt (M);
      |         ^~~~~~
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:6:17: error: expected primary-expression before 'int'
    6 |         vector <int> cnt (M);
      |                 ^~~
a.cc:13:25: error: 'cnt' was not declared in this scope; did you mean 'int'?
   13 |                         cnt [ A ]++;
      |                         ^~~
      |                         int
a.cc:18:22: error: 'cnt' was not declared in this scope; did you mean 'int'?
   18 |                 if ( cnt [ i ] == N ) {
      |                      ^~~
      |                      int
Language: C++

# include < bits / stdc ++. h >
using namespace std ;
int main () {
	int N , M ;
	cin >> N >> M ;
	vector <int> cnt (M);
	for ( int i = 0; i < N ; ++ i ) {
		int K;
 		cin >> K ;
		for ( int j = 0; j < K ; ++ j ) {
			int A; cin >> A ;
  			--A ;
			cnt [ A ]++;
		}
	}
	int ans = 0;
	for ( int i = 0; i < M ; ++ i ) {
		if ( cnt [ i ] == N ) {
			++ ans ;
		}
	}
	cout << ans << endl ;
}

Compiler output:
a.cc:1:11: fatal error:  bits / stdc ++. h : No such file or directory
    1 | # include < bits / stdc ++. h >
      |           ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>
#include <math.h>

int main(void){
  int n, m, i, j, z;
  scanf("%d %d", &n, &m);
  int k[n], a[n][m], count[m]={0};
  for(i=0; i<n; i++){
   scanf("%d", &k[i]);
   for(j=0; j<k[i]; j++){
   	scanf("%d", &a[i][j]);
    for(z=0; z<m; z++){
      if(z==a[i][j]){
        count[z]++;
      }
    }
   }
  }

  int s=0;
  for(z=0; z<m; z++){
    if(count[z]==n){
      s++;
    }
  }

  printf("%d", s);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:31: error: variable-sized object may not be initialized except with an empty initializer
    7 |   int k[n], a[n][m], count[m]={0};
      |                               ^
Language: C++

n,m = map(int, input().split())
res = set(range(1, m+1))
for i in range(n):
    a, *b = map(int, input().split())
    res &= set(b)
print(len(res))


Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n,m = map(int, input().split())
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m,k,a,res=0;
  cin>>n>>m;
  map<int,int> m;
  for(int i=0;i<n;++i){
    cin>>k;
    for(int j=0;j<k;++j){
      cin>>a;
      m[a]++;
    }
  }
  cout<<m.count(n);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: conflicting declaration 'std::map<int, int> m'
    6 |   map<int,int> m;
      |                ^
a.cc:4:9: note: previous declaration as 'int m'
    4 |   int n,m,k,a,res=0;
      |         ^
a.cc:11:8: error: invalid types 'int[int]' for array subscript
   11 |       m[a]++;
      |        ^
a.cc:14:11: error: request for member 'count' in 'm', which is of non-class type 'int'
   14 |   cout<<m.count(n);
      |           ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m,k,a,res=0;
  cin>>n>>m;
  vector<bool> v(m,true);
  for(int i=0;i<n;++i){
    vector<bool> u(m,false);
    cin>>k;
    for(int j=0;j<k;++j){
      cin>>a;
      u[a-1]=true;
    }
    for(int j=0;j<k;++j)v[j]&&=u[j];
  }
  for(int i=0;i<n;++i)res+=v[i];
  cout<<res;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:31: error: expected primary-expression before '=' token
   14 |     for(int j=0;j<k;++j)v[j]&&=u[j];
      |                               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    int N,M;
    cin>>N>>M;
    vector<int> count(M);
    for(int i = 0; i < N; i++)
    {
        int K;cin>>K;
        for(int j = 0; j < K; j++)
        {
            int A;cin>>A;--A;
            ++count.at[A];
        }
        
    }
    int ans=0;
    for(int i = 0; i <M; i++)
    {
        if (count.at[i]==N) {
            ans++;
        }
        
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   14 |             ++count.at[A];
      |                       ^
a.cc:21:21: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   21 |         if (count.at[i]==N) {
      |                     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m;cin>>n>>m;
  vector<int> b(m,0);
  for(int i=0;i<n;i++){
    int k;cin>>k;
    for(int j=0;j<k;j++){
      int a;cin>>a;a++
      b[a]++;}}
  int ans=0;
  for(int i=0;i<n;i++){
    if(b[i]==n)ans++;}
  cout<<ans;}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: expected ';' before 'b'
    9 |       int a;cin>>a;a++
      |                       ^
      |                       ;
   10 |       b[a]++;}}
      |       ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m;cin>>n>>m;
  vector<int> b(m,0)
  for(int i=0;i<n;i++){
    int k;cin>>k;
    for(int j=0;j<k;j++){
      int a;cin>>a;
      b[a]++;}}
  int ans=0;
  for(int i=0;i<n;i++){
    if(b[i]==n)ans++;}
  cout<<ans;}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected ',' or ';' before 'for'
    6 |   for(int i=0;i<n;i++){
      |   ^~~
a.cc:6:15: error: 'i' was not declared in this scope
    6 |   for(int i=0;i<n;i++){
      |               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m,k,a,fav,cou;cin>>n>>m;
  for(int i=0;i<n;i++){
    cin>>k;
    for(int j=0;j<m;j++){
      cin>>a;
      fav++;}
    if(fav[i]==a)cou++;}
  cout<<cou;}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: invalid types 'int[int]' for array subscript
   10 |     if(fav[i]==a)cou++;}
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  int N, M;
  cin >> N >> M;
  vector<int> tmp(M, 0);
  for(int i=0; i<N; ++i){
    ll A, K;
    cin >> K;
    for(int j=0; j<K; ++j){
      cin >> A;
      tmp[A-1]++;
    }
  }
  int ans=0;
  for(int i=0; i<M; ++i){
    if(tmp[i]==N) ans++;
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'll' was not declared in this scope
    9 |     ll A, K;
      |     ^~
a.cc:10:12: error: 'K' was not declared in this scope
   10 |     cin >> K;
      |            ^
a.cc:12:14: error: 'A' was not declared in this scope
   12 |       cin >> A;
      |              ^
Language: C

#include<stdio.h>
#include<stdlib.h>
 
int main(){
	
	int m, n, a[30], b[30], i, j, k, count, o, d;
  
	scanf("%d %d", &n, &m);
  	for(i=0;i<n;++i)
  		scanf("%d", &k);
		for(j=0;j<k;i++){
    		scanf("%d", a[j]);
    	}
		if(i==0){
        	for(j=0;j<k;j++) b[j]=a[j];
          	o=k;
        	continue;
        }
    	for(j=0;a[j]!=0;j++){
        	for(k=0;b[k]!=0;k++){
            	if(a[j]==b[k]) break;
            }
          if(b[k]==0) a[j]=0;
        }
        for(j=0, d=0;j<count;j++){
        	if(a[j]!=0){
              b[d]=a[j];
              d++;
            }
        }    
          count=d;
          for(;d<o;++d) b[d]=0;
          o=d;
      	for(j=0;j<30;j++) a[j]=0;
    }
      printf("%d", o);
      
      return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:17: error: continue statement not within a loop
   17 |                 continue;
      |                 ^~~~~~~~
main.c: At top level:
main.c:36:14: error: expected declaration specifiers or '...' before string constant
   36 |       printf("%d", o);
      |              ^~~~
main.c:36:20: error: unknown type name 'o'
   36 |       printf("%d", o);
      |                    ^
main.c:38:7: error: expected identifier or '(' before 'return'
   38 |       return 0;
      |       ^~~~~~
main.c:39:1: error: expected identifier or '(' before '}' token
   39 | }
      | ^
Language: C

#include<stdio.h>
#include<stdlib.h>

int main(){
	
	int m, n, a[30], b[30], i, j, k, count, o, d;
  
	scanf("%d %d", &n, &m);
  	for(i=0;i<n;++i;)
  		scanf("%d", &k);
		for(j=0;j<k;i++){
    		scanf("%s", a[j]);
    	}
		if(i==0){
        	for(j=0;j<k;j++) b[j]=a[j];
          	o=k;
        	continue;
        }
    	for(j=0;a[j]!=0;j++){
        	for(k=0;b[k]!=0;k++){
            	if(a[j]==b[k]) break;
            }
          if(b[k]==0) a[j]=0;
        }
        for(j=0, d=0;j<count;j++){
        	if(a[j]!=0){
              b[d]=a[j];
              d++;
            }
        }    
          count=d;
          for(;d<o;++d) b[d]=0;
          o=d;
      	for(j=0;j<30;j++) a[j]=0;
    }
 
      printf("%d", count);
      
      return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:24: error: expected ')' before ';' token
    9 |         for(i=0;i<n;++i;)
      |            ~           ^
      |                        )
main.c:17:17: error: continue statement not within a loop
   17 |                 continue;
      |                 ^~~~~~~~
main.c: At top level:
main.c:37:14: error: expected declaration specifiers or '...' before string constant
   37 |       printf("%d", count);
      |              ^~~~
main.c:37:20: error: unknown type name 'count'
   37 |       printf("%d", count);
      |                    ^~~~~
main.c:39:7: error: expected identifier or '(' before 'return'
   39 |       return 0;
      |       ^~~~~~
main.c:40:1: error: expected identifier or '(' before '}' token
   40 | }
      | ^
Language: C

#include <stdio.h>
#include <math.h>
 
int check(int* x, int* b, int an, int bn,
          int q, int r, int i, int* d){
  while(q<=an && r<=bn){
    if(x[q]<b[r]){
      check(x, b, an, bn, q+1, r, i, d);
    }else if(x[q]==b[r]){
      d[i] = x[q];
      i++;
      check(x, b, an, bn, q, r, i, d);
    }else{
      check(x, b, an, bn, q, r+1, i, d);
    }
  };
  return i;
}
 
int main(void){
  int n, m, i, j, p;
  scanf("%d %d", &n, &m);
  int k[n];
  for(i=0; i<n; i++){
   scanf("%d", &k[i]);
   p = k[i];
   int a[i][p];
   for(j=0; j<p; j++){
   	scanf("%d", &a[i][j]);
   }
  }
  
  int c[n][m];
  int s = check(&a[0], &a[1], 
                  k[0], k[1], 0, 0, 0, &c[0]);
  for(i=1; i<n-1; i++){
    s = check(&c[i-1], &a[i+1],
                   s, k[i+1], 0, 0, 0, &c[i]);
  }
 
  printf("%d", s);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:34:18: error: 'a' undeclared (first use in this function)
   34 |   int s = check(&a[0], &a[1],
      |                  ^
main.c:34:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:35:40: error: passing argument 8 of 'check' from incompatible pointer type [-Wincompatible-pointer-types]
   35 |                   k[0], k[1], 0, 0, 0, &c[0]);
      |                                        ^~~~~
      |                                        |
      |                                        int (*)[m]
main.c:5:37: note: expected 'int *' but argument is of type 'int (*)[m]'
    5 |           int q, int r, int i, int* d){
      |                                ~~~~~^
main.c:37:15: error: passing argument 1 of 'check' from incompatible pointer type [-Wincompatible-pointer-types]
   37 |     s = check(&c[i-1], &a[i+1],
      |               ^~~~~~~
      |               |
      |               int (*)[m]
main.c:4:16: note: expected 'int *' but argument is of type 'int (*)[m]'
    4 | int check(int* x, int* b, int an, int bn,
      |           ~~~~~^
main.c:38:40: error: passing argument 8 of 'check' from incompatible pointer type [-Wincompatible-pointer-types]
   38 |                    s, k[i+1], 0, 0, 0, &c[i]);
      |                                        ^~~~~
      |                                        |
      |                                        int (*)[m]
main.c:5:37: note: expected 'int *' but argument is of type 'int (*)[m]'
    5 |           int q, int r, int i, int* d){
      |                                ~~~~~^
Language: C

#include<stdio.h>
#include<stdlib.h>
 
int split(char *p){
	return atoi(p);
}
 
int main(){
	
	int m, n, a[30], b[30], i, j, k, count, l, o, d;
  
	scanf("%d %d", &n, &m);
  	for(i=0;i<n;++i;)
  		scanf("%d", &k);
		for(j=0;j<k;i++){
    		scanf("%s", a[j]);
    	}
		if(i==0){
        	for(j=0;j<k;j++) b[j]=a[j];
          	o=k;
        	continue;
        }
    	for(j=0;a[j]!=0;j++){
        	for(l=0;b[l]!=0;l++){
            	if(a[j]==b[l]) break;
            }
          if(b[l]==0) a[j]=0;
        }
        for(j=0, d=0;j<count;j++){
        	if(a[j]!=0){
              b[d]=a[j];
              d++;
            }
        }    
          count=d;
          for(;d<o;++d) b[d]=0;
          o=d;
      	for(j=0;j<30;j++) a[j]=0;
    }
 
      printf("%d", count);
      
      return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:24: error: expected ')' before ';' token
   13 |         for(i=0;i<n;++i;)
      |            ~           ^
      |                        )
main.c:21:17: error: continue statement not within a loop
   21 |                 continue;
      |                 ^~~~~~~~
main.c: At top level:
main.c:41:14: error: expected declaration specifiers or '...' before string constant
   41 |       printf("%d", count);
      |              ^~~~
main.c:41:20: error: unknown type name 'count'
   41 |       printf("%d", count);
      |                    ^~~~~
main.c:43:7: error: expected identifier or '(' before 'return'
   43 |       return 0;
      |       ^~~~~~
main.c:44:1: error: expected identifier or '(' before '}' token
   44 | }
      | ^
Language: C

#include <stdio.h>
#include <math.h>
 
int check(int* x, int* b, int an, int bn,
          int q, int r, int i, int* d){
  do{
    if(x[q]<b[r]){
      check(x, b, an, bn, q+1, r, i, d);
    }else if(x[q]==b[r]){
      d[i] = x[q];
      i++;
      check(x, b, an, bn, q, r, i, d);
    }else{
      check(x, b, an, bn, q, r+1, i, d);
    }
  }while(q>an || r>bn);
 
  return i;
}
 
int main(void){
  int n, m, i, j;
  scanf("%d %d", &n, &m);
  int k[n];
  for(i=0; i<n; i++){
   scanf("%d", &k[i]);
   p = k[i];
   int a[i][p];
   for(j=0; j<p; j++){
   	scanf("%d", &a[i][j]);
   }
  }
  
  int c[n][m];
  int p = check(&a[0], &a[1], 
                  k[0], k[1], 0, 0, 0, &c[0]);
  for(i=1; i<n-1; i++){
    p = check(&c[i-1], &a[i+1],
                   p, k[i+1], 0, 0, 0, &c[i]);
  }
 
  printf("%d", p);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:27:4: error: 'p' undeclared (first use in this function)
   27 |    p = k[i];
      |    ^
main.c:27:4: note: each undeclared identifier is reported only once for each function it appears in
main.c:35:18: error: 'a' undeclared (first use in this function)
   35 |   int p = check(&a[0], &a[1],
      |                  ^
main.c:36:40: error: passing argument 8 of 'check' from incompatible pointer type [-Wincompatible-pointer-types]
   36 |                   k[0], k[1], 0, 0, 0, &c[0]);
      |                                        ^~~~~
      |                                        |
      |                                        int (*)[m]
main.c:5:37: note: expected 'int *' but argument is of type 'int (*)[m]'
    5 |           int q, int r, int i, int* d){
      |                                ~~~~~^
main.c:38:15: error: passing argument 1 of 'check' from incompatible pointer type [-Wincompatible-pointer-types]
   38 |     p = check(&c[i-1], &a[i+1],
      |               ^~~~~~~
      |               |
      |               int (*)[m]
main.c:4:16: note: expected 'int *' but argument is of type 'int (*)[m]'
    4 | int check(int* x, int* b, int an, int bn,
      |           ~~~~~^
main.c:39:40: error: passing argument 8 of 'check' from incompatible pointer type [-Wincompatible-pointer-types]
   39 |                    p, k[i+1], 0, 0, 0, &c[i]);
      |                                        ^~~~~
      |                                        |
      |                                        int (*)[m]
main.c:5:37: note: expected 'int *' but argument is of type 'int (*)[m]'
    5 |           int q, int r, int i, int* d){
      |                                ~~~~~^
Language: C

#include <stdio.h>
int main(void){
  int N = 0, M = 0;
  int cntM[31] = {0};
  int num = 0;
  int temp = 0;
  int suki = 0;
 
  if(scanf("%d%d", &N, &M) != 2){
    printf("error\n");
    exit(1);
  }
  
  for(int cnt = 0; cnt < N; cnt++){
    if(scanf("%d", &num) == 1){
      printf("error\n");
      exit(1):
    }
    for(int cnt_num = 0; cnt_num < num; cnt_num++){
      if(scanf("%d", &temp) == 1){
	    printf("error\n");
        exit(1):
      }
      cntM[temp]++;
    }
  }

  for(int cnt = 0; cnt < M; cnt++){
	  if(cntM[cnt] == N){
        suki++;
      }
  }	
  printf("%d", suki);
 return 0; 
}


Compiler output:
main.c: In function 'main':
main.c:11:5: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
   11 |     exit(1);
      |     ^~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
    1 | #include <stdio.h>
  +++ |+#include <stdlib.h>
    2 | int main(void){
main.c:11:5: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
   11 |     exit(1);
      |     ^~~~
main.c:11:5: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:17:7: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
   17 |       exit(1):
      |       ^~~~
main.c:17:7: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:17:14: error: expected ';' before ':' token
   17 |       exit(1):
      |              ^
      |              ;
main.c:22:9: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
   22 |         exit(1):
      |         ^~~~
main.c:22:9: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:22:16: error: expected ';' before ':' token
   22 |         exit(1):
      |                ^
      |                ;
Language: C

#include <stdio.h>
#include <math.h>
 
int check(int* a, int* b, int an, int bn,
          int q, int r, int i, int* d){
  do{
    if(a[q]<b[r]){
      check(a, b, an, bn, q+1, r, i, d);
    }else if(a[q]==b[r]){
      d[i] = a[q];
      i++;
      check(a, b, an, bn, q, r, i, d);
    }else{
      check(a, b, an, bn, q, r+1, i, d);
    }
  }while(q>an || r>bn);
 
  return i;
}
 
int main(void){
  int n, m, i, j, p;
  scanf("%d %d", &n, &m);
  int k[n];
  for(i=0; i<n; i++){
   scanf("%d", &k[i]);
   p = k[i];
   int a[i][p];
   for(j=0; j<p; j++){
   	scanf("%d", &a[i][j]);
   }
  }
  
  int c[n][m];
  int p = check(&a[0], &a[1], 
                  k[0], k[1], 0, 0, 0, &c[0]);
  for(i=1; i<n-1; i++){
    p = check(&c[i-1], &a[i+1],
                   p, k[i+1], 0, 0, 0, &c[i]);
  }
 
  printf("%d", p);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:35:7: error: redeclaration of 'p' with no linkage
   35 |   int p = check(&a[0], &a[1],
      |       ^
main.c:22:19: note: previous declaration of 'p' with type 'int'
   22 |   int n, m, i, j, p;
      |                   ^
main.c:35:18: error: 'a' undeclared (first use in this function)
   35 |   int p = check(&a[0], &a[1],
      |                  ^
main.c:35:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:36:40: error: passing argument 8 of 'check' from incompatible pointer type [-Wincompatible-pointer-types]
   36 |                   k[0], k[1], 0, 0, 0, &c[0]);
      |                                        ^~~~~
      |                                        |
      |                                        int (*)[m]
main.c:5:37: note: expected 'int *' but argument is of type 'int (*)[m]'
    5 |           int q, int r, int i, int* d){
      |                                ~~~~~^
main.c:38:15: error: passing argument 1 of 'check' from incompatible pointer type [-Wincompatible-pointer-types]
   38 |     p = check(&c[i-1], &a[i+1],
      |               ^~~~~~~
      |               |
      |               int (*)[m]
main.c:4:16: note: expected 'int *' but argument is of type 'int (*)[m]'
    4 | int check(int* a, int* b, int an, int bn,
      |           ~~~~~^
main.c:39:40: error: passing argument 8 of 'check' from incompatible pointer type [-Wincompatible-pointer-types]
   39 |                    p, k[i+1], 0, 0, 0, &c[i]);
      |                                        ^~~~~
      |                                        |
      |                                        int (*)[m]
main.c:5:37: note: expected 'int *' but argument is of type 'int (*)[m]'
    5 |           int q, int r, int i, int* d){
      |                                ~~~~~^
Language: C++

#include "pch.h"
#include <iostream>
using namespace std;

int main()
{
	int n, m, k, a, ans=0;
	cin >> n >> m;
	int num[30];

	for (int i = 0;i < 30;i++) {
		num[i] = 0;
	}

	for (int i = 0;i < n;i++) {
		cin >> k;
		for (int j = 0;j < k;j++) {
			cin >> a;
			num[a-1]++;
		}
	}
	for (int i = 0;i < m;i++) {
		if (num[i] == n) {
			ans++;
		}
	}

	cout << ans << endl;
}

Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: C

#include <stdio.h>
#include <math.h>
 
int check(int* a, int* b, int an, int bn,
          int q, int r, int i, int* d){
  do{
    if(a[q]<b[r]){
      check(a, b, an, bn, q+1, r, i, d);
    }else if(a[q]==b[r]){
      d[i] = a[q];
      i++;
      check(a, b, an, bn, q, r, i, d);
    }else{
      check(a, b, an, bn, q, r+1, i, d);
    }
  }while(q>an || r>bn);
 
  return i;
}
 
int main(void){
  int n, m, i, j, p;
  scanf("%d %d", &n, &m);
  int k[n];
  for(i=0; i<n; i++){
   scanf("%d", &k[i]);
   p = k[i];
   int a[i][p];
   for(j=0; j<p; j++){
   	scanf("%d", &a[i][j]);
   }
  }
  
  int c[n][m];
  int p = check(&a[0], &a[1], 
                  k[0], k[1], 0, 0, 0, &c[0]);
  for(i=1; i<n-1; i++){
    p = check(&c, &a[i+1],
                   p, k[i+1], 0, 0, 0, &c[i]);
  }
 
  printf("%d", p);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:35:7: error: redeclaration of 'p' with no linkage
   35 |   int p = check(&a[0], &a[1],
      |       ^
main.c:22:19: note: previous declaration of 'p' with type 'int'
   22 |   int n, m, i, j, p;
      |                   ^
main.c:35:18: error: 'a' undeclared (first use in this function)
   35 |   int p = check(&a[0], &a[1],
      |                  ^
main.c:35:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:36:40: error: passing argument 8 of 'check' from incompatible pointer type [-Wincompatible-pointer-types]
   36 |                   k[0], k[1], 0, 0, 0, &c[0]);
      |                                        ^~~~~
      |                                        |
      |                                        int (*)[m]
main.c:5:37: note: expected 'int *' but argument is of type 'int (*)[m]'
    5 |           int q, int r, int i, int* d){
      |                                ~~~~~^
main.c:38:15: error: passing argument 1 of 'check' from incompatible pointer type [-Wincompatible-pointer-types]
   38 |     p = check(&c, &a[i+1],
      |               ^~
      |               |
      |               int (*)[n][m]
main.c:4:16: note: expected 'int *' but argument is of type 'int (*)[n][m]'
    4 | int check(int* a, int* b, int an, int bn,
      |           ~~~~~^
main.c:39:40: error: passing argument 8 of 'check' from incompatible pointer type [-Wincompatible-pointer-types]
   39 |                    p, k[i+1], 0, 0, 0, &c[i]);
      |                                        ^~~~~
      |                                        |
      |                                        int (*)[m]
main.c:5:37: note: expected 'int *' but argument is of type 'int (*)[m]'
    5 |           int q, int r, int i, int* d){
      |                                ~~~~~^
Language: C

#include <stdio.h>

int main(void)
{
    int n, m, k, i, j, l = 0, a[100], empty, count = 0;
    
    scanf ("%d%d", &n, &m);
    for (i = 0; i < n; i++)
    {
        scanf ("%d", &k);
        for (j = 0; j < k; j++)
        {
            scanf ("%d", &a[l]);
            l++;
        }
    }

    for (i = 0; i < l; i++)
    {
        for (j = i; j <= l; j++)
        {
            if (a[j] > a[j + 1])
            {
                empty = a[j];
                a[j] = a[j + 1];
                a[j + 1] = empty;
            }
        }
    }

    for (i = 0; i < l; i++)
    {
        empty = 1;
        for (j = i; j < n; j++)
        {
            if (a[i] == a[j])
            {
                empty += 1;
            }
        }
        if (empty == n) count += 1;
    }
    if (n == 1)
    {
        printf ("%d", ]);
    }
    else
    {
        printf ("%d", count);
    }
    
    return (0);
}

Compiler output:
main.c: In function 'main':
main.c:45:23: error: expected expression before ']' token
   45 |         printf ("%d", ]);
      |                       ^
main.c:45:22: error: expected ';' before ']' token
   45 |         printf ("%d", ]);
      |                      ^~
      |                      ;
main.c:45:23: error: expected statement before ']' token
   45 |         printf ("%d", ]);
      |                       ^
main.c:45:24: error: expected statement before ')' token
   45 |         printf ("%d", ]);
      |                        ^
Language: Java

import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();
    int fs = sc.nextInt();
    Set set = new Set();
    for(int i=0;i<fs;i++){
    	set.add(sc.nextInt);
    }
    for(int i=0;i<N-1;i++){
      fs = sc.nextInt();
      for(int j=0;j<fs;j++){
        if(sc.

Compiler output:
Main.java:15: error: reached end of file while parsing
        if(sc.
              ^
1 error
Language: C++

#include<iostream>

using namespace std;

int main() {
	int N, M;
	int A[30][30];
	int K[30];
	int sub = 0, answer = 0;
	int i, j;
	cin >> N >> M;
	for (i = 0;i < N ;++i) {
		cin >> K[i];
		for (j = 0;j < K[i] ;++j)cin >> A[i][j];
	}
	for (i = 0;i < N ;++i) {
		for (j = 0;j < K[i] ;++j)
			for (int k = 0;k < N - i;++k)
				for(int h=0;h<K[i]-j;++h)
			{
				if (A[i][j] == A[i + k][j+h])++sub;
				if (sub == N)++answer;
			}
		
		if (N == 1)answer = K[0];
		cout << answer << endl;
		return 0;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:10: error: expected '}' at end of input
   28 |         }
      |          ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C

#include<stdio.h>
int main()
{
  int member=0;
  int food=0;
  int count=0;
  scanf("%d%d",&member,&food);
  printf("\n");
  //入力処理
  for(int i;i==0;i++)
  {
    int mem_food=0; //好きな食べ物の数
    int save_mem_food=0;
    scanf("%d",&mem_food);
    for(int j=0;j==mem_food;j++)
    {
      int like[mem_food]; //番目の格納
      scanf("%d",&like[j]);
    }
    
    printf("\n");
    int save[];
    for(int k=0;k==mem_food;k++)
    {
      for(int l=0;l==save_mem_food;l++)
      {
       if(like[k]=save[l])
       {
        count++;
       }
      }
    }
    save_mem_food=mem_food;
    save[save_mem_food]=like[mem_food];
    
  }
  
  printf("%d",count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:9: error: array size missing in 'save'
   22 |     int save[];
      |         ^~~~
main.c:27:11: error: 'like' undeclared (first use in this function)
   27 |        if(like[k]=save[l])
      |           ^~~~
main.c:27:11: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>

using namespace std;

int main() {
	int N, M;
	int A[30][30];
	int K[30];
	int sub = 0, answer = 0;
	int i, j;
	cin >> N >> M;
	for (i = 0;i < N ;++i) {
		cin >> K[i];
		for (j = 0;j < K[i] ;++j)cin >> A[i][j];
	}
	for (i = 0;i < N ;++i) {
		for (j = 0;j < K[i] ;++j)
			for (int k = 0;k < N - i;++k)
				for(int h=0;h<K[i]-j;++h)
			{
				if (A[i][j] == A[i + k][j+h])++sub;
				if (sub == N)++answer;
			}
		
		else if (N == 1)answer = K[0];
		cout << answer << endl;
		return 0;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:17: error: 'else' without a previous 'if'
   25 |                 else if (N == 1)answer = K[0];
      |                 ^~~~
Language: C

#include<stdio.h>
int main()
{
  int member=0;
  int food=0;
  int count=0;
  scanf("%d%d",&member,&food);
  printf("\n");
  //入力処理
  for(int i;i==0;i++)
  {
    int mem_food=0; //好きな食べ物の数
    int save_mem_food=0;
    scanf("%d",&mem_food);
    for(int j=0;j==mem_food;j++)
    {
      int like[]; //番目の格納
      scanf("%d",&like[j]);
    }
    
    printf("\n");
    int save[];
    for(int k=0;k==mem_food;k++)
    {
      for(int l=0;l==save_mem_food;l++)
      {
       if(like[k]=save[l])
       {
        count++;
       }
      }
    }
    save_mem_food=mem_food;
    save[]=like[];
    
  }
  
  printf("%d",count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:11: error: array size missing in 'like'
   17 |       int like[]; //番目の格納
      |           ^~~~
main.c:22:9: error: array size missing in 'save'
   22 |     int save[];
      |         ^~~~
main.c:27:11: error: 'like' undeclared (first use in this function)
   27 |        if(like[k]=save[l])
      |           ^~~~
main.c:27:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:34:10: error: expected expression before ']' token
   34 |     save[]=like[];
      |          ^
Language: C

#include <studio.h>
#include <math.h>
 
int check(int* a, int* b, int an, int bn, int q, int r){
  int i=0;
  do{
    if(a[q]<b[r]){
      check(&a, &b, an, bn, q+1, r);
    }else if(a[q]==b[r]){
      c[i] = a[q];
      i++;
      check(&a, &b, an, bn, q, r);
    }else{
      check(&a, &b, an, bn, q, r+1);
    }
  }while(q>an || r>bn);
 
  return c;
}
 
int main(void){
  int n, m, i, j, p;
  scanf("%d %d", &n, &m);
  int k[n];
  for(i=0; i<n; i++){
   scanf("%d", &k[i]);
   p = k[i];
   int a[i][p];
   for(j=0; j<p; j++){
   	scanf("%d", &a[i][j]);
   }
   for( ;j<m; j++){
     a[i][j] = 0;
   }
  }
 
  int* c= check(&a[0], &a[1], 
                  k[0], k[1], 0, 0);
  for(i=1; i<n-1; i++){
    int cn = sizeof(c)/sizeof(c[0]);
    int* c = check(&c, &a[i+1], cn, k[i+1], 0, 0);
  }
  
  int cn = sizeof(c)/sizeof(c[0]);
  printf("%d", cn);
  return 0;
}

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

#include <studio.h>
#incude <math.h>

int check(int* a, int* b, int an, int bn, int q, int r){
  int i=0;
  do{
    if(a[q]<b[r]){
      check(&a, &b, an, bn, q+1, r);
    }else if(a[q]==b[r]){
      c[i] = a[q];
      i++;
      check(&a, &b, an, bn, q, r);
    }else{
      check(&a, &b, an, bn, q, r+1);
    }
  }while(q>an || r>bn);

  return c;
}

int main(void){
  int n, m, i, j, p;
  scanf("%d %d", &n, &m);
  int k[n];
  for(i=0; i<n; i++){
   scanf("%d", &k[i]);
   p = k[i];
   int a[i][p];
   for(j=0; j<p; j++){
   	scanf("%d", &a[i][j]);
   }
   for( ;j<m; j++){
     a[i][j] = 0;
   }
  }
 
  int* c= check(&a[0], &a[1], 
                  k[0], k[1], 0, 0);
  for(i=1; i<n-1; i++){
    int cn = sizeof(c)/sizeof(c[0]);
    int* c = check(&c, &a[i+1], cn, k[i+1], 0, 0);
  }
  
  int cn = sizeof(c)/sizeof(c[0]);
  printf("%d", cn);
  return 0;
}

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

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define LINE_BUF_SIZE 1024
#define NUM_MAX 30
#define NUM_MIN 1

int main(void)
{
   static char line[LINE_BUF_SIZE];
   int studiedNum;
   int foodKind;
   int initialized = 0;
   int likeFoodNum = 0;
   int likeArray[30] = {};
   int result = 0;

   while (fgets(line, sizeof(line), stdin) != NULL)
   {
      if (initialized == 0)
      {
         studiedNum = atoi(strtok(line, " "));
         foodKind = atoi(strtok(NULL, " "));
         initialized = 1;
      }
      else
      {
         likeFoodNum = atoi(strtok(line, " "));
         for (i = 0; i < likeFoodNum; i++)
         {
            likeFood = atoi(strtok(NULL, " "));
            likeArray[likeFood] += 1;
         }
      }
   }
   for (i = 0; i < 30; i++)
   {
      if (likeArray[i] == studiedNum)
      {
         result += 1;
      }
   }

   printf("%d", result);
   return EXIT_SUCCESS;
}

Compiler output:
main.c: In function 'main':
main.c:30:15: error: 'i' undeclared (first use in this function)
   30 |          for (i = 0; i < likeFoodNum; i++)
      |               ^
main.c:30:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:32:13: error: 'likeFood' undeclared (first use in this function); did you mean 'likeFoodNum'?
   32 |             likeFood = atoi(strtok(NULL, " "));
      |             ^~~~~~~~
      |             likeFoodNum
Language: C++

#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <functional>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <cassert>
#define SIZE 200005
#define INF 1000000000000000LL
 
using namespace std;
typedef long long int ll;
typedef pair <int,int> P;
ll mat[SIZE][SIZE],A[SIZE]
 
int main()
{
  int N,M,cnt=0;
  scanf("%d%d",&N,&M);
  for(int i=0;i<N;i++) for(int i=0;i<M+1;i++) mat[M][N]=0;
  for(int i=0;i<M;i++) A[M]=1;
  for(int i=0;i<N;i++) 
  {
    scanf("%d",mat[0][i]);
    for(int j=1;j<=mat[0][i];jj++) scanf("%d",mat[j][i]);
  }
  for(int i=0;i<N;i++)
  {
    for(int i=1;i<M+1;i++) A[mat[M][N]]+=1; 
  }
  for(int i=0;i<M;i++) if(A[M]==N) cnt++;
  pritnf("%d",cnt);
  return 0;
}

Compiler output:
a.cc:21:1: error: expected initializer before 'int'
   21 | int main()
      | ^~~
Language: C++

#include<iostream>
#include<vector>

using namespace std;

int main()
{
  int n,m;
  cin >> n >> m;
  vector<int> c(m)={};
  for(int i=0;i<n;i++)
  {
    int k;
    cin >> k;
    for(int j=0;j<k;j++)
    {
      int a;
      cin >> a;
      c[a-1]++;
    }
  }
  int ans=0;
  for(int i=0;i<m;i++)
    if(c[i]==n)ans++;
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: expected ',' or ';' before '=' token
   10 |   vector<int> c(m)={};
      |                   ^
Language: C++

#include<iostream>
#include<vector>

using namespace std;

int main()
{
  int n,m;
  cin >> n >> m;
  vector<int> count(m)={};
  for(int i=0;i<n;i++)
  {
    int k;
    cin >> k;
    for(int j=0;j<k;j++)
    {
      int a;
      cin >> a;
      count[a-1]++;
    }
  }
  int ans=0;
  for(int i=0;i<m;i++)
    if(count[i]==n)ans++;
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: expected ',' or ';' before '=' token
   10 |   vector<int> count(m)={};
      |                       ^
Language: C++

#include<iostream>

using namespace std;

int main()
{
  int n,m;
  cin >> n >> m;
  vector<int> count(m)={};
  for(int i=0;i<n;i++)
  {
    int k;
    cin >> k;
    for(int j=0;j<k;j++)
    {
      int a;
      cin >> a;
      count[a-1]++;
    }
  }
  int ans=0;
  for(int i=0;i<m;i++)
    if(count[i]==n)ans++;
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'vector' was not declared in this scope
    9 |   vector<int> count(m)={};
      |   ^~~~~~
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:9:10: error: expected primary-expression before 'int'
    9 |   vector<int> count(m)={};
      |          ^~~
a.cc:18:7: error: 'count' was not declared in this scope
   18 |       count[a-1]++;
      |       ^~~~~
a.cc:23:8: error: 'count' was not declared in this scope
   23 |     if(count[i]==n)ans++;
      |        ^~~~~
Language: Java

public class Main {

	public static void main(String[] args) {
		final Scanner in = new Scanner(System.in);
		final int n = in.nextInt(), m = in.nextInt();

		if (n == 1) {
			System.out.println(in.nextInt());
			return;
		} else {
			// boolean result = true;

			List<Integer> array = new ArrayList<>();

			int k = in.nextInt();
			for (int j = 0; j < k; j++) {
				array.add(in.nextInt());
			}

			// array.forEach(System.out::println);

			boolean smallResult = false;
			List<Integer> smallResultList = new ArrayList<>();

			for (int i = 0; i < n - 1; i++) {
				smallResultList.clear();

				k = in.nextInt();
				for (int j = 0; j < k; j++) {
					int a = in.nextInt();

					if (array.contains(a)) {
						smallResult = true;
						smallResultList.add(a);
					} else {
						smallResult = false;
					}
				}

				// System.out.println("");
				// smallResultList.forEach(System.out::print);

				if (!smallResult) {
					System.out.println(0);
					return;
				}
				array.removeIf(number -> !smallResultList.contains(number));
			}

			if (smallResult) System.out.println("SIZE: " + array.size());
		}
	}

}

Compiler output:
Main.java:4: error: cannot find symbol
		final Scanner in = new Scanner(System.in);
		      ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		final Scanner in = new Scanner(System.in);
		                       ^
  symbol:   class Scanner
  location: class Main
Main.java:13: error: cannot find symbol
			List<Integer> array = new ArrayList<>();
			^
  symbol:   class List
  location: class Main
Main.java:13: error: cannot find symbol
			List<Integer> array = new ArrayList<>();
			                          ^
  symbol:   class ArrayList
  location: class Main
Main.java:23: error: cannot find symbol
			List<Integer> smallResultList = new ArrayList<>();
			^
  symbol:   class List
  location: class Main
Main.java:23: error: cannot find symbol
			List<Integer> smallResultList = new ArrayList<>();
			                                    ^
  symbol:   class ArrayList
  location: class Main
6 errors
Language: C++

#include<iostream>

using namespace std;

int main() {
	int N, M;
	int A[30][30];
	int K[30];
	int sub = 0, answer = 0;
	int i, j;
	cin >> N >> M;
	for (i = 1;i < N + 1;++i) {
		cin >> K[i];
      	for(j=1;j<K[i]+1;++j)cin>>A[i][j];
	}
	for (i = 1;i < N + 1;++i) {
		for (j = 1;j < K[i]+ 1;++j)
			for (int k = 0;k < N-i;++k)
			{
				if (A[i][j] == A[i + k][j])++sub;
			}
		if (sub == N)++answer;
		cout << answer << endl;
		return 0;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:10: error: expected '}' at end of input
   25 |         }
      |          ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C

#include<stdio.h>
#include<stdlib.h>
 
int split(char *p){
	return atoi(*p);
}
 
int main(){
	
	int m, n, a[30], b[30], i, j, k, count, l, o, d;
	char c[200];
  
	scanf("%d %d", &n, &m);
	for(i=0;i<n;i++){
    	scanf("%s", c);
      	k=atoi(c);
    	for(j=0, count=0;count<k;j++){
    		if(c[j]==' '){
              j++;
              a[count]=split(c+i);
              ++count;
            }
        }
		if(i==0){
        	for(j=0;j<k;j++) b[j]=a[j];
          	o=k;
        	continue;
        }
    	for(j=0;a[j]!=0;j++){
        	for(l=0;b[l]!=0;l++){
            	if(a[j]==b[l]) break;
            }
          if(b[l]==0) a[j]=0;
        }
        for(j=0, d=0;j<count;j++){
        	if(a[j]!=0){
              b[d]=a[j];
              d++;
            }
        }    
          count=d;
          for(;d<o;++d) b[d]=0;
          o=d;
      	for(j=0;j<30;j++) a[j]=0;
    }
 
      printf("%d", count);
      
      return 0;
}
#include<stdio.h>
#include<stdlib.h>
 
int split(char *p){
	return atoi(p);
}
 
int main(){
	
	int m, n, a[30], b[30], i, j, k, count, l, o, d;
	char c[200];
  
	scanf("%d %d", &n, &m);
	for(i=0;i<n;i++){
    	scanf("%s", c);
      	k=atoi(c);
    	for(j=0, count=0;count<k;j++){
    		if(c[j]==' '){
              j++;
              a[count]=split(c+i);
              ++count;
            }
        }
		if(i==0){
        	for(j=0;j<k;j++) b[j]=a[j];
          	o=k;
        	continue;
        }
    	for(j=0;a[j]!=0;j++){
        	for(l=0;b[l]!=0;l++){
            	if(a[j]==b[l]) break;
            }
          if(b[l]==0) a[j]=0;
        }
        for(j=0, d=0;j<count;j++){
        	if(a[j]!=0){
              b[d]=a[j];
              d++;
            }
        }    
          count=d;
          for(;d<o;++d) b[d]=0;
          o=d;
      	for(j=0;j<30;j++) a[j]=0;
    }
 
      printf("%d", count);
      
      return 0;
}
提出情報

Compiler output:
main.c: In function 'split':
main.c:5:21: error: passing argument 1 of 'atoi' makes pointer from integer without a cast [-Wint-conversion]
    5 |         return atoi(*p);
      |                     ^~
      |                     |
      |                     char
In file included from main.c:2:
/usr/include/stdlib.h:105:30: note: expected 'const char *' but argument is of type 'char'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
main.c: At top level:
main.c:54:5: error: redefinition of 'split'
   54 | int split(char *p){
      |     ^~~~~
main.c:4:5: note: previous definition of 'split' with type 'int(char *)'
    4 | int split(char *p){
      |     ^~~~~
main.c:58:5: error: redefinition of 'main'
   58 | int main(){
      |     ^~~~
main.c:8:5: note: previous definition of 'main' with type 'int()'
    8 | int main(){
      |     ^~~~
main.c:101:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
  101 | 提出情報
      | ^~~~~~~~
Language: C++

#include<iostream>

using namespace std;

int main() {
	int N, M;
	int A[30];
	int K[30];
	int sub = 0, answer = 0;
	int i, j;
	cin >> N >> M;
	for (i = 1;i < N + 1;++i) {
		cin >> K[i];
      	int sum=K[i];
      	for(j=1;j<sum+1;++j)cin>>A[j];
	}
	for (i = 1;i < N + 1;++i) {
		for (j = 1;j < sum+ 1;++j)
			for (int k = 0;k < N-i;++k)
			{
				if (A[i][j] == A[i + k][j])++sub;
			}
		if (sub == N)++answer;
		cout << answer << endl;
		return 0;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:32: error: 'sum' was not declared in this scope; did you mean 'sub'?
   18 |                 for (j = 1;j < sum+ 1;++j)
      |                                ^~~
      |                                sub
a.cc:21:41: error: invalid types 'int[int]' for array subscript
   21 |                                 if (A[i][j] == A[i + k][j])++sub;
      |                                         ^
a.cc:21:56: error: invalid types 'int[int]' for array subscript
   21 |                                 if (A[i][j] == A[i + k][j])++sub;
      |                                                        ^
a.cc:26:10: error: expected '}' at end of input
   26 |         }
      |          ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C

#include<stdio.h>
#include <stdlib.h>

int main()
{
  int N, M;
  scanf("%d %d", &N, &M);

  int **mat = malloc(sizeof(int *) * N);
  for (int i=0; i < N;i++) mat[i] = malloc(sizeof(int) * M);

  for(int i = 0; i < N; i++)
  {
    int K = getchar();
    for( int j = 0; j < K; j++ )
    {
      int l = getchar();
      printf("%d %d", l, j);
    }
  }

  for (int i=0;i<N;i++) free(mat[i]);
  free(mat);

  retrun 0;
}

Compiler output:
main.c: In function 'main':
main.c:25:3: error: 'retrun' undeclared (first use in this function)
   25 |   retrun 0;
      |   ^~~~~~
main.c:25:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:9: error: expected ';' before numeric constant
   25 |   retrun 0;
      |         ^~
      |         ;
Language: C

#include<stdio.h>
#include <stdlib.h>

int main()
{
  int N, M;
  scanf("%d %d", N, M);
  
  int **mat = malloc(sizeof(int *) * N);
  for (int i=0; i < N;i++) mat[i] = malloc(sizeof(int) * M);
  
  for(int i = 0; i < N; i++)
  {
    int K = getchar();
    for( int j = 0; j < K; j++ )
    {
      int l = getchar();
      printf("%d %d", l, j);
    }
  }
  
  for (int i=0;i<N;i++) free(mat[i]);
  free(mat);
  
  retrun 0;
}

Compiler output:
main.c: In function 'main':
main.c:25:3: error: 'retrun' undeclared (first use in this function)
   25 |   retrun 0;
      |   ^~~~~~
main.c:25:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:9: error: expected ';' before numeric constant
   25 |   retrun 0;
      |         ^~
      |         ;