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

check = [0] * N

for i in range(K):
    d_i = int(input())
    A_i = map(int, input().split())
    for j in A_i:
        check[j] = 1

print(sum(1 for x in check if x == 0))


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

check = [0] * N

for i in range(K):
    d_i = int(input())
    A_i = map(int, input().split())
    for j in A_i:
        check[j-1] = 1

print(sum(1 for x in check if x == 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 = (int(num) for num in input().split(" "))
cnt = 0
dic = {i+1: 0 for i in range(N)}
print(dic)
while cnt < K:
    d = input()
    a = input().split(" ")
    for n in a:
        dic[int(n)] += 1
    cnt += 1

treated = 0
for key in dic:
    if dic[key] == 0:
        treated += 1
print(treated)


N, K = (int(num) for num in input().split(" "))
cnt = 0
dic = {i+1: 0 for i in range(N)}
while cnt < K:
    d = input()
    a = input().split(" ")
    for n in a:
        dic[int(n)] += 1
    cnt += 1

treated = 0
for key in dic:
    if dic[key] == 0:
        treated += 1
print(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):
d=[];
A=[];
N,K=input().split();
N=int(N);
K=int(K);
for i in range(K):
  d.append(input())
  A.append(input().split());
print(A);
count=0;
for i in range(N):
  flag=0;
  for j in range(K):
    if(str(i+1) in A[j]):
      print(str(i+1)+" have "+str(A[j]));
      flag=1;
  if (flag == 0):
    count+=1;

print(count);

d=[];
A=[];
N,K=input().split();
N=int(N);
K=int(K);
for i in range(K):
  d.append(input())
  A.append(input().split());
count=0;
for i in range(N):
  flag=0;
  for j in range(K):
    if(str(i+1) in A[j]):
      flag=1;
  if (flag == 0):
    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())
s=set()
for i in range(k):
  d=int(input())
  s=s|set(map(int,input().split()))
print(s)
ans=n-len(s)
print(ans)

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

for _ in K:
    d.append(input())
    num = d[-1]
    for i in num:
        A.append(input())

for j in max(d)+1:
    if j+1 in A:
        pass
    else:
        print(j+1)



N, K = input().split()
d = []
A = []
for _ in K:
    d.append(int(input()))
    num = d[-1]
    for i in num:
        A.append(int(input()))

for j in max(d)+1:
    if j+1 in A:
        pass
    else:
        print(j+1)

N, K = map(int, input().split())
uid_list = []
for _ in range(K):
   input()
   for uid in [int(i) for i in input().split()]:
       uid_list.append(uid)
print(N - len(set(uid_list)))

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

n, k = map(int, input().split())
 
x = [0]*n
 
for i in range(k):
    d = int(input())
    a = list(map(int, input().split()))
    for j in a:
      x[j-1]=x[j-1]+1
print(x.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):
 = [int(x) for x in input().split(' ')]
 
def solve(n, k):
    snukes = [None] * n
    victims = 0
 
    for i in range(k):
        snacks = int(input())
        snukes_snacks = [int(z) for z in input().split(' ')]
        for j in range(snacks):
            snukes[j-1] = snukes_snacks[j-1]
 
    for w in range(n):
        if snukes[w] is None:
            victims += 1
    
    print(victims)
 
solve(n, k)

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

def solve(n, k):
    snukes = [0] * n
    victims = 0

    for i in range(k):
        snacks = int(input())
        snukes_snacks = [int(z) for z in input().split(' ')]
        for j in range(snacks):
            snukes[j-1] = snukes_snacks[j-1]

    for w in range(n):
        if snukes[w] == 0:
            victims += 1
    
    print(snukes)
    print(victims)

solve(n, k)

n,k = [int(x) for x in input().split(' ')]
 
def solve(n, k):
    snukes = [None] * n
    victims = 0
    
    for i in range(k):
        snacks = int(input())
        snukes_snacks = [int(z) for z in input().split(' ')]
        for j in range(snacks):
            snukes[snukes_snacks[j] - 1] = snukes_snacks[j]
    
    print(snukes)
    for w in range(n):
        if snukes[w] is None:
            victims += 1
    
    print(victims)
 
solve(n, k)

n,k = [int(x) for x in input().split(' ')]
 
def solve(n, k):
    snukes = [None] * n
    victims = 0
    
    for i in range(k):
        snacks = int(input())
        snukes_snacks = [int(z) for z in input().split(' ')]
        for j in range(snacks):
            snukes[snukes_snacks[j] - 1] = snukes_snacks[j]
    
    for w in range(n):
        if snukes[w] is None:
            victims += 1
    
    print(victims)
 
solve(n, k)

Verdicts: 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 = input().split()
d = input()

print(N-d)

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

s = []

for i in range(N):
    s.append(False)
    
for i in range(K):
    d = int(input())
    a = list(map(int,input().split()))
    for j in range(d):
        s[a[j]-1] = True
        
cut = 0
for i in range(N):
    if not s[i]:
        cut += 1

print(cut)

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):
total,okasi=map(int,input().split())
sunuke=[]

for i in range(okasi):
  di=int(input)
  A=list(map(int,input().split()))
  for a in A:
    sunuke.append(input())
    
print(total-len(set(sunuke)))    

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

total,okasi=map(int,input().split())
sunuke=[]
for i in range(okasi):
  d=int(input())
  A=list(map(int,input().split()))
  for a in A:
    sunuke.append(input())
    
    
ans=total-len(set(sunuke))

print(sunuke)
    
    
    
    

total,okasi=map(int,input().split())
sunuke=[]
for i in range(okasi):
  d=int(input())
  A=list(map(int,input().split()))
  for a in A:
    sunuke.append(a)
    
    
ans=total-len(set(sunuke))
 
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):
import numpy as np

N =int(input(''))
K=int(input(''))
A=[]
l=[]
for i in range(K):
    d = int(input(''))
    for j in range(d):
        l_ = int(input(''))
        l.append(l_)
    A.append(l)

a=np.zeros((N, K))
for i in range (len(A)):
    for j in range(len(A[i])):
        a[A[i][j]-1][i]=1
#print(a)

print(np.count_nonzero(np.all(a==0, axis=1)))



import numpy as np

N,K=(int(x) for x in input().split())

A=[]
l=[]
for i in range(K):
    #d = int(input(''))
    #for j in range(d):
        #l_ = int(input(''))
        #l.append(l_)
    l=[int(x) for x in input().split()]
    A.append(l)

a=np.zeros((N, K))
for i in range (len(A)):
    for j in range(len(A[i])):
        a[A[i][j]-1][i]=1
#print(a)

print(np.count_nonzero(np.all(a==0, axis=1)))


import numpy as np

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

A=[]
l=[]
for _ in range(K):
    d = map(int, input())
    l=list(map(int,input().split()))
    A.append(l)
#print(A)
a=np.zeros((N, K))
for i in range (len(A)):
    for j in range(len(A[i])):
        a[A[i][j]-1][i]=1
#print(a)
print(np.count_nonzero(np.all(a==0, axis=1)))


Verdicts: 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())
ate = set()

for i in range(k):
    d = int(input())
    l = list(map(int, input().split()))
    for x in l:
        ate.add(x)
print(ate)
print(n - len(ate))

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

for i in range(k):
    d = int(input())
    l = list(map(int, input().split()))
    for x in l:
        ate.add(x)
# print(ate)
print(n - len(ate))

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

for j in range(k):
    for k in range(d[j]):
        a = set(A[j][k])

print(n-len(a))

d = []
A= []
c = []
 
for i in range(k):
    d.append(int(input()))
    a = input()
    A.append([int(a[j]) for j in range(a)])
 
for j in range(k):
    for m in range(d[j]):
        c.append(A[j][m])
 
print(n-len(set(c)))

n,k = map(int, input().split())
d = []
A= []
c = []
 
for i in range(k):
    d.append(int(input()))
    a = input()
    A.append([int(a[j]) for j in range(a)])
 
for j in range(k):
    for m in range(d[j]):
        c.append(A[j][m])
 
print(n-len(set(c)))

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

for i in range(k):
    d.append(int(input()))
    a = input()
    A.append([int(a[j]) for j in range(a)])

for j in range(k):
    for k in range(d[j]):
        c.append(A[j][k])

print(n-len(set(c)))

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

for j in range(k):
    for k in range(d[j]):
        a = set(e[j][k])

print(n-len(a))

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 j in range(k):
    for m in range(d[j]):
        c.append(A[j][m])
 
print(n-len(set(c)))

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=int(int(x) for x in input().split())
lists=[0]*N
while 1:
    tmp=int(input())
    if not tmp:
        break
    have_count=int(input().split())
    for i in have_count:
        lists[i-1]=1
print(lists.count(0))



N,K=(int(x) for x in input().split())
lists=[0]*N
while 1:
    tmp=int(input())
    if not tmp:
        break
    have_count=(int(x) for x in input().split())
    for i in have_count:
        lists[i-1]=1
print(lists.count(0))

N,K=int(input().split())
lists=[0]*N
while 1:
    tmp=int(input())
    if not tmp:
        break
    have_count=int(input().split())
    for i in have_count:
        lists[i-1]=1
print(lists.count(0))

N,K=(int(x) for x in input().split())
lists=[0]*N
while 1:
    try:
        tmp=int(input())
    except :
        break
    have_count=(int(x) for x in input().split())
    for i in have_count:
        lists[i-1]=1
