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

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

        List<Integer> arrayList1 = new ArrayList<Integer>();
        List<Integerr> arrayList2 = new ArrayList<Integer>();
        int N = scanner.nextInt();
        int K = scanner.nextInt();
        
        for(int i = 1; i <= K; i++){
            int d = scanner.nextInt();
            for(int s = 0; s <= d; s++){
                int A = scanner.nextInt();
                arrayList2.add(A);
            }
            arrayList1.add(arrayList2);
        }
        
        int count_treat = 0;
        for(int i = 0;i < n;i++) {
            if(b_list.get(i).size() == 0) {
                count_treat += 1;
            }
        }

        System.out.println(count_treat);
    }
}

Compiler output:
Main.java:6: error: cannot find symbol
        List<Integer> arrayList1 = new ArrayList<Integer>();
        ^
  symbol:   class List
  location: class Main
Main.java:6: error: cannot find symbol
        List<Integer> arrayList1 = new ArrayList<Integer>();
                                       ^
  symbol:   class ArrayList
  location: class Main
Main.java:7: error: cannot find symbol
        List<Integerr> arrayList2 = new ArrayList<Integer>();
        ^
  symbol:   class List
  location: class Main
Main.java:7: error: cannot find symbol
        List<Integerr> arrayList2 = new ArrayList<Integer>();
             ^
  symbol:   class Integerr
  location: class Main
Main.java:7: error: cannot find symbol
        List<Integerr> arrayList2 = new ArrayList<Integer>();
                                        ^
  symbol:   class ArrayList
  location: class Main
Main.java:21: error: cannot find symbol
        for(int i = 0;i < n;i++) {
                          ^
  symbol:   variable n
  location: class Main
Main.java:22: error: cannot find symbol
            if(b_list.get(i).size() == 0) {
               ^
  symbol:   variable b_list
  location: class Main
7 errors
Language: C++

#include <bits/stdc++.h>

#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
 
int main() {
  int n,k;
  cin >> n >> k;
  vector<int> d(n);
  
  rep(i,k){
    int m;
    cin >> m
    rep(j,m) {
      int a;
        cin >> a;
      d[a-1] = 1;
    }
  }
  
  int ans = 0;
  rep(i,n) if (d[i] == 0) ans++;
  cout << ans << endl;
  return 0;
     
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: expected ';' before 'for'
   13 |     cin >> m
      |             ^
      |             ;
a.cc:14:9: error: 'j' was not declared in this scope
   14 |     rep(j,m) {
      |         ^
a.cc:3:34: note: in definition of macro 'rep'
    3 | #define rep(i,n) for (int i = 0; i < (n); ++i)
      |                                  ^
Language: C++

#include <bits/stdc++.h>

#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
 
int main() {
  int n,k;
  cin >> n >> k;
  vector<int> d(n);
  
  rep(i,k){
    int m;
    cin >> m
    rep(j,m) {
      int a;
        cin >> a;
      d[a-1] = 1;
    }
  }
  
  int ans = 0;
  rep(i,n) if (d[i] == 0) ans++;
  coit << ans << endl;
  return 0;
     
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: expected ';' before 'for'
   13 |     cin >> m
      |             ^
      |             ;
a.cc:14:9: error: 'j' was not declared in this scope
   14 |     rep(j,m) {
      |         ^
a.cc:3:34: note: in definition of macro 'rep'
    3 | #define rep(i,n) for (int i = 0; i < (n); ++i)
      |                                  ^
a.cc:23:3: error: 'coit' was not declared in this scope
   23 |   coit << ans << endl;
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n,k; cin >> n >> k;
  int data[k][n];
  int d;
  for (int i = 0; i < k; i++){
    cin >> d;
    for (int j = 0; j < d; j++)
      cin >> data[i][j];
    for (int j = d; j < n; j++)
      data[i][j] = 0;
  }
  //入力
  int count = 0;
  bool xx = false;
  for (int k = 0; k < n; j++){
    for (int i = 0; i < k; i++){
       for (int j = 0; j < n; j++){
         if (data[i][j] = k){
           xx = true;
           break;
         }
       }
       if(xx) break;
    }
    if(xx) count++;
    xx = false;
  }
  cout << count << endl;
}
      
         
    

Compiler output:
a.cc: In function 'int main()':
a.cc:18:26: error: 'j' was not declared in this scope
   18 |   for (int k = 0; k < n; j++){
      |                          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n,k; cin >> n >> k;
  int data[k][n];
  int d;
  for (int i = 0; i < k; i++){
    cin >> d;
    for (int j = 0; j < d; j++)
      cin >> data[i][j];
    for (int j = d; j < n; j++)
      data[i][j] = 0;
  }
  //入力
  int count = 0;
  bool xx = false;
  for (int k = 0; k < n; j++){
    for (int i = 0; i < k; i++){
       for (int j = 0; j < n; j++){
         if (data[i][j] = k){
           xx = true;
           break;
         }
       }
       if(xx) break;
    }
    if(xx) count++;
  }
  cout << count << endl;
}
      
         
    

Compiler output:
a.cc: In function 'int main()':
a.cc:18:26: error: 'j' was not declared in this scope
   18 |   for (int k = 0; k < n; j++){
      |                          ^
Language: C++

#include "iostream"
using namespace std;
int snooke[10000];
int main()
{
    int n,k;
    cin>>n>>k;
    memset(snooke, 0, sizeof(snooke));
    for(int i=1;i<=k;i++)
    {
        int j;
        cin>>j;
        
        for(int lol=1;lol<=j;lol++)
        {
            int f;
            cin>>f;
            snooke[f]=1;
            
        }
        
        
    }
    
    int count=0;
    for(int i=1;i<=n;i++)
    {
        if(snooke[i]==0) count++;
        
    }
    
    cout<<count<<endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'memset' was not declared in this scope
    8 |     memset(snooke, 0, sizeof(snooke));
      |     ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include "iostream"
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C

#include<bits/stdc++.h>
using namespace std;
bool you[105];
int main()
{
	int n,k;
	cin>>n>>k;
	for(int i=0;i<k;i++)
	{
		int d;
		cin>>d;
		for(int j=0;j<d;j++)
		{
			int a;
			cin>>a;
			you[a]=true;
		}
	}
	int cnt=0;
	for(int i=1;i<=n;i++)
	{
		if(you[i]==false)cnt++;
	}
	cout<<cnt<<endl;
	return 0;
}


Compiler output:
main.c:1:9: 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 n, k;

int main() {
	cin >> n >> k;
	int d, a;
	bool f[n + 1] = {};
	for(int i = 1; i <= k; i++) {
		cin >> d;
		for(int j = 1; j <= d[i]; j++) {
			cin >> a;
			f[a] = true;
		}
	}

	int t = 0;
	for(int i = 1; i <= n; i++)
		if(!f[i]) t++;

	cout << t;

//	system("pause");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:38: error: invalid types 'int[int]' for array subscript
   12 |                 for(int j = 1; j <= d[i]; j++) {
      |                                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int n,k;
  cin >> n >> k;
  vector<bool>judge(n);
  for(int i=0;i<n;i++){
    judge(n)=true;
  }
  for(int i=0;i<k;i++){
    int d;
    cin >> d;
    for(int i=0;i<d;i++){
      int a;
      cin >> a;
      judge.at(a-1)=false;
    }
  }
  int cnt=0;
  for(int i=0;i<n;i++){
    if(judge.at(i)){
      cnt++;
    }
  }
  cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: no match for call to '(std::vector<bool>) (int&)'
    9 |     judge(n)=true;
      |     ~~~~~^~~
Language: C

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

const int N = 2e5+7;
struct node
{
	int a,b,c,d;
}Q[55];

int n,m,q;
int s[15],ans;

void check()
{
	int num=0;
	for(int i=0;i<q;i++)
	{
		if(s[Q[i].b]-s[Q[i].a]==Q[i].c) num+=Q[i].d;
	}
	ans = max(ans,num);
}
void dfs(int pos,int val)
{
	s[pos] = val;
	if(pos==n) 
	{
		check();
		return ;
	}
	for(int i=val;i<=m;i++)
	{
		dfs(pos+1,i);
	}
}
int main()
{
	cin >> n >> m >> q;
	for(int i=0;i<q;i++)
	{
		int a,b,c,d;
		cin >> a >> b >> c >> d;
		Q[i] = (node){a,b,c,d};
	}
	dfs(1,1);
	cout << ans << endl;
	return 0;
}

Compiler output:
main.c:1:9: 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(){l n,k;cin>>n>>k;unordered_set<int> g;for(int i=0;i<k;i++){int d;cin>>d;for(int i=0;i<d;i++){int u;cin>>u;g.insert(u);}}int r=g.size();cout<<n-r<<endl;}


Compiler output:
a.cc: In function 'int main()':
a.cc:2:32: error: 'l' was not declared in this scope
    2 | using namespace std;int main(){l n,k;cin>>n>>k;unordered_set<int> g;for(int i=0;i<k;i++){int d;cin>>d;for(int i=0;i<d;i++){int u;cin>>u;g.insert(u);}}int r=g.size();cout<<n-r<<endl;}
      |                                ^
a.cc:2:43: error: 'n' was not declared in this scope; did you mean 'yn'?
    2 | using namespace std;int main(){l n,k;cin>>n>>k;unordered_set<int> g;for(int i=0;i<k;i++){int d;cin>>d;for(int i=0;i<d;i++){int u;cin>>u;g.insert(u);}}int r=g.size();cout<<n-r<<endl;}
      |                                           ^
      |                                           yn
a.cc:2:46: error: 'k' was not declared in this scope
    2 | using namespace std;int main(){l n,k;cin>>n>>k;unordered_set<int> g;for(int i=0;i<k;i++){int d;cin>>d;for(int i=0;i<d;i++){int u;cin>>u;g.insert(u);}}int r=g.size();cout<<n-r<<endl;}
      |                                              ^
Language: C++

#include<bits/stdc++.h> using namespace std;typedef long long ll;int main(){ll n,k;cin>>n>>k;unordered_set<ll> done;for(int i=0;i<k;i++){ll d;cin>>d;for(int i=0;i<d;i++){ll u;cin>>u;done.insert(u);}}ll ds=done.size();cout<<n-ds<<endl;}

Compiler output:
a.cc:1:25: warning: extra tokens at end of #include directive
    1 | #include<bits/stdc++.h> using namespace std;typedef long long ll;int main(){ll n,k;cin>>n>>k;unordered_set<ll> done;for(int i=0;i<k;i++){ll d;cin>>d;for(int i=0;i<d;i++){ll u;cin>>u;done.insert(u);}}ll ds=done.size();cout<<n-ds<<endl;}
      |                         ^~~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

long long int n,k,x,a;
bool tr[110];

signed main()
{
    ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	
	cin>>n>>k;
	for (i=1;i<n+1;i++) tr[i]=false;
	for (i=1;i<k+1;i++)
	{
		cin>>x;
		for (j=1;j<x+1;j++) cin>>a,tr[a]=true;
	}
	x=0;
	for (i=1;i<n+1;i++) if (!tr[a]) x++;
	cout<<x;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: 'i' was not declared in this scope
   14 |         for (i=1;i<n+1;i++) tr[i]=false;
      |              ^
a.cc:15:14: error: 'i' was not declared in this scope
   15 |         for (i=1;i<k+1;i++)
      |              ^
a.cc:18:22: error: 'j' was not declared in this scope
   18 |                 for (j=1;j<x+1;j++) cin>>a,tr[a]=true;
      |                      ^
a.cc:21:14: error: 'i' was not declared in this scope
   21 |         for (i=1;i<n+1;i++) if (!tr[a]) x++;
      |              ^
Language: C++


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

Compiler output:
a.cc:2:2: error: stray '#' in program
    2 | }#include <bits/stdc++.h>
      |  ^
a.cc:2:1: error: expected declaration before '}' token
    2 | }#include <bits/stdc++.h>
      | ^
a.cc:2:3: error: 'include' does not name a type
    2 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> N >> M;
      |   ^~~
a.cc:8:3: error: 'vector' was not declared in this scope
    8 |   vector<int> A(N);
      |   ^~~~~~
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vector<int> A(N);
      |          ^~~
a.cc:15:7: error: 'A' was not declared in this scope
   15 |       A.at(x-1)++;
      |       ^
a.cc:20:8: error: 'A' was not declared in this scope
   20 |     if(A.at(i)==0){
      |        ^
a.cc:24:3: error: 'cout' was not declared in this scope
   24 |   cout << counter << endl;
      |   ^~~~
a.cc:24:22: error: 'endl' was not declared in this scope
   24 |   cout << counter << endl;
      |                      ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef map<int,int> mii;
typedef map<ll,ll> mll;
typedef vector<pii> vii;
typedef vector<pll> vll;
#define fi first
#define se second
#define pi 3.141592653589793
#define mod 1e9 + 7
#define pb push_back
#define all(v) v.begin(),v.end()
#define rall(v) v.begin(), v.end(), greater<ll>()
#define tc int t;cin>>t;while(t--)
#define pqmax priority_queue<int>
#define pqmin priority_queue<int,vi,greater<int>>
#define fast_io ios_base::sync_with_stdio(0), cin.tie(NULL)
#define tc_g int tt;cin>>tt;for(int ti=1;ti<=tt;ti++)
#define case_g "Case #"<<ti<<": "
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_multiset;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
typedef tree<int, int, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_map;
using namespace std;
int main() {
    ll N, K;
    cin >> N >> K;
    vector<bool> ishaving(N);
    ll d, num;
    for(int i = 0; i < N; ++i) {
        cin >> d;
        ishaving[d] = true;
        for(int j = 1; j <= d; ++j) {
            cin >> num;
        }
    }
    bool ans = 0;
    for(int i = 0; i < N; ++i) {
        if(ishaving[i]) {
            ans++;
        }
    }
    cout << (N - ans);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:49:13: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
   49 |             ans++;
      |             ^~~
Language: C++

#include <iostream>
using namespace std;

int main(){
	double N, K, ans=0;
  	cin >> N >> K;
  	bool check[N];
  	for(double i=0; i<K; i++){
    	double d;
      	cin >> d;
      	for(double j=0; j<d; j++){
        	double A;
          	cin >> A;
          	check[A-1]=false;
        }
    }
  	for(double i=0; i<N; i++){
    	if(check[i]==true){
        	ans++;
        }
    }
  	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    7 |         bool check[N];
      |                    ^
a.cc:7:20: error: could not convert 'N' from 'double' to 'long unsigned int'
    7 |         bool check[N];
      |                    ^
      |                    |
      |                    double
a.cc:7:20: error: size of array 'check' has non-integral type 'double'
a.cc:14:22: error: invalid types 'bool [1][double]' for array subscript
   14 |                 check[A-1]=false;
      |                      ^
a.cc:18:17: error: invalid types 'bool [1][double]' for array subscript
   18 |         if(check[i]==true){
      |                 ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(n); ++i)
using namespace std;
int main() {
  int N, K;
  cin >> N >> K;
  vector<int> A(N);
  rep(i,N)
    A.at(i) = i + 1;
  rep(i,N) {
    int d;
    cin >> d;
    rep(j,d) {
      int A;
      cin >> A;
      rep(k,n) {
        if (A == A.at(k))
          A.at(k) = 0;
      }
    }
  }
  rep(i,N) {
    if(A.at(i) == 0)
      N = N - 1;
  }
  cout << N << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: 'n' was not declared in this scope
   16 |       rep(k,n) {
      |             ^
a.cc:2:34: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i=0; i<(n); ++i)
      |                                  ^
a.cc:17:20: error: request for member 'at' in 'A', which is of non-class type 'int'
   17 |         if (A == A.at(k))
      |                    ^~
a.cc:18:13: error: request for member 'at' in 'A', which is of non-class type 'int'
   18 |           A.at(k) = 0;
      |             ^~
Language: C++

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

int main(){
  int n,k;
  int p;
  cin >> n >> k;
   vector<int> v(n);
  for(int i;i<n;i++){
    v[i]=0;
  }
  for(int i;i<k;i++){
    cin >> d;
    for(int j;j<d;j++){
     cin >> p;
      v[p]=1;
    }
  }
  int s=0;
  for(int i;i<n;i++){
    if(v[i]!=1){
      s++;
    }
  }
  cout << s;
  return 0;
}
  
  
  
      
      


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

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

int main(){
  int n,k;
  int p;
  cin >> n >> k;
   vector<int> v(n);
  for(int i;i<n;i++){
    v[i]=0;
  }
  for(int i;i<k;i++){
    cin >> d;
    for(int j;j<d;j++){
     cin >> p;
      v[p]=1;
    }
  }
  int s=0;
  for(int i;i<n;i++){
    if(v[i]!=1){
      s++;
    }
  }
  cout << s;
  return 0;
}
  
  
  
      
      

Compiler output:
a.cc: In function 'int main()':
a.cc:9:4: error: 'vector' was not declared in this scope
    9 |    vector<int> v(n);
      |    ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include<math.h>
  +++ |+#include <vector>
    3 | using namespace std;
a.cc:9:11: error: expected primary-expression before 'int'
    9 |    vector<int> v(n);
      |           ^~~
a.cc:11:5: error: 'v' was not declared in this scope
   11 |     v[i]=0;
      |     ^
a.cc:14:12: error: 'd' was not declared in this scope
   14 |     cin >> d;
      |            ^
a.cc:17:7: error: 'v' was not declared in this scope
   17 |       v[p]=1;
      |       ^
a.cc:22:8: error: 'v' was not declared in this scope
   22 |     if(v[i]!=1){
      |        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N,K; //N=人の数,K=お菓子の種類
  cin>>N>>K;
  int d,A;
  vector<int> ans;
  for(int j=0;j<d;j++){
      ans+=i+1;
  }
  for(int i=0;i<K;i++){
    cin>>d;
    for(int j=0;j<d;j++){
      cin>>A;
      ans.erace(ans.begin()-A);
    }
  }
  for(int j=0;j<d;j++){
      cout<<ans.at(j)<<endl;
  }
}  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'i' was not declared in this scope
    9 |       ans+=i+1;
      |            ^
a.cc:15:11: error: 'class std::vector<int>' has no member named 'erace'; did you mean 'erase'?
   15 |       ans.erace(ans.begin()-A);
      |           ^~~~~
      |           erase
Language: C++

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

int main(){
  int n,k,b[n+1],nm=0;
  cin>>n>>k;
  for(int i=1;i<=n;i++){
    b[i]==0;
  }
  vector<int>d(k);
  for(int i=1;i<=k;i++){
    cin>>d[i];
  }
  for(int i=1;i<=k;i++){
    for(j=1;j<=d[i];j++){
      int a;
      cin>>a;
      b[a]++;
    }
  }
  for(int i=1;i<=n;i++){
    if(b[i]==0){
      nm++;
    }
  }
  cout<<nm<<endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'j' was not declared in this scope
   15 |     for(j=1;j<=d[i];j++){
      |         ^
Language: C

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

void ReadFirstInput(int *snukesNumber, int *candyTypes)
{
    //printf_s("Enter the number of Snukes and Snacks: \n");
    scanf("%d %d", snukesNumber, candyTypes);
}

void CountTricks(int *snukesArray, int *snukesNumber)
{
    int counter = 0;
    
    for(int i = 0; i < *snukesNumber; i++)
    {
        if(snukesArray[i] != 1)
        {
            counter++;
        }
    }
    printf_s("%d", counter);
}

void CreateArray(int *snukesNumber, int *candyTypes)
{
    int *dArray = malloc(100 * sizeof(int));
    int *aArray =  malloc(100 * 100 * sizeof *aArray);
    int *snukesArray = malloc(100 * sizeof(int));
    
    for(int i = 0; i < *candyTypes; i++)
    {
        scanf("%d\n", &dArray[i]);
        for(int j = 0; j < dArray[i]; j++)
        {
            scanf("%d", &aArray[i + j]);
            int snukesWithSnacks = aArray[i + j];
            snukesArray[snukesWithSnacks - 1] = 1;
        }
    }
    
    CountTricks(snukesArray, snukesNumber);
    free(dArray);
    free(aArray);
    free(candyTypes);
}

int main(void)
{
    int *snukesNumber = malloc(3 * sizeof(int));
    int *candyTypes = malloc(3 * sizeof(int));
    
    ReadFirstInput(snukesNumber, candyTypes);
    CreateArray(snukesNumber, candyTypes);
    
    return 0;
}


Compiler output:
main.c: In function 'CountTricks':
main.c:21:5: error: implicit declaration of function 'printf_s'; did you mean 'printf'? [-Wimplicit-function-declaration]
   21 |     printf_s("%d", counter);
      |     ^~~~~~~~
      |     printf
Language: C

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

void ReadFirstInput(int *snukesNumber, int *candyTypes)
{
    //printf_s("Enter the number of Snukes and Snacks: \n");
    scanf("%d %d", snukesNumber, candyTypes);
}

void CountTricks(int *snukesArray, int *snukesNumber)
{
    int counter = 0;
    
    for(int i = 0; i < *snukesNumber; i++)
    {
        if(snukesArray[i] != 1)
        {
            counter++;
        }
    }
    printf_s("%d, counter);
}

void CreateArray(int *snukesNumber, int *candyTypes)
{
    int *dArray = malloc(100 * sizeof(int));
    int *aArray =  malloc(100 * 100 * sizeof *aArray);
    int *snukesArray = malloc(100 * sizeof(int));
    
    for(int i = 0; i < *candyTypes; i++)
    {
        scanf("%d\n", &dArray[i]);
        for(int j = 0; j < dArray[i]; j++)
        {
            scanf("%d", &aArray[i + j]);
            int snukesWithSnacks = aArray[i + j];
            snukesArray[snukesWithSnacks - 1] = 1;
        }
    }
    
    CountTricks(snukesArray, snukesNumber);
    free(dArray);
    free(aArray);
    free(candyTypes);
}

int main(void)
{
    int *snukesNumber = malloc(3 * sizeof(int));
    int *candyTypes = malloc(3 * sizeof(int));
    
    ReadFirstInput(snukesNumber, candyTypes);
    CreateArray(snukesNumber, candyTypes);
    
    return 0;
}

Compiler output:
main.c: In function 'CountTricks':
main.c:21:5: error: implicit declaration of function 'printf_s'; did you mean 'printf'? [-Wimplicit-function-declaration]
   21 |     printf_s("%d, counter);
      |     ^~~~~~~~
      |     printf
main.c:21:14: warning: missing terminating " character
   21 |     printf_s("%d, counter);
      |              ^
main.c:21:14: error: missing terminating " character
   21 |     printf_s("%d, counter);
      |              ^~~~~~~~~~~~~~
main.c:22:1: error: expected expression before '}' token
   22 | }
      | ^
main.c:21:14: error: expected ';' before '}' token
   21 |     printf_s("%d, counter);
      |              ^
      |              ;
   22 | }
      | ~
Language: C

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

void ReadFirstInput(int *snukesNumber, int *candyTypes)
{
    printf_s("Enter the number of Snukes and Snacks: \n");
    scanf("%d %d", snukesNumber, candyTypes);
}

void CountTricks(int *snukesArray, int *snukesNumber)
{
    int counter = 0;
    
    for(int i = 0; i < *snukesNumber; i++)
    {
        if(snukesArray[i] != 1)
        {
            counter++;
        }
    }
    printf_s("%d Snuke(s) had been tricked \n", counter);
}

void CreateArray(int *snukesNumber, int *candyTypes)
{
    int *dArray = malloc(100 * sizeof(int));
    int *aArray =  malloc(100 * 100 * sizeof *aArray);
    int *snukesArray = malloc(100 * sizeof(int));
    
    for(int i = 0; i < *candyTypes; i++)
    {
        scanf("%d\n", &dArray[i]);
        for(int j = 0; j < dArray[i]; j++)
        {
            scanf("%d", &aArray[i + j]);
            int snukesWithSnacks = aArray[i + j];
            snukesArray[snukesWithSnacks - 1] = 1;
        }
    }
    
    CountTricks(snukesArray, snukesNumber);
    free(dArray);
    free(aArray);
    free(candyTypes);
}

int main(void)
{
    int *snukesNumber = malloc(3 * sizeof(int));
    int *candyTypes = malloc(3 * sizeof(int));
    
    ReadFirstInput(snukesNumber, candyTypes);
    CreateArray(snukesNumber, candyTypes);
    
    return 0;
}

Compiler output:
main.c: In function 'ReadFirstInput':
main.c:6:5: error: implicit declaration of function 'printf_s'; did you mean 'printf'? [-Wimplicit-function-declaration]
    6 |     printf_s("Enter the number of Snukes and Snacks: \n");
      |     ^~~~~~~~
      |     printf
Language: C++

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

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	int N,K,tmp,d; cin >> N >> K;
    vector<int> snk(N,0)
    REP(i,K){
      cin >> d;
      REP(j,d){
        cin >> tmp;
        tmp--;
        snk[tmp]++;
      }
    }
    int ans = 0;
    REP(i,N) if(snk[i] == 0) ans++;
    cout << ans;
  	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:2:18: error: expected ',' or ';' before 'for'
    2 | #define REP(i,a) for(int (i)=0; (i)<(a); (i)++)
      |                  ^~~
a.cc:11:5: note: in expansion of macro 'REP'
   11 |     REP(i,K){
      |     ^~~
a.cc:11:9: error: 'i' was not declared in this scope
   11 |     REP(i,K){
      |         ^
a.cc:2:34: note: in definition of macro 'REP'
    2 | #define REP(i,a) for(int (i)=0; (i)<(a); (i)++)
      |                                  ^
Language: C

#include <bits/stdc++.h>

template <typename InputIterator>
typename InputIterator::value_type summation(InputIterator first,
                                             InputIterator last) {
  return std::accumulate(first, last, typename InputIterator::value_type());
}
template <typename T>
std::istream &operator>>(std::istream &stream, std::vector<T> &v);
template <typename T1, typename T2>
std::istream &operator>>(std::istream &stream, std::pair<T1, T2> &p);
template <typename T>
std::istream &operator>>(std::istream &stream, std::vector<T> &v) {
  for (auto &i : v) {
    stream >> i;
  }
  return stream;
}
template <typename T1, typename T2>
std::istream &operator>>(std::istream &stream, std::pair<T1, T2> &p) {
  stream >> p.first >> p.second;
  return stream;
}

int main() {
  int64_t n, k;
  std::cin >> n >> k;

  std::set<int64_t> has_snack;

  for (int64_t i = 0; i < k; i++) {
    int64_t d;
    std::cin >> d;
    std::vector<int64_t> a(d);
    std::cin >> a;
    for (const auto v : a) {
      has_snack.insert(v);
    }
  }

  std::cout << n - has_snack.size() << std::endl;
  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,k;
    int d[100];
    cin>>n>>k;
    
   vector<int>A(n,0);
   int nu[100][100];
   
  for(int i=0;i<k;i++)
  {
      cin>>d[i];
    
       for(int j=0;j<d[i];j++)
       {
           cin>>nu[i][j];
       }
    
  }
  
  for(int i=0;i<k;i++)
  {
      for(int j=0;j<d[i];j++)
      {
         A.at([nu[i][j]])++;
      }

  }
  
  
  int sum=0;
  for(int i=0;i<n;i++)
  {
      if(A.at(i)==0)
        sum++;
  
  }
  
   cout<<sum<<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:18: error: expected ',' before '[' token
   28 |          A.at([nu[i][j]])++;
      |                  ^
      |                  ,
a.cc:28:18: error: expected identifier before '[' token
a.cc: In lambda function:
a.cc:28:25: error: expected '{' before ')' token
   28 |          A.at([nu[i][j]])++;
      |                         ^
a.cc: In function 'int main()':
a.cc:28:14: error: no matching function for call to 'std::vector<int>::at(main()::<lambda()>)'
   28 |          A.at([nu[i][j]])++;
      |          ~~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1180:7: note: candidate: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::at(size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]'
 1180 |       at(size_type __n)
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1180:20: note:   no known conversion for argument 1 from 'main()::<lambda()>' to 'std::vector<int>::size_type' {aka 'long unsigned int'}
 1180 |       at(size_type __n)
      |          ~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1199:7: note: candidate: 'std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::at(size_type) const [with _Tp = int; _Alloc = std::allocator<int>; const_reference = const int&; size_type = long unsigned int]'
 1199 |       at(size_type __n) const
      |       ^~
/usr/include/c++/14/bits/stl_vector.h:1199:20: note:   no known conversion for argument 1 from 'main()::<lambda()>' to 'std::vector<int>::size_type' {aka 'long unsigned int'}
 1199 |       at(size_type __n) const
      |          ~~~~~~~~~~^~~
Language: C++

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

int main()
{
    int n,k;
    cin>>n>>k;
    
    map<int,bool>a;
  
    for(int i=0;i<k;k++)
    {
        int d=0;
        int A[d];
        cin>>d; 
          
       for(int j=0;j<d;j++)
       {
           cin>>A[j];
           
           if(!a.count(A[j]))
              {
                  a[A[j]]=true;
              } 
       }
    
    }
   int sun =0;
     for(int i=0;i<n;i++)
      {
          if(!a.count(i))
            sum++;
    
      }       

     cout<<sum<<endl;
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:13: error: 'sum' was not declared in this scope; did you mean 'sun'?
   32 |             sum++;
      |             ^~~
      |             sun
a.cc:36:12: error: 'sum' was not declared in this scope; did you mean 'sun'?
   36 |      cout<<sum<<endl;
      |            ^~~
      |            sun
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N, K;
  cin >> N >> K;
  vector<int> d(K);
  vector<vector<int>> A(K);
  for(int i = 0; i < K; i++){
    cin >> d(i);
    for(int j = 0; j < d[i]; j++){
      int num;
      cin >> num;
      A[i].push_back(num);
    }
  }
  vector<bool> key(N+1, false);
  int ans = 0;
  for(int count = 1; count <= N; count++){
    for(int i = 0; i < K; i++){
      for(int j = 0; j < A[i].size(); j++){
        if(count == A[i][j]){
          key[count] = true;
        }
      }
    }
    if(key[count] = false){
      ans++;
    }
  }
  cout << ans << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: no match for call to '(std::vector<int>) (int&)'
    9 |     cin >> d(i);
      |            ~^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N, K;
  cin >> N >> K;
  vector<vector<int>> A(K);
  for(int i = 0; i < K; i++){
    int d;
    cin >> d;
    for(int j = 0; j < d[i]; j++){
      A[i].push_back(j);
    }
  }
  vector<bool> key(N+1, false);
  for(int count = 1; count <= N; count++){
    for(int i = 0; i < K; i++){
      for(int j = 0; j < A[i].size(); j++){
        if(count == A[i][j]){
          key[count] = true;
        }
      }
    }
  }
  int ans = 0;
  for(int i = 0; i < N+1; i++){
    if(key[i] = false){
      ans++;
    }
  }
  cout << ans - 1 << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: invalid types 'int[int]' for array subscript
   10 |     for(int j = 0; j < d[i]; j++){
      |                         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N, K;
  cin >> N >> K;
  vector<vector<int>> A(K);
  for(int i = 0; i < K; i++){
    int d;
    cin >> d;
    for(int j = 0; j < d[i]; j++){
      A[i].push_back(j);
    }
  }
  vector<bool> key(N+1, false);
  for(int count = 1; count <= N; count++){
    for(int i = 0; i < k; i++){
      for(int j = 0; j < A[i].size(); j++){
        if(count == A[i][j]){
          key[count] = true;
        }
      }
    }
  }
  int ans = 0;
  for(int i = 0; i < N+1; i++){
    if(key[i] = false){
      ans++;
    }
  }
  cout << ans - 1 << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: invalid types 'int[int]' for array subscript
   10 |     for(int j = 0; j < d[i]; j++){
      |                         ^
a.cc:16:24: error: 'k' was not declared in this scope
   16 |     for(int i = 0; i < k; i++){
      |                        ^
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String args[]){
    Scanner scan = new Scanner();
    
    int N = scan.nextInt();
    int K = scan.nextInt();
    
    int sunuke[] = new int[N];
    int num;
    
    for(int k = 0; k < K; k++){
      num = scan.nextInt();
      for(int n = 0; n < num; n++){
        if(sunuke[scan.nextInt()]++ == 0){
          N--;
        }
      }
    }
    
    System.out.println(N);
  }
}

Compiler output:
Main.java:5: error: no suitable constructor found for Scanner(no arguments)
    Scanner scan = new Scanner();
                   ^
    constructor Scanner.Scanner(Readable,Pattern) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Readable) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,CharsetDecoder) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel,Charset) is not applicable
      (actual and formal argument lists differ in length)
1 error
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String args[]){
    Scanner scan = new Scanner();
    
    int N = scan.nextInt();
    int K = scan.nextInt();
    
    int sunuke[N];
    int num;
    
    for(int k = 0; k < K; k++){
      num = scan.nextInt();
      for(int n = 0; n < num; n++){
        if(sunuke[scan.nextInt()]++ == 0){
          N--;
        }
      }
    }
    
    System.out.println(N);
  }
}

Compiler output:
Main.java:10: error: ']' expected
    int sunuke[N];
               ^
Main.java:10: error: ';' expected
    int sunuke[N];
                ^
2 errors
Language: Java

import java.util.Scanner;

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

        int n  =sc.nextInt();
        int k = sc.nextInt();
        String brank = sc.nextLine();

        int max = 0;
        int d = 0;

        for(int i =1; i <= k; i++){
            d = sc.nextInt();
            brank = sc.nextInt();
            brank = sc.nextInt();
            if(d >= max){
                max = d;
            }
        }

        System.out.println(n-d);
        
    }
}

Compiler output:
Main.java:16: error: incompatible types: int cannot be converted to String
            brank = sc.nextInt();
                              ^
Main.java:17: error: incompatible types: int cannot be converted to String
            brank = sc.nextInt();
                              ^
2 errors
Language: C++

#include <iostream>
using namespace std;

int main(){
  int n,k,d,name,result=0;
  int array[100];
  cin>>n>>k;
  
  for(int i=1;i<=100;i++){array[i]=0;}
  
  for(int i=1;i<=100;i++){
    cin>>d;
    for(int i=1:i<=d;i++){
      cin>>name;
      array[name]=1;
    }
  }
  
  for(int i=1;i<=n;i++){
    if(array[i]==0){
      result++;
    }
  }
  cout<<result<<endl;
 
  return 0;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: initializer in range-based 'for' loop
   13 |     for(int i=1:i<=d;i++){
      |              ^
a.cc:13:21: error: expected ')' before ';' token
   13 |     for(int i=1:i<=d;i++){
      |        ~            ^
      |                     )
a.cc:13:25: error: expected ';' before ')' token
   13 |     for(int i=1:i<=d;i++){
      |                         ^
      |                         ;
Language: C++

#include < iostream>

using namespace std;

int main()
{
	int n, k;
	int a[100];
	int a_1[100][100];
	int d[100];

	cin >> n >> k;
	for (int i=0; i <= n; i++) {
		a[i] = i;
	}

	for (int i=0; i <= k - 1; i++) {
		cin >> d[i];
		for (int j = 0; j <= d[i]-1; j++) {
			cin >> a_1[i][j];
			a[a_1[i][j]] = 0;
		}
	}

	int p = 0;

	for (int i = 0; i <= n; i++) {
		if (a[i] != 0)
			p = p + 1;
	}
	cout << p;
}

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

#include<bits/stdc++.h>
using namespace std;
bool p[100000];
int main()
{
	int n,k;
	memset(p,0,sizeof(p));
	scanf("%d %d",&n,&k);
	ans = n;
	for(i=0;i<k;i++)
	{
		int l;
		scanf("%d",&l);
		for(int j=0;j<l;j++)
		{
			int a;
			scanf("%d",&a);
			if(!p[a])
			{
				p[a] =!p[a];
				ans--;
			}
		}
	}
	printf("%d",ans);
}

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

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

int main() {
  int n, k;

  cin >> n >> k;

  vector<int> a(n);

  for (int i = 0; i < k; i++) {
    int d;
    cin >> d;
    for (int j = 0; j < d; j++) {
      int tmp;
      cin >> tmp;
      a.at(tmp - 1) = 1;
    }
  }

  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (a.at(i) == 0) ans++;
  }

  cout << ans;

  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>
#define ll long long 
using namespace std;
int main(){
	// freopen("Input.txt","r",stdin); freopen("Output.txt","w",stdout);
	int n,k,d,tmp;
	cin>>n>>k;
	int arr[n+1]{};
	while(k--){
       cin>>d;
       for(int i=1;i<=d;++i){
       	   cin>>tmp;
       	   arr[tmp]=1;
       }
	}
	int ans=count(arr+1,arr+n+1,0);
	cout<<ans<<"\n";

}

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

import java.util.Scanner;

public class Main {
  public static void main() {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    int[] sunuke = new int[n]
    for (int i = 0; i<n; i++) {
      int d = sc.nextInt();
      for (int j = 0; j<d; j++) {
        int idx = sc.nextInt();
        sunuke[idx-1]+=1;
      }
    }
    int ans = 0;
    for (int i : sunuke) {
      if(i==0)ans++;
    }
    System.out.println(ans);
  }
}

Compiler output:
Main.java:8: error: ';' expected
    int[] sunuke = new int[n]
                             ^
1 error
Language: Java

//164B(Atcoder)
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
      	int K = sc.nextInt();
      	int[] A=new int[K];
      	
      	for(int i=0;i<K;i++){
          int d=sc.nextInt();
        for(int j=0;j<K;j++){
          a[sc.nextInt() - 1] += 1;
        }}
		
      	int count = 0;
        for (int i = 0; i < N; i++) {
          
            if (a[i] == 0) {
                count++;
            
        }
      }
 
        // 出力
        System.out.println(count);
    }
}

Compiler output:
Main.java:14: error: cannot find symbol
          a[sc.nextInt() - 1] += 1;
          ^
  symbol:   variable a
  location: class Main
Main.java:20: error: cannot find symbol
            if (a[i] == 0) {
                ^
  symbol:   variable a
  location: class Main
2 errors
Language: Java

//164B(Atcoder)
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
      	int K = sc.nextInt();
      	int[] A=new int[K];
      	
      	for(int i=0;i<K;i++){
          int d=sc.nextInt();
        for(int j=0;j<K;j++){
          a[sc.nextInt() - 1] += 1;
        }}
		
      	int count = 0;
        for (int i = 0; i < N; i++) {
          
            if (a[i] == 0) {
                count++;
            
        }
 
        // 出力
        System.out.println(count);
    }
}

Compiler output:
Main.java:28: error: reached end of file while parsing
}
 ^
1 error
Language: Java

//164B(Atcoder)
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
      	int K = sc.nextInt();
      	int[] d=new int[K];
      	int[][]A=new int[K][K];
      	for(int i=0;i<K;i++){
          int d[i]=sc.nextInt();
        for(int j=0;j<K;j++){
          int A[i][j]=sc.nextInt();
        }}
		
      	int count = 0;
        for (int i = 0; i < N; i++) {
          for (int j = 0; j < N; i++) {
            if (a[i][j] == 0) {
                count++;
            }
        }
 
        // 出力
        System.out.println(count);
    }
}
	


Compiler output:
Main.java:12: error: ']' expected
          int d[i]=sc.nextInt();
                ^
Main.java:12: error: ';' expected
          int d[i]=sc.nextInt();
                 ^
Main.java:14: error: ']' expected
          int A[i][j]=sc.nextInt();
                ^
Main.java:14: error: ';' expected
          int A[i][j]=sc.nextInt();
                 ^
Main.java:14: error: not a statement
          int A[i][j]=sc.nextInt();
                   ^
Main.java:14: error: ';' expected
          int A[i][j]=sc.nextInt();
                    ^
Main.java:28: error: reached end of file while parsing
}
 ^
7 errors
Language: C++

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

int main(){
    int n, k;
    cin >> n >> k;
    int d[k+1];
    int A[k+1][k+1];
    rep(i, k){rep(j, k){A[i][j] = 0;}}
    rep(i, k){
        int a[n+1];
        cin >> d[i];
        rep(j, d[i]){
            cin >> a[j];
            A[i][a[j]-1] += 1;
        }
    }
    rep(i, k+1){rep(j, k+1){cout << A[i][j];}cout<<"\n";}
    int res = n;
    rep(i, k){
        int sum = 0;
        rep(j, k){
            sum += A[j][i];  
        }
        if(sum){res--;}
    }
    cout << res << endl
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:24: error: expected ';' before 'return'
   29 |     cout << res << endl
      |                        ^
      |                        ;
   30 |     return 0;
      |     ~~~~~~
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 P = pair<int,int>;

int N, K;
vector<int> d;
vector<vector<int>> A;

void input() {
  cin >> N >> K;
  d.resize(K);
  A.resize(K, vector<int>());
  for(int i = 0; i < K; i++){
    cin >> d[i];
        A[i].resize(d[i]);
        for(int i = 0; i < K; i++) {
          cin >> d[i];
          A[i].resize(d[i]);
          for(int j = 0; j < d[i]; j++) {
            cin >> A[i][j];
          }
      }
  }   
}

void solve() {
  int ans = 0;
  for(int i = 1; i <= N; i++) {
    bool have = false;
    for(auto v : A) {
      if(p == i) have = true;
    }
    if(!have) ans++;
  }
  cout << ans << endl;
}

int main() {
  input();
  solve();
  return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:33:10: error: 'p' was not declared in this scope
   33 |       if(p == i) have = true;
      |          ^
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 P = pair<int,int>;

int N, K;
vector<int> d;
vector<vector<int>> A;

void input() {
  cin >> N >> K;
  d.resize(K);
  A.resize(K, vector<int>());
    cin >> d[i];
    A[i].resize(d[i]);
    for(int i = 0; i < K; i++) {
      cin >> d[i];
      A[i].resize(d[i]);
      for(int j = 0; j < d[i]; j++) {
        cin >> A[i][j];
      }
    }
}

void solve() {
  int ans = 0;
  for(int i = 1; i <= N; i++) {
    bool have = false;
    for(auto v : A) {
      if(p == i) have = true;
    }
    if(!have) ans++;
  }
  cout << ans << endl;
}

int main() {
  input();
  solve();
  return 0;
}

Compiler output:
a.cc: In function 'void input()':
a.cc:15:14: error: 'i' was not declared in this scope
   15 |     cin >> d[i];
      |              ^
a.cc: In function 'void solve()':
a.cc:31:10: error: 'p' was not declared in this scope
   31 |       if(p == i) have = true;
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(),(x).end()
using ll=long long;

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

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: conflicting declaration 'std::vector<long long int> a'
   10 |     vector<ll> a(n,1);
      |                ^
a.cc:7:18: note: previous declaration as 'll a'
    7 |     ll n,k,i,j,d,a;
      |                  ^
a.cc:15:17: error: invalid types 'll {aka long long int}[ll {aka long long int}]' for array subscript
   15 |             if(a[a-1]>0) a[a-1]--;
      |                 ^
a.cc:15:27: error: invalid types 'll {aka long long int}[ll {aka long long int}]' for array subscript
   15 |             if(a[a-1]>0) a[a-1]--;
      |                           ^
a.cc:19:13: error: invalid types 'll {aka long long int}[ll {aka long long int}]' for array subscript
   19 |         if(a[i]>0) ans++;
      |             ^
a.cc:20:16: error: invalid types 'll {aka long long int}[ll {aka long long int}]' for array subscript
   20 |         cout<<a[i];
      |                ^
Language: C++

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

int main() {
  int N, K; cin >> N >> K;
  vector<int> d(K);
  vector<bool> hvany(N,false);
  int a;
  for (int i=0; i<K; i++) {
    cin >> d.at(i);
    for (int j=0; j<d.at(i); j++) {
      cin >> a;
      hvany.at(a-1) = true;
    }
  }
  int sum=0;
  for (int i=0; i<N; i++) {
    if ( hvany.at(i) ) == false sum++ ;
  }
  cout << sum << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:24: error: expected primary-expression before '==' token
   18 |     if ( hvany.at(i) ) == false sum++ ;
      |                        ^~