Problem:
 Score : 200 points    Problem Statement N  Snukes called Snuke 1 , Snuke 2 , ..., Snuke N live in a town.  There are K kinds of snacks sold in this town, called Snack 1 , Snack 2 , ..., Snack K . The following d_i Snukes have Snack i : Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}} .  Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief?      Constraints  All values in input are integers.  1 \leq N \leq 100  1 \leq K \leq 100  1 \leq d_i \leq N  1 \leq A_{i, 1} < \cdots < A_{i, d_i} \leq N         Input Input is given from Standard Input in the following format:  N  K  d_1  A_{1, 1} \cdots A_{1, d_1}  \vdots  d_K  A_{K, 1} \cdots A_{K, d_K}       Output Print the answer.        Sample Input 1 3 2
2
1 3
1
3      Sample Output 1 1   Snuke 1 has Snack 1 .  Snuke 2 has no snacks.  Snuke 3 has Snack 1 and 2 .   Thus, there will be one victim: Snuke 2 .       Sample Input 2 3 3
1
3
1
3
1
3      Sample Output 2 2

Solution (Python):
n, k = map(int, input().split())
a = []
for i in range(k):
    d = int(input())
    a.append([d, list(map(int, input().split()))])
c = 0
for i in range(1, n+1):
    for j in a:
        if i in j[1]:
            break
    else:
        c += 1
print(c)

Solution (Python):
import sys
N, K = map(int, sys.stdin.readline().split())
d = []
A = []
for i in range(2 * K):
    if i % 2 == 0:
        d.append(int(input()))
    else:
        A.append(list(map(int, input().split())))
B = set(sum(A, []))
print(N - len(B))

Solution (Python):
n, k = map(int, input().split())
l = list(range(1, n+1))

for i in range(k):
    okashi = int(input())
    people = list(map(int, input().split()))
    for num in people:
        if num in l:
            l.remove(num)

print(len(l))

Solution (Python):
N, K = map(int, input().split())
A = set()
for i in range(K):
    d = int(input())
    a = set(map(int, input().split()))
    A=A|a
    
print(N-len(A))

Solution (Python):
from collections import defaultdict as dd
N,K=map(int,input().split())
res = [0]*N
for i in range(K):
    d = int(input())
    a = list(map(int,input().split()))
    for val in a:
        res[val-1]=1
print(N-sum(res))

Solution (Python):
import collections
N, K = map(int, input().split())
d = [0]*K
A = []
counter = 0
for i in range(K):
    d[i] = int(input())
    A.extend(list(map(int, input().split())))
l = collections.Counter(A)

counter = N - len(l)
print(counter)

Solution (Python):
N, K = map(int, input().split())
l_d = []
l_A = []
for i in range(K):
  di = int(input())
  Ai = list(map(int, input().split()))
  l_d.append(di)
  l_A.append(Ai)

l = [0]*N
for i in range(len(l_A)):
  for j in l_A[i]:
    l[j-1] = 1

print(l.count(0))

Solution (Python):
N,K=map(int,input().split())
A=[]
for i in range(K):
    d=int(input())
    a=list(map(int,input().split()))
    A.extend(a)
B=set(A)
print(N-len(B))

Solution (Python):




input_1 = input()
n = int(input_1.split(" ")[0])
k = int(input_1.split(" ")[1])

input_array = []
for i in range(k):
    input()
    input_array.append(input().split(" "))

for i in range(len(input_array)):
    for j in range(len(input_array[i])):
        input_array[i][j] = int(input_array[i][j])


trick_list = []
for i in range(n):
    trick_list.append(i+1)

for i in range(len(input_array)):
    for j in range(len(input_array[i])):
        try:
            trick_list.remove(input_array[i][j])
        except:
            pass
            
print(len(trick_list))

Solution (Python):
n,k = map(int,input().split())
a=[0]*(n+1)
b=[0]*n

ans = 0

for i in range(k):
    d=int(input())
    b = list(map(int, input().split()))
    for h in range(d):
        a[b[h]]+=1

for i in range(1,n+1):
    if a[i] == 0:
        ans +=1

print(str(ans))

Solution (Python):
N, K = map(int, input().split())
ans_list = []

for i in range(2*K):
  if(i%2==0):
    tmp = input()
    pass
  else:
    list_tmp = list(map(int, input().split()))
    for item in list_tmp:
      ans_list.append(item)

print(N - len(set(ans_list)))

Solution (Python):
N,K=map(int,input().split())
S=[0]*(N+1);cnt=0
for i in range(K):
  d=int(input())
  A=list(map(int,input().split()))
  for i in range(d):
    S[A[i]] +=1

for i in range(1,N+1):
  if S[i]==0:
    cnt=cnt+1
print(cnt)

Solution (Python):



import sys
sys.setrecursionlimit(10**7)
from pprint import pprint as pp
from pprint import pformat as pf

import math

import bisect


if __name__ == '__main__':
    any_haver = set()
    num_nusuke, num_treat_type = list(map(int, input().split()))
    for i in range(num_treat_type):
        _ = int(input())
        treat_haver = list(map(int, input().split()))
        for nusuke_id in treat_haver:
            any_haver.add(nusuke_id)
    
    count_not_have = 0
    for nusuke_id in range(1, num_nusuke + 1):
        
        
        if nusuke_id not in any_haver:
            count_not_have += 1
    
    
    print(count_not_have)

Solution (Python):
inp = input()
inplist1 = inp.split()
people = int(inplist1[0])
kinds = int(inplist1[1])

inplist2 = [input() for i in range(kinds * 2)]

foodlist = []
roop = 0
for i in inplist2:
  if roop % 2 == 0 :
    roop += 1
    continue
  boys = i.split()
  for boy in boys:
    foodlist.append(boy)
  roop += 1

setlist = set(foodlist)
print(people -len(setlist))

Solution (Python):
N, K = list(map(int, input().split()))
d = [0] * K
A = set()

sunuke = [i for i in range(1, N+1)]
sunuke = set(sunuke)

for i in range(K):
    d[i] = int(input())
    a = (list(map(int, input().split())))
    for j in range(len(a)):
        A.add(a[j])
    a = []

ans = len(sunuke - A)

print(ans)

Solution (Python):
n, k = [int(i) for i in input().split(" ")]
d = []
ans = [i for i in range(1, n + 1)]
for i in range(k):
    d.append(int(input()))
    A = [int(i) for i in input().split(" ")]
    for delete in A:
        if delete in ans:
            ans.remove(delete)
print(len(ans))

Solution (Python):
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

def main():
    n, k = nm()
    d = []
    a = []
    for _ in range(k):
        temp1 = ni()
        d.append(temp1)
        temp2 = nl()
        a.append(temp2)
    
    ans = [0] * (n + 1)

    for arr in a:
        for value in arr:
            ans[value] += 1
    out = 0 
    for value in ans:
        if value == 0 :
            out += 1
    print(out - 1)


if __name__ == '__main__':
    main()

Solution (Python):
N , K = [int(x) for x in input().split()]
s = set()
for i in range(1, N+1):
    s.add(i)

for i in range(K):
    num = int(input())
    discard_num = [int(y) for y in input().split()]
    for j in range(len(discard_num)):
        s.discard(discard_num[j])

print(len(s))

Solution (Python):
N, K = map(int, input().split())
human = N*[0]

for i in range(K):
    d = int(input())
    for j in list(map(int, input().split())):
        human[j-1] += 1

count = 0
for i in range(N):
    if human[i] == 0:
        count += 1

print(count)

Solution (Python):
N,K=list(map(int,input().split()))
s = []
for i in range(N):
  s.append(1)
a=[]
for k in range(K):
  o = int(input())
  if 1<o:
    p = list(map(int,input().split()))
    for g in p:
      a.append(g)
  else:
    p = int(input())
    a.append(p)
for i in a:
  s[i-1] = 0
ans = 0
for w in s:
  if w==1:
    ans += 1
print(ans)

Solution (Python):

 
nk = list(map(int,input().split()))

A = [0]*nk[0]

for i in range(nk[1]):
  d = int(input())
  
  add_A = list(map(int,input().split()))
  
  
  for j in range(d):
    A[ add_A[j]-1 ] += 1



ans = 0
for i in range(nk[0]):
  if( A[i]==0 ):
    ans += 1

print(ans)

Solution (Python):
nk = input().split()
n = int(nk[0])
k = int(nk[1])
t = [0]*n

for i in range(k):
    d = int(input())
    a = input().split()
    a = [int(x) for x in a]
    for j in range(d):
        t[a[j]-1] +=1
    
res= 0
for i in range(n):
    if t[i] == 0:
        res += 1
    
print(res)

Solution (Python):
N,K=map(int,input().split())
i=0
d=list()
A=list()
while i<K:
    d.append(int(input()))
    A+=list(map(int,input().split()))
    i+=1
B=set(A)
print(N-len(B))

Solution (Python):
n, k = map(int, input().split())
d = [0] * k
a = [0] * k
for i in range(k):
    d[i] = int(input())
    a[i] = list(map(int, input().split()))
ans = [0] * n
for i in range(k):
    for j in range(n):
        ans[j] += a[i].count(j+1)
print(ans.count(0))

Solution (Python):
n, k = map(int, input().split())
x = set()
for i in range(k):
    d = int(input())
    for j in input().split():
        x.add(j)

print(n - len(x))

Solution (Python):
n, k = map(int, input().split())
l = list(range(n))
for i in range(k):
    d= int(input())
    a = list(map(int, input().split()))
    for j in a:
        if j-1 in l:
            l.remove(j-1)
print(len(l))

Solution (Python):
list1=list(map(int,input().strip().split()))[:2]
n,k=list1[0],list1[1]
dict1={}
for i in range(k):
	d=int(input())
	have=list(map(int,input().strip().split()))
	for i in have:
		if i in dict1:
			dict1[i]+=1
		else:
			dict1[i]=1
print(n-len(dict1))

Solution (Python):
N, K = map(int, input().split())
set_mentioned = set()
for k in range(K):
  _ = input()
  new_row = list(map(int, input().split()))
  [set_mentioned.add(value) for value in new_row]
print(N-len(set_mentioned))

Solution (Python):
n,k=map(int,input().split())
a=[1]*n
for _ in range(0,k):
    d=int(input())
    b=list(map(int,input().split()))
    for x in b:
        a[x-1]=0
print(sum(a))

Solution (Python):
import collections
n,k = list(map(int,input().split()))
d_list = []
a_list = []
for i in range(k):
    d = int(input())
    a = list(map(int,input().split()))
    d_list.append(d)
    a_list.extend(a)
cnt = 0
cnt_dict = collections.Counter(a_list)
for i in range(1,n+1):
    if cnt_dict[i] == 0:
        cnt += 1
print(cnt)

Solution (Python):
n, k = map(int, input().split())

a = [0] * k

all_n = [0] * n


for i in range(k):
  d = int(input())
  a[i] = list(map(int, input().split()))


for i in range(len(a)):
  for j in range(len(a[i])):
    all_n[a[i][j] - 1] += 1

print(all_n.count(0))

Solution (Python):
import itertools


N, K = map(int, input().split())
d = []
A = []
ls = [i for i in range(1,N+1)]

for i in range(K):
    d.append(int(input()))
    A.append(list(map(int, input().split())))

A = list(itertools.chain.from_iterable(A))


print(len(set(A)^set(ls)))

Solution (Python):


import sys
sys.setrecursionlimit(300000)

def solve(n, k, d, A):
    s = set()
    for aa in A:
        for a in aa:
            s.add(a)
    ret = 0
    for i in range(1, n + 1):
        if not i in s:
            ret += 1
    print(ret)
    return


def main():
    n, k = map(int, input().split())
    d = []
    a = []
    for i in range(k):
        d.append(int(input()))
        a.append(list(map(int, input().split())))
    solve(n, k, d, a)

if __name__ == '__main__':
    main()

Solution (Python):
import math
from sys import stdin,stdout

from heapq import heapify,heappop,heappush




    
N,K=list(map(int,stdin.readline().split()))
vis=set()
for k in range(K):
    dk=int(stdin.readline())
    ar=list(map(int,stdin.readline().split()))    
    for sn in ar:
        vis.add(sn)

print(N-len(vis))

Solution (Python):
n,k=map(int,input().split())

trick=[True]*n

for i in range(k):
    input()
    a_lis=list(map(int,input().split()))
    for a in a_lis:
        trick[a-1]=False


ans=0
for i in range(n):
    if(trick[i]):
        ans+=1

print(ans)

