ZhenlongDai/ACPR huggingface dataset:
Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input()
b = input()
c = input()
 
print(a[0])
print(b[1])
print(c[2])
print('\n')

Failing test case input:
pu`
qae
erf

Expected output:
paf


Actual output:
p
a
f




Fixed submission (verdict: Accepted):
a = input()
b = input()
c = input()
 
print(a[0]+b[1]+c[2])

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c=[input() for i in range(3)]
print(c[0]+c[1]+c[2])

Failing test case input:
ddu
cat
ooi

Expected output:
dai


Actual output:
dducatooi


Fixed submission (verdict: Accepted):
c=[input() for i in range(3)]
print(c[0][0]+c[1][1]+c[2][2])

Problem: p03415
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
c = input()
d = input()
e = input()
ans = c[0] + d[1] + e[2]

Failing test case input:
tec
abu
lkp

Expected output:
tbp


Actual output:

Fixed submission (verdict: Accepted):
c = input()
d = input()
e = input()
ans = c[0] + d[1] + e[2]
print(ans)

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c=[input() for i in range(3)]
for i in range(0,3):
  print(c[i],end='')


Failing test case input:
ueb
uca
pll

Expected output:
ucl


Actual output:
uebucapll

Fixed submission (verdict: Accepted):
c=[input() for i in range(3)]
for i in range(3):
  print(c[i][i],end='')

Problem: p03415
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
U=input()
M=input()
B=input()

print(U[0],M[1],B[2])

Failing test case input:
bqt
qea
rhe

Expected output:
bee


Actual output:
b e e


Fixed submission (verdict: Accepted):

U=input()
M=input()
B=input()

print(U[0]+M[1]+B[2])

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

s=''
for i in range(3):
  s=s+input()[i]
  

Failing test case input:
bqt
qea
hdr

Expected output:
ber


Actual output:

Fixed submission (verdict: Accepted):
s=''
for i in range(3):
  temp=input()
  s=s+temp[i]
print(s)

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=[list(input()) for i in range(3)]
print(a[i][i] for i in range(3))

Failing test case input:
ceu
bau
oni

Expected output:
cai


Actual output:
<generator object <genexpr> at 0x7ffbcfacd630>


Fixed submission (verdict: Accepted):
a=[list(input()) for i in range(3)]
for i in range(3):
  print(a[i][i],end="")

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S1=str(input())
S2=str(input())
S3=str(input())
print(S1[0]+S1[1]+S2[2])

Failing test case input:
std
epb
gfr

Expected output:
spr


Actual output:
stb


Fixed submission (verdict: Accepted):
S1=str(input())
S2=str(input())
S3=str(input())
print(S1[0]+S2[1]+S3[2])

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s1 = input()
s2 = input()
s3 = input()
print(''.join([s1[0], s1[1], s1[2]]))

Failing test case input:
duc
aau
onj

Expected output:
daj


Actual output:
duc


Fixed submission (verdict: Accepted):
s1 = input()
s2 = input()
s3 = input()
print(''.join([s1[0], s2[1], s3[2]]))
Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
class Atcoder:


    def Contest0901(self):
        lines = []
        for i in range(3):
            line = input()
            if line:
                lines.append(line)
            else:
                break
        print(lines)
        return lines[0][0] + lines[1][1] + lines[2][2]

if __name__ == '__main__':
    atcoder = Atcoder()
    output = atcoder.Contest0901()
    print(output)

Failing test case input:
qv`
`qf
eer

Expected output:
qqr


Actual output:
['qv`', '`qf', 'eer']
qqr


Fixed submission (verdict: Accepted):
class Atcoder:


    def Contest0901(self):
        lines = []
        for i in range(3):
            line = input()
            if line:
                lines.append(line)
            else:
                break
        return lines[0][0] + lines[1][1] + lines[2][2]


if __name__ == '__main__':
    atcoder = Atcoder()
    output = atcoder.Contest0901()
    print(output)

Problem: p03415
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x= input()
y=input()
z=input()
result=x[0]+y[1]+x[2]
print(result)


Failing test case input:
`qu
qea
reh

Expected output:
`eh


Actual output:
`eu


Fixed submission (verdict: Accepted):
x= input()
y=input()
z=input()
result=x[0]+y[1]+z[2]
print(result)

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s1 = str( input() ) 
s2 = str( input() ) 
s3 = str( input() ) 
print( s1[0] + s1[1] + s1[2] )

Failing test case input:
una
bep
dfr

Expected output:
uer


Actual output:
una


Fixed submission (verdict: Accepted):
s1 = str( input() ) 
s2 = str( input() ) 
s3 = str( input() ) 
print( s1[0] + s2[1] + s3[2] )

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
f = list(input())
s = list(input())
t = list(input())

a = [f[i: i+1] for i in range(0, len(f), 1)]
b = [s[i: i+1] for i in range(0, len(s), 1)]
c = [t[i: i+1] for i in range(0, len(t), 1)]

