Problem p02688 (python)

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

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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))

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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))

Buggy submission (verdict: Runtime Error):
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)

Buggy submission (verdict: Runtime Error):
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)