Solution (Python):
N, K=map(int,input().split())
A=set()

for _ in range(K):
    d=input()
    A=A|set(map(int,input().split()))
    
print(N-len(A))

Solution (Python):
n, k = map(int, input().split())
d = []
a = set()
for _ in range(k):
    d.append(int(input()))
    for p in list(map(int, input().split())):
        a.add(p)

a_all = set(i+1 for i in range(n))

print(len(set(a_all)-set(a)))

Solution (Python):
N,K = map(int, input().split())
check = []
for i in range(K):
    d = int(input())
    A = list(map(int, input().split()))
    check += A

ans = 0
for j in range(N):
    if j+1 in check:
        continue
    else:
        ans += 1
print(ans)

Solution (Python):
n,k = map(int, input().split())
sunuke = []
for i in range(k):
    d = int(input())
    a = list(map(int, input().split()))
    sunuke.append(a)
count_lst=[]
for j in sunuke:
    for a in range(1,n+1):
        if a in j:
            count_lst.append(a)
count=0
for z in range(1, n+1):
    if z not in count_lst:
        count+=1

print(count)

Solution (Python):
n,k = list(map(int,input().split()))
d_ = []
a_ = []
for i in range(k):
    d_.append(int(input()))
    a_.append(list(map(int,input().split())))

sum = []
for i in range(n):
    sum.append(i+1)

res = []
for l in range(k):
    for k in range(d_[l]):
        if( a_[l][k] in res):
            continue
        else:
            res.append(a_[l][k])

resList = set(sum) ^ set(res)
print(len(resList))

Solution (Python):
N,K = map(int, input().split())

A = []
d = []
for _ in range(K):
  _ = int(input())
  tmp = list(map(int, input().split()))
  for i in tmp:
    A.append(int(i))
A = list(set(A))
print(N-len(A))

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline
from collections import defaultdict
from heapq import heappop, heappush

from decimal import *
































def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

inf = float('inf')
mod = 1000000007




def main():
	N,K = inputMap()

	ans = [False for i in range(N)]
	for i in range(K):
		d = inputInt()
		A = inputList()
		for jj in A:
			j = jj-1
			if ans[j] == False:
				ans[j] = True

	tmp = 0
	for i in ans:
		if i == False:
			tmp += 1

	print(tmp)











def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res