print( a[0] + b[1] + c[2])


Failing test case input:
udc
aau
kom

Expected output:
uam


Actual output:
u, a, m

Fixed submission (verdict: Accepted):
f = list(input())
s = list(input())
t = list(input())

a = [f[i: i+1] for i in range(0, len(f), 1)]
b = [s[i: i+1] for i in range(0, len(s), 1)]
c = [t[i: i+1] for i in range(0, len(t), 1)]
d = ''.join(a[0] + b[1] + c[2])
print(d)

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = [input()[i] for i in range(3)]
print(S[:])

Failing test case input:
csf
cua
nkm

Expected output:
cum


Actual output:
c, u, m

Fixed submission (verdict: Accepted):
S = [input()[i] for i in range(3)]
print("".join(S))

Problem: p03415
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s1 = input()
s2 = input()
s3 = input()
print(s1[0]+s1[1]+s1[2])

Failing test case input:
dsf
cua
nmk

Expected output:
duk


Actual output:
dsf


Fixed submission (verdict: Accepted):
a = input()
b = input()
c = input()
print(a[0]+b[1]+c[2])
Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
print(input()[0]+input([1])+input()[2])

Failing test case input:
vp`
asf
rge

Expected output:
vse


Actual output:
[1]vasfe


Fixed submission (verdict: Accepted):
print(input()[0]+input()[1]+input()[2])

Problem: p03415
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
c1 = list(input())
c2 = list(input())
c3 = list(input())
print(c1[0] + c1[1] + c2[2])


Failing test case input:
uq`
arf
reg

Expected output:
urg


Actual output:
uqf


Fixed submission (verdict: Accepted):
c1 = list(input())
c2 = list(input())
c3 = list(input())
print(c1[0] + c2[1] + c3[2])

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
for i in range(3):
  a = input()
  print(a[i])

Failing test case input:
uo`
eaq
erf

Expected output:
uaf


Actual output:
u
a
f


Fixed submission (verdict: Accepted):
ans = ""
for i in range(3):
  a = input()
  ans += a[i]
  
print(ans)

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = list(input())
b = list(input())
c = list(input())
print(a[0],b[1],c[2])

Failing test case input:
una
bep
dfr

Expected output:
uer


Actual output:
u e r


Fixed submission (verdict: Accepted):
a = list(input())
b = list(input())
c = list(input())
d=a[0]+b[1]+c[2]
print(d)

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A = input()
B = input()
C = input()

print(A[0], B[1], C[2])

Failing test case input:
ceu
bau
onj

Expected output:
caj


Actual output:
c a j


Fixed submission (verdict: Accepted):
A = input()
B = input()
C = input()

print(A[0]+B[1]+C[2])

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s1 = input()
s2 = input()
s3 = input()

print(s1[0],s2[1],s3[2])

Failing test case input:
ueb
vba
plm

Expected output:
ubm


Actual output:
u b m


Fixed submission (verdict: Accepted):
s1 = input()
s2 = input()
s3 = input()

print(s1[0]+s2[1]+s3[2])

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x1 = input()
x2 = input()
x3 = input()

print(x1[0], x2[1], x3[2])

Failing test case input:
edu
bau
ooi

Expected output:
eai


Actual output:
e a i


Fixed submission (verdict: Accepted):
s1 = input()
s2 = input()
s3 = input()

print('{}{}{}'.format(s1[0], s2[1], s3[2]))

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=[]
for i in range(3):
  s+=input()[i]
print(s)

Failing test case input:
bqt
qea
hdr

Expected output:
ber


Actual output:
b, e, r

Fixed submission (verdict: Accepted):
s=""
for i in range(3):
  s+=input()[i]
print(s)

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c1 = input()
c2 = input()
c3 = input()

print(c1[0]+c2[1]+c2[2])

Failing test case input:
uo`
eaq
erf

Expected output:
uaf


Actual output:
uaq


Fixed submission (verdict: Accepted):
c1 = input()
c2 = input()
c3 = input()

print(c1[0]+c2[1]+c3[2])
Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=input()
b=input()
c=input()

print(a[0],b[1],c[2])

Failing test case input:
std
peb
rfg

Expected output:
seg


Actual output:
s e g


Fixed submission (verdict: Accepted):
a=input()
b=input()
c=input()

print('{}{}{}'.format(a[0],b[1],c[2]))

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=input()
b=input()
c=input()
print('a[1]'+'b[2]'+'c[3]')


Failing test case input:
frc
atc
moo

Expected output:
fto


Actual output:
a[1]b[2]c[3]


Fixed submission (verdict: Accepted):
a=input()[0]
b=input()[1]
c=input()[2]
print(a+b+c)

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s1 = input()
s2 = input()
s3 = input()

print(s1[0], s2[1], s3[2])

Failing test case input:
cdu
aub
lko

Expected output:
cuo


Actual output:
c u o


Fixed submission (verdict: Accepted):
s1 = input()
s2 = input()
s3 = input()

