Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
a = set()

for _ in range(k):
  d = int(input())
  a += [int(m) for m in input().split(" ")]

print(n - len(a))


Fixed submission:
n, k = map(int, input().split())
a = []

for _ in range(k):
  d = int(input())
  a += [int(m) for m in input().split()]

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

Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
a = set()

for _ in range(k):
  d = int(input())
  a += (int(m) for m in input().split())

print(n - len(a))


Fixed submission:
n, k = map(int, input().split())
a = []

for _ in range(k):
  d = int(input())
  a += [int(m) for m in input().split()]

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

Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
a = set()

for _ in range(k):
  d = int(input())
  a += [int(m) for m in input().split()]

print(n - len(a))


Fixed submission:
n, k = map(int, input().split())
a = []

for _ in range(k):
  d = int(input())
  a += [int(m) for m in input().split()]

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

Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
a = set()

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

print(n - len(a))


Fixed submission:
n, k = map(int, input().split())
a = []

for _ in range(k):
  d = int(input())
  a += [int(m) for m in input().split()]

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

Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
a = set()

for _ in range(k):
  d = int(input())
  a.append(map(int, input().split()))

print(n - len(a))


Fixed submission:
n, k = map(int, input().split())
a = []

for _ in range(k):
  d = int(input())
  a += [int(m) for m in input().split()]

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

Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
a = set()

for _ in range(k):
  d = int(input())
  while m <= d:
    l = int(input())
    a.append(l)
    m += 1

print(n - len(a))


Fixed submission:
n, k = map(int, input().split())
a = []

for _ in range(k):
  d = int(input())
  a += [int(m) for m in input().split()]

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

Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
a = set()

for _ in range(k):
  d = int(input())
  while m <= d:
    a.append(int(input()))
    m += 1

print(n - len(a))

Fixed submission:
n, k = map(int, input().split())
a = []

for _ in range(k):
  d = int(input())
  a += [int(m) for m in input().split()]

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

Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
a = set()

for m in range(k):
  d = int(input())
  print(d)
  for l in range(d):
    a.append(range(n))
  print(a)

Fixed submission:
n, k = map(int, input().split())
a = []

for _ in range(k):
  d = int(input())
  a += [int(m) for m in input().split()]

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

Buggy python submission (verdict: Runtime Error):
import random
n = int(input())
k = int(input())
l = 0

while l <= k:
  d = random.randint(1, n)
  print(d)
  for m in range(d):
    print(random.randint(1, n))
  l += 1
  


Fixed submission:
n, k = map(int, input().split())
a = []

for _ in range(k):
  d = int(input())
  a += [int(m) for m in input().split()]

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

Buggy python submission (verdict: Runtime Error):
import random
n = list(x for x in range(input()))
k = int(input())
l = 0

while l <= k:
  d = random.randint(1, n)
  print(d)
  for m in range(d):
    print(random.choice(n))
  l += 1
  

Fixed submission:
n, k = map(int, input().split())
a = []

for _ in range(k):
  d = int(input())
  a += [int(m) for m in input().split()]

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

Buggy python submission (verdict: Runtime Error):
import random
n = list(range(1, int(input())))
k = int(input())
i = 0
m = 0

while i == k:
  for d in random.randint(1, k+1):
    for m in range(d)
      print(random.choice(n))
  i += 1
  

Fixed submission:
n, k = map(int, input().split())
a = []

for _ in range(k):
  d = int(input())
  a += [int(m) for m in input().split()]

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