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())
withSnacks = []
for x in range(K):
  nUmsnakes = int(input)
  snakes = list(map(int, input().split()))
  withSnacks.extend(snakes)
withSnacks = list(set(withSnacks))
count = 0
for x in range(1, x + 1):
  if not x in withSnacks:
    count += 1

print(count)
  
    

N, K = map(int, input().split())
withSnacks = []
for x in range(K):
	nUmsnakes = int(input())
	snakes = list(map(int, input().split()))
	withSnacks.extend(snakes)
withSnacks = list(set(withSnacks))
count = 0
for x in range(1, N + 1):
	if not x in withSnacks:
		count += 1
 
print(count)

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 = []
count = 0
for i in range(K):
    d = int(input())
    a = list(map(int,input().split()))
    li.append(a)

for i in range(N):
    if i+1 not in li:
        count += 1

print(count)

N,K = map(int,input().split())
li = []
count = 0
for i in range(K):
    d = int(input())
    a = list(map(int,input().split()))
    for j in range(d):
        li.append(a[j])

for i in range(N):
    if i+1 not in li:
        count += 1

print(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):
n,k = map(int,input().split())
a = [i for i in range(n+1)]
d = []
A = []

for j in range(k):
  d.append(int(input()))
  A.append(list(map(int,input().split())))
  
  
print(d,A)
for i in A:
  for j in i:
    if j in a:
      a.remove(j)
      
      
print(len(a)-1)

n,k = map(int,input(),split())
a = [0 for i in range(n)]

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


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

Verdicts: Wrong Answer

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())
snuke = [1 for i in range(n)]
for _ in range(k):
	d = int(input())
	a = list(map(int, input().split()))
	for i in range(a):
		snuke[i -1] = 0
		
print(sum(snuke))

n, k = map(int, input().split())
snuke = [1 for i in range(n)]
for _ in range(k):
	d = int(input())
	a = list(map(int, input().split()))
	for i in a:
		snuke[i -1] = 0
		
print(sum(snuke))

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 collections
li=[]
n,k=map(int,input().split())
for i in range(k):
    d=int(input())
    lik=list(map(int,input().split()))
    li+=lik
print(li)
li=collections.Counter(li)
ans=0
for j in range(1,n+1):
    if li[j]==0:
        ans+=1
print(ans)


import collections
li=[]
n,k=map(int,input().split())
for i in range(k):
    d=int(input())
    lik=list(map(int,input().split()))
    li+=lik
li=collections.Counter(li)
ans=0
for j in range(1,n+1):
    if li[j]==0:
        ans+=1
print(ans)


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_A = [1]*N
for i in range(K):
    d = int(input())
    l = list(map(int, input().split()))
    for J range(d):
        if list_A[l[j]-1]  == 1:
            list_A[l[j]-1]  = 0

print(list_A.count(1))        
        
        

N, K = map(int, input().split())
list_A = [1]*N
for i in range(K):
    d = int(input())
    l = list(map(int, input().split()))
    for j in range(d):
        if list_A[l[j]-1]  == 1:
            list_A[l[j]-1]  = 0

print(list_A.count(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())
sunuke=[]
for i in range(K):
    d=int(input())
    okashi=input().split()
    for i in range(d):
        sunuke.append(okashi[i])

have_okashi=collections.Counter(sunuke)
print(N-len(have_okashi))


import collections
N,K=map(int,input().split())
sunuke=[]
for i in range(K):
    d=int(input())
    okashi=input().split()
    for i in range(d):
        sunuke.append(okashi[i])

have_okashi=collections.Counter(sunuke)
print(N-len(have_okashi))

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 = []
ansli = []
for i in range(K):
    d = int(input())
    li.extend(list(map(int, input().split())))
print(li)
for i in range(1, N+1):
    if i not in li:
        ansli.append(i)
print(len(ansli))

N, K = map(int, input().split())
li = []
ansli = []
for i in range(K):
    d = int(input())
    li.extend(list(map(int, input().split())))
for i in range(1, N+1):
    if i not in li:
        ansli.append(i)
print(len(ansli))

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

print(len(set(count)-set(A)))
    

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

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


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

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

Verdicts: Wrong Answer

Wrong Answer

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 = []
A = []
for _ in range(K):
  d.append(int(input()))
  A.append(list(map(int, input().split())))

l = [1]*N
for i in range(K):
  for j in range(d[i]):
    print(i, j)
    print(A[i][j])
    l[A[i][j]-1] = 0
    
print(sum(l))

N,K = map(int ,input().split())
D = []
A = []
for _ in range(K):
  D.append(int(input()))
  A.append(list(map(int, input().split())))


l = [0]*N
for i in range(K):
  for j in range(D[i]):
    l[A[i][j]-1] = 1

print(N - sum(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=map(int,input().split())
cnt=[0]*N
for i in range(K):
    d=int(input())
    A=list(map(int(),input().split()))
    for a in A:
        cnt[a-1]=cnt[a-1]+1
ans=0
for i in range(N):
    if cnt[i]==0:
        ans=ans+1
print(ans)




N,K=map(int,input().split())
cnt=[0]*N
for i in range(K):
    d=int(input())
    A=list(map(int,input().split()))
    for a in A:
        cnt[a-1]=cnt[a-1]+1
ans=0
for i in range(N):
    if cnt[i]==0:
        ans=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):
NK = list(map(int, input().split()))
ans = [1]*NK[0]

for i in range(0,NK[1]):
  d = int(input())
  table  = list(map(int, input().split()))
  for j in range(0,NK[0]):
    if table.count(j) == 0:
      ans[j] = 0
print(NK[0]-sum(ans))

NK = list(map(int, input().split()))
ans = [0]*NK[0]

for i in range(0,NK[1]):
  d = int(input())
  table  = list(map(int, input().split()))
  for j in range(1,NK[0]+1):
    if table.count(j) != 0:
      ans[j-1] = 1
print(NK[1]-sum(ans))

N = int(input())
K = int(input())
ans = [1]*N

for i in range(0,K):
  d = int(input())
  table  = list(map(int, input().split()))
  for j in range(0,N):
    if table.count(j) != 0:
      ans[j] = 0
print(sum(ans))

N = input()
K = input()
ans = [1]*N

for i in range(0,K):
  d = int(input())
  table  = list(map(int, input().split()))
  for j in range(0,N):
    if table.count(j) != 0:
      ans[j] = 0
print(sum(ans))

N = int(input())
K = int(input())
ans = [1]*N

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

NK = list(map(int, input().split()))
ans = [0]*NK[0]

for i in range(0,NK[1]):
  d = int(input())
  table  = list(map(int, input().split()))
  for j in range(0,NK[0]):
    if table.count(j) != 0:
      ans[j] = 0
print(NK[1]-sum(ans))

NK = list(map(int, input().split()))
ans = [0]*NK[0]

for i in range(0,NK[1]):
  d = int(input())
  table  = list(map(int, input().split()))
  for j in range(0,NK[0]):
    if table.count(j) == 1:
      ans[j] = 0
print(NK[1]-sum(ans))

NK = list(map(int, input().split()))
ans = [0]*NK[0]

for i in range(0,NK[1]):
  d = int(input())
  table  = list(map(int, input().split()))
  for j in range(1,NK[0]+1):
    if table.count(j) != 0:
      ans[j-1] = 1
print(NK[0]-sum(ans))

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

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())
lis = []
for i in range(ki):
    lis.append(input().split())
lis2 = []
j = 1
while j < ki:
    for j in li[i]:
        li2.append(j)
    j += 2
lis2 = set(lis2)
print(n - len(lis2))


n, k = map(int, input().split())
li = []
for x in range(k2):
    li.append(input().split())
li2 = []
i = 1
while i < k2:
    for j in li[i]:
        li2.append(j)
    i += 2
li2 = set(li2)
print(n - len(li2))

n, k = map(int, input().split())
lis = []
for i in range(k*2):
    lis.append(input().split())
lis2 = []
j = 1
while j < k*2:
    for k in lis[j]:
        lis2.append(k)
    j += 2
lis2 = set(lis2)
print(n - len(lis2))

n, k = map(int, input().split())
lis = []
for i in range(k*2):
    lis.append(input().split())
lis2 = []
j = 1
while j < k*2:
    for k in lis[j]:
        li2.append(k)
    j += 2
lis2 = set(lis2)
print(n - len(lis2))

n, k = map(int, input().split())
lis = []
for i in range(k*2):
    lis.append(input().split())
lis2 = []
j = 1
while j < k2:
    for k in lis[j]:
        lis2.append(k)
    j += 2
lis2 = set(lis2)
print(n - len(lis2))

n, k = map(int, input().split())
li = []
for x in range(k*2):
    li.append(input().split())
li2 = []
i = 1
while i < k*2:
    for j in li[i]:
        li2.append(j)
    i += 2
li2 = set(li2)
print(n - len(li2))

Verdicts: Runtime Error

Runtime Error

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 = map(int, input().split())
 
tmp = set()
 
for i in range(N):
  input()
  tmp |= set(map(int, input().split()))
 
print(len(set(range(1, N+1)) - tmp))

N, K = map(int, input().split())
 
tmp = set()
 
for i in range(K):
  input()
  tmp |= set(input())
 
print(N - len(tmp) - 1)

N, K = map(int, input().split())
 
tmp = [0] * N
 
for i in range(K):
  input()
  for j in set(map(int, input().split()))
 	tmp[j] |= 1 
print(sum(tmp))

N, K = map(int, input().split())
 
tmp = [0] * N
 
for i in range(K):
  input()
  for j in set(map(int, input().split())):
 	tmp[j] |= 1 
print(sum(tmp))

N, K = map(int, input().split())
 
tmp = [0] * N
 
for i in range(K):
  input()
  for j in map(int, input().split()):
 	tmp[j-1] |= 1 
print(sum(tmp))

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

tmp = {}

for i in range(N):
  input()
  tmp |= set(map(int, input().split()))

print(len(set(range(1, N+1)) - tmp))

N, K = map(int, input().split())
 
tmp = [0] * N
 
for i in range(K):
  input()
  for j in map(int, input().split()):
    tmp[j-1] |= 1 
print(sum(tmp))

N, K = map(int, input().split())
 
tmp = [0] * N
 
for i in range(K):
  input()
  for j in map(int, input().split()):
 	tmp[j-1] |= 1 
print(sum(tmp))


N, K = map(int, input().split())
 
tmp = [0] * N
 
for i in range(K):
  input()
  for j in map(int, input().split()):
    tmp[j] |= 1
 
print(sum(tmp))

N, K = map(int, input().split())
 
tmp = [0] * N
 
for i in range(K):
  input()
  for j in map(int, input().split()):
 	tmp[j] |= 1 
print(sum(tmp))


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


Verdicts: Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

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):

import sys
import itertools
 
 
N, K = map(int, input().split())

nums = [ ]
for _ in range(N):
    _ =  int(input())
    nums.extend([int(x.strip()) for x in input().split(' ') ])

print(N - len(set(nums)))


import sys
import itertools
 
 
N, K = map(int, input().split())

nums = [ ]
for _ in range(K):
    _ =  int(input())
    nums.extend([int(x.strip()) for x in input().split(' ') ])

print(N - len(set(nums)))

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())
list1, list2, k = [], [], k*2
for x in range(k):
    list1.append(input().split())
while i < k:
    for j in list1[i]:
        list2.append(j)
    i += 2
print(n - len(set(list2)))

n, k = map(int, input().split())
list1, list2, k = [], [], k*2
for x in range(k):
    list1.append(input().split())
while i < k:
    for j in list1[i]:
        list2.append(j)
    i += 2
print(n - len(set(list2)))


n, k = map(int, input().split())
li = []
for x in range(k*2):
    li.append(input().split())
li2 = []
i = 1
while i < k*2:
    for j in li[i]:
        li2.append(j)
    i += 2
li2 = set(li2)
print(n - len(li2))

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 += map(int , input().split())
  print(set(A))
print(N-len(set(A)))

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

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=input()
K=input()
l=[]
for k in range(K):
  a=input()
  for i in range(a):
    l.append(input())
  
for j in range(N):
  if j not in l:
    print(j)





N,K=map(int,input().split())
l = []
for k in range(K):
    a = int(input())
    lis=list(map(int,input().split()))
    l.extend(lis)
for j in range(N):
    if not j+1 in l:
        print(j+1)

N = int(input())
K = int(input())
l = []
for k in range(K):
    a = int(input())
    for i in range(a):
        l.append(int(input()))
print(l)
for j in range(N):
    if not j+1 in l:
        print(j+1)

N=input()
K=input()
l=[]
for k in range(K):
  a=input()
  for i in range(a):
    l.append(input())
  
for j in range(N):
  if j != in l:
    print(j)





N,K=map(int,input().split())
l = []
for k in range(K):
    a = int(input())
    lis=list(map(int,input().split()))
    print(lis)
    l.extend(lis)
print(l)
for j in range(N):
    if not j+1 in l:
        print(j+1)

