TnT/Multi_CodeNet4Repair huggingface dataset:
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())
N = list(range(1,n+1))
A = set()
count = 0
for i in range(k):
  d = int(input())
  Ad = list(map(int,input().split()))
  for j in range(d):
    A.add(Ad[j])

for i in range(n):
  if N[i] in A:
    count += 1
print(A)
print(n-count)


n,k = map(int,input().split())
N = list(range(1,n+1))
A = set()
count = 0
for i in range(k):
  d = int(input())
  Ad = list(map(int,input().split()))
  for j in range(d):
    A.add(Ad[j])

for i in range(n):
  if N[i] in A:
    count += 1

print(n-count)

Verdicts: Wrong Answer

Accepted
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):
S = input()



if S == "ABC":
    print("ARC")
else:
    print("ABC")




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


zisyo = {} 
zisyo = set(zisyo)

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

print(N-len(zisyo))


















































































Verdicts: Wrong Answer

Accepted
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= list(map(int, input().split())) 

ans = [0]*(N+1)

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

res = sum(ans)
print(res)
        
    

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

ans = [0]*(N+1)

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

res = len(ans)-1-sum(ans)
print(res)
        
    

Verdicts: Wrong Answer

Accepted
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(' '))
a=list(1 for i in range(n+1))
for z in range(k):
  x=int(input())
  temp=map(int,input.split(' '))
  for i in temp:
    a[i]+=1
c=0
for i in range(1,n+1):
  if(a[i]==0):
    c++
print(c)

n,k=map(int,input().split(' '))
a=list(1 for i in range(n+1))
for z in range(k):
  x=int(input())
  temp=map(int,input.split(' '))
  for i in temp:
    a[i]+=1
    c=0
for i in range(1,n+1):
  if(a[i]==0):
    c++
print(c)

n,k=map(int,input().split(' '))
a=[0 for i in range(n+1)]
for z in range(k):
  x=int(input())
  temp=map(int,input().split(' '))
  for i in temp:
    a[i]+=1
c=0
for i in range(1,n+1):
  if(a[i]==0):
    c+=1
print(c)

Verdicts: Runtime Error

Runtime Error

Accepted
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 = int(input())
l_n = [0] * n
for i in range(0, k):
    d = int(input())
    a = int(input())
    for l in a:
        l_n[l-1] = 1
print(l_n.count(0)) 

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

Verdicts: Runtime Error

Accepted
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):
def main():
  n, k = map(int, input().split())
  
  kids = list()
  sum = 0
  
  for i in k-1:
    dustbox = input()
    kids += list(map(int, input().split()))
    
  for i in range(1, n+1):
    if i not in kids:
      sum += 1
      
  print(sum)
  
main()

def main():
  n, k = map(int, input().split())
  
  kids = list()
  sum = 0
  
  for i in k:
    dustbox = input()
    kids += list(map(int, input().split()))
    
  for i in range(1, n+1):
    if i not in kids:
      sum += 1
      
  print(sum)
  
main()

def main():
  n, k = map(int, input().split())
  
  kids = list()
  sum = 0
  
  for i in range(k):
    dustbox = input()
    kids += list(map(int, input().split()))
    
  for i in range(1, n+1):
    if i not in kids:
      sum += 1
      
  print(sum)
  
main()

Verdicts: Runtime Error

Runtime Error

Accepted
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())
A = []

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

ref = A[0]

for i in range(1, K):
  ref = list(set(ref) & set(A[i])) + list(set(ref) ^ set(A[i]))

len = len(ref)

print(len)
print(N - len)

N, K = map(int, input().split())
A = []

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

ref = A[0]

for i in range(1, K):
  ref = list(set(ref) & set(A[i])) + list(set(ref) ^ set(A[i]))

len = len(ref)

print(N - len)

Verdicts: Wrong Answer

Accepted
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):
import itertools
N1, K1 = map(int, input().split())
listA=[]
while True:
    try:
        listA.append(list(map(int,input().split())))
    except:
        break;
N = len(listA)
listB = []
for n in range(1,N):
  if n%2==0:
    listB.append(listA[n])
listC = list(itertools.chain.from_iterable(listB))
print(N1 - len(list(set(listC))))

import itertools
N1, K1 = map(int, input().split())
listA=[]
while True:
    try:
        listA.append(list(map(int,input().split())))
    except:
        break;
N = len(listA)
#print(N)
listB = []
for n in range(0,N):
  if n%2==1:
    listB.append(listA[n])

listC = list(itertools.chain.from_iterable(listB))

print(N1 - len(list(set(listC))))

Verdicts: Wrong Answer

Accepted
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())

have_snack = [0 for i in range(N)]

for k in range(K):
    hito_len = int(input())
    have_hito = map(int, input().split())
    for hh in range(have_hito):
        have_snack[hh - 1] = 1

print(have_snack.count(0))


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

have_snack = [0 for i in range(N)]

for k in range(K):
    hito_len = int(input())
    have_hito = list(map(int, input().split()))
    for hh in have_hito:
        have_snack[hh - 1] = 1

print(have_snack.count(0))


Verdicts: Runtime Error

Accepted
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 = list(map(int, input("").split()))

sunuke = [0] * n
 
for i in range(K):
    d = int(input())
    a = list(map(int,input().split()))
    for j in a:
        sunuke[j-1] = 0

print(sum(sunuke))

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

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

print(sum(sunuke))

Verdicts: Runtime Error

Accepted
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())
tmp_A = [0]*N
ans = 0

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

N,K = map(int,input().split())
tmp_A = [0]*N
ans = 0

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

Verdicts: Runtime Error

Accepted
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())
l = [list(map(int, input().split())) for _ in range(2 * K)]

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

for i in range(int((K+1)/2)):
  tt = list(set(list(range(1, N+1))) - set(l[2*i+1]))
  print(tt)
  treated = list(set(treated) & set(tt))

print(len(treated))

N, K = map(int, input().split())
l = [list(map(int, input().split())) for _ in range(2 * K)]

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

for i in range(K):
  tt = list(set(list(range(1, N+1))) - set(l[2*i+1]))
  treated = list(set(treated) & set(tt))

print(len(treated))

Verdicts: Wrong Answer

Accepted
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())
l=[]
for k in range(n):
  l.append(k)
for i in range(k):
  d=int(input())
  s=input().split()
  for j in s:
    if int(j) in l:
      l.remove(int(j))
print(len(l))

  

n,k=map(int,input().split())
l=[]
for m in range(1,n+1):
  l.append(m)
for i in range(k):
  d=int(input())
  s=input().split()
  for j in s:
    if int(j) in l:
      l.remove(int(j))
print(len(l))

Verdicts: Runtime Error

Accepted
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):
import sys

n, k = map(int, sys.stdin.readline().split())

snukes = [1] * n

for _ in range(k):
  nums = list(map(int, sys.stdin.readline().split()))
  for num in nums:
    snukes[num - 1] = 0

print(sum(snukes))


import sys
     
n, k = map(int, sys.stdin.readline().split())
     
snukes = [1] * n
     
for _ in range(k):
  n = int(sys.stdin.readline())
  nums = list(map(int, sys.stdin.readline().split()))
  for num in nums:
    snukes[num - 1] = 0

print(sum(snukes))


Verdicts: Wrong Answer

Accepted
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())
snk = [-1] * (n + 1)
ans = 0
for j in range(k):
	d = int(input())
	lis = list(input().split())
	for i in range(d):
		y = int(lis[i])
		snk[y] = 0
for j in range(n):
    if snk[j] == -1:
        ans += 1
print(ans)

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


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

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

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Accepted
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())

D=[]
A=[]
C=[]
for i in range(k):
    D.append(int(input()))
    A.append(list(map(int,input().split())))
for i in range(1,n+1):
    C.append(int(i))

for i in range(k-1):
    for a in A[i]:
        if C.count(a)!=0:
            C.remove(a)
        
print( C, len(C) )



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

D=[]
A=[]
C=[]
for i in range(k):
    D.append(int(input()))
    A.append(list(map(int,input().split())))
for i in range(1,n+1):
    C.append(int(i))

for i in range(k):
    for a in A[i]:
        if C.count(a)!=0:
            C.remove(a)
        
print( len(C) )



Verdicts: Wrong Answer

Accepted
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())
list = []
for p in range(k):
  m = int(input())
  k_list = list(map(int, input().split()))
  for q in k_list:
    if not q in list:
      list.append(q)
k_l = len(k_list)
print(n-k_l)

n, k = map(int, input().split())
list = []
for p in range(k):
  d = int(input())
  k_list = [int(x) for x in input().split()]
  m = len(k_list)
  for q in k_list:
    if not q in list:
      list.append(q)
l = len(list)
print(n - l)

Verdicts: Runtime Error

Accepted
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):
import itertools
N, K = map(int, input().split())
d_list = []
A = []
a_set = set()
al_set = {i for i in range(N)}
for i in range(K):
    d_list.append(int(input()))
    A.append(list(map(int, input().split())))
for i in itertools.chain.from_iterable(A):
    a_set.add(i)
print(len(al_set - a_set))

import itertools
N, K = map(int, input().split())
d_list = []
A = []
a_set = set()
al_set = {i for i in range(1, N+1)}
for i in range(K):
    d_list.append(int(input()))
    A.append(list(map(int, input().split())))
for i in itertools.chain.from_iterable(A):
    a_set.add(i)
print(len(al_set - a_set))

Verdicts: Wrong Answer

Accepted
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())
S = [input().split() for _ in range(N+K-1)]
new_list = []; count = 1
while count < 2*K:
    for i in new_list[count]:
        new_list.append(i)
    count += 2
new_list = set(new_list)
print(N - len(new_list))

N, K = map(int, input().split())
S = [input().split() for _ in range(K*2)]
new_list = []
for i in range(5):
    S.append([])
S.append([])
for i in range(1,len(S)-2,2):
    for j in S[i]:
        new_list.append(j)

new_list = set(new_list)
print(N - len(new_list))


Verdicts: Runtime Error

Accepted
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())

N = list(range(1,n +1))
for i in range(k):
    d = int(input())
    a = list(map(int, input().split()))
    for p in a:
        try:
            if N.index(p):
                N[N.index(p)] = 0
        except:
            pass

cnt = 0                    
for q in N:
    if q != 0:
        cnt += 1
print(cnt)

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

N = list(range(1,n +1))
for i in range(k):
    d = int(input())
    a = list(map(int, input().split()))
    for p in a:
        N[p - 1] = 0

cnt = 0                    
for q in N:
    if q != 0:
        cnt += 1
print(cnt)

Verdicts: Wrong Answer

Accepted
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):
import sys
def Ii():return int(sys.stdin.buffer.readline())
def Mi():return map(int,sys.stdin.buffer.readline().split())
def Li():return list(map(int,sys.stdin.buffer.readline().split()))

n,k = Mi()
b = [1]*n
for i in range(k):
  d = Ii()
  a = Li()
  for j in a:
    b[j] = 0
    
print(sum(b)-1)

import sys
def Ii():return int(sys.stdin.buffer.readline())
def Mi():return map(int,sys.stdin.buffer.readline().split())
def Li():return list(map(int,sys.stdin.buffer.readline().split()))
 
n,k = Mi()
b = [1]*(n+1)
for i in range(k):
  d = Ii()
  a = Li()
  for j in a:
    b[j] = 0
    
print(sum(b)-1)

Verdicts: Runtime Error

Accepted
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())
A = [1]*N
import collections
for i in range(K):
  d = int(input())
  check = input().split()
  for j in range(d):
    if A[int(check[j])-1] == 1:
      A[int(check[j])-1] = 0
