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

#define rep(i,n) for (long long i = 0; i < (long long) (n); i++)
using ll=long long;
using vi = vector<int>;
using vll = vector<ll>;

const int mod = 1000000007;
// const int mod = 998244353;

int main(){
    long long n,m;
    cin>>n>>m;
    vector<ll> v(m);
    rep(i,n){
      ll k;
      cin>>k;
      rep(j,k){
        ll p;
        cin>>p;
        v.at(p-1)+=1;
      }
    }

    int a=0;
    rep(i,m){
      if(v.at(i)==n){a+=1;cout<<i<<endl;}
    }
 cout<<a;
}

Compiler output:
a.cc:3:12: error: 'vector' does not name a type
    3 | using vi = vector<int>;
      |            ^~~~~~
a.cc:4:13: error: 'vector' does not name a type
    4 | using vll = vector<ll>;
      |             ^~~~~~
a.cc: In function 'int main()':
a.cc:11:5: error: 'cin' was not declared in this scope
   11 |     cin>>n>>m;
      |     ^~~
a.cc:12:5: error: 'vector' was not declared in this scope
   12 |     vector<ll> v(m);
      |     ^~~~~~
a.cc:12:14: error: expected primary-expression before '>' token
   12 |     vector<ll> v(m);
      |              ^
a.cc:12:16: error: 'v' was not declared in this scope
   12 |     vector<ll> v(m);
      |                ^
a.cc:25:27: error: 'cout' was not declared in this scope
   25 |       if(v.at(i)==n){a+=1;cout<<i<<endl;}
      |                           ^~~~
a.cc:25:36: error: 'endl' was not declared in this scope
   25 |       if(v.at(i)==n){a+=1;cout<<i<<endl;}
      |                                    ^~~~
a.cc:27:2: error: 'cout' was not declared in this scope
   27 |  cout<<a;
      |  ^~~~
Language: C++

#include <bits/stdc++.h>
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
 
int main() {
  // input
  int n,m;cin >> n >> m;
  vector<int> k(n);
  vector<vector<int>> a(n, vector<int>(30));
  
  for(int i = 0;i < n; i++) {
      cin >> k[i];
      int ki;
      ki = k[i];
      for(int j = 0; j < ki ; j++){
          cin >> a[i][j];
        cout << a[i][j] << endl;
      } 
  }
 
  // compute 
  int ans = 0;
  vector<int> suki(m);
  for(int i = 0;i < n; i++) {
      int ki;
      ki = k[i];
      for(int j = 0; j < ki ; j++){
        int aij;
        aij = a.[i][j];
        ++suki[aij];
      } 
  }

  for(int i = 0;i < m; i++) {
      if(suki[i] == n){
          ++ans;
      }
  }
  
  // output  
  cout << ans << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:17: error: expected unqualified-id before '[' token
   31 |         aij = a.[i][j];
      |                 ^
Language: C++

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

int main(){
  int N,M;
  cin>>N>>M;
  vecotr<int>ans(M);
  
  for(int i=0;i<N;i++){
    int k; cin>>k;
    
    for(int j=0;j<k;j++){
      int a; cin>>a;
      ans[--a];
    }
  }
  int cnt=0;
  for(int i=0;i<M;i++){
    if(ans[i]==N)cnt++;
  }
  cout<<cnt<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vecotr' was not declared in this scope
    7 |   vecotr<int>ans(M);
      |   ^~~~~~
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vecotr<int>ans(M);
      |          ^~~
a.cc:14:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |       ans[--a];
      |       ^~~
      |       abs
a.cc:19:8: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |     if(ans[i]==N)cnt++;
      |        ^~~
      |        abs
Language: C++

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

int main(){
  int N,M;
  cin>>N>>M;
  vecotr<int>a(M);
  
  for(int i=0;i<N;i++){
    int k; cin>>k;
    
    for(int j=0;j<k;j++){
      int a; cin>>a;
      ans[--a];
    }
  }
  int cnt=0;
  for(int i=0;i<M;i++){
    if(ans[i]==N)cnt++;
  }
  cout<<cnt<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vecotr' was not declared in this scope
    7 |   vecotr<int>a(M);
      |   ^~~~~~
a.cc:7:10: error: expected primary-expression before 'int'
    7 |   vecotr<int>a(M);
      |          ^~~
a.cc:14:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |       ans[--a];
      |       ^~~
      |       abs
a.cc:19:8: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |     if(ans[i]==N)cnt++;
      |        ^~~
      |        abs
Language: C++

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

ll d[33];
int main()
{
int n,m,k,a,an=0;
cin>>n>>m;
for(int i=0;i<n;i++)
{cin>>k;
	while(k--)
	{cin>>a;d[a]++;}
}
for(int i=0;i<=m;i++)if(d[i]==n)an++;
cout<<an<<endl;

}



Compiler output:
a.cc:4:1: error: 'll' does not name a type
    4 | ll d[33];
      | ^~
a.cc: In function 'int main()':
a.cc:12:17: error: 'd' was not declared in this scope
   12 |         {cin>>a;d[a]++;}
      |                 ^
a.cc:14:25: error: 'd' was not declared in this scope
   14 | for(int i=0;i<=m;i++)if(d[i]==n)an++;
      |                         ^
Language: C++

#include<iostream>
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 ;
}

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

#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int,int> P;
int INF = 1e9+7;
int mod = 1e9+7;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
signed main(){
    int K,M;
    cin >> K >> M;
    map<int,int>Mp;
    for(int i = 0; i < N; i++) {
        int K;cin >> K;
        for(int j = 0; j < K; j++) {
            int A;cin >> A;
            Mp[A]++;
        }
    }
    int ans = 0;
    for(P x:Mp) {
        if(x.second == N) {
            ans++;
        }
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:24: error: 'N' was not declared in this scope
   13 |     for(int i = 0; i < N; i++) {
      |                        ^
a.cc:22:24: error: 'N' was not declared in this scope
   22 |         if(x.second == N) {
      |                        ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:8: error: no match for call to '(std::vector<int>) (int)'
   15 |       a(l-1)++;
      |       ~^~~~~
a.cc:20:9: error: no match for call to '(std::vector<int>) (int&)'
   20 |     if(a(i)==n) cnt++;
      |        ~^~~
Language: C++

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

int main() {
  int n,m;
  cin >> n >> m;
  vector<int> a(m);
  rep(i,n){
    int k;
    cin >> k;
    rep(j,k){
      int x;
      cin >> x;
      a.at(j)++;
    }
  }

  int cnt = 0;
  for(int i: a)x{
    if(i == n) cnt ++;
  }
  cout << cnt << endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:21:16: error: 'x' was not declared in this scope
   21 |   for(int i: a)x{
      |                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char> cvec;
typedef vector<double> dvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
#define fs first
#define sc second
int main()	{
  int n,m;
  cin>>n>>m;
  vector<int>d(m);
  rep(i,n){
    int k;
    cin>>k;
    rep(j,k){
      cin>>a;
      d[j]++;
    }
  }
  int ans=0;
  rep(i,m){
    if(d[i]==n)
      ans++;
  }
  cout<<ans<<endl;
}

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

/*
 * cpp_filepath
 */

// C++ 14
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstring> // memset
#include <cassert>
using namespace std;
#define ll long long
#define loop(__x, __start, __end) for(int __x = __start; __x < __end; __x++)
template <class T> ostream & operator << (ostream & out, vector<T> const & v) {
  for (auto &&a: v) out << a << " "; out << endl; return out;
}
template <class T> void dump(T &a) { cout << a << endl; }
void solve();
int main() { solve(); return 0; }


#include <set>
void solve() {
  int n, m;
  cin >> n >> m;
  vector<set<int> > S(m);
  loop(i,0,n) {
    int k;
    cin >> k;
    loop(j,0,k) {
      int a;
      cin >> a; a--;
      S[a].insert(i);
    }
  }
  
  int total = 0;
  for (auto s: S) {
    if (s.second == n) total++;
  }
  cout << total << endl;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:40:11: error: 'class std::set<int>' has no member named 'second'
   40 |     if (s.second == n) total++;
      |           ^~~~~~
Language: C

#include<stdio.h>
int main(){
  int n,m,cnt,s =0;
  scanf("%d%d",&n,&m);
  int k[n],a[n][m];
  for(int i = 0;i< n;i++){
    scanf("%d",&k[i]);
  }
  for(int i = 0;i < n;i++){
    for(int j = 0;j < k[i];j++){
      scanf("%d",&a[i][j]);
    }
  }
    
    for(int j = 0;j < k[i];j ++){
      cnt = 0;
      for(int x = 0;x < n;x++){
        for(int y = 0;y<k[x];y++){
           if(a[0][j] == a[x][y]){
             cnt ++;
           }
        }
      }
    }
    if(cnt == n){
      s ++;  
    }
  }
  printf("%d",s);
}


Compiler output:
main.c: In function 'main':
main.c:15:25: error: 'i' undeclared (first use in this function)
   15 |     for(int j = 0;j < k[i];j ++){
      |                         ^
main.c:15:25: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:29:10: error: expected declaration specifiers or '...' before string constant
   29 |   printf("%d",s);
      |          ^~~~
main.c:29:15: error: unknown type name 's'
   29 |   printf("%d",s);
      |               ^
main.c:30:1: error: expected identifier or '(' before '}' token
   30 | }
      | ^
Language: C

#include<stdio.h>
int main(){
  int n,m,cnt,s =0;
  scanf("%d%d",n,m);
  int k[n],a[n][m];
  for(int i = 0;i< n;i++){
    scanf("%d",&k[i]);
  }
  for(int i = 0;i < n;i++){
    for(int j = 0;j < k[i];j++){
      scanf("%d",&a[i][j]);
    }
  }
  for(int i = 0;i < n;i++){
    cnt = 0;
    for(int j = 0;j < m;j ++){
      for(int x = i;x < n;x++){
        for(int y = j;y<m;y++){
           if(a[i][j] == a[x][y]){
             cnt ++;
           }
        }
      }
    }
    if(cnt == n){
      s ++;  
    }
  }
  printf("%d",s);
}
      
    }

Compiler output:
main.c:32:5: error: expected identifier or '(' before '}' token
   32 |     }
      |     ^
Language: C

#include<stdio.h>
int main(){
  int n,m,a,k;
  scanf("%d %d",&n,&m);
  int cnt[31];
  for(int i=0;i<n;i++){
    scanf("%d",&k);
    for(int j=0;j<k;j++){
      scanf("%d",&a);
      cnt[a-1]++;
    }
  }
  int anw=0;
  for(int i=0;i<m;i++){
    if(cnt[i] == N){
      anw++;
    }
  }
  printf("%d",anw);
}
  

Compiler output:
main.c: In function 'main':
main.c:15:18: error: 'N' undeclared (first use in this function)
   15 |     if(cnt[i] == N){
      |                  ^
main.c:15:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>
#include <set>
#include <vector>
#define REP(i, n) for (int i = 0; i < (n); i++)
using namespace std;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n, m;
    cin >> n >> m;

    vector<set<int> > a(n);
    REP(i, n) {
        int k;
        cin >> k;
        REP(j, k) {
            int tmp;
            cin >> tmp;
            a[i].insert(tmp);
        }
    }

    set<int> ans;
    if (n == 1) cout << a[0].size() << '\n';
    else {
        set_intersection(a[0].begin(), a[0].end(),
                a[1].begin(), a[1].end(),
                inserter(ans, ans.end()));
        REP(i, n) {
            set<int> tmp;
            set_intersection(ans.begin(), ans.end(),
                    a[i].begin(), a[i].end(),
                    inserter(tmp, tmp.end()));
            ans.clear();
            ans = tmp;
        }
        cout << ans.size() << '\n';
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: 'set_intersection' was not declared in this scope
   27 |         set_intersection(a[0].begin(), a[0].end(),
      |         ^~~~~~~~~~~~~~~~
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 gu=0;
    for(int i=0;i<m;i++){
      if(cnt[i]==n){
        gu++;
      }
    }
  }
  cout<<gu<<endl;
}
    
  


Compiler output:
a.cc: In function 'int main()':
a.cc:24:9: error: 'gu' was not declared in this scope
   24 |   cout<<gu<<endl;
      |         ^~
Language: C++

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

int main() {
  int n, m;
  cin >> n >> m;
  vector<vector<int>> a(n);
  int size;
  for (int i = 0; i < n; i++) {
    cin >> size;
    (int)a.at(i).size() = size;
    for (int j = 0; j < (int)a.at(i).size(); j++) {
      cin >> a.at(i).at(j);
    }
  }
  int sum;
  int res = 0;
  for (int k = 1; k <= m; k++) {
    sum = 0;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        if (a.at(i).at(j) == k) {
          sum++;
        }
      }
    }
    if (sum == n) {
      res++;
    }
  }
  cout << res << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: lvalue required as left operand of assignment
   11 |     (int)a.at(i).size() = size;
      |     ^~~~~~~~~~~~~~~~~~~
Language: C++

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

int gcd(int a,b)
int main(){
    ll n;
    cin >> n;
    vector<int> a(n);
    rep(i,n) cin >> a[i];
    int ans = a[0];
    rep(i,n){
        ans = gcd(ans,a[i]);
    }
    cout << ans << endl;
}

Compiler output:
a.cc:7:15: error: 'b' has not been declared
    7 | int gcd(int a,b)
      |               ^
a.cc:8:1: error: expected initializer before 'int'
    8 | int main(){
      | ^~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:15:20: error: expected ';' before 'int'
   15 |   scanf("%d",&k[i])
      |                    ^
      |                    ;
   16 |     int love[k[i]];
      |     ~~~             
main.c:19:17: error: 'love' undeclared (first use in this function)
   19 |     scanf("%d",&love[j]);
      |                 ^~~~
main.c:19:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:15:20: error: expected ';' before 'int'
   15 |   scanf("%d",&k[i])
      |                    ^
      |                    ;
   16 |     int love[k[i]];
      |     ~~~             
main.c:19:17: error: 'love' undeclared (first use in this function)
   19 |     scanf("%d",&love[j]);
      |                 ^~~~
main.c:19:17: note: each undeclared identifier is reported only once for each function it appears in
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;
  if(cnt[i]==N){
    ++ans;
  }
}
cout<<ans;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'n' was not declared in this scope
    7 |   for(int i=0;i<n;i++){
      |                 ^
a.cc:18:10: error: 'i' was not declared in this scope
   18 |   if(cnt[i]==N){
      |          ^
a.cc: At global scope:
a.cc:22:1: error: 'cout' does not name a type
   22 | cout<<ans;
      | ^~~~
a.cc:23:1: error: expected unqualified-id before 'return'
   23 | return 0;
      | ^~~~~~
a.cc:24:1: error: expected declaration before '}' token
   24 | }
      | ^
Language: C++

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

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

  map<int,int> S;

  for (int i = 0; i < N; i++) {
    int K;
    cin >> K;
    
    for (int j = 0; j < K; j++) {
      int A;
      cin >> A;
      S[A]++;
    }
  }
  int itti;
  for (auto x : S) {
    if (S[x] == N) {
      itti++;
    }
  }
  cout << itti << endl;

} 

Compiler output:
a.cc: In function 'int main()':
a.cc:23:10: error: no match for 'operator[]' (operand types are 'std::map<int, int>' and 'std::pair<const int, int>')
   23 |     if (S[x] == N) {
      |          ^
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:504:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; mapped_type = int; key_type = int]'
  504 |       operator[](const key_type& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:504:34: note:   no known conversion for argument 1 from 'std::pair<const int, int>' to 'const std::map<int, int>::key_type&' {aka 'const int&'}
  504 |       operator[](const key_type& __k)
      |                  ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_map.h:524:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >; mapped_type = int; key_type = int]'
  524 |       operator[](key_type&& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:524:29: note:   no known conversion for argument 1 from 'std::pair<const int, int>' to 'std::map<int, int>::key_type&&' {aka 'int&&'}
  524 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
vector<int> input(int N) {
  vector<int> vec(N);
  for (int i = 0; i < N; i++) {
    cin >> vec.at(i);
  }
  return vec;
}

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


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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
vector<int> input(int N) {
  vector<int> vec(N);
  for (int i = 0; i < N; i++) {
    cin >> vec.at(i);
  }
  return vec;
}

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

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

n, m = map(int, input().split())
l = []
for i in range(n):
    a = list(map(int, input().split()))
    a.pop(0)
    l.append(a)
cnt1 = 0
for i in range(m):
    cnt2 = 0
    for j in range(n):
        if i + 1 in l[j]:
            cnt2 += 1
    if cnt2 == n:
        cnt1 += 1
print(cnt1)

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;
  cin>>N>>M;
  vector <set<int>> A(N);
  for(int i=0;i<N;i++){
    set<int> a;
    int K;
    cin>>K;
    for(int j=0;j<K;j++){
    int c;
      cin>>c;
      a.insert(c);
      
    }A.at(i)=a;
  
  }int ans=0;
  for(int i=1;i<=M;i++){
  bool x=true;
    for(int j=0;j<N;j++){
     if(!A.at(i).count()){
      x=false; break;
     }
    }  if(x) ans++;
  
 } cout<<ans<<endl;
   
    
    
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:23: error: no matching function for call to 'std::set<int>::count()'
   22 |      if(!A.at(i).count()){
      |          ~~~~~~~~~~~~~^~
In file included from /usr/include/c++/14/set:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:158,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_set.h:756:9: note: candidate: 'template<class _Kt> decltype (((const std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_count_tr(__x)) std::set<_Key, _Compare, _Alloc>::count(const _Kt&) const [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]'
  756 |         count(const _Kt& __x) const
      |         ^~~~~
/usr/include/c++/14/bits/stl_set.h:756:9: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_set.h:750:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::count(const key_type&) const [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; size_type = long unsigned int; key_type = int]'
  750 |       count(const key_type& __x) const
      |       ^~~~~
/usr/include/c++/14/bits/stl_set.h:750:7: note:   candidate expects 1 argument, 0 provided
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N,M;
  cin>>N>>M;
  vector <set<int>> A(N);
  for(int i=0;i<N;i++){
    set<int> a;
    int K;
    cin>>K;
    for(int j=0;j<K;j++){
    int c;
      cin>>c;
      a.insert(c);
      
    }A.at(i)=a;
  
  }int ans=0;
  for(int i=1;i<=M;i++){
  bool x=true;
    for(int j=0;j<N;j++){
     if(!A.at(i).cout()){
      x=false; break;
     }
    }  if(x) ans++;
  
 } cout<<ans<<endl;
   
    
    
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:18: error: '__gnu_cxx::__alloc_traits<std::allocator<std::set<int> >, std::set<int> >::value_type' {aka 'class std::set<int>'} has no member named 'cout'; did you mean 'count'?
   22 |      if(!A.at(i).cout()){
      |                  ^~~~
      |                  count
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N,M;
  cin>>N>>M;
  vector <set<int>> A(N);
  for(int i=0;i<N;i++){
    set<int> a;
    int K;
    cin>>K;
    for(int j=0;j<K;j++){
    int c;
      cin>>c;
      a.insert(c);
      
    }A.at(i)=a;
  
  }int ans=0;
  for(int i=1;i<=M;i++){
  bool x=true;
    for(int j=0;j<N;j++){
     if(!A.at(i).cout()){
      x=false; break;
     }
    }  if(x) sum++;
  
 } cout<<sum<<endl;
   
    
    
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:18: error: '__gnu_cxx::__alloc_traits<std::allocator<std::set<int> >, std::set<int> >::value_type' {aka 'class std::set<int>'} has no member named 'cout'; did you mean 'count'?
   22 |      if(!A.at(i).cout()){
      |                  ^~~~
      |                  count
a.cc:25:14: error: 'sum' was not declared in this scope
   25 |     }  if(x) sum++;
      |              ^~~
a.cc:27:10: error: 'sum' was not declared in this scope
   27 |  } cout<<sum<<endl;
      |          ^~~
Language: C

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

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

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

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


Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'pair'
    3 | using pair<int,string> pii;
      |       ^~~~
a.cc: In function 'int main()':
a.cc:22:22: error: 'N' was not declared in this scope
   22 |         if(cnt[i] == N){
      |                      ^
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
int main(void){
    int n,m,k[50],a[50][50];
    int mm[100];
    ine yes=0;
    scanf("%d %d",&n,&m);
    for(int k=0;k<m;k++){
        mm[k]=0;
    }

    for(int i=0;i<n;i++){
        scanf("%d",&k[i]);
        for(int j=0;j<k[i];j++){
            scanf("%d",&a[i][j]);
            mm[a[i][j]]++;
        }
    }

    for(int i=0;i<n;i++){
        if(mm[i]==n){yes++;}
    }
    printf("%d\n",yes);
}


Compiler output:
main.c: In function 'main':
main.c:8:5: error: unknown type name 'ine'; did you mean 'int'?
    8 |     ine yes=0;
      |     ^~~
      |     int
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 ;
}
}

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

  vector<int> food(M);

  for(int i = 0; i < N; i++){
    for(int j = 0; j < K[i]; j++){
      food[A[i][j] - 1] += 1; 
    }
  }
  int ans = 0;
  for(int i = 0; i < M; i++){
    if(food[i] == N) ans++;
  }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: 'A' was not declared in this scope
   11 |     cin >> A[i][j];
      |            ^
a.cc:19:12: error: 'A' was not declared in this scope
   19 |       food[A[i][j] - 1] += 1;
      |            ^
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#define REP(i, n) for(int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1001001001;
const int mINF = -1001001001;


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


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

#include <iostream>
#include <algorithm>
#include <iomanip>
#include <string>
#include <vector>
#include <math.h>
#include <queue>
#include <deque>
#include <map>
const int MOD = 1e9+7;
typedef long long ll;
using namespace std;


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

Compiler output:
a.cc: In function 'int main()':
a.cc:18:31: error: expected ',' or ';' before ':' token
   18 |         vector<int> foods(m+1):
      |                               ^
a.cc:19:25: error: 'i' was not declared in this scope
   19 |         for (int i = 0; i < n; i++){
      |                         ^
Language: C++

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

int n, m, score[31], count;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:33: error: reference to 'count' is ambiguous
   14 |                                 count++;
      |                                 ^~~~~
In file included from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:                 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
a.cc:4:22: note:                 'int count'
    4 | int n, m, score[31], count;
      |                      ^~~~~
a.cc:18:17: error: reference to 'count' is ambiguous
   18 |         cout << count << endl;
      |                 ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:                 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
a.cc:4:22: note:                 'int count'
    4 | int n, m, score[31], count;
      |                      ^~~~~
Language: C++

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

int main() {
	int n,m;
	cin >> n >> m;
	vector<int> s(m,0);
	for(int i=0;i<n;i++)
	{
		int k;
		cin >> k;
		for(int j=0;j<k;j++)
		{
			int a;
			cin >> a;
			s.at(a-1)++;
		}
	}
	int k = 0;
	for(int i=0;i<m;i++)
	{
		if(a.at(i) == n)
		{
			k++;
		}
	}
	cout << k << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:20: error: 'a' was not declared in this scope
   22 |                 if(a.at(i) == n)
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina cout << ' '
#define in(n) cin >> n
#define in2(n, m) cin >> n >> m
#define in3(n, m, l) cin >> n >> m >> l
#define out(n) cout << n
const ll mei = (ll)1e9 + 7;

int main(){
  ll n, m, a, b;
  in2(n, m);
  vector<ll> c(m);
  rep(i, n){
    in(a);
    rep(j, a){
      in(b);
        c[b - 1]++;
  }
  a = 0;
  rep(i, m){
    if(c[i] == n)
      a++;
  }
  out(a);
  memi;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:2: error: expected '}' at end of input
   34 | }
      |  ^
a.cc:17:11: note: to match this '{'
   17 | int main(){
      |           ^
Language: C++

using namespace std;
int main()
{
   int n,m,i,j;
   cin>>n>>m;
   int count[50]={0};
   int ans=0;
   for(i=0;i<n;i++)
   {
       int k;
      for( j=0;j<k;j++)
       {
           int temp;
           count[temp]++;
       }
       for( i=1;i<m+1;i++)
       {
           if(count[i]==n)
           {
               ans++;
           }
       }
       cout<<ans;
       
   }
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:4: error: 'cin' was not declared in this scope
    5 |    cin>>n>>m;
      |    ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:23:8: error: 'cout' was not declared in this scope
   23 |        cout<<ans;
      |        ^~~~
a.cc:23:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < n; ++i)
#define rep2(i,s,n) for (int i = s; i < n; ++i)
#define all(a) a.begin(),a.end()
using namespace std;
using ll = long long;
using P = pair<int,int>;

int main() {
    int n,m;
    cin >> n >> m;
    vector<bool> liked(m,true);
    rep(i,n) {
        int k;
        cin >> k;
        vector<bool> now(m,false);
        rep(j,k) {
            int a;
            cin >> a;
            a--;
            now[a] = true;
        }
        rep(i,m) liked[i] = liked[i]&&now[i];
    }
    int ans = 0;
    rep(i,m) if(liked[i]) ans++;
    cout << ans << endl;
}#include<bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < n; ++i)
#define rep2(i,s,n) for (int i = s; i < n; ++i)
#define all(a) a.begin(),a.end()
using namespace std;
using ll = long long;
using P = pair<int,int>;

int main() {
    int n,m;
    cin >> n >> m;
    vector<bool> liked(m,true);
    rep(i,n) {
        int k;
        cin >> k;
        vector<bool> now(m,false);
        rep(j,k) {
            int a;
            cin >> a;
            a--;
            now[a] = true;
        }
        rep(i,m) liked[i] = liked[i]&&now[i];
    }
    int ans = 0;
    rep(i,m) if(liked[i]) ans++;
    cout << ans << endl;
}

Compiler output:
a.cc:28:2: error: stray '#' in program
   28 | }#include<bits/stdc++.h>
      |  ^
a.cc:28:3: error: 'include' does not name a type
   28 | }#include<bits/stdc++.h>
      |   ^~~~~~~
a.cc:36:5: error: redefinition of 'int main()'
   36 | int main() {
      |     ^~~~
a.cc:9:5: note: 'int main()' previously defined here
    9 | int main() {
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < n; ++i)
#define rep2(i,s,n) for (int i = s; i < n; ++i)
#define all(a) a.begin(),a.end()
using namespace std;
using ll = long long;
using P = pair<int,int>;

int main() {
    int n,m;
    cin >> n >> m;
    vector<bool> liked(m,true);
    rep(i,n) {
        int k;
        cin >> k;
        vector<bool> now(m,false);
        rep(j,k) {
            int a;
            cin >> a;
            a--;
            now[a] = true;
        }
        rep(i,m) liked[i] &&= now[i];
    }
    int ans = 0;
    rep(i,m) if(liked[i]) ans++;
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:29: error: expected primary-expression before '=' token
   23 |         rep(i,m) liked[i] &&= now[i];
      |                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,M,K,x=0,a;cin>>N>>M;
  vector<vector<bool>>p(N,vector<bool>(M,false));
  for(int i=0;i<N;i++){
    cin>>K;
    for(int j=0;j<K;j++){
      cin>>a;
      p.at(i).at(a-1)=true;
    }
  }
  for(int i=0;i<M;i++){
    bool g=true;
    for(int j=0;j<N;j++){
      g=g&&P.at(j).at(i);
    }
    if(g)x++;
  }
  cout<<x<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: 'P' was not declared in this scope
   16 |       g=g&&P.at(j).at(i);
      |            ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'a' was not declared in this scope
    7 |     a[n][m+1];
      |     ^
Language: C++

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

int main() {
  int n,m,t;
  t=0;
  cin>>n>>m;
  vector<vector<int>>vec(n,vector<int>);
  for(int i=0;i<n;i++){
    int l;
    cin>>l;
    for(int j=0;j<l;j++){
      int k;
      cin>>k;
      vec.at(i).at(j)=k;
    }
  }
  for(int i=1;i<m+1;i++){
    bool ans=false;
    int count=0;
    for(int j=0;j<n;j++){
      for(int k=0;k<vec.at(j).size();k++){
        if(vec.at(j).at(k)==i)ans=true;
      }
      if(ans)count++;
    }
    if(count==n)t++;
  }
  cout<<t<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:39: error: expected primary-expression before ')' token
    8 |   vector<vector<int>>vec(n,vector<int>);
      |                                       ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
#define fi first
#define se second
#define co(a) cout<<a<<endl
#define sz size()
#define bgn begin()
#define en end()
#define pb(a) push_back(a) //追加//
#define pp() pop_back() //削除//
#define V vector
#define P pair
#define V2(a,b,c) V<V<int>> a(b,V<int>(c))
#define V2a(a,b,c,d) V<V<int>> a(b,V<int>(c,d))
#define incin(a) int a; cin>>a
#define yuko(a) setprecision(a)
#define uni(a) a.erase(unique(a.begin(),a.end()),a.end())

signed main(){
  int n,m;
  cin>>n>>m;
  int ans=0;
  V<int> b(m,0);
  for(int i=0; i<n; i++){
    int k;
    
    fo(j,k){
      cin>>a;
      b[a-1]++;
    }

  }
  fo(i,m){
    if(b[i]==n)
      ans++;
  }
  cout<<ans<<endl;
}


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

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

int main() {
  int c, n, m, k, a;
  cin >> n >> m;
  int b[m]=0;
  for (int i=0;i<n;i++){
    cin >> k;
    for (int j=0;j<k;j++){
      cin >> a;
      b[a]++;
    }
  }
  int cl=0;
  for (int i=0;i<m;i++){
    if (b[i] == n)cl++;
  }
  cout << cl << endl;
  return 0;
}


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

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

int main() {
  int c, n, m, k, a;
  cin >> n >> m;
  int b[m]=<0>;
  for (int i=0;i<n;i++){
    cin >> k;
    for (int j=0;j<k;j++){
      cin >> a;
      b[a]++;
    }
  }
  int cl=0;
  for (int i=0;i<m;i++){
    if (b[i] == n)cl++;
  }
  cout << cl << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected primary-expression before '<' token
    8 |   int b[m]=<0>;
      |            ^
a.cc:8:15: error: expected primary-expression before ';' token
    8 |   int b[m]=<0>;
      |               ^
Language: C++

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

int main(){
    int kathusand, omerice;
    cin >> kathusand >> omerice;

    vector<int> mentaiko(omerice + 2, 0);
    for(int sushi = 0; sushi < kathusand; sushi++){
        int cream_brulee; cin >> cream_brulee;
        for(int sirloin_steak = 0; sirloin_steak < cream_brulee; sirloin_steak++){
            cin >> mentaiko[omerice], mentaiko[omerice]--;
            if(++mentaicko[mentaiko[omerice]] == kathusand) mentaiko[omerice + 1]++;
        }
    }

    cout << mentaiko[omerice + 1] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: 'mentaicko' was not declared in this scope; did you mean 'mentaiko'?
   13 |             if(++mentaicko[mentaiko[omerice]] == kathusand) mentaiko[omerice + 1]++;
      |                  ^~~~~~~~~
      |                  mentaiko
Language: C++

#include<iostream>
using namespace std;
int main(){
int a,b,c[100],b[100][100],f[100]={0},e=0,g=0;
  cin>>a>>b;
  for(int i=0;i<a;i++){
    cin>>c[i];
    for(int j=0;j=c[i];j++){
      cin>>d[i][j];
    }
  }
  for(int i=0;i<b;l++){
     for(int i=0;i<a;i++){
    for(int j=0;j=c[i];j++){
      if(l==a[i][j])e++;
    }                                  
  }
   if(e==l)g++;
    e=0;
  }
  cout<<g<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:16: error: conflicting declaration 'int b [100][100]'
    4 | int a,b,c[100],b[100][100],f[100]={0},e=0,g=0;
      |                ^
a.cc:4:7: note: previous declaration as 'int b'
    4 | int a,b,c[100],b[100][100],f[100]={0},e=0,g=0;
      |       ^
a.cc:9:12: error: 'd' was not declared in this scope
    9 |       cin>>d[i][j];
      |            ^
a.cc:12:19: error: 'l' was not declared in this scope
   12 |   for(int i=0;i<b;l++){
      |                   ^
a.cc:15:14: error: invalid types 'int[int]' for array subscript
   15 |       if(l==a[i][j])e++;
      |              ^
Language: C++

#include<iostream>
using namespace std;
int main(){
int a,b,c[100],b[100][100],f[100]={0},e=0,g=0;
  cin>>a>>b;
  for(int i=0;i<a;i++){
    cin>>c[i];
    for(int j=0;j=c[i];j++){
      cin>>d[i][j];
    }
  }
  for(int i=0;i<b;l++){
     for(int i=0;i<a;i++){
    for(int j=0;j=c[i];j++){
      if(l==a[i][j])e++;
    }                                  
  }
   if(e==l)g++;
  }
  cout<<g<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:16: error: conflicting declaration 'int b [100][100]'
    4 | int a,b,c[100],b[100][100],f[100]={0},e=0,g=0;
      |                ^
a.cc:4:7: note: previous declaration as 'int b'
    4 | int a,b,c[100],b[100][100],f[100]={0},e=0,g=0;
      |       ^
a.cc:9:12: error: 'd' was not declared in this scope
    9 |       cin>>d[i][j];
      |            ^
a.cc:12:19: error: 'l' was not declared in this scope
   12 |   for(int i=0;i<b;l++){
      |                   ^
a.cc:15:14: error: invalid types 'int[int]' for array subscript
   15 |       if(l==a[i][j])e++;
      |              ^
Language: C++

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

int main(){
  int n,m;
  cin >> n >> m;
  vector<int> vec(m);
  int k,a;
  for(int i=0; i<n; i++){
    cin >> k;
    for(int i=0; i<k; i++){
      cin >> a;
      vector.at(a)++;
    }
  }
  for(int i=0; i<m; i++){
    if(vector.at(i)==n)cout << i << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: expected unqualified-id before '.' token
   13 |       vector.at(a)++;
      |             ^
a.cc:17:14: error: expected unqualified-id before '.' token
   17 |     if(vector.at(i)==n)cout << i << endl;
      |              ^
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;
}

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 < 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;
}

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