Problem: 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?

Submission attempts (in order):
N,K = map(int,input().split())
P = [0 for i in range(N)]
for i in range(K):
    a = int(input())
    b = list(map(int,(input().split()))
    for j in range(a):
      P[b[j]-1] = 1 
m = 0   
for i in range(N):
    if P[i] == 0:
        m += 1
print(m)

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

sunuke=[]
for i range(1,n):
  sunuke.append(i)


for j range(1,k):
  ka = input()
  for l range(ka):
    x = input()
    sunuke[x - 1] = -1


for m range(0,n-1):
  if sunuke[m] != -1:
    y += 1
    
print(y)

N,K = map(int,input().split())
 
P = [0 for i in range(N)]
for i in range(K):
  a = int(input())
  b = list(int,input().split())
  for i in range(a):
    P[b[i]-1] = 1 
m = 0   
for i in range(N):
  if P[l] == 0:
    m += 1
    
print(m)

N,K = map(int,input().split())
P = [0 for i in range(N)]
for i in range(K):
    a = int(input())
    b = list(map(int,(input().split()))
    for j in range(a):
        P[b[j]-1] = 1
m = 0   
for i in range(N):
    if P[i] == 0:
        m += 1
print(m)

N,K = map(int,input().split())
P = [0 for i in range(N)]
for i in range(K):
    a = int(input())
    b = list(map(int,(input().split()))
    for j in range(a):
      P[b[j]-1] = 1 
m = 0   
for i in range(N):
    if P[i] == 0:
        m += 1
print(m)

N,K = map(int,input().split())
 
P = [0 for i in range(N)]
m = 0
for i in range(K):
  a = int(input())
  b = list(int,input().split())
  for j in range(a):
    P[b[j]-1] = 1
    j += 1
    
for l in range(N):
  if P[l] == 0:
    m += 1
    
print(m)


N,K = map(int,input().split())
P = [0 for i in range(N)]
for i in range(K):
    a = int(input())
    b = list(input().split())
  for j in range(a):
      P[b[j]-1] = 1 
m = 0   
for i in range(N):
    if P[i] == 0:
        m += 1
print(m)

N,K = map(int,input().split())
P = [0 for i in range(N)]
for i in range(K):
    a = int(input())
    b = list(input().split())
  for j in range(a):
      P[b[j]-1] = 1 
m = 0   
for i in range(N):
    if P[i] == 0:
    m += 1
print(m)

N,K = map(int,input().split())
 
P = [0 for i in range(N)]
m = 0
for i in range(K):
  a = int(input())
  b = list(int,input().split())
  for j in range(a):
    P[b[j]-1] = 1
    j += 1
    
for l in range(N):
  if P[l] == 0:
    m += 1
    
peint(m)

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

P = [0]*N
m = 0
for i in range(K):
  a = int(input())
  b = list(int,input().split())
  for j in range(a):
    P[b[j]-1] = 1
    j += 1
    
for l in range(N):
  if P[l] == 1:
    m += 1
    
peint(m)
    


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

sunuke=[]
for i in range(1,n):
  sunuke.append(i)


for j in range(1,k):
  ka = input()
  for l in range(ka):
    x = input()
    sunuke[x - 1] = -1


for m in range(0,n-1):
  if sunuke[m] != -1:
    y += 1
    
print(y)


N,K = map(int,input().split())
P = [0 for i in range(N)]
for i in range(K):
    a = int(input())
    b = list(map(int,(input().split()))
    for j in range(a):
      P[b[j]-1] = 1 
m = 0   
for i in range(N):
    if P[i] == 0:
        m += 1
print(m)

N,K = map(int,input().split())
P = [0 for i in range(N)]
for i in range(K):
    a = int(input())
    b = list(map(int,(input().split()))
  for j in range(a):
      P[b[j]-1] = 1 
m = 0   
for i in range(N):
    if P[i] == 0:
        m += 1
print(m)

N,K = map(int,input().split())
P = [0 for i in range(N)]
for i in range(K):
    a = int(input())
    b = list(map(int,input().split()))
  for j in range(a):
      P[b[j]-1] = 1 
m = 0   
for i in range(N):
    if P[i] == 0:
        m += 1
print(m)

n, k = map(int, input().split())
 
member = [0]*n
 
for i in range(k):
    d = int(input())
   
    for j in range(d):
        a = [int(x) for x in input().split()]
        member[a[j]-1] += 1
 
print(member.count(0))

N,K = map(int,input().split())
 
P = [0]*N
m = 0
for i in range(K):
  a = int(input())
  b = list(int,input().split())
  for j in range(a):
    P[b[j]-1] = 1
    j += 1
    
print(P.count(0))

N,K = map(int,input().split())
P = [0 for i in range(N)]
for i in range(K):
    a = int(input())
    b = list(map(int,(input().split()))
    for j in range(a):
      P[b[j]-1] = 1 
m = 0   
for i in range(N):
    if P[i] == 0:
        m += 1
print(m)

N,K = map(int,input().split())
P = [0 for i in range(N)]
for i in range(K):
  a = int(input())
  b = list(input().split())
  for j in range(a):
    P[b[j]-1] = 1 
m = 0   
for i in range(N):
  if P[i] == 0:
    m += 1

N,K = map(int,input().split())
P = [0 for i in range(N)]
for i in range(K):
    a = int(input())
    b = list(input().split())
  for j in range(a):
      P[b[j]-1] = 1 
m = 0   
for i in range(N):
    if P[i] == 0:
        m += 1
print(m)

N,K = map(int,input().split())
P = [0 for i in range(N)]
for i in range(K):
    a = int(input())
    b = list(map(int,(input().split()))
    for j in range(a):
        P[b[j]-1] = 1
m = 0   
for i in range(N):
    if P[i] == 0:
        m += 1
print(m)

N,K = map(int,input().split())
 
P = [0 for i in range(N)]
for i in range(K):
  a = int(input())
  b = list(int,input().split())
  for j in range(a):
    P[b[j]-1] = 1 
m = 0   
for i in range(N):
  if P[i] == 0:
    m += 1
    
print(m)

N,K = map(int,input().split())
P = [0] * N
for i in range(K):
    a = int(input())
    b = list(map(int,input().split()))
    for j in range(a):
      P[b[j]-1] = 1 
m = 0   
for i in range(N):
    if P[i] == 0:
        m += 1
print(m)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted