TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: AtCoder Inc. holds a contest every Saturday.  There are two types of contests called ABC and ARC, and just one of them is held at a time.  The company holds these two types of contests alternately: an ARC follows an ABC and vice versa.  Given a string S representing the type of the contest held last week, print the string representing the type of the contest held this week.

Submission attempts (in order):
input = input()

if input = 'ABC':
  return 'ARC'
else:
  return 'ABC'

inputStr = input()

if inputStr == 'ABC':
  print('ARC')
else if inputStr == 'ARC':
  print('ABC')
else:
  print('')

inputStr = input()

if inputStr == 'ABC':
  return 'ARC'
else if inputStr == 'ARC':
  return 'ABC'
else:
  return null


inputStr = input()

if inputStr == 'ABC':
	print('ARC')
else if inputStr == 'ARC':
    print('ABC')
else:
	print('')

inputStr = input()

if inputStr == 'ABC':
 	print('ARC')
else:
	print('ABC')

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: AtCoder Inc. holds a contest every Saturday.  There are two types of contests called ABC and ARC, and just one of them is held at a time.  The company holds these two types of contests alternately: an ARC follows an ABC and vice versa.  Given a string S representing the type of the contest held last week, print the string representing the type of the contest held this week.

Submission attempts (in order):
last = input()
if input[1] == "B":
  print("ARC")
else:
  print("ABC")

S = input()
if S[1] == "B":
  print("ARC")
else:
  print("ABC")

Verdicts: Runtime Error

Accepted
Problem: AtCoder Inc. holds a contest every Saturday.  There are two types of contests called ABC and ARC, and just one of them is held at a time.  The company holds these two types of contests alternately: an ARC follows an ABC and vice versa.  Given a string S representing the type of the contest held last week, print the string representing the type of the contest held this week.

Submission attempts (in order):
s = input()
if s == "ABC": print("ARC")
else print("ABC")

s = input()
if s == "ABC":
  print("ARC")
else:
  print("ABC")

Verdicts: Runtime Error

Accepted
Problem: AtCoder Inc. holds a contest every Saturday.  There are two types of contests called ABC and ARC, and just one of them is held at a time.  The company holds these two types of contests alternately: an ARC follows an ABC and vice versa.  Given a string S representing the type of the contest held last week, print the string representing the type of the contest held this week.

Submission attempts (in order):
N, K = (int(i) for i in input().split())
H = list(map(int,input().split()))
ans = [1]*N
for m in range(M):
  a, b = (int(i) for i in input().split())
  if H[a-1] <= H[b-1]:
    ans[a-1] = 0
  elif H[a-1] > H[b-1]:
    ans[b-1] = 0
print(ans.count(1))

N, M = (int(i) for i in input().split())
H = list(map(int,input().split()))
ans = [1]*N
for m in range(M):
  a, b = (int(i) for i in input().split())
  if H[a-1] <= H[b-1]:
    ans[a-1] = 0
  elif H[a-1] > H[b-1]:
    ans[b-1] = 0
print(ans.count(1))

n = input()
if n == "ABC":
  print("ARC")
else:
  print("ABC")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: AtCoder Inc. holds a contest every Saturday.  There are two types of contests called ABC and ARC, and just one of them is held at a time.  The company holds these two types of contests alternately: an ARC follows an ABC and vice versa.  Given a string S representing the type of the contest held last week, print the string representing the type of the contest held this week.

Submission attempts (in order):
s=str(input())
if s=="ABC":
  print(“ARC”)
else:
  print(“ABC”)

s=str(input())
if s=="ABC":
  print("ARC")
else:
  print("ABC")

Verdicts: Runtime Error

Accepted
Problem: AtCoder Inc. holds a contest every Saturday.  There are two types of contests called ABC and ARC, and just one of them is held at a time.  The company holds these two types of contests alternately: an ARC follows an ABC and vice versa.  Given a string S representing the type of the contest held last week, print the string representing the type of the contest held this week.

Submission attempts (in order):
import sys
import itertools
X = int(input())
N = 120
ABs = []
for i in range(N):
    ABs.append(i**5)
    