print(lists.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=map(int,input().split())
x=[0]*n
for i in range(k):
    y=int(input())
    z=list(map(int,input().split()))
    for j in z:
        x[j-1] +=1
a=0
for b in x:
    if b==0:
        c+=1
print(c)

n,k=map(int,input().split())
x=[0]*n
for i in range(k):
    y=int(input())
    z=list(map(int,input().split()))
    for j in z:
        x[j-1] +=1
a=0
for b in x:
    if b==0:
        a+=1
print(a)

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

n , k = map(int,input().split())
ans = [0] * n
for i in range(k):
  d = int(input())
  for j in list(map(int,input().split())):
    ans[j-1] = 1
print(ans.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):
x = input()
n = int(x.split()[0])
k = int(x.split()[1])
moji = ''
count = 0
 
for i in range(k * 2):
  s = input()
  if i % 2 != 0:
    moji = moji + s + ' '
print(moji)
for i in range(n):
  num = str(i+1)
  if moji.count(num):
    count
  else:
    count = count + 1
    
print(count)

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

for i in range(k):
  dummy = int(input())
  ans = map(int, input().split())
  list.extend(ans)

print(n - len(set(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())
SET = set()
for i in range(k):
	d = int(input())
    tmp = set(map(int, input().split()))
    SET = (SET|tmp)

print(n-int(len(SET)))

[n,k] = map(int, input().split())
SET = set()
for i in range(k):
  d = int(input())
  tmp = set(map(int, input().split()))
  SET = (SET|tmp)
print(n-int(len(SET)))


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())
#S = input()
Ai_list = []

for i in range(K):
    di = int(input())
    Ai_list += input().split()

print(Ai_list)
print(N - len(set(Ai_list)))

import numpy as np
# coding: utf-8
# Your code here!
N, K = map(int, input().split())
#S = input()
Ai_list = []
 
for i in range(K):
    di = int(input())
    Ai_list += input().split()
 
#print(Ai_list)
print(N - len(set(Ai_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(input().split())
a = [1] * n
for i in range(k):
    tmp = map(int, input().split())
    for j in range(tmp):
        a[j] = 0
print(sum(a[j]))


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


n, k = map(int, input().split())
a = [1] * n
for i in range(k):
    tmp = map(int, input().split())
    for j in range(tmp):
        a[j] = 0
print(sum(a[j]))


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


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):
import collections
N,K=map(int,input().split())
a=[]
while K>0:
  K=K-1
  d=int(input())
  a.append(map(str,input().split())
e =collections.Counter(a)
print(N-len(e))

N,K=map(int,input().split())
a=[]
while K>0:
  d=int(input())
  b=list(map(int,input().split())
  a.extend(b)
  K=K-1
e=collection.counter(a)
print(N-len(e))

N,K=map(int,input().split())
a=[]
while K>0:
  d=int(input())
  b=list(map(int,input().split())
  a.extend(b)
  K=K-1
e=collection.Counter(a)
print(N-len(e))

import collections
N,K=map(int,input().split())
a=[]
K=K+1
while K>0:
  K=K-1
  d=int(input())
  a.append(map(str,input().split()))
e=collections.Counter(a)
print(N-len(a))

import collections
N,K=map(int,input().split())
a=[]
d=[]
while K>0:
  K=K-1
  d.append(int(input()))
  b=list(map(int,input().split()))
  a.extend(b)
e=collections.Counter(a)
print(a)
print(e)
print(N-len(e))

N,K=map(int,input().split())
a=[]
while K>0:
  d=int(input())
  b=list(map(int,input().split())
  a.extend(b)
  K=K-1
collection.counter(a)
print(N-len(a))

import collections
N,K=map(int,input().split())
while K>0:
  K=K-1
  d=int(input())
  a.append(map(str,input().split()))
e=collections.Counter(a)
p=N-len(e)
print(p)

import collections
N,K=map(int,input().split())
a=[]
d=[]
while K>0:
  K=K-1
  d.append(int(input()))
  b=list(map(int,input().split()))
  a.extend(b)
e=collections.Counter(a)
print(N-len(e))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

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())
A=[]
people=list(range(1,N+1,1))
for idx in range(K):
    d=int(input())
    X=list((map(int,input().split())))
    for i in range(len(X)):
        A.append(X[i])
ans =[i for i in people if not i in A]
print(ans[0])

N,K=map(int,input().split())
A=[]
people=list(range(1,N+1,1))
for idx in range(K):
    d=int(input())
    X=list((map(int,input().split())))
    for i in range(len(X)):
        A.append(X[i])
print(A)
print(people)
ans =[i for i in people if not i in A]
print(len(ans))

N,K=map(int,input().split())
A=[]
people=list(range(1,N+1,1))
for idx in range(K):
    d=int(input())
    X=list((map(int,input().split())))
    for i in range(len(X)):
        A.append(X[i])
ans =[i for i in people if not i in A]
print(len(ans))

Verdicts: 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):
import itertools

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

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

hasmans=[]
for ii in range(K):
    d = int(input())
    hasmans.append(list(map(int, input().split())))

hasmans = itertools.chain.from_iterable(hasmans)

print(*list(set(mans) - set(hasmans)))

import itertools

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

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

hasmans=[]
for ii in range(K):
    d = int(input())
    hasmans.append(list(map(int, input().split())))

hasmans = itertools.chain.from_iterable(hasmans)

print(len(list(set(mans) - set(hasmans))))

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_setup_data = input().split()
N_sunuke_number = int(N_setup_data[0])
K_snack_number = int(N_setup_data[1]) - 1
K_snack_number = int(N_setup_data[1])
N_sunuke_pocket = [0] * N_sunuke_number


for j in range(K_snack_number):
	N_A_sunuke_pocket = [0] * (N_sunuke_number + 1)
	N_B_sunuke_pocket = [0] * (N_sunuke_number + 1)
	d = input()
	N_A_sunuke_pocket = input().split()
	print(N_A_sunuke_pocket)
	for i in N_A_sunuke_pocket:
		N_B_sunuke_pocket[int(i) - 1] += 1
	print(N_B_sunuke_pocket, i)
	j = 0

	for i in N_B_sunuke_pocket:
		if i != 0:
			N_sunuke_pocket[j] += 1
		j += 1
		print(N_sunuke_pocket)
def calc_area():
	Out_Area = 0
	for i in N_sunuke_pocket:
		if i == 0:
			Out_Area += 1
	return Out_Area

print(calc_area())


N_setup_data = input().split()
N_sunuke_number = int(N_setup_data[0])
K_snack_number = int(N_setup_data[1]) - 1
K_snack_number = int(N_setup_data[1])
N_sunuke_pocket = [0] * N_sunuke_number


for j in range(K_snack_number):
	N_A_sunuke_pocket = [0] * (N_sunuke_number + 1)
	N_B_sunuke_pocket = [0] * (N_sunuke_number + 1)
	d = input()
	N_A_sunuke_pocket = input().split()
#	print(N_A_sunuke_pocket)
	for i in N_A_sunuke_pocket:
		N_B_sunuke_pocket[int(i) - 1] += 1
#	print(N_B_sunuke_pocket, i)
	j = 0

	for i in N_B_sunuke_pocket:
		if i != 0:
			N_sunuke_pocket[j] += 1
		j += 1
#		print(N_sunuke_pocket)
def calc_area():
	Out_Area = 0
	for i in N_sunuke_pocket:
		if i == 0:
			Out_Area += 1
	return Out_Area

print(calc_area())


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 = [t for t in range(1,N+1)]
for i in range(K):
    d = int(input())
    A = list(map(input().split()))
    if A[i] in s:
        s.remove(A[i])
    K -= 1
print(lne(s))

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

s = [t for t in range(1,N+1)]
for i in range(K):
    d = int(input())
    A = list(map(int,input().split()))
    for i in range(len(A)):
        if A[i] in s:
            s.remove(A[i])
print(len(s))

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())
s = set()
for i in [0]*k:
  _ = input()
  s|=set(map(int,input().split()))
print(k-len(s))

n,k = map(int,input().split())
s = set()
for i in [0]*n:
  _ = input()
  s|=set(map(int,input().split()))
print(k-len(s))

n,k = map(int,input().split())
l=[]
for i in [0]*k:
  d = input()
  l+=list(map(int,input().split()))
print(n-len(set(l)))

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):
line1 = input().split()
n = int(line1[0])
k = int(line1[1])
list1 = []
for i in range(k):
  d = input()
  lst = input().split()
  list1 += lst

set1 = set(list1)
print(set1)
nothing = set(str(i+1) for i in range(n)) - set1
print(len(nothing))

line1 = input().split()
n = int(line1[0])
k = int(line1[1])
list1 = []
for i in range(k):
  d = input()
  lst = input().split()
  list1 += lst

set1 = set(list1)
nothing = set(i for i in range(n)) - set1
print(len(nothing))

line1 = input().split()
n = int(line1[0])
k = int(line1[1])
list1 = []
for i in range(k):
  d = input()
  lst = input().split()
  list1 += lst

set1 = set(list1)
nothing = set(str(i+1) for i in range(n)) - set1
print(len(nothing))

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

n,k=map(int,input().split())
l=[]
count=0
for _ in range(k):
    d=int(input())
    a=list(map(int,input().split()))
    l+=a
for i in range(1,n+1):
    if i not in l:
        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):
#!/usr/bin/env python3

from typing import Iterable


def main() -> None:
    N, K = rmi()
    D, A = [], []
    for n in range(N):
        d = ri()
        D.append(d)
        A.append(rmi())
    target = [False] * N
    for k in range(K):
        for a in A[k]:
            target[a] = True
    w(target.count(False))


def r() -> str:
    return input().strip()


def ri() -> int:
    return int(input())


def rmi(delim: str = ' ') -> int:
    return tuple(map(int, input().split(delim)))


def w(data) -> None:
    print(data)


def wm(data: Iterable) -> None:
    print(' '.join(data))


if __name__ == '__main__':
    main()


#!/usr/bin/env python3

from typing import Iterable


def main() -> None:
    N, K = rmi()
    D, A = [], []
    for k in range(K):
        d = ri()
        D.append(d)
        A.append(rmi())
    target = [False] * N
    for k in range(K):
        for a in A[k]:
            target[a - 1] = True
    w(target.count(False))


def r() -> str:
    return input().strip()


def ri() -> int:
    return int(r())


def rmi(delim: str = ' ') -> int:
    return tuple(map(int, input().split(delim)))


def w(data) -> None:
    print(data)


def wm(data: Iterable) -> None:
    print(' '.join(data))


if __name__ == '__main__':
    main()


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


f= False
for d  in range (a,b+1):
    if d % k == 0:
        f=True
        break


if f :
    print('OK')
else :
    print('NG')


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

print(a.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 sys
import itertools
import heapq
import numpy as np
stdin = sys.stdin
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

N,K=nm()
A=[0]*K
for i in range(K):
    d=int(input())
    tmp=nl()
    for j in range(d):
        A[tmp[j]-1]+=1
c=0
for i in range(N):
        if(A[i]==0):
            c+=1

print(c)

import sys
import itertools
stdin = sys.stdin
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

N,K=nm()
A=[0 for i in range(N)]
for i in range(K):
    d=int(input())
    tmp=nl()
    for j in range(d):
        A[tmp[j]-1]+=1
c=0
for i in range(N):
        if(A[i]==0):
            c+=1

print(c)


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=[list(map(str, input().split())) for _ in range(2*K)]
merge=[]
ans=0
for i in range(K):
  merge+=sunuke[2*i+1]
for j in range(1, 101):
  if str(j) not in merge:
    ans+=1
print(ans)

N, K=map(int, input().split())
sunuke=[list(map(str, input().split())) for _ in range(2*K)]
merge=[]
ans=0
for i in range(K):
  merge+=sunuke[2*i+1]
for j in range(1, N+1):
  if str(j) not in merge:
    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())
count = {i: [] for i in range(n)}
for i in range(k):
    input()
    a = list(map(int, input().split()))
    for ii in a:
        count[ii-1].append(i)
sum(len(item)==0 for item in count.values())



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

print(n - len(set(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(" "))
flag = [for 1 in range(N)]
for i in range(K):
  input()
  for j in map(int,input().split(" ")):
    flag[j-1] = 0
sum(flag)

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

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


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

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 = list(map(int, input().split()))
hoge = [1] * n

for i in range(k * 2):
  if i % 2 == 0:
    a = list(map(int, input().split()))
  	for j in a:
      hoge[j - 1] = 0
      
print(sum(hoge))


n,k = list(map(int, input().split()))
hoge = [1] * n

for i in range(k * 2):
  if i % 2 != 0:
    a = list(map(int, input().split()))
    for j in a:
      hoge[j - 1] = 0
      
print(sum(hoge))


n,k = list(map(int, input().split()))
hoge = [1] * n

for i in range(k * 2):
  if i % 2 != 0:
    a = list(map(int, input().split()))
  	for j in a:
      hoge[j - 1] = 0
      
print(sum(hoge))


n,k = list(map(int, input().split()))
hoge = [1] * n

for i in range(k * 2):
  if i % 2 == 0:
    a = list(map(int, input().split()))
    for j in a:
      hoge[j - 1] = 0
      
print(sum(hoge))


n,k = list(map(int, input().split()))
hoge = [1] * n

for i in range(k * 2):
  a = list(map(int, input().split()))
  if i % 2 != 0:
    for j in a:
      hoge[j - 1] = 0
      
print(sum(hoge))

Verdicts: Runtime Error

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())
d = int(input())
while True:
  val = [int(i) for i in input().split()]
  if len(val) == 0:
    break

print(N - d)

# B - Trick or Treat

N, K = map(int, input().split())
ls = []
for _ in range(K):
    d = int(input())
    A = [int(a) for a in input().split()]
    ls += A

print(N - len(set(ls)))


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())
count = 0
lis = []

for m in range(0, k):
  d = int(input())
  li = [int(i) for i in input().split()]
  lis = lis + li
  
print(lis)
  
for s in range(1, n+1):
  if s in lis:
    count += 0
  else:
    count += 1

print(count)

n, k = map(int, input().split())
count = 0
lis = []

for m in range(0, k):
  d = int(input())
  li = [int(i) for i in input().split()]
  lis = lis + li
  
for s in range(1, n+1):
  if s in lis:
    count += 0
  else:
    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())
Sunuke = [0]*N
d = list()
A = list()
for _ in range(K):
  d = int(input()
  A = list(map(int, input().split()))
  for a in A:
    Sunuke[a-1] += 1

ans = 0
for s in Sunuke:
  if s == 0:
     ans += 1
print(ans)


N, K = map(int, input().split())
Sunuke = [0]*N
for _ in range(K):
  d = int(input())
  A = list(map(int, input().split()))
  for a in A:
    Sunuke[a-1] += 1

ans = 0
for s in Sunuke:
  if s == 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):
from sys import stdin
import re
import bisect
import numpy as np

n, k = map(int(), stdin.readline().rstrip().split())
data = np.zeros((n,k),dtype=bool)
for i in range(k):
    _ = stdin.readline()
    line = map(int(), stdin.readline().rstrip().split())
    for j in line:
        data[i][j] = True

count = int(0)
for i in range(n):
    if (data.T[n]).all() == True:
        count += 1
print(count)

from sys import stdin
import re
import bisect
import numpy as np

N, K = map(int, stdin.readline().rstrip().split())
frag = np.zeros((K,N), dtype=bool)
for i in range(K):
    _ = stdin.readline()
    line = map(int, stdin.readline().rstrip().split())
    for j in line:
        j -= 1
        frag[i][j] = True
        
count = int(0)
frag = frag.T
for i in range(N):
    if np.count_nonzero(frag[i] == 1) == 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 = []
for i in range(K):
    d = int(input())
    B = list(map(int, input().split()))
    A.extend(B)
E = list(set(A))
F = N - len(E)

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

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

n, k = map(int, input().split())
 
t = [0]*n
for i in range(k):
  d = int(input())
  A = list(map(int, input().split()))
  for a in A:
    t[a - 1] += 1
print(t.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):
^CTraceback (most recent call last):
  File "testcon1.py", line 6, in <module>
    if x>=x2 and x<=y2:
N,K = map(int,input().split())
okashi=[0] * N
for i in range(K):
  x=input()
  y=input().split()
  for j in y:
    okashi[int(j)-1]=1
counter=0

for i in okashi:
  if i==0:
    counter=counter+1
print(counter)

N,K = map(int,input().split())
okashi=[0] * N
for i in range(K):
  x=input()
  y=input().split()
  for j in y:
    okashi[int(j)-1]=1
counter=0

for i in okashi:
  if i==0:
    counter=counter+1
print(counter)

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 = int(input())
K = int(input())
A=[]
for i in range(K):
    d = int(input())
    for i in range(d):
        a = int(input())
        A.append(a)

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

N = int(input())
K = int(input())
for i in range(K):
    d = int(input())
    for i in range(d):
        a = int(input())
        A.append(a) 
ans = len(list(set(A)))
print(N-ans)

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

ans = len(list(set(A)))
print(N-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 = []
for i in range(N):
  d = int(input())
  A = list(map(int, input().split()))
  for j in range(d):
    L.append(A[j])
print(N-len(set(L)))

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

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


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


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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted