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

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

int main() {
  int N, K;
  cin >> N >> K;
  vector<int> V(N);
  while (K--) {
    int D;
    cin >> D;
    while (D--) {
      int A;
      cin >> A
      V.at(--A)++;
    }
  }
  for (int i = 0; i < N; i++) {
    if (!V.at(i)) cout << i + 1 << "\n";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: expected ';' before 'V'
   13 |       cin >> A
      |               ^
      |               ;
   14 |       V.at(--A)++;
      |       ~
Language: Java

public class Main {
    public static void main(String[] args) {

        Scanner s = new Scanner(System.in);
        int N = s.nextInt();
        int K = s.nextInt();

        Set set = new HashSet();
        for (int i = 1; i >= N; i++) {
            set.add(i);
        }

        for (int i = 0; i < K; i++) {
            if(set.size()<=0){break;}
            int di = s.nextInt();
            for (int j = 0; j < di; j++) {
                int num = s.nextInt();
                if(set.contains(num)) {
                    set.remove(num);
                }
            }
            System.out.println(set.size());
        }

    }
}

Compiler output:
Main.java:4: error: cannot find symbol
        Scanner s = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
        Scanner s = new Scanner(System.in);
                        ^
  symbol:   class Scanner
  location: class Main
Main.java:8: error: cannot find symbol
        Set set = new HashSet();
        ^
  symbol:   class Set
  location: class Main
Main.java:8: error: cannot find symbol
        Set set = new HashSet();
                      ^
  symbol:   class HashSet
  location: class Main
4 errors
Language: C++

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

int main(){
  int N,K,di,Ai,count;
  count=0;
  cin>>N>>K;
  bool* ans = new bool[N];
  for(int i=1;i<=K;i++){
    cin>>di;
    for(int j=1;<=di;j++){
      cin>>Ai;
      ans[Ai]=false;
    }
  }
  for(int i=1;i<=K;i++){
    if(ans[i]==true)count++;
  }
  cout<<count<<endl;
  delete[] ans;
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: expected primary-expression before '<=' token
   12 |     for(int j=1;<=di;j++){
      |                 ^~
Language: C++

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

int main(){
  int N,K,di,Ai,count;
  count=0;
  cin>>N>>K;
  bool* ans = new bool[N];
  for(int i=1;i=<K;i++){
    cin>>di;
    for(int j=1;j=<di;j++){
      cin>>Ai;
      ans[Ai]=false;
    }
  }
  for(int i=1;i=<K;i++){
    if(ans[i]==true)count++;
  }
  cout<<count<<endl;
  delete[] ans;
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: expected primary-expression before '<' token
   10 |   for(int i=1;i=<K;i++){
      |                 ^
a.cc:12:19: error: expected primary-expression before '<' token
   12 |     for(int j=1;j=<di;j++){
      |                   ^
a.cc:17:17: error: expected primary-expression before '<' token
   17 |   for(int i=1;i=<K;i++){
      |                 ^
Language: C++

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

#define rep(i,n) for(int i=0; i<(n); i++)
#define pb push_back
#define sortA(a) sort(a.begin(),a.end())
#define sortD(a) sort(a.begin(),a.end(),greater<int>())
typedef long long ll;


int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n,k;
    cin>>n,k;
    vector<int> a(n+1);
    rep(i,n+1)
      a[i]=0;
    rep(i,k)
    {
      int d;
      cin>>d;
      rep(i,d)
      {
          int x;
          cin>>x;
          a[d]++;
      }
    }

    ans = -1;
    rep(i,n+1)
    {
      if(a[d]==0)
        ans++;
    }
    cout<<ans;
    
	  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   31 |     ans = -1;
      |     ^~~
      |     abs
a.cc:34:12: error: 'd' was not declared in this scope
   34 |       if(a[d]==0)
      |            ^
Language: C++

/* author : akshatjai258 */
#include <iostream>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<string, string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vii;
typedef vector<ll> vl;
typedef vector<vl> vvl;
#define int ll
#define mod int(1e9 + 7)
#define inf int(1e9)
#define endl "\n"
#define FOR(a, b, c) for (int(a) = (b); (a) < (c); ++(a))
#define FORN(a, b, c) for (int(a) = (b); (a) <= (c); ++(a))
#define fi first
#define mem0(a) memset(a, 0, sizeof(a))
#define mem1(a) memset(a, -1, sizeof(a))
#define memf(a) memset(a, false, sizeof(a))
#define all(v) v.begin(), v.end()
#define se second
#define mp make_pair
#define pb push_back
#define w(x)  \
	int x;    \
	cin >> x; \
	while (x--)
#define ps(x, y) fixed << setprecision(y) << x
void prep()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
/*#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif*/
}
int32_t main()
{
	prep();
	int n,k;
	vi vis(n+1,0);
	cin>>n>>k;
	int i=0;
	while(i!=n)
	{
		int a;
		cin>>a;
		i+=a;
		while(a--)
		{
			int s;
			cin>>s;
			vis[s]=1;
		}
	}
	int ans=0;
	for(int i=1;i<=n;i++)
	{
		if(!vis[i])
			ans++;
	}
	cout<<ans;
		
	return 0;
}


Compiler output:
a.cc:8:9: error: 'vector' does not name a type
    8 | typedef vector<int> vi;
      |         ^~~~~~
a.cc:9:9: error: 'vector' does not name a type
    9 | typedef vector<vi> vvi;
      |         ^~~~~~
a.cc:10:9: error: 'vector' does not name a type
   10 | typedef vector<pii> vii;
      |         ^~~~~~
a.cc:11:9: error: 'vector' does not name a type
   11 | typedef vector<ll> vl;
      |         ^~~~~~
a.cc:12:9: error: 'vector' does not name a type
   12 | typedef vector<vl> vvl;
      |         ^~~~~~
a.cc: In function 'int32_t main()':
a.cc:46:9: error: 'vi' was not declared in this scope; did you mean 'fi'?
   46 |         vi vis(n+1,0);
      |         ^~
      |         fi
a.cc:58:25: error: 'vis' was not declared in this scope
   58 |                         vis[s]=1;
      |                         ^~~
a.cc:64:21: error: 'vis' was not declared in this scope
   64 |                 if(!vis[i])
      |                     ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1<<30;
const ll LINF = 1LL<<60;

int main() {
    ios::sync_with_stdio(0); cin.tie(0);
    if (fopen("input.in", "r")) {
        freopen("input.in", "r", stdin);
        freopen("output.out", "w", stdout);
    }

    int n, k;
    set<int> s;
    for (int i = 0; i < k; i++) {
        int d; cin >> d;
        for (int j = 0; j < d; j++) {
            int a; cin >> a; s.insert(a);
        }
    }

    cout << (n-a.size()) << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:16: error: 'a' was not declared in this scope
   23 |     cout << (n-a.size()) << endl;
      |                ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:17:15: error: expected ';' before '}' token
   17 |       arr[a]=1
      |               ^
      |               ;
   18 |     }
      |     ~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cfenv>
#include <cmath>
#include <string>
#include <algorithm>
#include <cassert>
#include <functional>
#include <deque>
#define rep(i,n) for(int i=0; i<(n); i++)
using ll = long long;
using namespace std;

int main(){
  int n,k,tmp,ret;
  cin >> n >> k;
  vector<int> d(k);
  vector<int> s(n)=0;
  rep(i,k){
    cin >> d(i);
    rep(j,d(i)){
       cin >> tmp;
      s(tmp-1)++;
    }
  }
  ret=0;
  rep(i,n){
    if(s(n)==0){
      ret++;
    }
  }
  cout << ret << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:19: error: expected ',' or ';' before '=' token
   19 |   vector<int> s(n)=0;
      |                   ^
a.cc:21:13: error: no match for call to '(std::vector<int>) (int&)'
   21 |     cin >> d(i);
      |            ~^~~
a.cc:22:12: error: no match for call to '(std::vector<int>) (int&)'
   22 |     rep(j,d(i)){
      |           ~^~~
a.cc:11:34: note: in definition of macro 'rep'
   11 | #define rep(i,n) for(int i=0; i<(n); i++)
      |                                  ^
a.cc:24:8: error: no match for call to '(std::vector<int>) (int)'
   24 |       s(tmp-1)++;
      |       ~^~~~~~~
a.cc:29:9: error: no match for call to '(std::vector<int>) (int&)'
   29 |     if(s(n)==0){
      |        ~^~~
Language: C++

/*
 KUNAL RAUT (ZUKONIT14)  :- "DO WHAT YOU LIKE!"
 -PICT,PUNE! :)
 */
#include<bits/stdc++.h>
using namespace std;
#define ll          unsigned long long
#define int         long long
#define ld          long double
#define pb          push_back
#define mp          make_pair
#define fi          first
#define se          second
#define mod         1000000007
#define mod9        1000000009
#define pi          3.1415926535
#define MAXN        1000005
#define N           1000001
#define MAX2N       1*1000 + 10
#define all(v)      v.begin(), v.end()
#define allr(v)     v.rbegin(), v.rend()
#define ms(s, n)    memset(s, n, sizeof(s))
#define prec(n)     fixed<<setprecision(n)
#define forci(p,n)  for(ll i=p;i<(ll)n;i++)
#define forcj(p,n)  for(ll j=p;j<(ll)n;j++)
#define bolt        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define bits(a)     __builtin_popcount(a)
#define test        ll t;cin>>t;for(ll testi=1;testi<=t;testi++)
#define djokovic    freopen("input00.txt", "r", stdin);freopen("output00.txt", "w", stdout);

ll gcd(ll a, ll b)  {    if (b == 0) return a;    return gcd(b, a % b);}
ll lcm(ll a, ll b)  {    return (a / gcd(a, b) * b);}
ll expo(ll x, ll y) {
    ll res = 1; x = x % mod; while (y > 0) {
        if (y & 1)res = (1ll * res * x) % mod;
        y = y >> 1; x = (1ll * x * x) % mod;
    } return res;
}
ll ncr(ll n, ll r)  { ll res = 1; if (r > n - r)r = n - r; for (ll i = 0; i < r; i++) {  res *= n - i;  res /= i + 1; } return res;}
ll max(ll a, ll b)  {return (a > b) ? a : b;}
bool prime(ll n)    {ll i; for (i = 2; i <= sqrt(n); i++) {if (n % i == 0)return false;} return true;}
bool sortbysec(const pair<ll, ll> &a, const pair<ll, ll> &b)
{   if (a.second == b.second)
        return a.first < b.first;
    return (a.second < b.second);
}
//https://www.youtube.com/watch?v=WTJSt4wP2ME

// ll rr[] = {0, 1, 1, 1, 0, -1, -1, -1};
// ll cc[] = {1, 1, 0, -1, -1, -1, 0, 1};
ll n, k, m, q, ans, a[MAXN], ans1[MAXN]; vector<ll>v;
void solve()
{
    ll n;map<ll,ll>mp;
    cin>>n>>k;
    for(ll i=0;i<n;i++)
    {
        ll d;cin>>d;
        for(ll j=0;j<d;j++)
        {
            ll x;cin>>x;
            mp[x]++;
        }
    }
    ll ans=0;
    for(ll i=1;i<=n;i++)    if(!mp[i])  ans++;
    cout<<ans;
}
signed main()
{
    bolt;
	solve();



Compiler output:
a.cc: In function 'int main()':
a.cc:72:17: error: expected '}' at end of input
   72 |         solve();
      |                 ^
a.cc:70:1: note: to match this '{'
   70 | {
      | ^
Language: Java

package Codes;

import java.util.*;
import java.io.*;

public class B {

	public static void main(String[] args) throws IOException{
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		String i1[]=br.readLine().split(" ");
		int n=Integer.parseInt(i1[0]);
		int k=Integer.parseInt(i1[1]);
		
		long a[]=new long[n+1];
		
		String line = br.readLine();
		while ( line != null  &&  !line.equals("")) {
		    
	    	int d=Integer.parseInt(line);
			String s=br.readLine();
			a[d]++;
			line=br.readLine();
		}
		
		int count=0;
		for(int i=1;i<=n;i++)
		{
			if(a[i]==0)
			{
				count++;
			}
		}
		System.out.println(count);
	}

}


Compiler output:
Main.java:6: error: class B is public, should be declared in a file named B.java
public class B {
       ^
1 error
Language: C++

#include<iostream>
#include<map>
using namespace std;
int main() {
	int n, k, d, i, j,count=0;
	map<int, bool> t;
	cin >> n >> k;
	for (i = 0;i < k;i++)t[i] = 0;
	for (i = 0;i < k;i++) {
		cin >> d;
		for (j = 0;j < d;j++){
			t[j]++;
	}
}
	for (i = 0;i < n;i++)if (t[j] == 0)count++;
	cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:29: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
   12 |                         t[j]++;
      |                             ^~
Language: C++

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

using namespace std;

int main(){
  int N, K;
  cin >> N >> K;
  vector<int> d(K, 0);
  vector<bool> B(N, false)
  vector<vector<int> > A(K, vector<int>(N, 0));
  int tmp, ans = 0;

  for (size_t i = 0; i < K; i++) {
    cin >> d[i];
    for (size_t j = 0; j < d[i]; j++) {
      cin >> tmp;
      A[i][tmp - 1] = 1;
    }
  }

  for (size_t i = 0; i < N ; i++) {
    for (size_t j = 0; j < K; j++) {
      if (A[j][i] == 1) {
        B[i] = true;
      }
    }
  }

  for (size_t i = 0; i < N; i++) {
    if (B[i] == false) {
      ans += 1;
    }
  }

  cout << ans << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: expected ',' or ';' before 'vector'
   12 |   vector<vector<int> > A(K, vector<int>(N, 0));
      |   ^~~~~~
a.cc:19:7: error: 'A' was not declared in this scope
   19 |       A[i][tmp - 1] = 1;
      |       ^
a.cc:25:11: error: 'A' was not declared in this scope
   25 |       if (A[j][i] == 1) {
      |           ^
Language: C++

#include<iostream>

int main(){
  	int n,k,i;
	cin>>n>>k;
  	bool snukes[n+1];
  	for(i = 0; i<n; i++){
    	snukes[i] = false;
    }
  	for(int j = 0; j<k; j++){
    	int d;
      	cin>>d;
      	for(i = 0; i<d; i++){
        	int s;
          	cin>>s;
          	snukes[s] = true;
        }
    }
  	int count = 0;
  	for(i = 1; i<=n; i++){
    	if(snukes[i] == false) count++;
    }
  	cout<<count<<endl;
}

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

#include <stdio.h>
int main (void)
{
    int n,k,d,a;
    int ans = 0;
    int b[] = {0};

    scanf("%d %d", &n, &k);
    for(;0<k;k--){
        scanf("%d", &d);
        for(;0<d;d--){
            scanf("%d", &a);
            b[a]++;
        }
        k--;
    }

    for(i=0;i<n;i++){
        if(b[i+1]==0)
            ans++;
    }

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

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

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

		int n = sc.nextInt();
		int k = sc.nextInt();
		HashSet<Integer> map =new HashSet<Integer>();
		for(int i =  1 ; i<=k; i++) {
			int d = sc.nextInt();
			for(int  j = 1 ; j<=d ;j++) {
				int x = sc.nextInt();
				map.add(x);
			}
		}
		System.out.println(n - map.size());
	}

	
}


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
java.util.*;
^
1 error
Language: C++

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

int main(){
    int n,k;
    set<int> st;
    cin>>n>>k;
    for(int i=0;i<k;i++){
        int d;
        cin>>d;
        for(int i=0;i<d;i++){
            int x;
            cin>>x;
            st.insert(x);
        }
    }
    cout<<abs(n-st.size())<<"\n";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:14: error: call of overloaded 'abs(std::set<int>::size_type)' is ambiguous
   17 |     cout<<abs(n-st.size())<<"\n";
      |           ~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:980:12: note: candidate: 'int abs(int)'
  980 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
      |            ^~~
In file included from /usr/include/c++/14/cstdlib:81:
/usr/include/c++/14/bits/std_abs.h:137:3: note: candidate: 'constexpr __float128 std::abs(__float128)'
  137 |   abs(__float128 __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:85:3: note: candidate: 'constexpr __int128 std::abs(__int128)'
   85 |   abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
   79 |   abs(long double __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)'
   75 |   abs(float __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)'
   71 |   abs(double __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)'
   61 |   abs(long long __x) { return __builtin_llabs (__x); }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)'
   56 |   abs(long __i) { return __builtin_labs(__i); }
      |   ^~~
Language: C++

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

int main(){
    freopen("in.txt","r",stdin);
    int n,k;
    set<int> st;
    cin>>n>>k;
    for(int i=0;i<k;i++){
        int d;
        cin>>d;
        for(int i=0;i<d;i++){
            int x;
            cin>>x;
            st.insert(x);
        }
    }
    cout<<abs(n-st.size())<<"\n";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: call of overloaded 'abs(std::set<int>::size_type)' is ambiguous
   18 |     cout<<abs(n-st.size())<<"\n";
      |           ~~~^~~~~~~~~~~~~
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:980:12: note: candidate: 'int abs(int)'
  980 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
      |            ^~~
In file included from /usr/include/c++/14/cstdlib:81:
/usr/include/c++/14/bits/std_abs.h:137:3: note: candidate: 'constexpr __float128 std::abs(__float128)'
  137 |   abs(__float128 __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:85:3: note: candidate: 'constexpr __int128 std::abs(__int128)'
   85 |   abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
   79 |   abs(long double __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)'
   75 |   abs(float __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)'
   71 |   abs(double __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)'
   61 |   abs(long long __x) { return __builtin_llabs (__x); }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)'
   56 |   abs(long __i) { return __builtin_labs(__i); }
      |   ^~~
Language: C++

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

long long modinv(long long a, long long m) {
    long long b = m, u = 1, v = 0;
    while (b) {
        long long t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m;
    if (u < 0) u += m;
    return u;
}

int main(){
  int n, k;
  cin >> n >> k;
  set<int> s;
  for(int i=0; i<k; i++){
    int d;
    cin >> d;
    for(int j=0; j<d; j++){
      int a;
      cin >> a;
      if(!s.count(a))
	s.insert(a);
    }
  }
  count << n-s.size() << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:9: error: invalid operands of types '<unresolved overloaded function type>' and 'std::__cxx1998::set<int, std::less<int>, std::allocator<int> >::size_type' {aka 'long unsigned int'} to binary 'operator<<'
   32 |   count << n-s.size() << endl;
      |   ~~~~~~^~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: 'sn' was not declared in this scope; did you mean 'n'?
   11 |     cin>>sn;
      |          ^~
      |          n
a.cc:21:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   21 |       ans++;
      |       ^~~
      |       abs
a.cc:23:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   23 |   cout<<ans<<endl;
      |         ^~~
      |         abs
Language: C++

#include <iostream>
#include<vector>
using namespace std;
 
int N, K;
vector<int> d;
vector<vector<int>> A;
 
int main()
{
	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 j = 0; j < d[i]; j++)
		{
			cin >> A[i][j];
		}
	}
 
	int ans = 0;
	for (int i = 1; i <= N; i++)
	{
		bool have = false; //haveは変数
		for (auto v : A)
		{
			for (auto p : v)
			{
				if (p == i)have = true;
			}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:26: error: expected '}' at end of input
   33 |                         }
      |                          ^
a.cc:29:17: note: to match this '{'
   29 |                 {
      |                 ^
a.cc:33:26: error: expected '}' at end of input
   33 |                         }
      |                          ^
a.cc:26:9: note: to match this '{'
   26 |         {
      |         ^
a.cc:33:26: error: expected '}' at end of input
   33 |                         }
      |                          ^
a.cc:10:1: note: to match this '{'
   10 | {
      | ^
Language: C++

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

int n, k, a, b, arr[1000], ans=0;

int main() {
  cin>>n>>k; 
  for(int i=0; i<k; i++) {
    cin>>a;
    for(int j=0; j<a; j++) {
      cin>>b; arr[b]++
    }
  }
  for(int i=1; i<=n; i++) {
    if(arr[i]==0) ans++;
  }
  cout<<ans<<"\n";
  return 0;
}


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

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

int n, k, a, arr[1000];

int main() {
  cin>>n>>k; 
  for(int i=0; i<k; i++) {
    cin>>a; arr[a]++;
  }
  for(int i=1; i<=n; i++) {
    if(arr[i]==0) ans++;
  }
  cout<<ans<<"\n";
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |     if(arr[i]==0) ans++;
      |                   ^~~
      |                   abs
a.cc:14:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |   cout<<ans<<"\n";
      |         ^~~
      |         abs
Language: C++

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

int n, k, a, arr[1000];

int main() {
  cin>>n>>k; 
  for(int i=0; i<k; i++) {
    cin>>a; arr[a]++;
  )
  for(int i=1; i<=n; i++) {
    if(arr[i]==0) ans++;
  )
  cout<<ans<<"\n";
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected primary-expression before ')' token
   10 |   )
      |   ^
a.cc:11:25: error: expected ';' before ')' token
   11 |   for(int i=1; i<=n; i++) {
      |                         ^
      |                         ;
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:8:26: note: to match this '{'
    8 |   for(int i=0; i<k; i++) {
      |                          ^
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
Language: C++

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

int n, k, a, arr[1000];

int main() {
  cin>>n>>k; 
  for(int i=0; i<k; i++) {
    cin>>a; arr[a]++;
  )
  for(int i=1; i<=n; i++) {
    if(arr[i]==0) ans++;
  )
  cout<<ans<<"\n:;
  return 0;
}

Compiler output:
a.cc:14:14: warning: missing terminating " character
   14 |   cout<<ans<<"\n:;
      |              ^
a.cc:14:14: error: missing terminating " character
   14 |   cout<<ans<<"\n:;
      |              ^~~~~
a.cc: In function 'int main()':
a.cc:10:3: error: expected primary-expression before ')' token
   10 |   )
      |   ^
a.cc:11:25: error: expected ';' before ')' token
   11 |   for(int i=1; i<=n; i++) {
      |                         ^
      |                         ;
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:8:26: note: to match this '{'
    8 |   for(int i=0; i<k; i++) {
      |                          ^
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
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 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:21:13: error: expected primary-expression before 'if'
   21 |   rep(i,n) (if d[i]==0) ans++;
      |             ^~
a.cc:21:13: error: expected ')' before 'if'
   21 |   rep(i,n) (if d[i]==0) ans++;
      |            ~^~
      |             )
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
  int n,k;
  cin>>n>>k;
  int a[n+1]={0};
  while (k--)
  {
    ind d;
    cin>>d;
    while (d--)
    {
      int tem;
      cin>>tem;
      a[tem]++;
    }
  }
  int count=0;
  for (int i=1;i<=n;i++)
    if (a[i]!=0)
      count++;
  cout<<count;
}

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

#include<bits/stdc++.h>
using namespace std;
int A[100001];
int main()
{
    map <int, int> mp;
    int n, x, y, i, j, z, cnt = 0,;
    cin >> x >> n;
    for(i = 0; i < n; i++)
    {
        cin >> y;
        for(j = 0; j < y; j++)
        {
            cin >> z;
            mp[z]++;
        }
    }
    for(i = 1; i <= x; i++)
    {
        ///cout << mp[i] << endl;
            if(mp[i] == 0)
            {
                cnt++;
            }
    }
    cout << cnt << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:35: error: expected unqualified-id before ';' token
    7 |     int n, x, y, i, j, z, cnt = 0,;
      |                                   ^
Language: Java

import java.util.Scanner;
public class mondai2 {
	public static void main(String args[]) {
	Scanner scan=new Scanner(System.in);
	int N=scan.nextInt();
	int K=scan.nextInt();
	int A[]=new int[N];
	for(int i=0;i<N;i++) {
		A[i]=0;
	}
	for(int i=0;i<K;i++) {
	int d=scan.nextInt();
		for(int j=0;j<d;j++) {
			int m=scan.nextInt();
			A[m-1]=1;
		}
	}
	int num=0;
	for(int i =0;i<N;i++) {
		if(A[i]==0) {
		num++;
		}
		else {}
	}
	System.out.println(num);
	}
}


Compiler output:
Main.java:2: error: class mondai2 is public, should be declared in a file named mondai2.java
public class mondai2 {
       ^
1 error
Language: C

#include<stdio.h>
 
int main(void) {
 
    int N, K, d;
    int i = 0, time = 0, temp;
    int flag = 0;
    int Sunuke[100];
  	for(int i=0i<100;i++){
    	Sunuke[i] = 0;
    }
 
    scanf("%d", &N);
    scanf("%d", &K);
 
    while (time < K) {
      scanf("%d", &d);
      for (i = 0; i < d; i++) {
        scanf("%d", &temp);
        Sunuke[(temp - 1)] = 1;
      }
      time++;
    }
 
    for (i = 0; i < N; i++) {
      if (Sunuke[i] != 1) {
        flag++;
      }
    }
    printf("%d\n", flag);
 
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:21: error: invalid operands to binary < (have 'complex int' and 'int')
    9 |         for(int i=0i<100;i++){
      |                     ^
main.c:9:29: error: expected ';' before ')' token
    9 |         for(int i=0i<100;i++){
      |                             ^
      |                             ;
Language: C

#include<stdio.h>
 
int main(void) {
 
    int N, K, d;
    int i = 0, time = 0, temp;
    int flag = 0;

 
    scanf("%d", &N);
    scanf("%d", &K);
    vector<int> Sunuke(N,0)
 
    while (time < K) {
      scanf("%d", &d);
      for (i = 0; i < d; i++) {
        scanf("%d", &temp);
        Sunuke[(temp - 1)] = 1;
      }
      time++;
    }
 
    for (i = 0; i < N; i++) {
      if (Sunuke[i] != 1) {
        flag++;
      }
    }
    printf("%d\n", flag);
 
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:5: error: 'vector' undeclared (first use in this function)
   12 |     vector<int> Sunuke(N,0)
      |     ^~~~~~
main.c:12:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:12: error: expected expression before 'int'
   12 |     vector<int> Sunuke(N,0)
      |            ^~~
Language: C

#include<stdio.h>
 
int main(void) {
 
    int N, K, d;
    int i = 0, time = 0, temp;
    int flag = 0;
    int Sunuke[100];
 
    scanf("%d", &N);
    scanf("%d", &K);
 
    while (time < K　+1) {
      scanf("%d", &d);
      for (i = 0; i < d; i++) {
        scanf("%d", &temp);
        Sunuke[(temp - 1)] = 1;
      }
      time++;
    }
 
    for (i = 0; i < N; i++) {
      if (Sunuke[i] != 1) {
        flag++;
      }
    }
    printf("%d\n", flag);
 
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:20: error: stray '\343' in program
   13 |     while (time < K<U+3000>+1) {
      |                    ^~~~~~~~
Language: C++

#include <stdio.h>
using namespace std;
int n, m, i, j, k, x, y, ans;
struct ren{
    int su;
}a[105];
int main(){
    scanf("%d%d", &n, &k);
    for(i=1; i<=n; i++){
        a.su = 0;
    }
    for(i=1; i<=k; i++){
        scanf("%d", &x);
        for(j=1; j<=x; j++){
            scanf("%d", &y);
            a[y].su++;
        }
    }
    for(i=1; i<=n; i++){
        if(a.su == 0) ans++;
    }
    printf("%d", ans);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: request for member 'su' in 'a', which is of non-class type 'ren [105]'
   10 |         a.su = 0;
      |           ^~
a.cc:20:14: error: request for member 'su' in 'a', which is of non-class type 'ren [105]'
   20 |         if(a.su == 0) ans++;
      |              ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int n, m, i, j, k, x, y, ren;
struct abc{
    int tang;
}s[105];
int main(){
    scanf("%d%d", &n, &k);
    for(i=1; i<=n; i++){
        s.tang = 0;
    }
    for(i=1; i<=k; i++){
        scanf("%d", &x);
        for(j=1; j<=x; j++){
            scanf("%d", &y);
            s[y].tang++;
        }
    }
    for(i=1; i<=n; i++){
        if(s.tang == 0) ren++;
    }
    printf("%d", ren);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: request for member 'tang' in 's', which is of non-class type 'abc [105]'
   10 |         s.tang = 0;
      |           ^~~~
a.cc:20:14: error: request for member 'tang' in 's', which is of non-class type 'abc [105]'
   20 |         if(s.tang == 0) ren++;
      |              ^~~~
Language: C++

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

int n,k;
vector<int> d;
vector<vector<int>> A;

void input(){
	cin >> n >> k;
	
	d.resize(k);
	A.resize(k, vector<int>());

	rep(i, k){
		cin >> d.at(i);
		A.at(i).resize(d.at(i));
		rep(j, d.at(i)){
			cin >> A.at(i).at(j);
		}
	}
}

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

int main(){
	input();
	output();
}

Compiler output:
a.cc: In function 'void output()':
a.cc:34:32: error: expected ';' before ':' token
   34 |                 if(!have) ans++:
      |                                ^
      |                                ;
Language: Java

import java.util.Scanner;
public class main {
	public static void main(String args[]) {
	Scanner scan=new Scanner(System.in);
	int N=scan.nextInt();
	int K=scan.nextInt();
	int A[]=new int[N];
	for(int i=0;i<N;i++) {
		A[i]=0;
	}
	for(int i=0;i<K;i++) {
	int d=scan.nextInt();
		for(int j=0;j<d;j++) {
			int m=scan.nextInt();
			A[m-1]=1;
		}
	}
	for(int i =0;i<N;i++) {
		if(A[i]==0) {
			System.out.println(i+1);
		}
		else {}
	}
	}
}


Compiler output:
Main.java:2: error: class main is public, should be declared in a file named main.java
public class main {
       ^
1 error
Language: C++

#include <bits/stdc++.h>
#include <cstdlib>
#include <cmath>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
const ll INF=1e18 ;
const ll mod=2019 ;
inline void chmax(ll& a,ll b){a=max(a,b);}
inline void chmin(ll& a,ll b){a=min(a,b);}

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:23:17: error: expected ';' before '}' token
   23 |        d[a-1] =1
      |                 ^
      |                 ;
   24 |      }
      |      ~
Language: C++

int main(){
	int n, k, d, b; cin >> n >> k;
	bool a[110] = {};
	rep(i, k){
		cin >> d;
		rep(j, d){
			cin >> b;
			a[b] = true;
		}
	}
	int ans = -1;
	rep(i, n + 1) if(!a[i]) ans++;
	cout << ans << endl; 

}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:25: error: 'cin' was not declared in this scope
    2 |         int n, k, d, b; cin >> n >> k;
      |                         ^~~
a.cc:4:13: error: 'i' was not declared in this scope
    4 |         rep(i, k){
      |             ^
a.cc:4:9: error: 'rep' was not declared in this scope
    4 |         rep(i, k){
      |         ^~~
a.cc:13:9: error: 'cout' was not declared in this scope
   13 |         cout << ans << endl;
      |         ^~~~
a.cc:13:24: error: 'endl' was not declared in this scope
   13 |         cout << ans << endl;
      |                        ^~~~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main(){
  
  int n, k, d, a;
  
  cin >> n >> k;
  vector<int> visited(n, false);
  while(cin >> d){
  	
    for(int i = 0; i < d; i++){
    	cin >> a;
      if(!visited[a - 1]){
        visited[a - 1] = true;
        n--;
    }
  }
  
    cout << n << endl;
  
  return 0;
}


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

#include <iostream>
#include <vector>

using namespace std;

int main(){
  
  int n, k, d, a;
  
  cint >> n >> k;
  vector<int> visited(n, false);
  while(cin >> d){
  	
    for(int i = 0; i < d; i++){
    	cin >> a;
      if(!visited[a - 1]){
        visited[a - 1] = true;
        n--;
    }
  }
  
    cout << n << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'cint' was not declared in this scope; did you mean 'uint'?
   10 |   cint >> n >> k;
      |   ^~~~
      |   uint
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int n, k;
vector<int> d;
vector<vector<int>> a;

void input(){

  cin >> n >> k; 
  d.resize[k];
  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){
      for(auto e: v){
        if(e == i) have = true;
      }
    }
    if(!have) ans++;
  }
  cout << ans << endl;
}

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

Compiler output:
a.cc:5:1: error: 'vector' does not name a type
    5 | vector<int> d;
      | ^~~~~~
a.cc:6:1: error: 'vector' does not name a type
    6 | vector<vector<int>> a;
      | ^~~~~~
a.cc: In function 'void input()':
a.cc:11:3: error: 'd' was not declared in this scope
   11 |   d.resize[k];
      |   ^
a.cc:14:5: error: 'a' was not declared in this scope
   14 |     a[i].resize[d[i]];
      |     ^
a.cc: In function 'void solve()':
a.cc:25:17: error: 'a' was not declared in this scope
   25 |     for(auto v: a){
      |                 ^
Language: C

#include <stdio.h>
int main(){
    int n,k,d,g,count;
    scanf("%d %d",&n,&k);
    char a[n];
    a[] = 0;
    for(int p=0;p<n;p++){
        if(a[p]!=1){
            for(int i=0;i<k;i++){
                scanf("%d",&d);
                for(int j=0;j<d;j++){
                    scanf("%d",&g);
                    if(p==g){
                        a[p]=1;
                        count++;
                    }
                }
            }
        }
    }
    int ans;
    ans = n-count;
    printf("%d",ans);
    
    
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:7: error: expected expression before ']' token
    6 |     a[] = 0;
      |       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#include<set>
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.at(i)==0)ans++;
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:8: error: no match for call to '(std::vector<int>) (int)'
   16 |       d(a-1)=1;
      |       ~^~~~~
Language: C++

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

int main() {
 int N,K;
  cin >> N>> K;
  int sum=0;
  int count[150]={0};
  int d[150];
  int A[150];
  for (int i=0;i<K;i++){
    cin>>d[i];
    for (int m=0;m<d[i];m++){
      cin >> A[m];
      count[A[m]-1]++;
    }
  }
  for(int l=0;l<N;l++){
    if(count[l]==0){
      sum++
    }
  }
  cout <<sum <<endl;
      
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:12: error: expected ';' before '}' token
   20 |       sum++
      |            ^
      |            ;
   21 |     }
      |     ~
Language: C++

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

int main() {
  int n, k;
  cin >> n >> k;
  
  vector<int> vec(n,1);
  
  for (i=0; i<k; i++){
    int d;
    cin >> d;
    for (j=0; j<d; j++){
      int a;
      cin >> a;
      vec.at(a)=0;
    }
  }
  
  int ans=0;
  
  for (i=0; i<n; i++){
    ans+=vec.at(i);
  }

  cout << ans << endl;
}

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

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

int main() {
  int n, k;
  cin >> n >> k;
  
  vector<int> vec(n,1);
  
  for (i=0; i<k; i++){
    int d;
    cin >> d;
    for (j=0; j<d; j++){
      int a;
      cin >> a;
      vec.at(a)=0;
    }
  }
  
  int ans=0;
  
  for (i=0; i<n; i++){
    ans+=vec.at(i)
  }

  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: 'i' was not declared in this scope
   10 |   for (i=0; i<k; i++){
      |        ^
a.cc:13:10: error: 'j' was not declared in this scope
   13 |     for (j=0; j<d; j++){
      |          ^
a.cc:22:8: error: 'i' was not declared in this scope
   22 |   for (i=0; i<n; i++){
      |        ^
Language: Java

import java.util.*;
import java.util.stream.*;

class Main {
  public static void main(String[] args) {
    var scanner = new Scanner(System.in);
    var N = scanner.nextInt();
    var K = scanner.nextInt();
    var candy = new int[N+1];
    candy[0] = 1;
    for(int i = 1; i <= K; i++) {
    	var d = scanner.nextInt();
	    	for(int j = 1; j <= d; j++) {
          	var x = scanner.nextInt();
          	candy[x]++;
        }
    }
    long target = (Arrays.stream(candy).filter(t -> t==0).count();
	System.out.println(target);
  }
}


Compiler output:
Main.java:18: error: ')' expected
    long target = (Arrays.stream(candy).filter(t -> t==0).count();
                                                                 ^
1 error
Language: C++

scale = 0
n=read()
k=read()
while(k>0){
  d=read()
  while(d>0){
    z=read()
    a[z-1]+=1
    d-=1
  }
  k-=1
}
i=0
b=0
while(n!=i){
  if(!a[i])b+=1
  i+=1
}
b


Compiler output:
a.cc:1:1: error: 'scale' does not name a type
    1 | scale = 0
      | ^~~~~
a.cc:13:1: error: 'i' does not name a type
   13 | i=0
      | ^
a.cc:19:1: error: 'b' does not name a type
   19 | b
      | ^
Language: C++

#include<iostream>

using namespace std;

int main()
{
 

  int aaa;
  int a,b;
  cin >> a >> b ;
  int aa[a];
  for(int i=1; i<=a; i++)
  {
     a[i-1]=i;
  }
 
  while(b--)
  {
    int z;
    int zz;
    cin >> z ;
    while(z--)
    {
    cin >> zz ;
      int count=0;
      for(int i=0; i<a; i++)
      {
        if(zz==a[i])
        {
          count=1;
         break;
        }
      }
      if(count==0)
      {
           aaa++;
      }
    }
    
  }
  cout << aaa ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: invalid types 'int[int]' for array subscript
   15 |      a[i-1]=i;
      |       ^
a.cc:29:17: error: invalid types 'int[int]' for array subscript
   29 |         if(zz==a[i])
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespaces std;
int main(){
  int n,k;
  cin>>n>>k;
  int cnt[n+1];
  memset(cnt,0,sizeof(cnt));
  while(k--){
  	int d;
    cin>>d;
    while(d--){
      int t;
      cin>>t;
      cnt[t]++;
    }
  }
 	int ans = 0;
  for(int i = 1; i <= n;i++){
  	if(cnt[i] == 0)ans++;
  }
  cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespaces'
    2 | using namespaces std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin>>n>>k;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:21:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   21 |   cout<<ans<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:21:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   21 |   cout<<ans<<endl;
      |              ^~~~
      |              std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C

#include <iostream>

using namespace std;

int main()
{
    int n, k;
    bool a[110];
    cin >> n >> k;
    for (int i = 0; i < n; i++)
    {
        a[i] = 0;
    }
    for (int i = 0; i < k; i++)
    {
        int d;
        cin >> d;
        for (int j = 0; j < d; j++)
        {
            int x;
            cin >> x;
            a[x-1] |= 1;
        }
    }
    int s = 0;

    for (int i = 0; i < n; i++)
    {
        s += a[i];
    }
    cout << s << endl;
    return 0;
}

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

#include <bits/stdc++.h>
#define fin cin
#define fout cout
using namespace std;
//ifstream fin("data.in");
//ofstream fout("data.out");
vector<vector<int> > mt;
int main()
{
    //ios_base::sync_with_stdio(false);
    //fin.tie(NULL), fout.tie(NULL);
    int n, k;
    fin >> n >> k;
    mt.resize(k, vector<int>());
    for (int i = 1; i <= k; ++i)
    {
        int x;
        fin >> x;
        mt[i].resize(x);
        for (int j = 1; j <= x; ++j)
        {
            fin >> mt[i][j];
        }
    }
    int cnt = 0;
    for (int i = 1; i <= n; ++i)
    {
        bool ok = false;
        for (auto j : mt)
        {
            for (auto q : j)
            {
                if (j == p)
                    ok = true;
            }
        }
        if (!ok) ++cnt;
    }
    fout << cnt;
    //fin.close(), fout.close();
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:26: error: 'p' was not declared in this scope
   33 |                 if (j == p)
      |                          ^
Language: Java

import java.util.HashSet;
import java.util.Scanner;

public class A {

    static long ans;
    static int[] k_list;

    public static void main(String[] args) {
        var scaner = new Scanner(System.in);
        var n = scaner.nextInt(); // sunuke
        var k = scaner.nextInt(); // kind

        var set = new HashSet<>();
        
        for(int i = 0; i<k; i++) {
            int d = scaner.nextInt();
            for(int j = 0; j<d; j++) {
                set.add(scaner.nextInt());
            }
        }

        System.out.println(n - set.size());
        scaner.close();
    }

}


Compiler output:
Main.java:4: error: class A is public, should be declared in a file named A.java
public class A {
       ^
1 error
Language: Java

import java.util.ArrayList;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Scanner;

public class A {

    static long ans;
    static ArrayList<ArrayList<Integer>> a = new ArrayList<ArrayList<Integer>>();
    static int[] k_list;

    public static void main(String[] args) {
        var scaner = new Scanner(System.in);
        var n = scaner.nextInt(); // sunuke
        var k = scaner.nextInt(); // kind

        var set = new HashSet<>();
        
        for(int i = 0; i<k; i++) {
            int d = scaner.nextInt();
            for(int j = 0; j<d; j++) {
                set.add(scaner.nextInt());
            }
        }


        System.out.println(n - set.size());
        scaner.close();
    }


}


Compiler output:
Main.java:6: error: class A is public, should be declared in a file named A.java
public class A {
       ^
1 error