def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def egcd(a, b):
    if a == 0:
        return b, 0, 1
    else:
        g, y, x = egcd(b % a, a)
        return g, x - (b // a) * y, y



def H(n, r, mod=10**9+7):
	
	
    return combination(n+r-1, r, mod)


class Combination:
    """
    O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
    n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
    使用例：
    comb = Combination(1000000)
    print(comb(5, 3))  
    """
    def __init__(self, n_max, mod=10**9+7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n-r] % self.mod

    def make_factorial_list(self, n):
        
        
        fac = [1]
        facinv = [1]
        for i in range(1, n+1):
            fac.append(fac[i-1] * i % self.mod)
            facinv.append(facinv[i-1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        
        modinv = [0] * (n+1)
        modinv[1] = 1
        for i in range(2, n+1):
            modinv[i] = self.mod - self.mod//i * modinv[self.mod%i] % self.mod
        return modinv



def dfs(graph,parent,counter,edge):
    stk = []
    stk.append(edge)
    while len(stk) > 0:
        p = stk.pop()
        for e in graph[p]:
            if parent[p] == e:
                continue
            else:
                parent[e] = p
                counter[e] += counter[p]
                stk.append(e)

if __name__ == "__main__":
	main()

Solution (Python):
N,K=input().split(' ')
N=int(N)
K=int(K)

have_list=[0]*N
for i in range(K):
  input()
  haves=input().split(' ')
  for n in haves:
    have_list[int(n)-1]+=1
print(have_list.count(0))

Solution (Python):
N,K = list(map(int,input().split(" ")))
A = [0 for u in range(N)]
okasi = []
for i in range(K):
  d = int(input())
  okasi.append(list(map(int,input().split(" "))))
for a in okasi:
  for m in a:
    A[m-1] += 1
print(A.count(0))

Solution (Python):
N , K = map(int,input().split())
d_list = []
A_list = []
for k1 in range(K):
    d_list+=[int(input())]
    A_list+=[[a_i for a_i in map(int,input().split())]]

S=[0 for i in range(N)]
for k2 in range(K):
    for i in A_list[k2]:
        S[i-1]+=1

counter = 0
for i in range(N):
    if S[i]==0:
        counter+=1
print(counter)

Solution (Python):
N,K=map(int,input().split())
lis=[0]*N
for i in range(K):
  n=input()
  li=list(map(int,input().split()))
  for j in li:
    lis[j-1]=1
ans=0
for i in lis:
  if i==0:
    ans+=1
print(ans)

Solution (Python):
n, k = map(int, input().split())
ans = [0] * n

for i in range(k):
    d = int(input())
    a = list(int(i) for i in input().split())
    for i in a:
        ans[i - 1] += 1


print(ans.count(0))

Solution (Python):
n,k=map(int,input().split())
d={}
for _ in range(k):
  a=int(input())
  l=list(map(int,input().split()))
  for i in range(len(l)):
    if l[i] not in d:
      d[l[i]]=1
      n=n-1

print(n)

Solution (Python):
N,K = map(int,input().split())

akun = [0]*N
count = N

for i in range(K):
    di = int(input())
    tmp = list(map(int,input().split()))
    for j in tmp:
        if akun[j-1] == 0:
            akun[j-1] +=1
            count -=1

print(count)

Solution (Python):
N, K = map(int, input().split())
s = set(range(1, N+1))

for idx in range(K):
    d = int(input())
    a = list(map(int, input().split()))
    for person in a:
        s.discard(person)

print(len(s))

Solution (Python):
import itertools

n,k=map(int,input().split())
s=[input().split() for i in range(2*k)]
t=[]
for i in range(len(s)//2):
  t.append(s[2*i+1])
res = [ flatten for inner in t for flatten in inner ]

res = [int(i) for i in res]
res=list(set(res))

print(n-len(res))

Solution (Python):
N, K = map(int, input().split())

A = [0]*N

for i in range(K):
  d = int(input())
  B = list(map(int, input().split()))
  for j in range(d):
    a = B[j]
    A[a-1] += 1
    
ans = 0
    
for i in range(N):
  if A[i] == 0:
    ans += 1
    
print(ans)

Solution (Python):
n, k = map(int, input().split())
ans = []
for i in range(k):
    x = int(input())
    x = list(map(int, input().split()))
    for j in x:
        ans.append(j)
ans = set(ans)
cnt = 0
for i in range(1, n+1):
    if not i in ans:
        cnt += 1
print(cnt)

Solution (Python):
from collections import defaultdict

n, k = map(int, input().split())

res = []
for i in range(k):
    kashi = int(input())
    res += [int(i) for i in input().split()]

print(n - len(set(res)))

Solution (Python):
N, K = list(map(int, input().split()))
sunuke_set = set([i for i in range(1, N + 1)])

for i in range(K):
    d = int(input())
    d_set = set(list(map(int, input().split())))
    sunuke_set = sunuke_set - d_set

ans = len(sunuke_set)
print(ans)

Solution (Python):
n, k = list(map(int,input().split()))
flags = [1]*n
for i in range(k):
    d = int(input())
    a = list(map(int,input().split()))
    for j in range(d):
        flags[a[j]-1] = 0
print(sum(flags))

Solution (Python):
N,K = list(map(int,input().split()))

Ds = []
As = []
for i in range(K):
    Ds.append(list(map(int, input())))
    As.append(list(map(int, input().split())))

sunukes = [0] * N
for A in As:
    for a in A:
        sunukes[a-1] += 1


ans = 0
for sunuke in sunukes:
    if(sunuke == 0):
        ans += 1

print(ans)

Solution (Python):
n,k=map(int,input().split())
h=[]
for _ in range(k):
    d=int(input())
    as_=list(map(int,input().split()))
    for a in as_:
        h.append(a)
ans=0
for m in range(1, n+1):
    if not m in h:
        ans+=1
print(ans)

Solution (Python):
import collections
def main():
  N,K = map(int, input().split())
  lists=[0]*N
  num_list = [list(map(int, input().split())) for _ in range(2*K)]
  num_list2=[list(num_list[i]) for i in range(1,2*K,2)]
  for i in range(K):
    tgtlist=num_list2[i]
    for j in range(len(tgtlist)):
      lists[tgtlist[j]-1]=lists[tgtlist[j]-1]+1
  print(len([i for i, x in enumerate(lists) if x == 0]))
  
    
if __name__=='__main__':
  main()

Solution (Python):
import numpy as np

n, k = map(int, input().split())
sunukes = list(np.zeros(n))
for i in range(k):
    d = int(input())
    a = list(map(int, input().split()))
    for j in range(n):
        if j+1 in a:
            sunukes[j] = 1
            
print(sunukes.count(0))

Solution (Python):
n, k = map(int, input().split())

sunuke = {i + 1 for i in range(n)}
hav = set()

for _ in range(k):
    d = int(input())
    a_l = list(map(int, input().split()))
    for a in a_l:
        hav.add(a)

print(len(sunuke - hav))

Solution (Python):
N, K = map(int,input().split())
count = 0
A = list()
for _ in range(K):
  d = int(input())
  a = list(map(int,input().split()))
  A.append(a)
sum_A = sum(A,[])
for i in range(1,N+1):
  if (i in sum_A) == False:
    count = count + 1
print(count)

Solution (Python):


n,k = map(int,input().split())

sunuke = ["{}".format(i) for i in range(1,n+1)]

for i in range(k):
    d = int(input())
    a = input().split()
    for i in a:
        if i in sunuke:
            sunuke.remove(i)

ans = len(sunuke)

print("{}".format(ans))

Solution (Python):
n,k=map(int,input().split())
s=[]
for d in range(1,k+1):
    d=int(input())
    List=list(map(int,input().split()))
    for a in List:
        s.append(a)

t=set(s)

print(n-len(t))

Solution (Python):
N, K = map(int, input().split())
d = []
A = []
for i in range(K):
    d.append(int(input()))
    A.append(list(map(int, input().split())))

hito = [i for i in range(1, N+1)]


for i in range(N):
    name = hito[i]
    for j in range(K):
        if name in A[j]:
            hito[i] = -1
            break

ans = set(hito)
print(len(ans)-1)

Solution (Python):
n, k = map(int, input().split())
a = [list(map(int,input().split())) for i in range(2*k)]
ans = 0
b=[]
for i in range(k):
  b += a[2*i-1]
print(n-len(set(b)))

Solution (Python):
import sys
input = sys.stdin.readline

n, k = map(int,input().split())

kodomo = [i for i in range(1,n+1)]

DS = []
okashi = []

for i in range(k):
    DS.append(int(input()))
    okashi.append(list(map(int,input().split())))

for i in range(k):
    for j in range(DS[i]):
        try:
            kodomo.remove(okashi[i][j])
        except ValueError:
            continue

print(len(kodomo))

Solution (Python):
N, K = [int(n) for n in input().split()]

d = []
A = []

S = dict([(i + 1, True) for i in range(N)])

for i in range(K):
    d.append(int(input()))
    
    for a in input().split():
        if int(a) in S:
            del S[int(a)]

print(len(S))

Solution (Python):
[n,k] = [int(x) for x in input().split()]

temp = []
for _ in range(k):
    n_okashi_people_num = int(input())
    temp = temp + [int(x) for x in input().split()]

ans = n - len(list(set(temp)))

print(ans)

Solution (Python):
N,K=map(int,input().split())
lis=[i for i in range(1,N+1)]
for i in range(K):
  d=int(input())
  tmp=[int(_) for _ in input().split()]
  for j in range(d):
    if tmp[j] in lis:
      lis.remove(tmp[j])
print(len(lis))

Solution (Python):
n, k = map(int, input().split())
l = [0] * n
for i in range(k):
    d = int(input())
    a = map(int, input().split())
    for j in a:
        l[j-1] += 1

counter = 0
for s in l:
    if s == 0:
        counter+=1

print(counter)

Solution (Python):
n,k=map(int, input().split())
S = []
for i in range(k):
    d1 = int(input())
    
    S.append(list(map(int, input().split())))

ans = [0]*n

for i,s in enumerate(S):
    for d in s:
        ans[int(d)-1]+=1


cnt = 0
for i in ans:
    if i == 0:
        cnt+=1
print(cnt)

Solution (Python):
N, K = map(int, input().split())
ans_list = [0 for x in range(N)]
for i in range(K):
    d = int(input())
    A = list(map(int, input().split()))
    for j in range(d):
        ans_list[A[j] - 1] += 1
ans = ans_list.count(0)
print(ans)

Solution (Python):
import numpy as np

n, k = map(int, input().split())

n_count = np.zeros(n, dtype = np.int)


for i in range(k):
  d = int(input())
  a = list(map(int, input().split()))
  
  for j in range(d):
    n_count[a[j]-1] += 1


print(np.count_nonzero(n_count == 0))

Solution (Python):
n,k = map(int,input().split())
a = []

for i in range(k):
    d = int(input())
    e = list(map(int,input().split()))
    a += e
    
a_new = [int(s) for s in a]

print(int(n-len(set(a))))

Solution (Python):
n,k = map(int,input().split())
d = [0] * k
a = [0] * k
arr = []
for i in range(k):
    d[i] = int(input())
    a[i] = [int(j) for j in input().split()]
    arr = arr + a[i]

ans = 0
for i in range(n):
    if i+1 in arr:
        continue
    else:
        ans += 1

print(ans)

Solution (Python):
n,k = map(int,input().split())
okashi = [0 for i in range(n+1)]

for i in range(k):
    d = int(input())
    if(d==1):
        oka = int(input())
        okashi[oka] += 1
    else:
        oka = list(map(int,input().split()))
        
        for j in oka:
            okashi[j] += 1
c = 0
for i in okashi:
    if(i==0):
        c+=1
print(c-1)

Solution (Python):
a = list(map(int,input().split()))
n = a[0]
k = a[1]


member = list(range(1,n+1))

for i in range(k):
  num = int(input())
  c = list(map(int,input().split()))
  for j in c:
    if j in member:
      member.remove(j)
print(len(member))

Solution (Python):
N, K = map(int, input().split())

sunuke = list(range(1, N + 1, 1))

for c in range(K):
    d = int(input())
    A = list(map(int, input().split()))
    for co in range(d):
        try:
            sunuke.remove(A[co])
        except ValueError:
            pass

print(len(sunuke))

Solution (Python):
import itertools
N,K = input().split()
N,K = int(N),int(K)
Alist = []

for i in range(0,K*2):
    Alist.append(input().split())

intAlist = [[int(item) for item in row] for row in Alist]



count = 0
oklist = []
nowD = 0
for j in range(0,K*2):

    if j % 2 == 0:
        
        pass
    else:
        oklist.append(intAlist[j])
oklist = list(set(list(itertools.chain.from_iterable(oklist))))
print(N - len(oklist))

Solution (Python):
n, k = map(int, input().split())
s = list(list(map(int, input().split())) for _ in range(2*k))

a = []
for i in range(1, k+1):
    a += s[2*i-1]
    
lis = [None]*n
for i in range(n):
    lis[i] = i+1

cnt = 0
for i in lis:
    if i not in a:
        cnt += 1
        
print(cnt)

Solution (Python):
n, k = map(int, input().split())
l = [0] * n
for i in range(k):
    d = int(input())
    a = list(map(int,input().split()))
    for j in range(d):
        l[a[j] - 1] = 1
ans = 0
for i in range(n):
    if l[i] == 0:
        ans += 1
print (ans)

Solution (Python):
n, k = map(int, input().split())

l = [0] * (n + 1) 

for i in range(k):
  d = int(input())
  a = input().split()
  
  for j in a:
    l[ int(j) ] = 1
    

print(n - sum(l))

Solution (Python):
import numpy as np
N,K=list(map(int, input().split()))
AA=np.zeros(N)
for i in range(K):
  d,=list(map(int, input().split()))
  A=[]
  A=np.array(list(map(int, input().split())))-1  
  AA[A]+=1  
print(N-np.count_nonzero(AA))

Solution (Python):
n, k = list(map(int, input().split()))
d = []
a = []
ans = 0

for i in range(k):
    d += [int(input())]
    a += [list(map(int, input().split()))]

for m in range(n):
    for array in a:
        if m+1 in array:
            ans -= 1
            break
    ans += 1

print(ans)

Solution (Python):
n, k = map(int, input().split())

p = [x for x in range(1, n+1)]

for i in range(k*2):
    nums = list(map(int, input().split()))
    if i%2==0:
        pass
    else:
        for num in nums:
            if p.count(num) > 0:
                p.remove(num)

print(len(p))

Solution (Python):
from collections import defaultdict

N, K = map(int, input().split())

b = defaultdict(int)
for i in range(K):
    d = int(input())
    M = input().split()
    for z in M:
        b[str(z)] = i
print(N - len(b))

Solution (Python):
n, k = map(int, input().split())
sunukes = list(range(1, n+1))
for _ in range(k):
  d = int(input())
  a = list(map(int, input().split()))
  
  for i in a:
    if i in sunukes:
      sunukes.remove(i)
    
print(len(sunukes))

Solution (Python):
N, K = map(int, input().split())

have = []
for i in range(K):
    d = int(input())
    x = list(map(int, input().split()))
    have.extend(x)
uni = set(have)
print(N - len(uni))

Solution (Python):
(N,K)=input().split()
(N,K)=(int(N),int(K))
d=[0 for i in range(K)]
A=[0 for i in range(K)]
M=[]
for i in range(1,N+1):
  M.append(i)
for i in range(K):
  d[i]=int(input())
  A[i]=input().split()
  for j in range(len(A[i])):
    A[i][j]=int(A[i][j])
    if A[i][j] in M:
      M.remove(A[i][j])
print(len(M))

Solution (Python):
n,k=map(int,input().split())
ans=[1]*n
for i in range(k):
  d=int(input())
  for j in list(map(int, input().split())):
    ans[j-1]=0
print(sum(ans))

Solution (Python):
n,k = map(int,input().split())
d = []
a = []
for i in range(k):
    d.append(int(input()))
    a.append(list(map(int,input().split())))

z = []
for j in a:
    for i in range(len(j)):
        z.append(j[i])

z = len(set(z))


print(n-z)

Solution (Python):
import numpy as np
import sys
from typing import Callable, NoReturn


def main() -> NoReturn:
    scan: Callable[[], str] = sys.stdin.readline

    n, k = map(int, scan().rstrip().split())  

    counter: np.ndarray = np.zeros((n, k))

    for i in range(k):
        input()
        for a in map(int, scan().rstrip().split()):
            counter[a - 1][i] += 1

    print(np.sum(counter @ np.ones((k,1)) == 0))


if __name__ == '__main__':
    main()

Solution (Python):
N,K = map(int,input().split())
L = list(range(1,N+1))
for i in range(K):
  d = int(input())
  A = list(map(int,input().split()))
  for a in A:
    try:
      L.remove(a)
    except ValueError:
      pass
print(len(L))

Solution (Python):
n,k=map(int,input().split())
l=[]
d={}
for i in range(k):
    x=int(input())
    a=input().split()
    for j in range(x):
        try:
            d[a[j]]+=1
        except:
            d[a[j]]=1
            l.append(a[j])
print(n-len(l))

Solution (Python):
n, k = map(int, input().split())
d = []
A = [A for A in range(1, n+1)]
ans = []
for i in range(k):
  d.append(int(input()))
  al = list(map(int, input().split()))
  for j in range(len(al)):
    if not(al[j] in ans):
      ans.append(al[j])
print(len(list(set(A)-set(ans))))

Solution (Python):
N, K = map(int, input().split())
S = [0 for _ in range(N)]
for j in range(K):
    d = int(input())
    A = list(map(int, input().split()))
    for i in range(d):
        S[A[i]-1] += 1
print(S.count(0))

Solution (Python):
from collections import defaultdict
N, K = map(int, input().split())
check = defaultdict(lambda : False)
for _ in range(K):
    d = int(input())
    A = list(map(int, input().split()))
    for a in A:
        check[a] = True
ans = 0
for i in range(1, N+1):
    if not check[i]:
        ans += 1
print(ans)

Solution (Python):
n,k = map(int,input().split())
check = [int(i) for i in range(1,n + 1)]

num = []
for i in range(k):
  x = input()
  test = list(map(int, input().split()))
  for j in test:
    num.append(j)

num = set(check) ^ set(num)

print(len(num))

Solution (Python):
n,k = map(int,input().split())
sunuke = []
for i in range(k):
    d = int(input())
    sunuke.extend(list(map(int,input().split())))
print(n-len(set(sunuke)))