for i in range(N):
    for j in range(N):
        if ABs[i]-ABs[j] == X:
            print(i,j)
            sys.exit()
        elif ABs[i]+ABs[j] == X:
            print(i,-j)
            sys.exit()

s = input()
print("ARC" if input()=="ABC" else "ABC")

s = input()
print("ABC" if s== "ARC" else "ARC")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: AtCoder Inc. holds a contest every Saturday.  There are two types of contests called ABC and ARC, and just one of them is held at a time.  The company holds these two types of contests alternately: an ARC follows an ABC and vice versa.  Given a string S representing the type of the contest held last week, print the string representing the type of the contest held this week.

Submission attempts (in order):
s = raw_input()
print({"ARC":"ABC", "ABC":"ARC"}[s])

s = input()
d = {"ABC":"ARC", "ARC":"ABC"}
print(d[s])

Verdicts: Runtime Error

Accepted
Problem: AtCoder Inc. holds a contest every Saturday.  There are two types of contests called ABC and ARC, and just one of them is held at a time.  The company holds these two types of contests alternately: an ARC follows an ABC and vice versa.  Given a string S representing the type of the contest held last week, print the string representing the type of the contest held this week.

Submission attempts (in order):
s = input()
if s = 'ABC':
	print('ARC')
elif s = 'ARC':
	print('ABC')

s = input()

if s = 'ABC':
  print('ARC')
elif s = 'ARC':
  print('ABC')

s = input()
if s == 'ABC':
  print('ARC')
elif s == 'ARC':
  print('ABC')

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 = [0]*N
for _ in range(K):
    d = int(input()) 
    l2= list(map(int, input().split()))
    print(l2)
    for val in l2:
        list[val-1] = 1
print(N-sum(list))

N, K = map(int, input().split())
l1 = [0]*N
for _ in range(K):
    d = int(input()) 
    l2= list(map(int, input().split()))
    for val in l2:
        l1[val-1] = 1
print(N-sum(l1))


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())
M=[]
i=0
for a in range(K*2):
   
    M= list(map(int, input().split()))
for b in range(1,N+1):
    if b not in M:
        i+=1
print(i)

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

i=0
A=[]
for a in range(K):
    M=[]
    P=input()
    M= list(map(int, input().split()))
    A=A+M
for b in range(1,N+1):
    if b not in A:
        i+=1

print(i)

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=[None]*n
while k>0:
  d=input()
  a=list(map(int,input().split()))
  #print (d,a)
  for i in a:
    ans[i-1]=d
  k-=1
count=0
for item in ans:
  if item==None:
    count+=1
print (count)a

n,k=map(int,input().split())
ans=[None]*n
while k>0:
  d=input()
  a=list(map(int,input().split()))
  #print (d,a)
  for i in a:
    ans[i-1]=d
  k-=1
count=0
for item in ans:
  if item==None:
    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):
import numpy as np
n, k = input().split(' ')
dds = []
aas = []
for i in range(int(k)):
  dds.append(int(input()))
  aas.append(list(map(lambda x: int(x), input().split(' '))))
  

uni = len(np.unique(np.array(aas).flatten()))

print(int(n) - uni)

import numpy as np
n, k = list(map(lambda x: int(x), input().split(' ')))
su = list(range(1, n+1))
for i in range(int(k)):
  input()
  tmp = list(map(lambda x: int(x), input().split(' ')))
  for j in tmp:
    if j in su:
      su.remove(j)
  

print(len(su))

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

snukes = [0] * N
for i in range(K):
  d_i = int(input()) # throw away
  a_i = map(int, input().split())
  for a in a_i:
    snukes[a] += 1

counter = 0
for i in range(N):
  if snukes[i] == 0:
    counter += 1

print(counter)

N, K = map(int, input().split())
 
snukes = [0] * N
for i in range(K):
  d_i = int(input()) # throw away
  a_i = map(int, input().split())
  for a in a_i:
    snukes[a-1] += 1
 
counter = 0
for i in range(N):
  if snukes[i] == 0:
    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, k = map(int, input().split())
a = [x*0 for x in range(n)]
count = 0

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

print(count)

n, k = map(int, input().split())
a = [x*0 for x in range(n)]
count = 0

for i in range(k):
    d = int(input())
    A = list(map(int, input().split()))
    for j in range(d):
        a[A[j]-1] += 1
    
for t in range(n):
    if a[t] == 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 = int(input().split())
Sunuke = set(range(N))
for i in range(K):
  d = int(input())
  X = list(map(int, input().split()))
  for x in X:
    Sunuke.discard(x-1)
print(len(Sunuke))

N, K = input().split()
N = int(N)
K = int(K)
Sunuke = set(range(N))
for i in range(K):
  d = int(input())
  X = list(map(int, input().split()))
  for x in X:
    Sunuke.discard(x-1)
print(len(Sunuke))

Verdicts: Runtime Error

Accepted
Problem: N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town.  There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}.  Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief?

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

n,k = map(int, input().split())
for k in range(k):
	d = int(input())
	for d in range(d):
    a.append({int(x) for x in input().split()})
    n = array_diff(n,a)
print(len(n))

n,k = map(int, input().split())
for k in range(k):
	d = input()
	for d in range(d):
      a = input()
    n = array_diff(n,d)
print(n)

n,k = map(int, input().split())
for k in range(k+1):
	for d in range(n):
      a = list(map(int, input().split()))
      n = array_diff(n,a)
print(n)

n,k = map(int, input().split())
for k in range(k):
	d = int(input())
	for d in range(d):
    a.append({int(x) for x in input().split()})
    n = array_diff(n,a)
print(n)

n,k = map(int, input().split())
for k in range(k):
	for n in range(n):
      a = list(map(int, input().split()))
      n = array_diff(n,a)
print(n)

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

Verdicts: Runtime Error

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 = list(map(int,input().strip().split()))
temp = []
ans = int(0)
for i in range(k+1):
    d = int(input())
    li = list(map(int,input().split()))
    for j in range(d):
        temp += str(li[j])
for m in range(n+1):
    b  = str(m + 1)
    a = temp.count(b)
    if a == 0:
        ans += 1
print(ans)


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



Verdicts: Runtime Error

Accepted
Problem: N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town.  There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}.  Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief?

Submission attempts (in order):
n,k = map(int,input().split())
lst = []
for _ in range(k):
  d = int(input())
  lstx = [int(input()) for _ in range(d)]
  lst += lstx
setans = set(lst)
print(n - len(setans))

n,k = map(int,input().split())
lst = []
for _ in range(k):
  d = int(input())
  lstx = list(map(int,input().split()))
  lst += lstx
setans = set(lst)
print(n - len(setans))

Verdicts: Runtime Error

Accepted
Problem: N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town.  There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}.  Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief?

Submission attempts (in order):

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


l = [0 for i in range(n+1)]

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


print(l[1:].count(1))


n,k= list(map(int,input().split()))
l = [0 for i in range(n+1)]
 
for i in range(k):
    d = int(input())
    m = list(map(int,input().split()))
    for j in range(d):
        l[m[j]] = 1
 
 
print(l[1:].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())
s={i+1 for i in range(N)}
t={}
for i in range(K):
  input()
  t|=set(map(int,input().split()))
print(len(s-t))

N,K=map(int,input().split())
s={i+1 for i in range(N)}
t=set()
for i in range(K):
  input()
  t|=set(map(int,input().split()))
print(len(s-t))

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

grid = []
for i in range(2*k):
    array = list(map(int, input().strip().split()))
    grid.append(array)
print(grid)
l = []
for j in range (k):
    l.append(grid[0+2*j+1])
print(l)
lis = list(itertools.chain.from_iterable(l))
print(lis)
count = 0
for m in range(n):
    if m+1 in lis:
        count = count +1
print(n - count)

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

grid = []
for i in range(2*k):
    array = list(map(int, input().strip().split()))
    grid.append(array)
for j in range (k):
    l.append(grid[0+2*j+1])
lis = list(itertools.chain.from_iterable(l))
count = 0
for m in range(n):
    if m+1 in lis:
        count = count +1
print(n - count)

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

grid = []
for i in range(2*k):
    array = list(map(int, input().strip().split()))
    grid.append(array)
print(grid)
l = []
for j in range (k):
    l.append(grid[0+2*j+1])
print(l)
lis = itertools.chain.from_iterable(l)
print(list(itertools.chain.from_iterable(l)))
count = 0
for m in range(n):
    if m+1 in lis:
        count = count +1
print(n - count - 1)

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

grid = []
for i in range(2*k):
    array = list(map(int, input().split()))
    grid.append(array)

l = []
for j in range (k):
    l.append(grid[0+2*j+1])

lis = list(itertools.chain.from_iterable(l))

count = 0
for m in range(n):
    if m+1 in lis:
        count = count +1
print(n - count)

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town.  There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}.  Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief?

Submission attempts (in order):
N, K = map(int, input().split())

sunuke_list = []
for i in range(K):
    input()
    okashi_sunukes = map(int, input().split())
    for okashi_sunuke in okashi_sunukes:
        sunuke_list.insert(okashi_sunuke, '')

print(N - len(sunuke_list))

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

sunuke_dict = {}
for i in range(K):
    input()
    okashi_sunukes = map(int, input().split())
    for okashi_sunuke in okashi_sunukes:
        sunuke_dict[okashi_sunuke] = ''

print(N - len(sunuke_dict))

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 = []
x2 = []
count = 0
for i in range(0, int(N)):
  x2.append(0)
for i in range(0, int(K)):
  d = int(input())
  x = input().split()
  for j in x:
    if x2[int(j)-1] == 0:
      x2[int(j)-1] = 1
      count += 1
print(count)

N, K = input().split()
d = []
x2 = []
count = 0
for i in range(0, int(N)):
  x2.append(0)
for i in range(0, int(K)):
  d = int(input())
  x = input().split()
  for j in x:
    if x2[int(j)-1] == 0:
      x2[int(j)-1] = 1
      count += 1
print(int(N)-count)

Verdicts: Wrong Answer

Accepted
Problem: N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town.  There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}.  Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief?

Submission attempts (in order):
n, k = map(int, input().split())

sunuke = [[0] * (n+2)] * (k+2)
ans = 0
for j in range(1, k+1) :
    num_have_okashi = int(input())
    oakshi_sunuke = list(map(int,input().split()))

    for i in oakshi_sunuke :
        sunuke[i][j] = 1
        print('num_have_okashi = [%d]' % (num_have_okashi))
        print(oakshi_sunuke)
        print('sunuke[%d][%d] = %d' % (i, j, sunuke[i][j]))
        ans = ans + 1
        break

print(n-ans)


num_sunuke, num_okashi_kind = map(int, input().split())
sunuke = [0] * (num_sunuke+1)

ans = 0
for idx_okashi_kind in range(1, num_okashi_kind+1) :
    num_have_okashi = int(input())
    idx_sunuke_with_okashi = map(int,input().split())

    for i in range(1, num_have_okashi+1) :
        for j in idx_sunuke_with_okashi :
            sunuke[j] = 1

for s in sunuke :
    if s == 1 :
        ans = ans + 1

print(num_sunuke - 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):
for okashi_number in range(k):
	di = int(input())
	D = map(int,input().split())
	for x in range(di)
		A[[x]-1] = 1

for i in range(N):
	if A[i] == 0:
	print(A[i])


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

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

count = 0
for i in range(1,N +1,1):
	if okasi[i] != 1:
		count = count + 1
print(count)

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

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

count = 0
for i in range(1,N +1,1):
	if okasi != 1:
		count = count + 1
print(count)

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

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

count = 0
for i in range(1,N +1,1):
	if okasi[i] != 1:
		count = count + 1
print(count)

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=map(int,input().split())
kashi = [0] * n
cnt = 0
M = 0
for s in range(n):
	i=int(input())
	li=list(map(int,input().split()))
	if i > 0:
		for m in li:
			kashi[m-1] +=1

for i in kashi:
	if i == 0:
		cnt += 1

print(cnt)
    

n,k=map(int,input().split())
kashi = [0] * n
cnt = 0
M = 0
for s in range(n):
	i=int(input())
	li=list(map(int,input().split()))
	for m in li:
		kashi[m-1] +=1

for i in kashi:
	if i == 0:
		cnt += 1

print(cnt)
    

n,k=map(int,input().split())
kashi = [0] * n
cnt = 0
M = 0
for s in range(k):
	i=int(input())
	li=list(map(int,input().split()))
	if i > 0:
		for m in li:
			kashi[m-1] +=1

for i in kashi:
	if i == 0:
		cnt += 1

print(cnt)
    

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

for j in range (K):
    UKE = list ( set(list(range(N))) - set(A[j]) )

print ( len(UKE) )

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

S = [False] * N

for i in range (K):
	for j in A[i]:
		S[j-1] = True

print (S.count(False))
	

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

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

s = []
n, k = map(int, input().split())
for i in range(n):
  s.append(0)
for i in range(k):
	m = int(input())
    na = list(map(int, input().split())
    for j in na:
    	s[j - 1] = 1
         
print(s.count(0))
        

s = []
n, k = map(int, input().split())
for i in range(n):
    s.append(0)
for i in range(k):
    m = int(input())
    na = list(map(int, input().split()))
    for j in na:
        s[j - 1] = 1
         
print(s.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 = [list(map(int, input().split())) for i in range(2*k)]
List_a = []
for x in range(1,2*k,2):
    for i in List[x]:
        List_a.append(i)

List_a =set(List_a)
print(List_a)
print(n-len(List_a))

n,k = map(int,input().split())
List = [list(map(int, input().split())) for i in range(2*k)]
List_a = []
for x in range(1,2*k,2):
    for i in List[x]:
        List_a.append(i)

List_a =set(List_a)
print(n-len(List_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, k = map(int, input().split())


temp_array = []

for _ in range(k):
  temp = input()
  [temp_array.append(i) for i in list(map(int, input().split()))]

all_member = len(list(set(temp_array)))
print(k - all_member)

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

temp_array = []

for _ in range(k):
  temp = input()
  [temp_array.append(i) for i in list(map(int, input().split())) if i != ""]

all_member = len(list(set(temp_array)))
print(n - all_member)

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

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


Verdicts: Runtime Error

Accepted
Problem: N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town.  There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}.  Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief?

Submission attempts (in order):
N,K=map(int,input().split())

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

for i in range(K):
    d=int(input())
    a=list(map(int,input().split()))
    b=set(sunuke_list)-set(a)
    sunuke_list=list(b)
    print(sunuke_list)
    
print(len(sunuke_list))

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

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

for i in range(K):
    d=int(input())
    a=list(map(int,input().split()))
    b=set(sunuke_list)-set(a)
    sunuke_list=list(b)
    
print(len(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())
a = set()
for i in [0]*k:
    _ = input()
    a.add(*map(int, input().split()))
    print(a)
print(n - len(a))

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

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

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):
import numpy as np
N, K = map(int, input().split())

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

hito = np.ones(N)
for i in range(len(A)):
    hito[A[i]] = 0
print(int(np.sum(hito)))

import numpy as np

N, K = map(int, input().split())
A = []
for i in range(K):
    d = int(input())
    temp = list(map(int, input().split()))
    A = A + temp
hito = np.ones(N)
for i in range(len(A)):
    hito[A[i]] = 0
print(int(np.sum(hito)))

import numpy as np

N, K = map(int, input().split())
A = []
for i in range(K):
    d = int(input())
    temp = list(map(int, input().split()))
    A = A + temp
hito = np.ones(N)
for i in range(len(A)):
    hito[A[i]-1] = 0
print(int(np.sum(hito)))


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):
import itertools^M
N,K = list(map(int, input().split(" ")))^M
A = list(itertools.chain.from_iterable([input().split(" ")  for i in range(K) if input().split(" ")]))^M
A = list(map(int, A))
none = [a for a in range(1, K + 1) if a not in A]
print(len(none))

import itertools

inp2intlist = lambda inp:list(map(int,inp))

N,K = list(map(int, input().split(" ")))
A = list(itertools.chain.from_iterable([inp2intlist(input().split())  for i in range(K) if input().split()]))

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

d = set(d)
d = list(d)
print(n - len(d))
  

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

d = set(d)
d = list(d)
print(n - len(d))


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

t = 0
for i in range(1,n+1):
    if i in a_list:
        t += 1
print(t)

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

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

t = 0
for i in range(1,n+1):
    if i in a_list:
        t += 1
print(n-t)

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 = int(input())
A = list(map(int,input().split()))
dk = [int(input()) for ia in range(K)]
Ak = list(map(int, input().split()))

print(N - d)


import collections
N , K= map(int, input().split())
c = 0
A =[]
for ia in range(K):
    d = int(input())
    A.extend(list(map(int, input().split())))

sa = collections.Counter(A)
sss = len(sa)
print(N-sss)
    



Verdicts: Runtime Error

Accepted
Problem: N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town.  There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}.  Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief?

Submission attempts (in order):
N,K=map(int,input().split())

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

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

for k in range(1,N+1):
    if k in A:
        ans=ans-1
print(ans)    

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

N_list=list(range(1,N+1))
ans=N
for i in range(K):
    d=int(input())
    A=list(map(int,input().split()))
    for j in A:
        if j in N_list:
            ans=ans-1
            N_list.remove(j)
    

print(len(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):
a,b=map(int,input().split())
c=int(input())
d=list(map(int,input().split()))
e=[input() for _ in range(b)]
f=list(map(int,input().split()))

print(a-c)

import itertools
a,b=map(int,input().split())
c=[]
for i in range(1,b*2+1):
    c.append(list(map(int,input().split())))
n=c[1::2]
n=list(itertools.chain.from_iterable(n))
print(a-len(set(n)))

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

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


Verdicts: Runtime Error

Accepted
Problem: N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town.  There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}.  Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief?

Submission attempts (in order):
N, K = map(int, input().split())
ANSlist = [1]*(N)
print(ANSlist)
for i in range(1,K):
    I = input() #
    S = list(input())
    for j in range(len(S)):
        if S[j] != " ":
            ANSlist[int(S[j])-1] = 0

ANS = 0

for i in range(N-1):
    if ANSlist[i] != 0:
        ANS += 1

print(ANS)

N, K = map(int, input().split())
ANSlist = [1]*(N)
print(ANSlist)
for i in range(K):
    I = input() #
    S = list(input())
    for j in range(len(S)):
        if S[j] != " ":
            ANSlist[int(S[j])-1] = 0

ANS = 0

for i in range(N-1):
    if ANSlist[i] != 0:
        ANS += 1

print(ANS)

N, K = map(int, input().split())
print("ok")
D = int(input)

ANSlist = [1]*(N -1)

for i in range(1,K):
    S = map(int, input().split())
    for j in range(S):
        ANSlist[S[j]] = 0

ANS = 0

for i in range(N-1):
    if ANSlist[i] != 0:
        ANS += 1

print(ANS)

N, K = map(int, input().split())
ANSlist = [1]*(N)
print(ANSlist)
for i in range(K):
    I = input() #
    S = list(input())
    for j in range(len(S)):
        if S[j] != " ":
            ANSlist[int(S[j])-1] = 0

ANS = 0

for i in range(N):
    if ANSlist[i] != 0:
        ANS += 1

print(ANS)

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

ANSlist = []

for i in range(1,K):
    inportant = int(input())
    trash = input()
    ANSlist.append(inportant)

ANS = N - max(ANSlist)

print(ANS)

N, K = map(int, input().split())
ANSlist = [1]*(N)

for i in range(K):
    I = input() #
    S = list(input())
    for j in range(len(S)):
        if S[j] != " ":
            ANSlist[int(S[j])-1] = 0

ANS = 0

for i in range(len(ANSlist[i])):
    if ANSlist[i] != 0:
        ANS += 1

print(ANS)

N, K = map(int, input().split())
#ANSlist = [1]*(N)
ANSlist = []
ANS = 0

for i in range(K):
    I = input() #
    S = input().split()
    print(ANSlist)
    for j in range(len(S)):
        if S[j] != " ":
            #ANSlist[int(S[j])-1] = 0
            if not S[j] in ANSlist:
                ANSlist.append(S[j])
                
            



ANS = N - len(ANSlist)
print(ANS)

N, K = map(int, input().split())
#ANSlist = [1]*(N)
ANSlist = []
ANS = 0

for i in range(K):
    I = input() #
    S = input().split()
    #print(ANSlist)
    for j in range(len(S)):
        if S[j] != " ":
            #ANSlist[int(S[j])-1] = 0
            if not S[j] in ANSlist:
                ANSlist.append(S[j])
                
            



ANS = N - len(ANSlist)
print(ANS)

Verdicts: Wrong Answer

Wrong Answer

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

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

print(sum(does_have))

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

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

print(N-sum(does_have))

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):
sunuke,var = map(int,input().split())
loser = [1] * sunuke
for i in range(var):
  d = int(input())
  buy = map(int(input().split())
  for t in buy:
    winer[t-1] = 0
print(sum(loser))

import collections

n,k = map(int,input().split())
for i in range (k):
  d = int(input())
  a = map(int,input().split())
c = collections.Counter(a)
print(n-len(c))

sunuke,var = map(int,input().split())
loser = [1] * sunuke
for i in range(var):
  d = int(input())
  tmp = map(int,input().split())
  for t in tmp:
    loser[t-1] = 0
print(sum(loser))

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 = input().split()
N = int(N)
K = int(K)
N_list = list()

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

for i in range(K):
	d = int(input())
	a_list = input().split()
	
	for i in N_list:
		for j in a_list:
			if i == int(j):
				N_list.remove(i)
answer = N_list[0]

print(answer)


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

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

for i in range(K):
	d = int(input())
	a_list = input().split()
	N_list += a_list
	N_list = map(N_list)

print(N_list)



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

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

for i in range(K):
	d = int(input())
	a_list = map(int,input().split())
	for n in N_list:
		for a in a_list:
			if n == a:
				N_list.remove(n)

print(N_list[0])

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

for i in range(N):
	d = int(input())
	a = map(int,input().split())
	for i in a:
		check[i-1] = 1

print(check.count(0))


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

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

print(check.count(0))


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

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

print(check.count(0))


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

N,K=map(int,input().split())
S=[0]*(N+1);cnt=0
for i in range(K):
  d=int(input())
  A=list(map(int,input().split()))
  for i in range(d):
    S[A[i]] +=1
#print(S)
for i in range(1,N+1):
  if S[i]==0:
    cnt=cnt+1
print(cnt)

Verdicts: Wrong Answer

Accepted
Problem: N _Snukes_ called Snuke 1, Snuke 2, ..., Snuke N live in a town.  There are K kinds of snacks sold in this town, called Snack 1, Snack 2, ..., Snack K. The following d_i Snukes have Snack i: Snuke A_{i, 1}, A_{i, 2}, \cdots, A_{i, {d_i}}.  Takahashi will walk around this town and make mischief on the Snukes who have no snacks. How many Snukes will fall victim to Takahashi's mischief?

Submission attempts (in order):
N,K=map(int,input().split())
d=[]
a=[]
for i in range(K):
    d.append(int(input()))
    a.append(list(map(int,input().split())))
    
aa=[0]*N
counts=0

for k in K:
    for j in a[k]:
        aa[j-1]=1
        
for x in range(N+1):
    if aa[x-1]==0:
        counts+=1

print(counts)

N,K=map(int,input().split())
d=[]
a=[]
for i in range(k):
    d.append(int(input()))
    a.append(list(map(int,input().split())))
    
aa=[0]*N
counts=0

for k in K:
    for j in a[k]:
        aa[j-1]=1
        
for x in range(N+1):
    if aa[x-1]==0:
        counts+=1

print(counts)

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


for k in a:
    for j in k:
        aa[j-1]+=1
        
for x in aa:
    if x==0:
        counts+=1

print(counts)

Verdicts: Runtime Error

Runtime Error

Accepted