c = collections.Counter(A)
print(c[0])

N,K = map(int,input().split())
A = [1]*N
import collections
for i in range(K):
  d = int(input())
  check = input().split()
  for j in range(d):
    if A[int(check[j])-1] == 1:
      A[int(check[j])-1] = 0
c = collections.Counter(A)
print(c[1])

Verdicts: Wrong Answer

Accepted
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())
L = [1 for i in range(N)]
for k in range(K):
  d = int(input())
  A = list(map(int, input().spit()))
  for i in range(d):
    L[A[i] - 1] = 0
print(sum(L))

N, K = map(int, input().split())
L = [1 for i in range(N)]
for k in range(K):
  d = int(input())
  A = list(map(int, input().split()))
  for i in range(d):
    L[A[i] - 1] = 0
print(sum(L))

Verdicts: Runtime Error

Accepted
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 = list(map(int, input().split()))
d=[0] * K
A=[0] * K
okashi_sunuke = list()
for i in range(K):
    d[i] = int(input())
    A[i] = list(map(int, input().split()))
    okashi_sunuke += A[i]

sunuke = 0
for i in range(N):
    if i in okashi_sunuke:
        sunuke +=1

print(N-sunuke)






N, K = list(map(int, input().split()))
d=[0] * K
A=[0] * K
okashi_sunuke = list()
for i in range(K):
    d[i] = int(input())
    A[i] = list(map(int, input().split()))
    okashi_sunuke += A[i]

sunuke = 0
for i in range(1,N+1):
    if i in okashi_sunuke:
        sunuke +=1

print(N-sunuke)






Verdicts: Wrong Answer

Accepted
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())
A = []
N = []

N = set(range(1,n+1))

for i in range(1,k+1):
    d = int(input())
    a=set(map(int,input().split()))
    A += a

ans = list(N-A)

print(len(ans))

n, k = map(int,input().split())
A = []
N = []

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

for i in range(1,k+1):
    d = int(input())
    a=set(map(int,input().split()))
    A += a

ans = list(set(N)-set(A))

print(len(ans))

Verdicts: Runtime Error

Accepted
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())	
x=[list(map(int, input().split())) for i in range(2*k)]
ans=[range(1,n+1)]
num=[]
print(x)
many=x[0:2*k:2]
cookie=x[1:2*k:2]
print(many)
print(cookie)
for y in range(len(cookie)):
    for z in range(len(cookie[y])):
        num.append(cookie[y][z])
Q=set(num)
W=list(Q)
print(n-len(W))

n,k=map(int,input().split())	
x=[list(map(int, input().split())) for i in range(2*k)]
ans=[range(1,n+1)]
num=[]
many=x[0:2*k:2]
cookie=x[1:2*k:2]
for y in range(len(cookie)):
    for z in range(len(cookie[y])):
        num.append(cookie[y][z])
Q=set(num)
W=list(Q)
print(n-len(W))

Verdicts: Wrong Answer

Accepted
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) = [int(s) for s in input().split()]

data = arr = [[0 for i in range(k + 1)] for j in range(n + 1)]

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

    for m in a:
        data[m - 1][d - 1] = 1

dd = []

for d in data:
    dd.append(sum(d))

ans = 0

for ddd in dd:
    if ddd == 0:
        ans += 1

print(ans)



(n, k) = [int(s) for s in input().split()]

data = [[0 for i in range(k)] for j in range(n)]

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

    for m in a:
        data[m - 1][d - 1] = 1

dd = []



ans = 0

for ddd in dd:
    if ddd == 0:
        ans += 1

print(ans)



(n, k) = [int(s) for s in input().split()]

data = [[0 for i in range(k)] for j in range(n)]

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

    for m in a:
        data[m - 1][i] = 1

dd = []

for d in data:
    dd.append(sum(d))

ans = 0

for ddd in dd:
    if ddd == 0:
        ans += 1

print(ans)



Verdicts: Runtime Error

Runtime Error

