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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: no match for 'operator+=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
   14 |       cin >> a[k] += 1;
      |       ~~~~~~~~~~~~^~~~
Language: C++

#include <iostream>
using namespace std;

int count[50];

int main() {
	int n, m;
	cin >> n >> m;
	for (int i = 0; i < m; i++) cin >> count[i];
    
	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:17:37: error: expected ';' before '}' token
   17 |                         count[a - 1]
      |                                     ^
      |                                     ;
   18 |                 }
      |                 ~
Language: C

#include<stdio.h>

int main(void) {
	int N, M;
	int K[10000];
	int A[10000];
	int count = 0;
	int p;
	scanf("%d%d", &N, &A);

	for(int i = 1; i <= N; i++){
		scanf("%d", &K[i]);
		for(p = 1; p <= K; p++){
			scanf("%d", &A[i][p]);
			for(int s = 1; s <= M; s++){
				int q[s] = 0;
				if (s == A[i][p]) {
					q[s]++;
				}
			}
		}
	}
	for (int r = 1; p[r] == N; r++) {
		count++;
	}
	printf("%d", &count);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:30: warning: comparison between pointer and integer
   13 |                 for(p = 1; p <= K; p++){
      |                              ^~
main.c:14:42: error: subscripted value is neither array nor pointer nor vector
   14 |                         scanf("%d", &A[i][p]);
      |                                          ^
main.c:16:44: error: variable-sized object may not be initialized except with an empty initializer
   16 |                                 int q[s] = 0;
      |                                            ^
main.c:17:46: error: subscripted value is neither array nor pointer nor vector
   17 |                                 if (s == A[i][p]) {
      |                                              ^
main.c:23:26: error: subscripted value is neither array nor pointer nor vector
   23 |         for (int r = 1; p[r] == N; r++) {
      |                          ^
Language: C

#include<stdio.h>

int main(void) {
	int N, M;
	int K[10000];
	int A[10000];
	int count = 0;
	int p;
	scanf("%d%d", &N, &A);

	for (int i = 1; i <= N; i++) {
		scanf("%d", &K[i]);
		for (p = 1; p <= K; p++) {
			scanf("%d", &A[i][p]);
			for (int s = 1; s <= M; s++) {
				int q[s] = 0;
				if (s == A[i][p]) {
					p[s]++;
				}
			}
		}
	}
	for (int r = 1; p[r] == N; r++) {
		count++;
	}
	printf("%d", &count);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:31: warning: comparison between pointer and integer
   13 |                 for (p = 1; p <= K; p++) {
      |                               ^~
main.c:14:42: error: subscripted value is neither array nor pointer nor vector
   14 |                         scanf("%d", &A[i][p]);
      |                                          ^
main.c:16:44: error: variable-sized object may not be initialized except with an empty initializer
   16 |                                 int q[s] = 0;
      |                                            ^
main.c:17:46: error: subscripted value is neither array nor pointer nor vector
   17 |                                 if (s == A[i][p]) {
      |                                              ^
main.c:18:42: error: subscripted value is neither array nor pointer nor vector
   18 |                                         p[s]++;
      |                                          ^
main.c:23:26: error: subscripted value is neither array nor pointer nor vector
   23 |         for (int r = 1; p[r] == N; r++) {
      |                          ^
Language: C

#include<stdio.h>
 
int main(void){
  int N,M;
  int K[10000];
  int A[10000];
  int count = 0;
    scanf("%d%d",&N,&A);
  
  for(int i = 1;i <= N;i++){
    scanf("%d",&K[i]);
    for(int p = 1;p <= K;p++){
      scanf("%d",&A[i][p]);
        for(int s = 1;s <= M;s++){
          int q[s] = 0;
          if(s == A[i][p]){
            p[s]++;
          }
        }
    }
  }
for(int r = 1;p[r] == N;r++){
  count++;
}
  printf("%d",&count);
  
  return 0;
}
          

Compiler output:
main.c: In function 'main':
main.c:12:21: warning: comparison between pointer and integer
   12 |     for(int p = 1;p <= K;p++){
      |                     ^~
main.c:13:23: error: subscripted value is neither array nor pointer nor vector
   13 |       scanf("%d",&A[i][p]);
      |                       ^
main.c:15:22: error: variable-sized object may not be initialized except with an empty initializer
   15 |           int q[s] = 0;
      |                      ^
main.c:16:23: error: subscripted value is neither array nor pointer nor vector
   16 |           if(s == A[i][p]){
      |                       ^
main.c:17:14: error: subscripted value is neither array nor pointer nor vector
   17 |             p[s]++;
      |              ^
main.c:22:15: error: 'p' undeclared (first use in this function)
   22 | for(int r = 1;p[r] == N;r++){
      |               ^
main.c:22:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void){
  int N,M;
  int K[10000]
  int A[10000]
  int count = 0;
    scanf("%d%d",&N,&A);
  
  for(int i = 1;i <= N;i++){
    scanf("%d",&K[i]);
    for(int p = 1;p <= K;p++){
      scanf("%d",&A[i][p]);
        for(int s = 1;s <= M;s++){
          int q[s] = 0;
          if(s == A[i][p]){
            p[s]++
          }
        }
    }
  }
for(int r = 1;p[r] == N;r++){
  count++;
}
  printf("%d",&count);
  
  return 0;
}
          

  

Compiler output:
main.c: In function 'main':
main.c:5:15: error: expected ';' before 'int'
    5 |   int K[10000]
      |               ^
      |               ;
    6 |   int A[10000]
      |   ~~~          
main.c:6:15: error: expected ';' before 'int'
    6 |   int A[10000]
      |               ^
      |               ;
    7 |   int count = 0;
      |   ~~~          
main.c:8:22: error: 'A' undeclared (first use in this function)
    8 |     scanf("%d%d",&N,&A);
      |                      ^
main.c:8:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:17: error: 'K' undeclared (first use in this function)
   11 |     scanf("%d",&K[i]);
      |                 ^
main.c:15:22: error: variable-sized object may not be initialized except with an empty initializer
   15 |           int q[s] = 0;
      |                      ^
main.c:17:14: error: subscripted value is neither array nor pointer nor vector
   17 |             p[s]++
      |              ^
main.c:17:19: error: expected ';' before '}' token
   17 |             p[s]++
      |                   ^
      |                   ;
   18 |           }
      |           ~        
main.c:22:15: error: 'p' undeclared (first use in this function)
   22 | for(int r = 1;p[r] == N;r++){
      |               ^
Language: C

#include<stdio.h>
int n,m,i,k[30],a[30][30],f,flag[30],h,count;
int main(void){
    scanf("%d%d",&n,&m);
    for(i = 0;i < n;i++){
    scanf("%d",&k[i]);
    for(f = 1;f<k[i];f++){
        scanf("%d",&a[i][f]);
    }
    }

    for(i=0;i<n;i++){
        for(f=1;f<k[i];f++){
            flag[a[i][f]] += 1;
        }
        }
    }
    for(i=1;i<m;i++){
        if(flag[i] == n){
            count +=1;
        }
    }
    
printf("%d",count);
return 0;
}

Compiler output:
main.c:18:5: error: expected identifier or '(' before 'for'
   18 |     for(i=1;i<m;i++){
      |     ^~~
main.c:18:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   18 |     for(i=1;i<m;i++){
      |              ^
main.c:18:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   18 |     for(i=1;i<m;i++){
      |                  ^~
main.c:24:8: error: expected declaration specifiers or '...' before string constant
   24 | printf("%d",count);
      |        ^~~~
main.c:24:13: error: expected declaration specifiers or '...' before 'count'
   24 | printf("%d",count);
      |             ^~~~~
main.c:25:1: error: expected identifier or '(' before 'return'
   25 | return 0;
      | ^~~~~~
main.c:26:1: error: expected identifier or '(' before '}' token
   26 | }
      | ^
Language: C++

#include<iostream>

using namespace std;

int main() {
  int N, M, K, a;
  
  cin >> N >> M;
  
  vector<int> food(M, 0);
  for(int i = 0; i < N; i++) {
  	cin >> K;
    for(int j = 0; j < K; j++) {
      cin >> a;
      food[a-1]++;
    }
  }

  int ans = 0;
  for(int i = 0; i < M; i++) {
    if(food[i] == N) {
      ans++;
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'vector' was not declared in this scope
   10 |   vector<int> food(M, 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:10:10: error: expected primary-expression before 'int'
   10 |   vector<int> food(M, 0);
      |          ^~~
a.cc:15:7: error: 'food' was not declared in this scope
   15 |       food[a-1]++;
      |       ^~~~
a.cc:21:8: error: 'food' was not declared in this scope
   21 |     if(food[i] == N) {
      |        ^~~~
Language: C++

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

int main(){

	int n, m;
	cin >> n >> m;
	
	a[100][100] = {};
	
	for(int i = 0; i < n; i++){
		int k;
		cin >> k;
		for(int j = 0; j < k; j++){
			int A; cin >> A;
			A--;
			a[i][A] = 1;
		}
	}

	int sum[100] = {};

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

	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'a' was not declared in this scope
    9 |         a[100][100] = {};
      |         ^
Language: C++

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

int main(){
    int N, M;
    cin >> N >> M;
    vector<int> cnt(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--;
           cnt(A)++;
        }
        }
    
    int ans = 0;
    for(int i = 0; i<M ; i++){
        if(cnt[i] == N){
            ans++;
        }
    }

    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: no match for call to '(std::vector<int>) (int&)'
   12 |            cnt(A)++;
      |            ~~~^~~
Language: C++

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

int main(){
    int N, M;
    cin >> N >> M;
    vector<int> cnt(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--;
           cnt(A)++
        }
        }
    
    int ans = 0;
    for(int i = 0; i<M ; i++){
        if(cnt[i] == N){
            ans++;
        }
    }

    cout << ans << endl;
    return 0;
}

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

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

int main() {
	int N, M;
	cin >> N >> M;

	int num[M] = { 0 };

	vector<int> K(N);
	for (int i = 0; i < N; i++) {
		cin >> K.at(i);
		vector<int> A(K.at(i));
		for (int j = 0; j < K.at(i); j++) {
			num[A.at(j)]++;
		}
	}

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

	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: 'j' was not declared in this scope
   22 |                 if (num[j] == N) {
      |                         ^
Language: C++

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

int main() {
	int N, M;
	cin >> N >> M;

	int num[M] = { 0 }

	vector<int> K(N);
	for (int i = 0; i < N; i++) {
		cin >> K.at(i);
		vector<int> A(K.at(i));
		for (int j = 0; j < K.at(i); j++) {
			num[A.at(j)]++;
		}
	}

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

	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: expected ',' or ';' before 'vector'
   11 |         vector<int> K(N);
      |         ^~~~~~
a.cc:13:24: error: 'K' was not declared in this scope
   13 |                 cin >> K.at(i);
      |                        ^
a.cc:22:25: error: 'j' was not declared in this scope
   22 |                 if (num[j] == N) {
      |                         ^
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <utility> // pair
#include <string>
#include <vector>
#define MAX_N 100001
#define rep(i, a, b) for(ll i=a; i<b; i++)
#define rer(i, a, b) for(ll i=a-1; i>=b; i--)
#define pb push_back
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
ll n, m;
#define MAX_M 31
int v[MAX_M];

signed main(){
    cin >> n >> m;
    rep(i, 0, MAX_M) v[i] = 1;
    rep(i, 0, n){
        ll k; cin >> k;
        int w[MAX_M] = {};
        rep(j, 0, k){
            ll a; cin >> a;
            w[a-1] = 1;
        }
        rep(j, 0, m){
            v[j] = m]in(w[j], v[j]);
        }
    }
    int ret = 0;
    rep(i, 0, m){
        if(v[i] == 1) ret++;
    }
    cout << ret << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:21: error: expected ';' before ']' token
   28 |             v[j] = m]in(w[j], v[j]);
      |                     ^
      |                     ;
Language: C++

#include<bits/stdc++.h>

#define ll long long
#define fornum(A,B,C) for(A=B;A<C;A++)
#define mp make_pair
#define pii pair<int,int>
#define pll pair<ll,ll>

using namespace std;

/////////////////////////////////////////////////////
ll N, M;
ll mk[100],i;
int main(){
    scanf("%lld%lld", &N,&M);
    fornum(i,0,N){
        ll kk;
        scanf("%lld", &kk);
        fornum(j,0,kk){
            ll aa;
            scanf("%lld",&aa);
            mk[aa]++;
        }
    }
    ll ans = 0;
    fornum(i,0,M){
        if(mk[i+1]==N){
            ans++;
        }
    }
    printf("%lld", ans);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:16: error: 'j' was not declared in this scope; did you mean 'jn'?
   19 |         fornum(j,0,kk){
      |                ^
a.cc:4:27: note: in definition of macro 'fornum'
    4 | #define fornum(A,B,C) for(A=B;A<C;A++)
      |                           ^
Language: Java

import java.util.Scanner;

import com.sun.beans.util.Cache.Kind;

public class Main {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);

        try{
            int N = scan.nextInt();
            int M = scan.nextInt()+1;
            int[][] A_ = new int[N][M];
            int[] Kind_ = new int[M];

            //初期化
            for(int i = 0; i < N; i++){
                for(int j = 0; j < M; j++){
                    A_[i][j] = 0;
                }
            }
            for(int i = 0; i < M; i++){
                Kind_[i] = 0;
            }

            //連想配列
            for(int i = 0; i < N; i++){
                int K = scan.nextInt();
                for(int j = 0; j < K; j++){
                    A_[i][j] = scan.nextInt();
                    Kind_[A_[i][j]]++;
                }
            }

            int count = 0;
            for(int i = 1; i < M; i++){
                if(Kind_[i] == N){
                    count++;
                }
            }
            System.out.println(count);
        }finally{
            scan.close();
        }
    }
}


Compiler output:
Main.java:3: error: package com.sun.beans.util is not visible
import com.sun.beans.util.Cache.Kind;
                    ^
  (package com.sun.beans.util is declared in module java.desktop, which does not export it)
1 error
Language: C++

    #include <cstdio>
     
    int main() 
    {
      int n, m;
      std::scanf("%d %d", &n, &m);
      std::vector<int> a(m, 0);
      for (int i = 0; i < n; i++){
        int k;
        std::scanf("%d", &k);
        for (int j = 0; j < k; j++){
          	int t;
        	std::scanf("%d", &t);
          	a[t]++;
        }
      }
      
      for (int i = 0; i < m; i++){
        if (a[i] == n) {
	        std::printf("%d", i);
        }
      }
    	return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'vector' is not a member of 'std'
    7 |       std::vector<int> a(m, 0);
      |            ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 |     #include <cstdio>
  +++ |+#include <vector>
    2 | 
a.cc:7:19: error: expected primary-expression before 'int'
    7 |       std::vector<int> a(m, 0);
      |                   ^~~
a.cc:14:17: error: 'a' was not declared in this scope
   14 |                 a[t]++;
      |                 ^
a.cc:19:13: error: 'a' was not declared in this scope
   19 |         if (a[i] == n) {
      |             ^
Language: C++

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

int main()
{
    int N, M;
    cin >> N >> M;
    int cnt[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--;
            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:8:13: error: 'm' was not declared in this scope
    8 |     int cnt[m] = {0};
      |             ^
a.cc:19:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
   19 |             cnt[A]++;
      |             ^~~
      |             int
a.cc:26:13: error: 'cnt' was not declared in this scope; did you mean 'int'?
   26 |         if (cnt[i] == N)
      |             ^~~
      |             int
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int n, m, ans = 0;
  cin >> n >> m;
  int cnt[m];
  for(int i = 0; i < n; i++)
  {
    int k;
    cin >> k;
    for(int j = 0; j < k; j++)
    {
      int x;
      cin >> x;
      cnt[x]++;
    }
    for(int k = 0; k < m; k++)
    {
   	  if(n == cnt[x])
      {
  	    ans++;
      }
    }
  }
  cout << ans;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:23: error: 'x' was not declared in this scope
   21 |           if(n == cnt[x])
      |                       ^
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args)
	{
		// Input Example:
		//
		// N M
		// K1 A11 A12 ... A1k1
		// K2 A21 A22 ... A2k2
		// .
		// .
		// .
		// KN AN1 AN2 ... ANkN

		Scanner sc = new Scanner(System.in);
		// N people
		int N = sc.nextInt();
		
		// get two integers separated with half-width break
		// M kinds of foods
		int M = sc.nextInt(); 

		// Ki: the number of foods that No.i+1 person like
		int K;

		// map[M]: the table of the likeness of each foods 
		Map<Integer, Integer> map = new HashMap<Integer, Integer>();

		for (int i=0; i<N; i++)
		{
			K = sc.nextInt();
			for (int j=0; j<K; j++)
			{
				int K_temp = sc.nextInt();
				if (map.containsKey(K_temp))
				{
					int val = map.get(K_temp); // food no. K_temp +1
					val++;
					map.put(K_temp, val);
				}
				else
				{
					map.put(K_temp.val);
				}
			}
		}
		sc.close();

		int ans = 0;
		for (int i=1;i<map.values();i++)
		{
			if (map.get(i) == N) //it means everyone (N people) likes it
			{
				ans++;
			}
		}
		System.out.println(ans);
		
	}

}

Compiler output:
Main.java:43: error: int cannot be dereferenced
					map.put(K_temp.val);
					              ^
Main.java:50: error: bad operand types for binary operator '<'
		for (int i=1;i<map.values();i++)
		              ^
  first type:  int
  second type: Collection<Integer>
2 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args)
	{
		// Input Example:
		//
		// N M
		// K1 A11 A12 ... A1k1
		// K2 A21 A22 ... A2k2
		// .
		// .
		// .
		// KN AN1 AN2 ... ANkN

		Scanner sc = new Scanner(System.in);
		// N people
		int N = sc.nextInt();
		
		// get two integers separated with half-width break
		// M kinds of foods
		int M = sc.nextInt();

		// int A[][] = new int[N][M]; 

		// Ki: the number of foods person i+1 like
		int K;

		// map[M]: the table of the likeness of each foods 
		int map[M];

		for (int i=0; i<N; i++)
		{
			K = sc.nextInt();
			for (int j=0; j<K; j++)
			{
				int K_temp;
				K_temp = sc.nextInt();
				map[K_temp-1]++;
			}
		}

		int ans = 0;
		for (int i=0;i<M;i++)
		{
			if (map[i] == N)
			{
				ans++;
			}
		}
		System.out.println(ans);
		
	}

}

Compiler output:
Main.java:29: error: ']' expected
		int map[M];
		        ^
Main.java:29: error: ';' expected
		int map[M];
		         ^
2 errors
Language: C++

#include <iostream>

using namespace std;

int main(){
  int N, M;
  cin >> N >> M;
  
  int ans[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--;
      ans[a]++;
    }
  }
  int result=0;
  
  for(int i=0;i<M;i++){
    if(ans[i]==N)
      result++;
  }
  
  cout << result << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: array must be initialized with a brace-enclosed initializer
    9 |   int ans[M]=0;
      |              ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: expected ';' before '}' token
   12 |             ++cnt[A]
      |                     ^
      |                     ;
   13 |         }
      |         ~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:27: error: redeclaration of 'int k'
    5 |         int n,m,i,j,k,num,k,ans=0;
      |                           ^
a.cc:5:21: note: 'int k' previously declared here
    5 |         int n,m,i,j,k,num,k,ans=0;
      |                     ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: 'sum' was not declared in this scope; did you mean 'num'?
   13 |                         sum[num]++;
      |                         ^~~
      |                         num
Language: C++

#include <iostream>
using namespace std;
//-------------------------------

int main(){
    int n m; cin >> n >> m ;
    vector<int> foods(m, 0);

    //-------------------
    for(i=0;i<=n;i++){
        int K; cin >> K;

        for(j=0;i<K;j++){
            int A; cin >> A; --A;
            foods[A]++;
        }
    }

    //-------------------
    int ans = 0; 
    for(i=0;i<=m;i++){
        if(foods[i]==n){
            ans++;
        }
    }

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: expected initializer before 'm'
    6 |     int n m; cin >> n >> m ;
      |           ^
a.cc:6:21: error: 'n' was not declared in this scope
    6 |     int n m; cin >> n >> m ;
      |                     ^
a.cc:6:26: error: 'm' was not declared in this scope; did you mean 'tm'?
    6 |     int n m; cin >> n >> m ;
      |                          ^
      |                          tm
a.cc:7:5: error: 'vector' was not declared in this scope
    7 |     vector<int> foods(m, 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:12: error: expected primary-expression before 'int'
    7 |     vector<int> foods(m, 0);
      |            ^~~
a.cc:10:9: error: 'i' was not declared in this scope
   10 |     for(i=0;i<=n;i++){
      |         ^
a.cc:13:13: error: 'j' was not declared in this scope
   13 |         for(j=0;i<K;j++){
      |             ^
a.cc:15:13: error: 'foods' was not declared in this scope
   15 |             foods[A]++;
      |             ^~~~~
a.cc:21:9: error: 'i' was not declared in this scope
   21 |     for(i=0;i<=m;i++){
      |         ^
a.cc:22:12: error: 'foods' was not declared in this scope
   22 |         if(foods[i]==n){
      |            ^~~~~
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main()
{
    int N, M = 0;
    cin >> N >> M;
    bool unLike[M] = {};

    for(int i = 0; i < N; i++)
    {
        int K;
        cin >> K;

        bool A[K] = {};

        for(int j = 0; j < K; j++)
        {
            int a;
            cin >> a;
            A[a - 1] = true;
        }

        for(int j = 0; j < K; j++)
        {
            if(!A[j])
                unLike[j] = true;
        }
    }
    
    auto count = count_if(unLike.begin(), unLike.end(), [](bool x){ return !x;});
    
    cout << count << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:34: error: request for member 'begin' in 'unLike', which is of non-class type 'bool [M]'
   33 |     auto count = count_if(unLike.begin(), unLike.end(), [](bool x){ return !x;});
      |                                  ^~~~~
a.cc:33:50: error: request for member 'end' in 'unLike', which is of non-class type 'bool [M]'
   33 |     auto count = count_if(unLike.begin(), unLike.end(), [](bool x){ return !x;});
      |                                                  ^~~
a.cc:33:18: error: 'count_if' was not declared in this scope; did you mean 'count'?
   33 |     auto count = count_if(unLike.begin(), unLike.end(), [](bool x){ return !x;});
      |                  ^~~~~~~~
      |                  count
Language: C++

#include<iostream>
#include<vector>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> n >> m;
      |   ^~~
      |   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:23:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   23 |   cout << ans << 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:23:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   23 |   cout << ans << 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 <stdio.h>
int main (){
int a,b,i,j,k=0,f=0,sum=0,l;
scanf ("%d%d",&a,&b);
int c[b] = {0};
for (i=0;i<a;i++){
scanf ("%d",&f);
  for (j=0;j<f;j++){
  scanf ("%d",&k);
  c[k]=c[k]+1;
  }
}
for (l=0;l<a;l++){
if(c[i]==b){
sum=sum+1;
}
}
  printf ("%d",sum);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:12: error: variable-sized object may not be initialized except with an empty initializer
    5 | int c[b] = {0};
      |            ^
Language: C

#include <stdio.h>
int main (){
int a,b,i,j,k=0,f=0,sum=0;
scanf ("%d%d",&a,&b);
int c[b] = {0};
for (i=0;i<a;i++){
scanf ("%d",&f);
  for (j=0;j<f;j++){
  scanf ("%d",&k);
    c[k]=c[k]+1;
    j=j+1;
  }
}
for (i=0;i<a;i++){
if(c[i]==b){
sum=sum+1;
}
}
  printf ("%d",sum);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:12: error: variable-sized object may not be initialized except with an empty initializer
    5 | int c[b] = {0};
      |            ^
Language: C

#include <stdio.h>
int main (){
int a,b,i,j,k=0,f=0,sum=0;
scanf ("%d%d",&a,&b);
int c[b]={0};
for (i=0;i<a;i++){
scanf ("%d",&f);
  for (j=0;j<f;j++){
  scanf ("%d",&k);
    c[k]=c[k]+1;
  }
}
for (i=0;i<a;i++){
if(c[i]==b){
sum=sum+1;
}
}
  printf ("%d",sum);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:10: error: variable-sized object may not be initialized except with an empty initializer
    5 | int c[b]={0};
      |          ^
Language: C

#include <stdio.h>
int main (){
int a,b,i,j,k,f,sum=0;
scanf ("%d%d",&a,&b);
int c[b]={0};
for (i=0;i<a;i++){
scanf ("%d",&f);
  for (j=0;j<f;j++){
  scanf ("%d",&k);
    c[k]=c[k]+1;
  }
}
for (i=0;i<a;i++){
if(c[i]==b){
sum=sum+1;
}
}  
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:10: error: variable-sized object may not be initialized except with an empty initializer
    5 | int c[b]={0};
      |          ^
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <numeric>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
using namespace std;
typedef long long unsigned int ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main(){

   int n, m;
   cin >> n >> m;

   // vector cnt(要素数m, 0で初期化)
   // m種類の食べ物に関するカウンターを用意
   vector<int> cnt(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--;
         cnt[a]++;
      }
   }

   int ans = 0;
   for(int i=0; i < m; i++){
      if(cnt[i] == N){
         ans++;
      }
   }
   cout << ans << endl;

   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:20: error: 'N' was not declared in this scope
   46 |       if(cnt[i] == N){
      |                    ^
Language: C++

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

int main(){
	int n,m;
  	cin >> n >> m;
  	int i,j,c = 0, a[m+1] = {0},x,y;
  	for(i = 0; i < n; i ++)
    {
      cin >> x;
      for(j = 0; j < x; j ++)
      {
        cin >> y;
        a[y] ++;
      }
    }
  	for(i = 1; i <= m; i ++)
    	if(a[i] >= n)
          c++;
 	cout << c;
}

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

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

Compiler output:
a.cc:8:20: error: extended character 　 is not valid in an identifier
    8 |         int cnt [M]　= {0};
      |                    ^
a.cc: In function 'int main()':
a.cc:8:20: error: expected initializer before '\U00003000'
    8 |         int cnt [M]　= {0};
      |                    ^~
a.cc:15:11: error: 'cnt' was not declared in this scope; did you mean 'int'?
   15 |         ++cnt[A];
      |           ^~~
      |           int
a.cc:19:10: error: 'cnt' was not declared in this scope; did you mean 'int'?
   19 |       if(cnt[i] == N)
      |          ^~~
      |          int
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:17:37: error: expected ')' before '{' token
   17 |                 if (a[0][i]==a[j][l]{
      |                    ~                ^
      |                                     )
main.c:21:13: error: expected expression before '}' token
   21 |             }
      |             ^
Language: C++

#include <bits/stdc++.h>
#define N 1000005
#define ll long long int 
#define mp make_pair
#define pb push_back
#define ppb pop_back
#define sp " "
#define endl "\n"
#define fi first
#define se second
#define ii pair<int,int>
#define lli pair<ll,ll>
#define fast cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(false)
#define fast2 freopen ("myfile.gir","r",stdin);freopen ("myfile.cik","w",stdout);
#define mod 1000000007
using namespace std;

ll n,ar[N],a,b,tut[N],sum;


int main()
{
	fast;
	cin>>n>>m;
	for(int i=1;i<=n;i++)
	{
		int k;
		cin>>k;
		for(int j=1;j<=k;j++)
		{
			int tmp;
			cin>>tmp;
			tut[tmp]++;
		}
	}
	for(int i=1;i<=m;i++)
		if(tut[i]==n)
			sum++;
	cout<<sum;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:17: error: 'm' was not declared in this scope; did you mean 'tm'?
   24 |         cin>>n>>m;
      |                 ^
      |                 tm
Language: C++

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:32: error: 'num' was not declared in this scope; did you mean 'enum'?
   11 |                         cin >> num;
      |                                ^~~
      |                                enum
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:1: error: expected primary-expression before 'if'
   12 | if (cnt[i] ++ans;
      | ^~
a.cc:13:1: error: expected primary-expression before '}' token
   13 | } }
      | ^
a.cc:12:18: error: expected ';' before '}' token
   12 | if (cnt[i] ++ans;
      |                  ^
      |                  ;
   13 | } }
      | ~                 
a.cc:13:1: error: expected primary-expression before '}' token
   13 | } }
      | ^
a.cc:12:18: error: expected ')' before '}' token
   12 | if (cnt[i] ++ans;
      |                  ^
      |                  )
   13 | } }
      | ~                 
a.cc:11:18: note: to match this '('
   11 | int ans = 0; for (int i =
      |                  ^
a.cc:13:1: error: expected primary-expression before '}' token
   13 | } }
      | ^
a.cc: At global scope:
a.cc:13:3: error: expected declaration before '}' token
   13 | } }
      |   ^
a.cc:14:1: error: expected unqualified-id before numeric constant
   14 | 0; i < M; ++i) { == N) {
      | ^
a.cc:14:4: error: 'i' does not name a type
   14 | 0; i < M; ++i) { == N) {
      |    ^
a.cc:14:11: error: expected unqualified-id before '++' token
   14 | 0; i < M; ++i) { == N) {
      |           ^~
Language: C++

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

int main(){
  int num, menu;
  cin >> num >> menu;
  vector<int> candidate(menu);
  for(int i = 0;i < num;++i){
    int num_menu;
    cin >> num_menu;
    for(int j = 0; j < num_menu;j++){
      int like_menu;
      cin >> like_menu;
      like_menu--;
      #配列に代入
      candidate[like_menu]++;
    }
  }
  int ans = 0;
  for(int i = 0; i < menu;++i){ 
	if(candidate[i] == num){
    	ans++;
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc:15:8: error: invalid preprocessing directive #\U0000914d\U00005217\U0000306b\U00004ee3\U00005165
   15 |       #配列に代入
      |        ^~~~~~~~~~
Language: C++

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

int main(){
  int num, menu;
  cin >> num >> menu;
  vector<int> candidate(menu);
  for (int i = 0;i < num;++i){
    int num_menu;
    cin >> num_menu;
    for (int j = 0; j < num_menu;j++){
      int like_menu;
      cin >> like_menu;
      like_menu--;
      #配列に代入
      candidate[like_menu]++;
    }
  }
  int ans = 0;
  for (int i = 0; i < menu;++i){    
	if (candidate[i] == num){
    	ans++;
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc:15:8: error: invalid preprocessing directive #\U0000914d\U00005217\U0000306b\U00004ee3\U00005165
   15 |       #配列に代入
      |        ^~~~~~~~~~
Language: C++

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

int main(){
  int num, menu, ans;
  ans = 0;
  cin >> num >> menu;
  vector<int> candidate(menu);
  for (int i = 0;i < num;i++){
    int num_menu;
    cin >> num_menu;
    for (int j = 0; j < num_menu;j++){
      int like_menu;
      cin >> like_menu;
      like_menu--;
      #配列に代入
      candidate[like_menu]++;
    }
  }
  for (int i = 0; i < menu;i++){
    
	if (candidate[i] == num){
    	ans++;
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc:16:8: error: invalid preprocessing directive #\U0000914d\U00005217\U0000306b\U00004ee3\U00005165
   16 |       #配列に代入
      |        ^~~~~~~~~~
Language: C++

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

int main(){
  int num, menu, ans;
  ans = 0;
  cin >> num >> menu;
  vector<int> candidate(menu);
  for (int i = 0;i < num;i++){
    int num_menu;
    cin >> num_menu;
    for (int j = 0; j < num_menu;j++){
      int like_menu;
      cin >> like_menu;
      like_menu--;
      #配列に代入
      candidate[like_menu]++;
    }
  }
  for (int i = 0; i < menu;i++){
    
	if (candidate[i] == num);
    	ans++;
  }
  cout << ans << endl;
}

Compiler output:
a.cc:16:8: error: invalid preprocessing directive #\U0000914d\U00005217\U0000306b\U00004ee3\U00005165
   16 |       #配列に代入
      |        ^~~~~~~~~~
Language: C++

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

int main(){
  int num, menu, ans;
  ans = 0
  cin >> num >> menu;
  vector<int> candidate(menu);
  for (int i = 0;i < num;i++){
    int num_menu;
    cin >> num_menu;
    for (int j = 0; j < num_menu;j++){
      int like_menu;
      cin >> like_menu;
      like_menu--;
      #配列に代入
      candidate[like_menu]++;
    }
  }
  for (int i = 0; i < ;i++){
    
	if (candidate[i] == num);
    	ans++;
  }
  cout << ans << endl;
}

Compiler output:
a.cc:16:8: error: invalid preprocessing directive #\U0000914d\U00005217\U0000306b\U00004ee3\U00005165
   16 |       #配列に代入
      |        ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:10: error: expected ';' before 'cin'
    6 |   ans = 0
      |          ^
      |          ;
    7 |   cin >> num >> menu;
      |   ~~~     
a.cc:20:23: error: expected primary-expression before ';' token
   20 |   for (int i = 0; i < ;i++){
      |                       ^
Language: C

#include <stdio.h>

int clear(int a[],int n){
    for(int i=0;i<n;i++) a[i]=0;
}

int main(void){
    int N,M;
    scanf("%d",&N);
    scanf("%d",&M);
    int counter=0,memory[M],K,a;
    clear(memory,M);
    
    for(int i=0;i<N;i++){
        scanf("%d",&K);
        for(int j=0;j<K;j++){
            scanf("%d",&a);
            memory[a]++;
        }
    }
    
    for(k=0;k<M;k++){
        if(memory[k]==N-1) counter++;
    }
    
    printf("%d",counter);

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:22:9: error: 'k' undeclared (first use in this function)
   22 |     for(k=0;k<M;k++){
      |         ^
main.c:22:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
#include<algorithm>
#include<queue>
#include<stack>
#include<cstdio>
#include<map>
#define  For(a,b)    for(int a=0;a<b;a++)
#define  si(a)       scanf("%d",&a);
#define  sl(a)       scanf("%lld",&a);
#define  sii(a,b)    scanf("%d%d",&a,&b);
#define  sll(a,b)    scanf("%lld%lld",&a,&b);
#define  queues      priority_queue
#define mod 1000000007
#define mem(a)  memset(a,0,sizeof(a));
typedef long long ll;
const int INF=0x3f3f3f3f;
//queues<int,vector<int >,greater<int > >q;
using namespace std;

int main()
{ int s[100];mem(s);
  int n,m;
  cin>>n>>m;
  for(int i=1;i<=n;i++)
  {
      int t;
      cin>>t;
      while(t--)
      {
          int a;
          cin>>a;
          s[a]++;
      }
  }
  int sum=0;
  for(int i=1;i<=m;i++)
    if(s[i]==n)sum++;
  cout<<sum;
}

/******************************************
**        **             ********       **
**       ** **           **             **
**      **   **          **             **
**     **     **         **             **
**    ***********        **             **
**   **         **       ********       **
******************************************/


Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'memset' was not declared in this scope
   14 | #define mem(a)  memset(a,0,sizeof(a));
      |                 ^~~~~~
a.cc:21:14: note: in expansion of macro 'mem'
   21 | { int s[100];mem(s);
      |              ^~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include<map>
  +++ |+#include <cstring>
    7 | #define  For(a,b)    for(int a=0;a<b;a++)
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+a+)
        {
            int A;
            cin >> A;
            A--;
            cnt[A]++;
        }
    }

    int ans = 0;
    for (int i = 0; i < M; i++)
    {
        if (cnt[i] == N)
        {
          ans += 1;
        }
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:34: error: 'a' was not declared in this scope
   14 |         for (int j = 0; j < K; j+a+)
      |                                  ^
a.cc:14:36: error: expected primary-expression before ')' token
   14 |         for (int j = 0; j < K; j+a+)
      |                                    ^
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;

int main(){
  int N,M;
  cin >> N >> M;
  int K[N+1];
  int A[N+1][31];
  for(int i=1; i<=N; ++i){
    cin >> K[i];
    for(int j=1; j<=K[i]; ++j){
      cin >> A[i][j];
    }
  }
  static int count[M*2];
  for(int i=1; i<=N; ++i){
    for(int j=1; j<=K[i]; ++j){
      count[A[i][j]] +=1;
    }
  }
  int ans=0;
  for(int i=1; i<=M; ++i){
    if(count[i]==N) ans += 1;
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: storage size of 'count' isn't constant
   16 |   static int count[M*2];
      |              ^~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int N,M;
  cin >> N >> M;
  int K[N+1];
  int A[N+1][31];
  for(int i=1; i<=N; ++i){
    cin >> K[i];
    for(int j=1; j<=K[i]; ++j){
      cin >> A[i][j];
    }
  }
  static int count[M+1];
  for(int i=1; i<=N; ++i){
    for(int j=1; j<=K[i]; ++j){
      count[A[i][j]] +=1;
    }
  }
  int ans=0;
  for(int i=1; i<=M; ++i){
    if(count[i]==N) ans += 1;
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: storage size of 'count' isn't constant
   15 |   static int count[M+1];
      |              ^~~~~
Language: C++

#include<iostream>
using namespace std

int main(){
  int N,M;
  cin >> N >> M;
  int K,A;
  vecter<int> cnt(M,0);
  for(int i=0;i<N;++i){
    cin >> K;
    for(int j=0;j<K;++j)
    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:2:20: error: expected ';' before 'int'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | 
    4 | int main(){
      | ~~~                 
a.cc: In function 'int main()':
a.cc:8:3: error: 'vecter' was not declared in this scope
    8 |   vecter<int> cnt(M,0);
      |   ^~~~~~
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vecter<int> cnt(M,0);
      |          ^~~
a.cc:13:7: error: 'cnt' was not declared in this scope; did you mean 'int'?
   13 |     ++cnt[A];
      |       ^~~
      |       int
a.cc: At global scope:
a.cc:17:1: error: expected unqualified-id before 'for'
   17 | for (int i=0;i<M;++i){
      | ^~~
a.cc:17:14: error: 'i' does not name a type
   17 | for (int i=0;i<M;++i){
      |              ^
a.cc:17:18: error: expected unqualified-id before '++' token
   17 | for (int i=0;i<M;++i){
      |                  ^~
a.cc:23:1: error: 'cout' does not name a type
   23 | cout << ans << endl;
      | ^~~~
Language: C

#include <bits/stdc++.h>
// statics
using namespace std;
using int64 = int_fast64_t;
using PAIR = pair<int64, int64>;
constexpr int INF = 1 << 30;
constexpr int64 LINF = 1LL << 60;
constexpr int MOD = 1e9 + 7;
constexpr int MAX_N = 3e5 + 1;

// init/input
#define int int64
#define INIT ios::sync_with_stdio(false);cin.tie(0);
#define VAR(type, ...) type __VA_ARGS__;MACRO_VAR_Scan(__VA_ARGS__);
template<typename T> void MACRO_VAR_Scan(T &t) {cin>>t;}
template<typename First, typename...Rest> void MACRO_VAR_Scan(First &first, Rest&...rest) {cin>>first;MACRO_VAR_Scan(rest...);}
#define VEC(type, c, n) vector<type> c(n);for(auto &&i:c)cin>>i;

// out
#define OUT(dist) cout<<(dist);
#define FOUT(n, dist) cout<<fixed<<setprecision(n)<<(dist);
#define SP cout<<" ";
#define BR cout<<endl;
#define zero(n) cout<<setfill('0')<<right<<setw(n)
#define debug(x) cerr<<#x<<":"<< (x);BR;

// utility
#define ALL(a) (a).begin(), (a).end()
#define EACH(i, a) for(auto &&i:(a))
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define RFOR(i, a, b) for(int i=(b)-1;i>=0;--i)
#define REP(i, n) for(int i=0;i<(n);++i)
#define RREP(i, n) for(int i=(n)-1;i>=0;--i)

signed main() {
  INIT;
	map<int,int> mp;
	VAR(int,n,m);
	REP(i,n){
		VAR(int, k);
		REP(j,k){
			VAR(int,a);
			mp[a]++;
		}
	}

	int ans =0;
	EACH(mi,mp){
		if(mi.second==n) ++ans;
	}
	OUT(ans)BR;
  
  return 0;
}


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

#include<bits/stdc++.h>

using namespace std;

int main()
{
  int n,m,k,a,c=0;
  map<int,int> f;
  cin >> n >> m;
  for(int i = 0 ; i < n ; i++)
  {
    cin >> k;
    for(in t j = 0 ; j <k ; j++)
    {
      cin >> a;
      f[a]++;
    }
  }
  for(int i = 1; i<=m;i++)
    c += f[i] == n ? 1 : 0;
  
  cout << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'in' was not declared in this scope; did you mean 'i'?
   13 |     for(in t j = 0 ; j <k ; j++)
      |         ^~
      |         i
a.cc:13:22: error: 'j' was not declared in this scope
   13 |     for(in t j = 0 ; j <k ; j++)
      |                      ^