N,K=map(int,input().split())
l = []
for k in range(K):
    a = int(input())
    lis=list(map(int,input().split()))
    l.extend(lis)
c=0
for j in range(N):
    if not j+1 in l:
        c+=1
print(c)

Verdicts: Runtime Error

Wrong Answer

Runtime Error

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 = list(map(int, input('').split(' ')))
D = set()
for i in range(K):
  input('')
  [D.add(j) for j in map(int, input('').split(' '))]
print(K-len(D))

N,K = list(map(int, input('').split(' ')))
D = set()
for i in range(K):
  input('')
  D |= set(map(int, input('').split(' ')))
print(K-len(D))

N,K = list(map(int, input('').split(' ')))
D = set()
for i in range(K):
  input('')
  D |= set(map(int, input('').split(' ')))
print(N-len(D))

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):
NK=input().split()
N=int(NK[0])
K=int(NK[1])
listd=[]
listA=[]
for i in range(K):
    listd.append(input())
    listA.append(input().split())
ans=0
for a in range(1,N+1):
    n=0
    for i in range(1,K+1):
        for j in range(1,int(listd[i-1])+1):
            if a==listA[i-1][j-1]:
                n+=1
            else:
                pass
    if n==0:
        ans+=1
print(ans)


[N,K]=list(map(int, input().split()))
dlist=[]
alist=[]
for i in range(K):
    d=int(input())
    dlist.append(d)
    alist.append(list(map(int, input().split())))
nlist=[n for n in range(1,N+1)]
ans=0
for n in range(1,N+1):
    flg=True
    for als in alist:
        if n in als:
            flg=False
            break
    if flg:
        ans+=1
print(ans)


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 math
x = int(input())
n = 100
y = 0

while x > n:
    
    n += n // 100
    y += 1

print(y)

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

d = [0] * n

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

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

print(ans)

# ABC166 B
n,k = map(int, input().split())

d = [0] * n

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

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

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

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

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())
list=[1:n+1]
for i in range(k):
  d=int(input())
  a=list(map(int,input.split()))
  list.remove(a)
print(count(list))

n,k=map(int,input().split())
lst=[for _ in range(1,n+1)]
for i in range(k):
  x=int(input())
  a=list(map(int,input().split()))
  b=set(a)
  for j in b:
    lst.remove(j)
print(len(lst))

n,k=map(int,input().split())
lst=[_ for _ in range(1,n+1)]
for i in range(k):
  x=int(input())
  a=list(map(int,input().split()))
  b=set(a)
  for j in b:
    if j in lst:
      lst.remove(j)
print(len(lst))

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())
hashmap=dict()
for i in range(k):
  d=input()
  for i in range(d):
    key=int(input())
    hashmap[key]=d
count=0
for i in range(1,n+1):
  if hashmap.get(key)==None:
    count+=1
print(count)

n,k=map(int,input().split())
hashmap=dict()
for i in range(k):
  d=int(input())
  for j in range(d):
    key=int(input())
    hashmap[key]=d
count=0
for i in range(1,n+1):
  if hashmap.get(i)==None:
    count+=1
print(count)

n,k=map(int,input().split())
hashmap=dict()
for i in range(k):
  d=input()
  for i in range(d):
    key=int(input())
    hashmap[key]=d

count=0
for i in range(1,n+1):
  if hashmap.get(key)==None:
    count+=1
print(count)

n,k=map(int,input().split())
hashmap=dict()
for i in range(k):
  d=int(input())
  for i in range(d):
    key=int(input())
    hashmap[key]=d
count=0
for i in range(1,n+1):
  if hashmap.get(i)==None:
    count+=1
print(count)

n,k=map(int,input().split())
hashmap=dict()
for i in range(k):
  d=int(input())
  for i in range(d):
    key=int(input())
    hashmap[key]=d
count=0
for i in range(1,n+1):
  if hashmap.get(key)==None:
    count+=1
print(count)

n,k=map(int,input().split())
hashmap=dict()
for _ in range(k):
  d=int(input())
  arr=[int(p) for p in input().split()]
  for key in arr:
    hashmap[key]=d
count=0
for i in range(1,n+1):
  if hashmap.get(i)==None:
    count+=1
print(count)

Verdicts: Runtime Error

Runtime Error

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 = map(int,input().split())
c = [0]*k

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

print(c.count(0))

n, k = map(int,input().split())
c = [0]*n

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