print('{}{}{}'.format(s1[0], s2[1], s3[2]))

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s1 = input()
s2 = input()
s3 = input()
ans = s1[0]+s1[1]+s2[2]
print(ans)

Failing test case input:
dsf
uca
lmo

Expected output:
dco


Actual output:
dsa


Fixed submission (verdict: Accepted):
s1 = input()
s2 = input()
s3 = input()
ans = s1[0]+s2[1]+s3[2]
print(ans)

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c1 = str(input())
c2 = str(input())
c3 = str(input())

print(c1[0],c2[1],c3[2])

Failing test case input:
cdt
aub
lkp

Expected output:
cup


Actual output:
c u p


Fixed submission (verdict: Accepted):
c1 = str(input())
c2 = str(input())
c3 = str(input())
res = ""

res += c1[0] + c2[1] + c3[2]

print(res)

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
for i in range(3):
    print(input()[i],sep='')

Failing test case input:
una
pbe
fdr

Expected output:
ubr


Actual output:
u
b
r


Fixed submission (verdict: Accepted):
s=''
for i in range(3):
    s+=input()[i]
print(s)

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C = [input() for i in range(3)]
a = [A[:1], A[1:2], A[2:]]
b = [B[:1], B[1:2], B[2:]]
c = [C[:1], C[1:2], C[2:]]
print(a.pop(0), b.pop(1), c.pop(2))

Failing test case input:
bqt
qea
rhe

Expected output:
bee


Actual output:
b e e


Fixed submission (verdict: Accepted):
A,B,C = [input() for i in range(3)]
a = [A[:1], A[1:2], A[2:]]
b = [B[:1], B[1:2], B[2:]]
c = [C[:1], C[1:2], C[2:]]
print(a.pop(0) + b.pop(1) + c.pop(2))

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input()
b = input()
c = input()
print(a[0] + b[1] + c[1])


Failing test case input:
dsf
uca
nmk

Expected output:
dck


Actual output:
dcm


Fixed submission (verdict: Accepted):
a = input()
b = input()
c = input()
print(a[0] + b[1] + c[2])

Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input()
b = input()
c = input()

print(a[0],b[1],c[2])

Failing test case input:
edu
bau
ooi

Expected output:
eai


Actual output:
e a i


Fixed submission (verdict: Accepted):
a = input()
b = input()
c = input()

st = a[0]+b[1]+c[2]
print(st)
Problem: p03415
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A = input()
B = input()
C = input()
print(A[0], B[1], C[2])

Failing test case input:
`uo
qae
erf

Expected output:
`af


Actual output:
` a f


Fixed submission (verdict: Accepted):
A = input()
B = input()
C = input()
print(A[0]+B[1]+C[2])
Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k=map(int,input().split())	
x=[list(map(int, input().split())) for i in range(2*k)]
ans=[range(1,n+1)]
num=[]
print(x)
many=x[0:2*k:2]
cookie=x[1:2*k:2]
print(many)
print(cookie)
for y in range(len(cookie)):
    for z in range(len(cookie[y])):
        num.append(cookie[y][z])
Q=set(num)
W=list(Q)
print(n-len(W))

Failing test case input:
2 0
0
0 0
14
-1

Expected output:
2


Actual output:
[]
[]
[]
2


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

Problem: p02688
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
from collections import defaultdict
N,K=map(int,input().split())
Hash=defaultdict(lambda:0)
for i in range(K):
    x=int(input())
    Hash[x]=1
    L=list(map(int,input().split()))
count=0
for i in range(1,N+1):
    if Hash[i]==0:
        count+=1
print(count)

Failing test case input:
3 1
2
1 3
1
3

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
from collections import defaultdict
N,K=map(int,input().split())
Hash=defaultdict(lambda:0)
for i in range(K):
    x=int(input())
    L=list(map(int,input().split()))
    for i in L:
        Hash[i]=1
count=0
for i in range(1,N+1):
    if Hash[i]==0:
        count+=1
print(count)

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = map(int, input().split())
D = []
count = 0
sunuke_list = [1] * N
for j in range(K * 2):
    D = list(map(int, input().split()))
    if j % 2 == 1:
        for i in range(len(D)):
            sunuke_list[i - 1] = 0

print(sum(sunuke_list))


Failing test case input:
3 3
0
3
1
3
1
1

Expected output:
1


Actual output:
2


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

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

n, k = map(int, input().split())
n_list = list(range(1, n+1))
input_map = {}
for i in range(k):
    d = int(input())
    d_list = [ int(ai) for ai in input().split()]
    input_map.setdefault(d, d_list)


having_map = {}
for key, value in input_map.items():

    for h in value:
        if n_list.count(h) >= 1:
            n_list.remove(h)

print(len(n_list))


Failing test case input:
3 3
0
3
1
3
1
1

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):

n, k = map(int, input().split())
n_list = list(range(1, n+1))
input_map = {}
for i in range(k):
    d = int(input())
    d_list = [ int(ai) for ai in input().split()]
    for h in d_list:
        if n_list.count(h) == 1:
            n_list.remove(h)

print(len(n_list))
Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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);

Failing test case input:
1 -1
1
1 2
8
-1

Expected output:
1


Actual output:
[]
1


Fixed submission (verdict: Accepted):
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);

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k = map(int,input().split())

count = [0]*(n+1)
count1 = 0

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

for i in range(n):
  if count[i] == 0:
    count1 += 1
print(count)
print(count1)

Failing test case input:
3 3
0
3
1
3
1
1

Expected output:
1


Actual output:
[1, 0, 2, 0]
1


Fixed submission (verdict: Accepted):
n,k = map(int,input().split())

count = [0]*(n+1)
count1 = 0

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

for i in range(n):
  if count[i] == 0:
    count1 += 1

print(count1)

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from collections import Counter as counter

ii = lambda:int(input())
mi = lambda:list(map(int,input().split()))
ix = lambda x:list(input() for _ in range(x))
mix = lambda x:list(mi() for _ in range(x))
iix = lambda x:list(int(input()) for _ in range(x))


n,k = mi()
res = 0
a = []
for i in range(k):
    d = input()
    a.extend(mi())
c = counter(a)
for i in range(1,k+1):
    if c[i] == 0: res+=1
print(res)
    

Failing test case input:
3 0
1
1 3
1
2

Expected output:
3


Actual output:
0


Fixed submission (verdict: Accepted):
from collections import Counter as counter

ii = lambda:int(input())
mi = lambda:list(map(int,input().split()))
ix = lambda x:list(input() for _ in range(x))
mix = lambda x:list(mi() for _ in range(x))
iix = lambda x:list(int(input()) for _ in range(x))


n,k = mi()
res = 0
a = []
for i in range(k):
    d = input()
    a.extend(mi())
c = counter(a)
for i in range(1,n+1):
    if c[i] == 0: res+=1
print(res)
Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,K = map(int,input().split())
s = [input() for i in range(K*2)]
l = []
c = 0
k = 0
m = 0
f = []

num = []
for i in range(K*2):
  if i%2==1:
    for m in range(int(s[i-1])):
      num.append(s[i].split()[m])
for j in (1,N+1):
  f.append(num.count(str(j)))
print(N-len(f))

Failing test case input:
0 -1
-1
-1 -1
1
-2

Expected output:
0


Actual output:
-2


Fixed submission (verdict: Accepted):
N,K = map(int,input().split())
s = [input() for i in range(K*2)]
l = []
c = 0
k = 0
m = 0
f = []

num = []
for i in range(K*2):
  if i%2==1:
    for m in range(int(s[i-1])):
      num.append(s[i].split()[m])
for j in range(1,N+1):
  f.append(num.count(str(j)))
print(f.count(0))

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = map(int, input().split())
A = set()
for i in range(K):
    
    a = set(map(int, input().split()))
    A=A|a
    
print(N-len(A))

Failing test case input:
5 1
2
1 4
2
3

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())
A = set()
for i in range(K):
    d = int(input())
    a = set(map(int, input().split()))
    A=A|a
    
print(N-len(A))

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def Qb():
    n, k = map(int, input().split())
    ans = set()
    for v in range(k):
        d = int(input())
        ans.add(tuple(int(v) for v in input().split()))
        print(f'{d=}')
        print(f'{ans=}')
    print(n - len(ans))


if __name__ == '__main__':
    Qb()


Failing test case input:
3 3
0
3
1
3
1
1

Expected output:
1


Actual output:
d=0
ans={(3,)}
d=1
ans={(3,)}
d=1
ans={(1,), (3,)}
1


Fixed submission (verdict: Accepted):
def Qb():
    n, k = map(int, input().split())
    ans = set()
    for v in range(k):
        d = int(input())
        ns = [int(v) for v in input().split()]
        for N in ns:
            ans.add(N)
    print(n - len(ans))


if __name__ == '__main__':
    Qb()

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = map(int, input().split(" "))
flag = [1 for i in range(N)]
for i in range(K):
  input()  
  for j in map(int, input().split(" ")):
    flag[j - 1] = 0
sum(flag)


Failing test case input:
1 -4
-2
-1 -1
2
-2

Expected output:
1


Actual output:

Fixed submission (verdict: Accepted):
N, K = map(int, input().split(" "))
flag = [1 for i in range(N)]
for i in range(K):
  input()  
  for j in map(int, input().split(" ")):
    flag[j - 1] = 0
print(sum(flag))
Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k = map(int,input().split())
N = list(range(1,n+1))
A = set()
count = 0
for i in range(k):
  d = int(input())
  Ad = list(map(int,input().split()))
  for j in range(d):
    A.add(Ad[j])

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


Failing test case input:
3 0
1
1 2
4
0

Expected output:
3


Actual output:
set()
3


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

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

print(n-count)

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)

Failing test case input:
2 0
0
0 1
8
-3

Expected output:
2


Actual output:
[1, 1]
1


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())

ANSlist = []
ANS = 0

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



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

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k=map(int,input().split())
t=[]
for i in range(k):
    t.append(i+1)
for i in range(k):
    d=int(input())
    nums = [int(e) for e in input().split()]
    for j in range(d):
        if(nums[j] in t):
            t.remove(nums[j])
print(len(t))

Failing test case input:
2 -1
1
0 0
14
-1

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
n,k=map(int,input().split())
x=[]
for i in range(k):
    hoge=int(input())
    c=[int(e) for e in input().split()]
    for j in range(hoge):
        x.append(c[j])
x=set(x)
print(n-len(x))

Problem: p02688
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n, k= map(int, input().split())
num = range(1,n)
c = set()
num = set(num)
for i in range(k):
  a = input()
  b = set(list(map(int, input().split())))
  c = b | c
num = list(num -c)
L=[str(a) for a in num]
L=" ".join(L)
print(L)

Failing test case input:
2 0
4
1 1
20
-4

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
n, k= map(int, input().split())
num = list(range(1, n+1))
c = set()
num = set(num)
for i in range(k):
  a = input()
  b = set(list(map(int, input().split())))
  c = c.union(b)
num = list(num -c)
print(len(num))
Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = tuple(map(int, input().split()))

s = set()

for k in range(K):
  input()
  s.add(tuple(map(int, input().split())))
  
print(N-len(s))

Failing test case input:
5 1
2
1 4
1
3

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
N, K = tuple(map(int, input().split()))

s = set()

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

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = map(int,input().split())
ans =list()
d = [1]*K
A =[1]*K
count = 0
for i in range(K):
  d[i] = int(input())
  A[i] = input().split()
for i in range (N+1):
  ans.append(i)
for i in range(N):
  for j in range(K):
    for k in range(d[j]):
      ans[int(A[j][k])] = 0
for i in range(N):
  if ans[i] != 0:
    count += 1
print (count)
  


Failing test case input:
12 -2
0
-1 0
0
-1

Expected output:
12


Actual output:
11


Fixed submission (verdict: Accepted):
N, K = map(int,input().split())
ans =[1]*N
d = [1]*K
A =[1]*K
count = 0
for i in range(K):
  d[i] = int(input())
  A[i] = input().split()
for i in range(K):
  for j in range(d[i]):
      ans[int(A[i][j])-1] = 0
for i in range(N):
  if ans[i] == 1:
    count += 1
print (count)

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b = map(int, input().split())
List = [list(map(int, input().split())) for i in range(2*b)]
list_all=[]
Output = 0
for i in range(b):
  list_all = list_all+List[2*i]
set_a = set(list_all)
Output = a- len(set_a)
print(Output)

Failing test case input:
5 1
2
1 4
2
1

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
a,b = map(int, input().split())
List = [list(map(int, input().split())) for i in range(2*b)]
list_all=[]
Output = 0
for i in range(b):
  list_all = list_all+List[2*i+1]
set_a = set(list_all)
Output = a- len(set_a)
print(Output)

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = map(int, input().split())
S = [False]*N

for _ in range(K):
    d = int(input())
    A = map(int, input().split())
    for i in range(d):
        S[i] = True

print(sum(1 for x in S if not x))


Failing test case input:
3 3
0
3
1
3
1
1

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())
S = [False]*N

for _ in range(K):
    d = int(input())
    A = map(int, input().split())
    for x in A:
        S[x-1] = True

print(sum(1 for x in S if not x))
Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, k = map(int, input().split())
a = [0] * (n+1)
cnt = -1
b = []

for i in range(k):
    d = int(input())
    b.append(input().split())
    

    for j in range(d):
        b[i][j] = int(b[i][j])
        a[b[i][j]] += 1
for i in range(n):
    if a[i] == 0:
        cnt += 1

print(cnt)

Failing test case input:
0 -3
0
-1 0
1
0

Expected output:
0


Actual output:
-1


Fixed submission (verdict: Accepted):
n, k = map(int, input().split())
a = [0] * n
cnt = 0
b = []

for i in range(k):
    d = int(input())
    b.append(input().split())
    

    for j in range(d):
        b[i][j] = int(b[i][j])
        a[b[i][j] - 1] += 1
for i in range(n):
    if a[i] == 0:
        cnt += 1

print(cnt)

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)

Failing test case input:
3 0
1
1 6
2
0

Expected output:
3


Actual output:
[0, 0, 0]
3


Fixed submission (verdict: Accepted):
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)

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = list(map(int, input().split()))

sunukes = [0] * N

for i in range(K):
    d = int(input())
    kashimochi = list(map(int, input().split()))
    for j in range(len(kashimochi)):
        sunukes[j-1] = 1


print(sunukes.count(0))

Failing test case input:
3 3
0
3
1
3
1
1

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
N, K = list(map(int, input().split()))

sunukes = [0] * N

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


print(sunukes.count(0))
Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k = map(int,input().split()) 
d = []
a = []
for i in range(k):
    d.append(int(input()))
    a.append(list(map(int,input().split())))


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

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



Failing test case input:
3 -3
0
-1 0
1
-2

Expected output:
3


Actual output:
[0, 0, 0]
3


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


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


print(sunuke.count(0))

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, k = map(lambda x: int(x), input().split(' '))
sunukes = [0] * int(n)
for i in range(1, k):
    d = input()
    A = map(lambda x: int(x), input().split(' '))
    for a in A:
        sunukes[a - 1] = 1
result = sunukes.count(0)
print(result)

Failing test case input:
5 1
2
1 4
2
1

Expected output:
3


Actual output:
5


Fixed submission (verdict: Accepted):
n, k = map(lambda x: int(x), input().split(' '))
sunukes = [0] * int(n)
for i in range(1, k + 1):
    d = input()
    A = map(lambda x: int(x), input().split(' '))
    for a in A:
        sunukes[a - 1] = 1
result = sunukes.count(0)
print(result)

Problem: p02688
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N, K = map(int, input().split())

l = []
i = 0

while i < 2*K:
  i += 1
  if i % 2 == 0:
    l.extend([int(x) for x in input().split()])
  else:
    pass

L = list(set(l))
print(N - len(L))

Failing test case input:
5 1
2
1 4
2
3

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())

d = []
l = []
i = 0

while i < 2*K:
  i += 1
  if i % 2 == 0:
    l.extend([int(x) for x in input().split()])
  else:
    d.append(int(input()))

L = list(set(l))
print(N - len(L))

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,K=map(int,input().split())
a=[list(map(int,input().split()))for i in range(2*K)]
sunuke=[]
if N==1:
    print(0)
    exit()
for i in range(2*K-1):
    if i%2==1:
        d=sum(a[i-1])
        for n in range(d):
            sunuke.append(a[i][n])

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

Failing test case input:
1 -8
-1
1 -1
2
-2

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
N,K=map(int,input().split())
a=[list(map(int,input().split()))for i in range(2*K)]
sunuke=[]
for i in range(2*K):
    if i%2==1:
        d=sum(a[i-1])
        for n in range(d):
            sunuke.append(a[i][n])
sunuke=set(sunuke)
print(N-len(sunuke))
Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,K = list(map(int, input('').split(' ')))
D = set()
for i in range(K):
  input('')
  [D.add(j) for j in map(int, input('').split(' '))]
print(K-len(D))

Failing test case input:
3 -1
1
1 2
4
-1

Expected output:
3


Actual output:
-1


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

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,K = map(int, input().split())
arr1=[]
arr=[]
for i in range(1, N+1):
  arr1.append(i)

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


Failing test case input:
5 1
2
1 4
2
1

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
N,K = map(int, input().split())
arr1=[]
arr=[]
for i in range(1, N+1):
  arr1.append(i)

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

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,K = map(int,input().split())
unchecked = set((range(1,N+1)))

checked = set()

for i in range(K):
  d = int(input())
  A = set(map(int,input().split()))
  checked = A | checked

print(checked)

print(len(unchecked))

Failing test case input:
0 -2
4
1 1
9
-1

Expected output:
0


Actual output:
set()
0


Fixed submission (verdict: Accepted):
N,K = map(int,input().split())
unchecked = set((range(1,N+1)))

checked = set()

for i in range(K):
  d = int(input())
  A = set(map(int,input().split()))
  checked = A | checked


unchecked -= checked
print(len(unchecked))

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = input().split(" ")

d_num = int(input())

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

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


Failing test case input:
3 3
0
3
1
3
1
3

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
N, K = input().split(" ")

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

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

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)

Failing test case input:
2 0
4
0 1
16
-4

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
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)
Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
total, kinds = map(int, input().split())

l = [False]*total
print(list)

for i in range(kinds):
    non = input()
    people = list(map(int, input().split()))
    for j in range(len(people)) :
        l[people[j]-1] = True
    
print(l.count(False))

Failing test case input:
4 -8
-2
1 0
0
0

Expected output:
4


Actual output:
<class 'list'>
4


Fixed submission (verdict: Accepted):
total, kinds = map(int, input().split())

l = [False]*total

for i in range(kinds):
    non = input()
    people = list(map(int, input().split()))
    for j in range(len(people)) :
        l[people[j]-1] = True
    
print(l.count(False))

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, k = map(int, input().split())
c = 2 * k
ls = [input().split() for _ in range(c)]
l = []
while c > 1:
    l = [j for j in ls[c-1]]
    c -= 1
print(n-len(sorted(l)))

Failing test case input:
3 3
0
3
1
3
1
1

Expected output:
1


Actual output:
2


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

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,K = map(int,input().split())
N = set([int(i) for i in range(1,N+1)])
for k in range(K):
    d = int(input())
    A = [int(i) for i in input().split()]
    a = set(A)
    N = N-a

for n in N:
    print(n)

Failing test case input:
2 -8
-2
1 -1
2
-2

Expected output:
2


Actual output:
1
2


Fixed submission (verdict: Accepted):
N,K = map(int,input().split())
N = set([int(i) for i in range(1,N+1)])
for k in range(K):
    d = int(input())
    A = [int(i) for i in input().split()]
    a = set(A)
    N = N-a
print(len(N))

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k = map(int, input().split())
hito = []
for i in range(k):
  d = int(input())
  x = list(map(int, input().split()))
  for j in range(d):
    hito.append(x[j])
a = list(set(hito))
a.sort()
ans = n
for i in range(len(hito)):
  if i+1 in a:
    ans -= 1
print(ans)

Failing test case input:
3 3
0
3
1
3
1
1

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):
n,k = map(int, input().split())
hito = []
for i in range(k):
  d = int(input())
  x = list(map(int, input().split()))
  for j in range(d):
    hito.append(x[j])
a = list(set(hito))
ans = n
for i in range(n):
  if i+1 in a:
    ans -= 1
print(ans)
Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k = map(int,input().split())

sunukes = list()
for i in range(1,k+1):
    sunukes.append(i)

sunukes = set(sunukes)

for i in range(1,k+1):
    input()
    sunukes = sunukes - set(map(int,input().split()))

print(len(sunukes))


Failing test case input:
6 -2
1
0 0
0
-1

Expected output:
6


Actual output:
0


Fixed submission (verdict: Accepted):
n,k = map(int,input().split())

sunukes = list()
for i in range(1,n+1):
    sunukes.append(i)

sunukes = set(sunukes)

for i in range(1,k+1):
    input()
    sunukes = sunukes - set(map(int,input().split()))

print(len(sunukes))

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


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

sunuke = ["{}".format(i) for i in range(1,n+1)]

for i in range(k):
    d = int(input())
    a = input().split()
    for i in a:
        if i in sunuke:
            sunuke.remove(i)
    print(sunuke)

ans = len(sunuke)

print("{}".format(ans))

Failing test case input:
5 1
2
1 4
2
3

Expected output:
3


Actual output:
['2', '3', '5']
3


Fixed submission (verdict: Accepted):


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

sunuke = ["{}".format(i) for i in range(1,n+1)]

for i in range(k):
    d = int(input())
    a = input().split()
    for i in a:
        if i in sunuke:
            sunuke.remove(i)

ans = len(sunuke)

print("{}".format(ans))

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = map(int, input().split())


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

for i in range(0,K): 
  d = int(input())
 
 
  A = list(map(int, input().split()))
  print('<A>')
  for j in A:
  
    li[j-1] = 1
sum = 0


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

Failing test case input:
5 1
2
1 4
1
3

Expected output:
3


Actual output:
<A>
3


Fixed submission (verdict: Accepted):
N, K = map(int, input().split())


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

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


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

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x=input()
x_list=x.split()
N=int(x_list[0])
K=int(x_list[1])

Z=set()

for i in range(K):
  s=int(input())
  c=input()
  c_list=c.split()
  Z.add(c.split)

print(N-len(Z))

Failing test case input:
5 1
2
1 4
1
3

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
x=input()
x_list=x.split()
N=int(x_list[0])
K=int(x_list[1])

Z=set()

for i in range(K):
  s=int(input())
  c=input()
  c_list=c.split()
  for r in c_list:
    Z.add(r)
  
print(N-len(Z))
Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k=map(int,input().split())
print(n)
print(k)
d=[[] for i in range(k)]
dlist=[]
memb=[i+1 for i in range(n)]
for i in range(k):
    d[i]=int(input())
    dklist=list(map(int,input().split()))
    dlist.append(dklist)
    print(d[i])
    print(dlist[i])
    for j in dklist:
        print(j)
        if j in memb:
            memb.remove(j)
print(len(list(memb)))

Failing test case input:
2 0
0
0 0
14
-1

Expected output:
2


Actual output:
2
0
2


Fixed submission (verdict: Accepted):
n,k=map(int,input().split())
d=[[] for i in range(k)]
dlist=[]
memb=[i+1 for i in range(n)]
for i in range(k):
    d[i]=int(input())
    dklist=list(map(int,input().split()))
    dlist.append(dklist)
    for j in dklist:
        if j in memb:
            memb.remove(j)
print(len(list(memb)))

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k =map(int,input().split())

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

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



Failing test case input:
5 1
2
1 3
1
3

Expected output:
3


Actual output:
5


Fixed submission (verdict: Accepted):
n,k =map(int,input().split())

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

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

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, k = map(int,input().split())

l = [list(map(int,input().split())) for i in range(k*2)]

ans = 0
for i in range(1,k+1):
    if l[2*i-1].count(i) == 0 :
        ans += 1

print(ans)


Failing test case input:
1 -1
1
1 2
8
-1

Expected output:
1


Actual output:
0


Fixed submission (verdict: Accepted):
n, k = map(int,input().split())

l = [list(map(int,input().split())) for i in range(k*2)]
a=[]
for i in range(1,k+1):
    a.append(l[2*i-1])
b = []
for j in a :
    for item in j :
        b.append(item)

ans = 0
for k in range(1,n+1):
    if b.count(k) == 0 :
        ans += 1

print(ans)

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = map(int, input().split())
l = [list(map(int, input().split())) for _ in range(2 * K)]

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

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

print(len(treated))

Failing test case input:
2 0
4
2 1
20
-4

Expected output:
2


Actual output:
1


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

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

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

print(len(treated))
Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
(n, k) = list(map(int, input().split()))
snk = set(range(1, n))
items = []
for i in range(k):
    d = int(input())
    alist = list(map(int, input().split()))
    for a in alist:
        if a in snk:
            snk.remove(a)
print(len(snk))

Failing test case input:
2 -1
1
1 2
7
-1

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
(n, k) = list(map(int, input().split()))
snk = set(range(1, n + 1))
items = []
for i in range(k):
    d = int(input())
    for a in list(map(int, input().split())):
        if a in snk:
            snk.remove(a)
print(len(list(snk)))

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)

Failing test case input:
3 0
2
1 3
1
3

Expected output:
3


Actual output:
[0, 0, 0, 0]
3


Fixed submission (verdict: Accepted):
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

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

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)

Failing test case input:
2 0
0
0 1
16
-3

Expected output:
2


Actual output:
[]
2


Fixed submission (verdict: Accepted):
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)

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


L, R = map(int,input().split())
dell = set(range(1, L))
answer = set(range(1, L))

for x in range(R):
  intA = int(input())
  dell = list(map(int, input().split()))
  
  answer = answer.difference(dell)

print (len(answer))

Failing test case input:
2 -1
0
1 2
7
-1

Expected output:
2


Actual output:
1


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline



L, R = map(int,input().split())
dell = set(range(1, L))
answer = set(range(1, L+1))

for x in range(R):
  intA = int(input())
  dell = list(map(int, input().split()))
  
  answer = answer.difference(dell)

print (len(answer))
Problem: p02688
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N,K=map(int,input().split())

d=[]
A=[]

U=set(range(1,N))
X=set()

for i in range(K):
    d.append(int(input()))

    S=map(int,input().split())
    for s in S:
        X.add(s)

print(len(U-X))




Failing test case input:
12 -2
0
-1 0
1
-2

Expected output:
12


Actual output:
11


Fixed submission (verdict: Accepted):
N,K=map(int,input().split())

d=[]
U=set(range(1,N+1))
X=set()

for i in range(K):
    d.append(int(input()))

    S=map(int,input().split())
    for s in S:
        X.add(s)

print(len(U-X))

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, m = map(int, input().split())
ql = [tuple(map(int, input().split())) for i in range(2*m)]
a = ql[1::2]
ans = n - len(set(a))
if ans <= 0:
    print(0)
else:
    print(ans)

Failing test case input:
5 1
2
1 4
2
3

Expected output:
3


Actual output:
4


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
ql = [tuple(map(int, input().split())) for i in range(2*m)]
a = ql[1::2]
b = []
for x in a:
    b += x
ans = n - len(set(b))
print(ans)

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, K = map(int,input().split())

sunuke = []
target = []

for i in range(K):
    d = input()
    c = list(map(int,input().split()))
    sunuke += c

sunuke = set(sunuke)

for i in range(1, K+1):
    if i not in sunuke:
        target.append(i)

print(len(target))

Failing test case input:
2 0
0
0 0
8
-1

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
N, K = map(int,input().split())

sunuke = []
target = []

for i in range(K):
    d = input()
    c = list(map(int,input().split()))
    sunuke += c


for i in range(1, N+1):
    if i not in sunuke:
        target.append(i)

print(len(target))

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):

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

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

    for j in range(len(a)):
        l[j-1] += 1

print(l.count(0))


Failing test case input:
3 3
0
3
1
3
1
1

Expected output:
1


Actual output:
2


Fixed submission (verdict: Accepted):

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

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

    for j in range(len(a)):
        l[a[j]-1] += 1

print(l.count(0))

Problem: p02688
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n,k=map(int,input().split())
x=[0]*n
d=[0]*k
sums=[]
sums2=0
sums3=0
for i in range(k):
    d[i]=int(input())
    a=[0]*d[i]
    a=list(map(int,input().split()))
    sums=sums+a
    sums2=sums2+d[i]
for j in range(sums2):
    if sums.count(j+1)==0:
        sums3=sums3+1
print(sums3)

Failing test case input:
2 0
0
0 1
16
-3

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
n,k=map(int,input().split())
x=[0]*n
d=[0]*k
sums=[]
sums2=0
sums3=0
for i in range(k):
    d[i]=int(input())
    a=[0]*d[i]
    a=list(map(int,input().split()))
    sums=sums+a
    sums2=sums2+d[i]
for j in range(n):
    if sums.count(j+1)==0:
        sums3=sums3+1
print(sums3)