Accepted
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())

z = 0
l = [0]
for i in range(k):
  d=int(input())
  s =list(map(int,input().split()))
  l.extend(s)
  
print(l)
for i in range(n+1):
  if l.count(i)==0:
    z = z + 1
print(z)

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

z = 0
l = [0]
for i in range(k):
  d=int(input())
  s =list(map(int,input().split()))
  l.extend(s)
for i in range(n+1):
  if l.count(i)==0:
    z = z + 1
print(z)

Verdicts: Wrong Answer

Accepted
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())
a = [0]*n
for i in range(K):
    d = int(input())
    A = list(map(int, input().split()))
    for l in A:
        a[l-1] = 1
print(a.count(0))


N, K = map(int, input().split())
a = [0]*n
for i in range(K):
    d = int(input())
    A = list(map(int, input().split()))
    A.sort()
    for l in A:
        a[l-1] = 1
print(a.count(0))


N, K = map(int, input().split())
a = [0]*n
for i in range(K):
    d = int(input())
    A = list(map(int, input().split()))
    A.sort()
    for l in L:
        a[l-1] = 1
print(a.count(0))


N, K = map(int, input().split())
a = [0]*N
for i in range(K):
    d = int(input())
    A = list(map(int, input().split()))
    for l in A:
        a[l-1] = 1
print(a.count(0))


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
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 = input().split(" ")

d_num = int(input())

okasi_nasi = set()
for i in range(d_num):
    okasi_nasi = okasi_nasi | input().split(" ")

print(len(okasi_nasi))

N, K = input().split(" ")

okasi_nasi = set()
for i in range(int(K)*2):
    buf = input()
    if i % 2 == 1:
        if buf[0] != "":
            okasi_nasi = okasi_nasi | set(buf.split(" "))

print(int(N) - len(okasi_nasi))


Verdicts: Runtime Error

Accepted
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())
arr1=[]
arr=[]
for i in range(1, N+1):
  arr1.append(i)

for i in range(K*2):
  A=list(map(int, input().split()))
  if i%2!=0:
    arr = arr+A
print(list(set(arr1) - set(arr)))


N,K = map(int, input().split())
sunukes = [1 for _ in range(K)]
arr=[]
for _ in range(K):
  d = input()
  A=list(map(int, input().split()))
  arr = arr+A
print(len(list(set(sunukes) - set(arr))))


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

arr=[]
arr1=[]
for i in range(1, N+1):
  arr1.append(i)

for i in range(K):
  d=input()
  A=list(map(int, input().split()))
  arr = arr+A
print(len(set(arr1) - set(arr)))

Verdicts: Wrong Answer

Wrong Answer

Accepted
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())
D=[0]*n
for i in range(k):
  a=list(map(int,input().split()))
  for i in range(len(a)):
    D[a[i]-1]+=1
res=0
for i in range(n):
  if not D[i]:
    res+=1
print(res)

n,k=map(int,input().split())
D=[0]*n
for i in range(k):
  a=list(map(int,input().split()))
  for j in range(len(a)):
    D[a[j]-1]+=1
res=0
for i in range(n):
  if not D[i]:
    res+=1
print(res)


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


Verdicts: Wrong Answer

Wrong Answer

Accepted
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())
list1 = []

for i in range(1,N+1):
    list1.append(i)



for j in range(K):
    d =int(input())
    lista = list(map(int,input().split()))
    for l in list1:
        for h in lista:
            if (l==h):
                list1.remove(l)

[print(m)for m in list1]

N,K= map(int,input().split())
list1 = []

for i in range(1,N+1):
    list1.append(i)

for j in range(K):
    d =int(input())
    lista = list(map(int,input().split()))
    for l in lista:
        for h in list1:
            if (l==h):
                list1.remove(h)

print(len(list1))

Verdicts: Wrong Answer

Accepted
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())
S = set()

for n in range(N):
  input()
  S|=set(input().split())

print(N-len(S))

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

for n in range(N):
	input()
	S|=set(input().split())

print(N-len(S))

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

for k in range(K):
  input()
  S|=set(input().split())

print(N-len(S))

Verdicts: Runtime Error

Runtime Error

Accepted
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())
listX=[]

while K>0:
    dk=int(input())
    listk=input().split()
    listX=listX+listk
    K=K-1

listN=list(range(N+1))
listZ=list(set(listN)-set(listX))
L=str(len(listZ))
print(L)


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

while K>0:
    dk=int(input())
    listk=input().split()
    listX.extend(listk)
    K=K-1

listX=[int(s) for s in listX]
listN=list(range(N))
listN.append(N)
listN.remove(0)
listZ=list(set(listN)-set(listX))

L=str(len(listZ))
print(L)


Verdicts: Wrong Answer

Accepted
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 = list(map(int, input().split()))
d = []
A = []
B = set()
for i in range(K):
    _d = int(input())
    _A = list(map(int, input().split()))
    d.append(_d)
    A.append(_A)
    _B = set(_A)
    B = B | _B
print(B)
print(N - len(B))

N, K = list(map(int, input().split()))
d = []
A = []
B = set()
for i in range(K):
    _d = int(input())
    _A = list(map(int, input().split()))
    d.append(_d)
    A.append(_A)
    _B = set(_A)
    B = B | _B
print(N - len(B))

Verdicts: Wrong Answer

Accepted
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())

snk = [False] * n

for i in range(k):
    d = int(input())
    a = list(map(int, input().split()))
    
    for i+1 in a:
        snk[i] = True
 
print(snk.count(False))

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


snk = [False]*n

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

print(snk.count(False))

Verdicts: Runtime Error

Accepted
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())
d = []
A = []

s = set([i for i in range(1, N+1)])
print(s)
rs = set()

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

for i in range(K):
    for a in A:
        for j in a:
            rs.add(j)

for i in rs:
    s.remove(i)

print(len(s))

N, K = map(int, input().split())
d = []
A = []

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

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

for i in range(K):
    for a in A:
        for j in a:
            rs.add(j)

for i in rs:
    s.remove(i)

print(len(s))

Verdicts: Wrong Answer

Accepted
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())

a = []

s = 0
for i in range(k):
  d = int(input())
  array = list(map(int, input().strip().split()))
  a.append(array)
for j in range(1, n):
  if k not in a:
    s += 1
print(s)  


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

array = []

s = 0
for i in range(k):
  d = int(input())
  array += list(map(int, input().strip().split()))

array = set(array)

for j in range(1,n+1):
  if j not in array:
    s += 1
print(s)  


Verdicts: Wrong Answer

Accepted
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())

list_n=[]
for i in range(1,N+1):
    list_n.append(i)
    
t=[]
for i in range(K):
    d=int(input())
    s=list(map(int,input().split()))
    t+=s
    
s=set(t)
s.sort()

cnt=0
for i in list_n:
    if i not in s:
        cnt+=1
        
print(cnt)

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

list_n=[]
for i in range(1,N+1):
    list_n.append(i)
    
t=[]
for i in range(K):
    d=int(input())
    s=list(map(int,input().split()))
    t+=s
    
s=list(set(t))
s.sort()

cnt=0
for i in list_n:
    if i not in s:
        cnt+=1
        
print(cnt)

Verdicts: Runtime Error

Accepted
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):
first_line = list(map(int, input().split()))
N = first_line[0]
K = first_line[1]
rest = list(range(1, N+1))
for i in range(K):
  d = int(input())
  given = list(map(int, input().split()))
  for j in range(1, N+1):
    if j in given and j in rest:
      print(j)
      rest.remove(j)

print(len(rest))

first_line = list(map(int, input().split()))
N = first_line[0]
K = first_line[1]
rest = list(range(1, N+1))
for i in range(K):
  d = int(input())
  given = list(map(int, input().split()))
  for j in range(1, N+1):
    if j in given and j in rest:
      rest.remove(j)

print(len(rest))


Verdicts: Wrong Answer

Accepted
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())
data = []
for _ in range(k):
    d = int(input())
    data.extend(list(map(int,input().split())))

print(data)
print(n-len(set(data)))

n, k = map(int,input().split())
data = []
for _ in range(k):
    d = int(input())
    data.extend(list(map(int,input().split())))

print(n-len(set(data)))

Verdicts: Wrong Answer

Accepted
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())
a = []
from collections import defaultdict as dd
dc = dd(lambda : 0)
for i in range(k):
  d = int(input())
  a = list(map(int , input().split()))
  for i in a:
    dc[i] += 1
cnt = 0
for i in range(1 , n + 1):
  if d[i] == 0:
    cnt += 1
print(cnt)
         

n,k = map(int , input().split())
a = []
from collections import defaultdict as dd
dc = dd(lambda : 0)
for i in range(k):
  d = int(input())
  a = list(map(int , input().split()))
  for i in a:
    dc[i] += 1
cnt = 0
for i in range(1 , n + 1):
  if dc[i] == 0:
    cnt += 1
print(cnt)

Verdicts: Runtime Error

Accepted
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())
li_ = []
for i in range(K):
    d = int(input())
    li_ += list(map(int,input().split()))
    print(li_)
print(N -len(set(li_)))


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


Verdicts: Wrong Answer

Accepted
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())
s = []
ans = 0
for i in range(k):
  d = int(input())
  A = list(map(int,input().split()))
  for i in range(d):
    s.append(A[i])
  
for i in range(k+1):
  if s.count(i+1) == 0:
    ans += 1
    
print(ans-1)

n,k = map(int,input().split())
s = []
ans = 0
for i in range(K):
  d = int(input())
  A = list(map(int,input().split()))
  for i in range(d):
    s.append(A[i])
  
for i in range(K):
  if s.count(i) == 0:
    ans += 1
    
print(ans)
    

n,k = map(int,input().split())
s = []
ans = 0
for i in range(k):
  d = int(input())
  A = list(map(int,input().split()))
  for i in range(d):
    s.append(A[i])
print(s)
for i in range(n+1):
  if s.count(i) == 0:
    ans += 1
    
print(ans-1)

n,k = map(int,input().split())
s = []
ans = 0
for i in range(k):
  d = int(input())
  A = list(map(int,input().split()))
  for i in range(d):
    s.append(A[i])

for i in range(n+1):
  if s.count(i) == 0:
    ans += 1
    
print(ans-1)

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
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())

L = [0 for i in range(N+1)]

for i in range(K):
  d = int(input())
  for j in range(d):
    s = int(input())
    L[s] += 1

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

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

L = [0 for i in range(N+1)]

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

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

Verdicts: Runtime Error

Accepted
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 = (int(x) for x in input().split())
all = set(map(lambda a: a+1,range(N)))
for i in range(K):
	d = input()
	Ai = set(int(x) for x in input().split())
	all -= Ai
	print(Ai)
print(len(all))

N,K = (int(x) for x in input().split())
all = set(map(lambda a: a+1,range(N)))
for i in range(K):
	d = input()
	Ai = set(int(x) for x in input().split())
	all -= Ai
	
print(len(all))

Verdicts: Wrong Answer

Accepted
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):
a,b = map(int, input().split())

p = [1]*a

while True:
  if !input():
    break
  c = input().split()
  for d in c:
    p[d]=0

print(sum(p))

a,b = map(int, input().split())
 
p = [1]*a
 
while True:
  try:
    input()
  except EOFError:
    break
  c = input().split()
  for d in c:
    p[int(d)]=0
 
print(sum(p))

a,b = map(int, input().split())
 
p = [1]*a
 
while True:
  try:
    input()
  except EOFError:
    break
  c = input().split()
  for d in c:
    p[int(d)-1]=0
 
print(sum(p))

Verdicts: Runtime Error

Runtime Error

Accepted