print(c.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):
import itertools
n, k = map(int, input().split())
d = []
a = []
n_1=[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_1 = list(itertools.chain.from_iterable(a))
c=list(set(n_1)-set(a_1))
for d in c:
  print(d)

import itertools
n, k = map(int, input().split())
d = []
a = []
n_1=[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_1 = list(itertools.chain.from_iterable(a))
c=list(set(n_1)-set(a_1))
if len(c)>1:
  c=' '.join(c)
  print(c)
else:
  print(c[0])
  

import itertools
n, k = map(int, input().split())
d = []
a = []
n_1=[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_1 = list(itertools.chain.from_iterable(a))
c=list(set(n_1)-set(a_1))
print(len(c))
  

Verdicts: Wrong Answer

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 = []
n = []
for k in range(K):
    d.append(input())
    n.append(input().split())
def flatten(nested_list):
    return [e for inner_list in nested_list for e in inner_list]
nfu = set(flatten(n))
print(nfu)
print(N - len(nfu))

N,K = map(int, input().split())
d = []
n = []
for k in range(K):
    d.append(input())
    n.append(input().split())
def flatten(nested_list):
    return [e for inner_list in nested_list for e in inner_list]
nfu = set(flatten(n))
print(N - len(nfu))

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())
sweet = [0 for i in range(N)]
for i in range(K):
  input()
  for j in map(int, input().split()):
    sweet[j] = 1
cnt = 0
for k in sweet:
  if k == 0:
    cnt += 1
print(cnt)

N, K = map(int, input().split())
sweet = [0 for i in range(N)]
for i in range(K):
  s = input()
  for j in map(int, input().split()):
    sweet[j-1] = 1
cnt = 0
for k in sweet:
  if k == 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):
import numpy as np

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

ans = N - len(np.unique(A))
print(ans)

import numpy as np

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

A = sum(A, [])
ans = N - len(np.unique(A))
print(ans)

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())
t = [0] * n

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

    for e in a:
        t[e-1] += 1
ans = 0
l = [i for i in t if i != 0]
print(len(l))

n,k = map(int,input().split())
t = [0] * n

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

    for e in a:
        t[e-1] += 1
ans = 0
l = [i for i in t if i == 0]
# print(l)
print(len(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 = map(int,(input().split()))
n_list=[]
ans_list=[]
for i in range(N):
  ans_list.append(i+1)

for i in range(K):
  d = int(input())
  a_list = list(map(int, input().split()))
  n_list.extend(a_list)
  n_list = list(set(n_list))
print(*list(set(ans_list)-set(n_list)))

N,K = map(int,(input().split()))
n_list=[]
ans_list=[]
for i in range(N):
  ans_list.append(i+1)

for i in range(K):
  d = int(input())
  a_list = list(map(int, input().split()))
  n_list.extend(a_list)
  n_list = list(set(n_list))
print(len(list(set(ans_list)-set(n_list))))

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 = [0]*N
print(K)
for k in range(K):
    _ = input()
    user = list(map(int,input().split()))
    for u in user:
        Data[u-1] += 1
ans = 0
for i in range(N):
    if Data[i] == 0:
        ans += 1
print(ans)

N,K = map(int,input().split())
Data = [0]*N
for k in range(K):
    _ = input()
    user = list(map(int,input().split()))
    for u in user:
        Data[u-1] += 1
ans = 0
for i in range(N):
    if Data[i] == 0:
        ans += 1
print(ans)

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()) 
d = []
a = []
for i in range(k):
    d.append(int(input()))
    a.append(list(map(int,input().split())))


sunuke =[0] * n
for i in range(k):
    #print("d[i]",d[i])
    for j in range(int(d[i])):
        temp = a[i][j] -1 
        sunuke[temp] += 1

print(sunuke)
print(sunuke.count(0))



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


sunuke =[0] * n
for i in range(k):
    #print("d[i]",d[i])
    for j in range(int(d[i])):
        temp = a[i][j] -1 
        sunuke[temp] += 1


print(sunuke.count(0))



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())
c = 2 * k
ls = [input().split() for _ in range(c)]
i = 1
while i < c:
    l = [j for j in ls[i]]
    i += 2
print(n-len(set(l)))

n, k = map(int, input().split())
c = 2 * k
ls = [input().split() for _ in range(c)]
i = 1
while i < c:
    l = [j for j in ls[i]]
    i += 2
print(n-len(sorted(l)))

n, k = map(int, input().split())
c = 2 * k
ls = [input().split() for _ in range(c)]
i = 1
while i < c:
    l = [j for j in ls[i]]
    i += 1
print(n-len(sorted(l)))

n, k = map(int, input().split())
c = 2 * k
ls = [input().split() for _ in range(c)]
i = 1
l = []
while i < c:
    for j in ls[i]:
        l.append(j)
    i += 2
print(n-len(set(l)))

Verdicts: Wrong Answer

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):
3 3
1
3
1
3
1
3

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

if __name__ == '__main__':
    main()

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

if __name__ == '__main__':
    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):
a,b = map(int,input().split())
lis = [0]*b
for i in range(a):
  c = int(input())
  d = input().split()
  
  for l in range(c):
    lis[int(d[l])-1] += 1
    
count = 0
for i in range(b):
  if(lis[i] == 0):
    count += 1

print(count)

a,b = map(int,input().split())
lis = [0]*a
for i in range(b):
  c = int(input())
  d = input().split()
  
  for l in range(c):
    lis[int(d[l])-1] += 1
    
count = 0
for i in range(a):
  if(lis[i] == 0):
    count += 1

print(count)

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

n,k = map(int,input().split())
a = [0]*n
for _ in range(k):
    kind = int(input())
    for i in list(map(int,input().split())):
        a[i-1] += 1
print(a.count(0) if 0 in a else 0) 

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

for i in range(k): 
    d=int(input())  
    a=list(map(int,input().split()))
    for j in a:    
        ans.append(1)

print(n-sum(ans)) 
                  #n-(0+1+1+1+0+0+...)


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

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

print(n-sum(ans)) 
                  #n-(0+1+1+1+0+0+...)


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())
total = set()
for _ in range(k):
  d = int(input())
  a = set(map(int, input().split()))
  for b in a:
    total.add(b)
ans = n - len(total)
print(ans)
  


n, k = map(int, input())
total = set()
for _ in range(k):
  d = int(input())
  a = set(map(int, input().split()))
  total = total | a
ans = n - len(total)
print(ans)
  

n, k = map(int, input())
total = []
for _ in range(k):
  d = int(input())
  A = list(map(int, input().split()))
  for a in A:
    total.append(a)
ans = n - len(set(total))
print(ans)
  


n, k = map(int, input().split())
total = []
for _ in range(k):
  d = int(input())
  A = list(map(int, input().split()))
  for a in A:
    total.append(a)
ans = n - len(set(total))
print(ans)
  


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 = int(input())
f = []
for _ in range(k):
  x = int(input())
  l = list(map(int,input().split()))
  for i in range(len(l)):
    f.append(l[i])
f = set(f)
print(n-len(f))

n,k = map(int,input().split())
f = []
for _ in range(k):
  x = int(input())
  l = list(map(int,input().split()))
  for i in range(len(l)):
    f.append(l[i])
f = set(f)
print(n-len(f))

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,imput().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(ans.count(1))

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

for i in range(1,k):
  d = int(input())
  for j in range(1,d):
    output.append(int(input()))

print(n - len(set(output)))

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

for i in range(k):
  d = int(input())
  l = list(map(int,input().split()))
  output.append(l)

print(n - len(set(output)))

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

for i in range(k):
  d = int(input())
  for j in range(d):
    output.append(int(input()))

print(n - len(set(output)))

n,k = map(int,imput().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(ans.count(1))

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(ans.count(1))

Verdicts: Runtime Error

Runtime Error

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 = map(int, input().split())
D = []
count = 0
sunuke_list = [0] * N
print(sunuke_list)
for j in range(K * 2):
    D = list(map(int, input().split()))
    if j % 2 == 1:
        for i in range(len(D)):
            sunuke_list[i - 1] = 1
        print(sunuke_list)

print(N - sum(sunuke_list))


N, K = map(int, input().split())
sunuke_list = [1] * N
for j in range(K):
  D = int(input())
  D_list = list(map(int, input().split()))
  for i in D_list:
    sunuke_list[i - 1] = 0
print(sum(sunuke_list))

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

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

for i in range(n):
    if all((x == i for x in a)):
        print(i)

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

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

for i in range(n):
    if all((x != i for x in a)):
        print(i)

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

k = 0

b = sum(a, [])
    
for i in range(n):
    if i+1 not in b:
        k = k + 1

print(k)

Verdicts: Runtime Error

Runtime Error

Accepted