qyliang/CodeNanoFix huggingface dataset:
Buggy code:
values = input()
values = [int(x) for x in values]

sum = 0

for val in values:
  sum += val
  
if val >= 22:
  print("bust")
else:
  print("win")

Fixed code:
values = input().split()
values = [int(x) for x in values]

sum = 0

for val in values:
    sum += val

if sum >= 22:
    print("bust")
else:
    print("win")
Buggy code:
num_list = [int(item) for item in input().split()]

if sum(num_list) >= 22:
    print('burst')
else:
    print('win')

Fixed code:
num_list = [int(item) for item in input().split()]

if sum(num_list) >= 22:
    print('bust')
else:
    print('win')
Buggy code:
a,b,c=map(int,input().split())

if a+b+c<=21:
  print(win)
else:
  print(bust)

Fixed code:
a ,b ,c= map(int,input().split())
if a+b+c<=21:
  	print('win')
else:
	print('bust')
Buggy code:
a, b ,c= map(int, input().split())
if a+b+c > 22 
print("bust")
else:
  print("win")

Fixed code:
a, b ,c= map(int, input().split())
if a+b+c >= 22 :
  print("bust")
else:
  print("win")
Buggy code:
A: a = [int(x) for x in input().split(" ")]
print("bust") if sum(a) >= 22 else print("win")

Fixed code:
A = [int(x) for x in input().split()]

if sum(A) >= 22:
    print("bust")
else:
    print("win")
Buggy code:
a,b,c = map(int,input().split())
if a+b+c = 22:
		print("bust")
		
else:
		print("win")

Fixed code:
a,b,c = map(int,input().split())
if (a + b + c) >= 22:
    print('bust')
else:
    print('win')
Buggy code:
A1,A2,A3 = int(input().split(""))
result = A1+A2+A3
if result>= 22:
  print("bust")
else:
  print("win")

Fixed code:
A1,A2,A3 = map(int, input().split())

if A1 + A2 + A3 >= 22:
    print("bust")
else:
    print("win")
Buggy code:
inp = input()
inpLi = inp.split("")
A1 = int(inpLi[0])
A2 = int(inpLi[1])
A3 = int(inpLi[2])
result = A1+A2+A3
if result >= 22:
  print("bust")
else:
  print("win")


Fixed code:
inp = input()
inpLi = inp.split()
A1 = int(inpLi[0])
A2 = int(inpLi[1])
A3 = int(inpLi[2])

if (A1+A2+A3) >= 22:
  print("bust")
else:
  print("win")
Buggy code:
a1, a2, a3 = list(map(int, input().split()))

print(a1+a2+a3)

if a1+a2+a3 == 22:
    print("bust")
else:
    print("win")

Fixed code:
a1, a2, a3 = map(int, input().split())
 
if a1+a2+a3 >= 22:
    print("bust")
else:
    print("win")
Buggy code:
a,s,d=map(int,input().split())
print("bust" if sum([a,s,d])<=22 else "win")

Fixed code:
a,s,d=map(int,input().split())
print("bust" if sum([a,s,d])>=22 else "win")
Buggy code:
a,b,c=map(int,input().split())
if a+b+c<22:
    print('bust')
else: 
    print('win')


Fixed code:
a, b, c = map(int, input().split())
if a+b+c>=22:
  print('bust')
else:
  print('win')
Buggy code:
a1, a2, a3 = map(int, input().split())

total = sum(a1, a2, a3)

if total >= 22:
	print('bust')
else:
	print('win')

Fixed code:
a1, a2, a3 = map(int, input().split())

total = a1 + a2 + a3

if total >= 22:
	print('bust')
else:
	print('win')
Buggy code:
A = list(map(int,input().split())
a = sum(A)
if a >= 22:
    print("bust")
else:
    print("win")

Fixed code:
A=sum(list(map(int, input().split())))
if A>=22:
	print('bust')
else:
	print('win')
Buggy code:
x,y,z = map(int,input())
if(x+y+z>=22):
    print("bust")
else:
  print("win")

Fixed code:
x,y,z = map(int,input().split())
if(x+y+z>=22):
    print("bust")
else:
  print("win")
Buggy code:
print("bust") if sum(map(int, input().split()))>21 else ("win")

Fixed code:
print("bust") if sum(map(int, input().split()))>21 else print("win")
Buggy code:
# A - Blackjack

a, b, c = map(int, input().split())
s = a + b + c

if s > 22:
    print("bust")
else:
    print("win")


Fixed code:
# A - Blackjack

a, b, c = map(int, input().split())
s = a + b + c

if s > 21:
    print("bust")
else:
    print("win")
Buggy code:
a1, a2, a3 = map(int, input().split())
return 'bust' if a1+a2+a3 >= 22 else 'win'

Fixed code:
a1, a2, a3 = map(int, input().split())
print('bust' if a1+a2+a3 >= 22 else 'win')
Buggy code:
a, b, c = map(int, input().split()) 
d = a + b + c  
if d < 21:
  print("win")
else:
  print("bust") 

Fixed code:
a, b, c = map(int, input().split()) 
d = a + b + c  
if d <= 21:
  print("win")
else:
  print("bust")
Buggy code:
input1 = input()
A1 = int(input1.split([0]))
A2 = int(input1.split([1]))
A3 = int(input1.split([2]))

if A1+A2+A3 > 21:
    print("bust")
else:
    print("win")

Fixed code:
input1 = input()
A1 = int(input1.split()[0])
A2 = int(input1.split()[1])
A3 = int(input1.split()[2])

if A1+A2+A3 > 21:
    print("bust")
else:
    print("win")
Buggy code:
A1, A2, A3 = map(int, input.split())
if A1 + A2 + A3 >= 22:
    print("bust")
else:
    print("win")

Fixed code:
A1, A2, A3 = map(int, input().split())
x = A1 + A2 + A3
if x >= 22:
    print("bust")
else:
    print("win")
Buggy code:
a,b,c = map(int, input().split)
if a+b+c>=22:
    print("bust")
else:
    print("win")

Fixed code:
a,b,c=map(int,input().split())
if a+b+c>=22:
  print('bust')
else:
  print('win')
Buggy code:
a,b,c = map(int,input().sprit())
s = a + b + c
if s > 21:
  print("bust")
else:
  print("win")

Fixed code:
a,b,c = map(int,input().split())
s = a + b + c
if s > 21:
  print("bust")
else:
  print("win")
Buggy code:
a = list(map(int, input().split()))

sum_ = sum(a)

if sum_ <= 21:
    print(win)
else:
    print(bust)


Fixed code:
a = list(map(int, input().split()))

sum_ = sum(a)

if sum_ <= 21:
    print('win')
else:
    print('bust')
Buggy code:
a = input().split()
a2 = 0
for i in range(len(a)):
    a2 += int(a[i])
print(a2)
if a2 >= bust:
    print('win')
elif a2 <= 21:
    print('win')

Fixed code:
a = input().split()
a2 = 0
for i in range(len(a)):
    a2 += int(a[i])
#print(a2)
if a2 >= 22:
    print('bust')
elif a2 <= 21:
    print('win')
Buggy code:
A,B,C=map(int,input().split())
if (A+B+C)>21:
  print("Bust")
else:
  print("win")

Fixed code:
A,B,C=map(int,input().split())
if (A+B+C)>21:
  print("bust")
else:
  print("win")
Buggy code:
import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


def main():
    a, b, c = map(int, input().split())
    print('bust' if sum([a,b,c]) else 'win')

if __name__ == '__main__':
    main()


Fixed code:
import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


def main():
    a, b, c = map(int, input().split())
    print('bust' if sum([a,b,c]) >= 22 else 'win')

if __name__ == '__main__':
    main()
Buggy code:
A1, A2, A3 = map(int, input().split())

if A1+A2+A3 => 22:
    print('bust')
else:
    print('win')

Fixed code:
A1, A2, A3 = map(int, input().split())

if A1 + A2 + A3 > 21:
    print('bust')
else:
    print('win')
Buggy code:
a1,a2,a3 = map(int, input().split())

if a1 + a2 + a3 <= 21:
    print("win")
else:
    print("burst")

Fixed code:
a1,a2,a3 = map(int, input().split())

if a1 + a2 + a3 <= 21:
    print("win")
else:
    print("bust")
Buggy code:
a, b, c = map(int, input())

a += b 
a += c

if a > 22:
    print("bust")
else:
    print("win")

Fixed code:
a, b, c = map(int, input().split())
if a + b + c >= 22:
    print("bust")
else:
    print("win")
Buggy code:
a,b,c = map(int,input().split())
if a+b+c > 21:
    print ('burst')
else:
    print ('win')

Fixed code:
a, b, c = map(int, input().split())
if (a + b + c) > 21:
  print("bust")
else:
  print("win")
Buggy code:
A0,A1,A2 = (int(x) for x in input().split())

if A0+A1+A2 > 21:
    print("lose")
else:
    print("win")

Fixed code:
A0,A1,A2 = (int(x) for x in input().split())

if A0+A1+A2 > 21:
    print("bust")
else:
    print("win")
Buggy code:
A1, A2, A3 = map(int, input().split())
if (A1+A2+A3) > 22:
    print("bust")
else:
    print("win")

Fixed code:
A1, A2, A3 = map(int, input().split())
if (A1+A2+A3) > 21:
    print("bust")
else:
    print("win")
Buggy code:
l = input()
a, b, c = map(int, l.split())

a += b 
a += c

if a > 22:
    print("bust")
else:
    print("win")

Fixed code:
l = input()
a, b, c = map(int, l.split())

sum=0
sum+=a
sum+=b
sum+=c

if sum >= 22:
    print("bust")
else:
    print("win")
Buggy code:
#!/usr/bin/env python3
import sys

a1, a2, a3 = map(int, sys.stdin.readline().split())
if a1+a2+a3>=22:
  print('bust')
  return
print('win')

Fixed code:
#!/usr/bin/env python3
import sys

a1, a2, a3 = map(int, sys.stdin.readline().split())
if a1+a2+a3>=22:
  print('bust')
else:
  print('win')
Buggy code:
a1, a2, a3 = int(input().split())

if a1+a2+a3 >= 22:
    print("bust")
else:
    print("win")


Fixed code:
a1,a2,a3=map(int,input().split())
if a1+a2+a3>=22:
  print('bust')
else:
  print('win')
Buggy code:
# ABC 147 A

A1, A2, A3 = map(int, input().split())

if A1 + A2 + A3 >= 22:
    print('burst')
else:
    print('win')

Fixed code:
# ABC 147 A

A1, A2, A3 = map(int, input().split())

if A1 + A2 + A3 >= 22:
    print('bust')
else:
    print('win')
Buggy code:
A = list(map(int, input().split()))

print("win" if sum(A) >= 22 else "bust")

Fixed code:
A = list(map(int, input().split()))

print("bust" if sum(A) >= 22 else "win")
Buggy code:
A1,A2,A3=map(int,input().split())


if A1+A2+A3<=22:
  print("bust")
else:
  print("win")

Fixed code:
A1,A2,A3=map(int,input().split())


if A1+A2+A3>=22:
  print("bust")
else:
  print("win")
Buggy code:
def main():
	a,b,c = map(int,input().split())
	if a + b + c >= 22:
    	print('bust')
	else:
    	print('win')
main()

Fixed code:
a, b, c = map(int, input().split())

if a+b+c >= 22:
  print("bust")
else:
  print("win")
Buggy code:
a = list(map(int, input().split()))
if sum(a) >= 22:
  print('bust')
else:
  printt('win')

Fixed code:
a = list(map(int, input().split()))
if sum(a) >= 22:
  print("bust")
else:
  print("win")
Buggy code:
a,b,c = map(int,input())
if a+b+c <= 21:
  print("win")
else:
  print("bust")

Fixed code:
a,b,c = map(int,input().split())
if a+b+c <= 21:
  print("win")
else:
  print("bust")
Buggy code:
a = list(map(int,input().split()))
if sum(list) >= 22:
  print('bust')
else:
  print('win')

Fixed code:
A = list(map(int,input().split()))

if sum(A) >= 22:
    print("bust")
else:
    print("win")
Buggy code:
a , b, c = map(int, input().split())

if a + b + c < 22:
  	print('win')
else:
  	print('burst')

Fixed code:
a,b,c = map(int,input().split())
if a + b + c < 22:
    print("win")
else:
    print("bust")
Buggy code:
a = input()
a = a.split(" ")
sum = 0
for num in a:
    sum += int(num)
if sum >= 22:
    print("bust")
else:
    print(sum)

Fixed code:
a = input()
a = a.split(" ")
sum = 0
for num in a:
    sum += int(num)
if sum >= 22:
    print("bust")
else:
    print("win")
Buggy code:
fastio():
    import sys
    from io import StringIO 
    from atexit import register
    global input
    sys.stdin = StringIO(sys.stdin.read())
    input = lambda : sys.stdin.readline().rstrip('\r\n')
    sys.stdout = StringIO()
    register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

INF = 10**20
MOD = 10**9 + 7
I = lambda:list(map(int,input().split()))
from collections import defaultdict as dd
from math import gcd

a, b, c = I()
if a + b + c >= 22:
    print('bust')
else:
    print('win')


Fixed code:
def fastio():
    import sys
    from io import StringIO 
    from atexit import register
    global input
    sys.stdin = StringIO(sys.stdin.read())
    input = lambda : sys.stdin.readline().rstrip('\r\n')
    sys.stdout = StringIO()
    register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

INF = 10**20
MOD = 10**9 + 7
I = lambda:list(map(int,input().split()))
from collections import defaultdict as dd

a, b, c = I()
if a + b + c >= 22:
    print('bust')
else:
    print('win')
Buggy code:
A=list(map(int(input.split())))
if A[0]+A[1]+A[2]>=22:
  print("bust")
else:
  print("win")

Fixed code:
A=list(map(int,input().split()))
if A[0]+A[1]+A[2]>=22:
  print("bust")
else:
  print("win")
Buggy code:
a,b,c=int(input.split())
if a+b+c>=22:
  print("bust")
else:
  print("win")

Fixed code:
a, b, c = map(int, input().split())

if a+b+c>=22:
    print("bust")
else:
    print("win")
Buggy code:
a1,a2,a3=int(input(),split())
if a1+a2+a3>=22 :
    print('bust')
elif a1+a2+a3<22 :
    print('win')

Fixed code:
a1,a2,a3=map(int,input().split())
if a1+a2+a3>=22 :
    print('bust')
elif a1+a2+a3<22 :
    print('win')
Buggy code:
import sys
input = sys.stdin.readline

A=list(map(int,input().split()))

if sum(A)>=22:
   print("burst")
else:
   print("win")

Fixed code:
import sys
input = sys.stdin.readline


A=list(map(int,input().split()))
 
if sum(A)>=22:
   print("bust")
else:
   print("win")
Buggy code:
A123 = sum(list(map(int, input().split())))
print('bust' if A123 > 21, else 'win')

Fixed code:
A123 = sum(list(map(int, input().split())))
print('bust' if A123 > 21 else 'win')
Buggy code:
a = list(map(int,input().split())

if sum(a) =>22:
    print(bust)
else:
    print(win)

Fixed code:
a = list(map(int,input().split()))

if sum(a) >= 22:
    print("bust")
else:
    print("win")
Buggy code:
A1,A2,A3=map(int,input().split())
if A1 + A2 + A3 > 23:
	print("bust")
else:
	print("win")


Fixed code:
A1,A2,A3=map(int,input().split())
if A1 + A2 + A3 > 21:
	print("bust")
else:
	print("win")
Buggy code:
s = list(map(int, input().split()))
S=s[0]+s[1]+s[2]
if S <= 21:
  print('win')
else:
  print('burst')

Fixed code:
s = list(map(int, input().split()))
S=s[0]+s[1]+s[2]
if S <= 21:
  print('win')
else:
  print('bust')
Buggy code:
a,b,c=map(int,input().split())

if a+b+c >= 22:
  print(bust)
else:
  print(win)


Fixed code:
a,b,c=map(int, input().split())
print("bust" if a+b+c >=22 else "win")
Buggy code:
W,E,R = map(int,input().split())
if W + E + R >= 22:
    ans("bust")
else :
    ans("win")
print(ans)

Fixed code:
W,E,R = map(int,input().split())
if W + E + R >= 22:
    ans="bust"
else :
    ans="win"
print(ans)
Buggy code:
a,b,c= map(int, input().split())
print("bust" if a+b+c>21 else "Win")

Fixed code:
a,b,c= map(int, input().split())
print("bust" if a+b+c>21 else "win")
Buggy code:
A1,A2,A3=map(int,input().split)

if A1+A2+A3>=22:
    print("bust")
else:
    print("win")

Fixed code:
A1,A2,A3=map(int,input().split())

if A1+A2+A3>=22:
    print("bust")
else:
    print("win")
Buggy code:
a1, a2, a3 = map(int, input().split())
print('burst' if a1 + a2 + a3 >= 22 else 'win')


Fixed code:
a1, a2, a3 = map(int, input().split())
print('bust' if a1 + a2 + a3 >= 22 else 'win')
Buggy code:
as = map(int, input().split())

if as.sum() <= 21:
  print("win")
else:
  print("bust")

Fixed code:
as_ = map(int, input().split())
 
if sum(as_) <= 21:
  print("win")
else:
  print("bust")
Buggy code:
one,two,three = map(int,input().split())
if one + two + three <=22:
  print("win")
else:
  print("bust")

Fixed code:
one, two, three = map(int, input().split())

if one + two + three <= 21:
    print("win")
else:
    print("bust")
Buggy code:
a, b, c = map(int, input().split())

if a + b + c <= 21:
    print("win")
else:
    print("burst")

Fixed code:
a, b, c = map(int, input().split())

if a + b + c <= 21:
    print("win")
else:
    print("bust")
Buggy code:
A = list(map(int, input().split()))

if sum(A) >= 22:
    print('bust')
else:
    print('Yes')


Fixed code:
A = list(map(int, input().split()))

if sum(A) >= 22:
    print('bust')
else:
    print('win')
Buggy code:
    in_prise = list(map(int,input().split()))
    if sum(in_prise) <= 21:
        print("win")
    else:
        print("bust")


Fixed code:
s=sum(list(map(int,input().split())))
if s<=21:
  print("win")
else:
  print("bust")
Buggy code:
import numpy as np
N = int(input())
data_xy = []
for i in range(N):
    A = int(input())
    xy = []
    for i in range(A):
        [x,y] = list(map(int,input().split()))
        xy.append([x-1, y])
    data_xy.append(xy)
data_xy = np.array(data_xy)
p_list = np.zeros(N)
ans = 0
for i in range(2**N):
    for j in range(N):
        if (i>>j) & 1 == 1:
            p_list[j] = 1
    flag = True
    for j in range(N):
        if p_list[j] == 1:
            for k in range(len(data_xy[j])):
                x = data_xy[j][k][0]
                y = data_xy[j][k][1]
                if p_list[x] != y:
                    flag = False
    if flag == True:
        ans = max(sum(p_list),ans)
print(ans)

Fixed code:
import numpy as np
N = int(input())
data_xy = []
for i in range(N):
    A = int(input())
    xy = []
    for i in range(A):
        [x,y] = list(map(int,input().split()))
        xy.append([x-1, y])
    data_xy.append(xy)
ans = 0
for i in range(2**N):
    p_list = [0]*N
    for j in range(N):
        if (i>>j) & 1 == 1:
            p_list[j] = 1
    flag = True
    for j in range(N):
        if p_list[j] == 1:
            for k in range(len(data_xy[j])):
                x = data_xy[j][k][0]
                y = data_xy[j][k][1]
                if p_list[x] != y:
                    flag = False
    if flag == True:
        ans = max(sum(p_list),ans)
print(ans)
Buggy code:
N = int(input())
A = []
L = []
for i in range(N):
  a = int(input())
  A.append(a)
  tmp = []
  for i in range(a):
    tmp.append(list(map(int, input().split())))
  L.append(tmp)

ans = 0
for i in range(1, 2**N):
  tmp = [-1] * N
  flag = True
  d = []
  for j in range(N):
    if (i>>j) & 1:
      tmp[j] = 1
      l = L[j]
      for k in range(len(L[j])):
        p, t = l[k][0], l[k][1]
        if tmp[p-1] < 0:
          tmp[p-1] = t
        elif tmp[p-1] != t:
          flag = False
          break
      if flag == False:
        break
    else:
      tmp[j] = 0
      d.append(j)
  for m in range(len(d)):
    n = d[m]
    if tmp[n] == 1:
      flag = False
      break
  if flag:
    ans = max(ans, tmp.count(1))
print(ans)

Fixed code:
N = int(input())
A = []
L = []
for i in range(N):
  a = int(input())
  A.append(a)
  tmp = []
  for i in range(a):
    tmp.append(list(map(int, input().split())))
  L.append(tmp)

ans = 0
for i in range(1, 2**N):
  tmp = [-1] * N
  flag = True
  d = []
  for j in range(N):
    if (i>>j) & 1:
      if tmp[j] == 0:
        flag = False
        break
      tmp[j] = 1
      l = L[j]
      for k in range(len(L[j])):
        p, t = l[k][0], l[k][1]
        if tmp[p-1] < 0:
          tmp[p-1] = t
        elif tmp[p-1] != t:
          flag = False
          break
      if flag == False:
        break
    else:
      d.append(j)
  for m in range(len(d)):
    n = d[m]
    if tmp[n] == 1:
      flag = False
      break
  if flag:
    ans = max(ans, tmp.count(1))
print(ans)
Buggy code:
n=int(input())
a=[[] for i in range(n)]
for i in range(n):
    c=int(input())
    for j in range(c):
        x,y = map(int, input().split())
        a[i].append([x,y])
from itertools import permutations, combinations,combinations_with_replacement,product
ans3 = 0
for ans  in product([0,1],repeat=n):
    flag = True
    for i, check in enumerate(a):
        if ans[i]==0:
            continue
        
        for x, y in check:
            if y^ans[i] != ans[x-1]:
                flag = False
                break
    if flag:
        ans3=max(sum(ans), ans3)
print(ans3)


Fixed code:
n=int(input())
a=[[] for i in range(n)]
for i in range(n):
    c=int(input())
    for j in range(c):
        x,y = map(int, input().split())
        a[i].append([x,y])
from itertools import permutations, combinations,combinations_with_replacement,product
ans3 = 0
for ans  in product([0,1],repeat=n):
    flag = True
    for i, check in enumerate(a):
        if ans[i]==0:
            continue
        
        for x, y in check:
            if y != ans[x-1]:
                flag = False
                break
    if flag:
        ans3=max(sum(ans), ans3)
print(ans3)
Buggy code:
#!/usr/bin/env python3]
import sys
sys.setrecursionlimit(2000)

N = int(input())
syogen = []
for i in range(N):
    N_a = int(input())
    syogen_a = []
    for _ in range(N_a):
        x, y = input().split()
        syogen_a.append([int(x) - 1, int(y)])
    syogen.append(syogen_a)

max_syojiki = 0


def syojiki(i):
    for x, y in syogen[i]:
        if y == 1:
            syojiki_list.append(x)
            if len(syojiki_list) >= N:
                return
            syojiki(x)


def check_syojiki(syojikitati):
    d = {}
    for s in syojikitati:
        for x, y in syogen[s]:
            if not d.get(x) is None:
                if d[x] != y:
                    return False
            else:
                d[x] = y
    return True


for i in range(2 ** N):
    d = {}
    num_syojiki = 0
    syojiki_list = []
    for j in range(N):
        if (i >> j) & 1:
            syojiki_list.append(j)
            syojiki(j)
    syojiki_list = list(set(syojiki_list))
    if check_syojiki(syojiki_list):
        max_syojiki = max(max_syojiki, len(syojiki_list))

print(max_syojiki)


Fixed code:
#!/usr/bin/env python3]
import sys
sys.setrecursionlimit(2000)

N = int(input())
syogen = []
for i in range(N):
    N_a = int(input())
    syogen_a = []
    for _ in range(N_a):
        x, y = input().split()
        syogen_a.append([int(x) - 1, int(y)])
    syogen.append(syogen_a)


def syojiki(i):
    for x, y in syogen[i]:
        if y == 1:
            syojiki_list.append(x)
            if len(syojiki_list) >= N:
                return
            syojiki(x)


def check_syojiki(syojikitati):
    d = {}
    for s in range(N):
        if s in syojikitati:
            d[s] = 1
        else:
            d[s] = 0

    for s in syojikitati:
        d[s] = 1
        for x, y in syogen[s]:
            if d[x] != y:
                return False
    return True


max_syojiki = 0

for i in range(2 ** N):
    d = {}
    syojiki_list = []
    for j in range(N):
        if (i >> j) & 1:
            syojiki_list.append(j)
            syojiki(j)
    syojiki_list = list(set(syojiki_list))
    if check_syojiki(syojiki_list):
        max_syojiki = max(max_syojiki, len(syojiki_list))

print(max_syojiki)
Buggy code:
n=int(input())
X=[]
Y=[]
A=[0]*n
for i in range(n):
  A[i]=int(input())
  a=A[i]
  x=[0]*a
  y=[0]*a
  for j in range(a):
    x[j],y[j]=[int(s) for s in input().split()]
  X.append(x)
  Y.append(y)
  
s=0
for i in range(2**n):
  c=0
  d=0
  B=[0]*n
  for j in range(n):
    if((i >> j) & 1):
      c=c+1
      B[j]=1
  for k in range(n):
    if B[k]==1:
      for j in range(A[k]):
        if Y[k][j]!=B[X[k][j]]:
          d=-1
          break
    if d<0:
      break
  if s<c:
    s=c
      
      
print(s)         




Fixed code:
n=int(input())
X=[]
Y=[]
A=[0]*n
for i in range(n):
  A[i]=int(input())
  a=A[i]
  x=[0]*a
  y=[0]*a
  for j in range(a):
    x[j],y[j]=[int(s) for s in input().split()]
  X.append(x)
  Y.append(y)
  
s=0
for i in range(2**n):
  c=0
  d=0
  B=[0]*n
  for j in range(n):
    if((i >> j) & 1):
      c=c+1
      B[j]=1
  for k in range(n):
    if B[k]==1:
      for j in range(A[k]):
        if Y[k][j]!=B[X[k][j]-1]:
          d=-1
          break
    if d<0:
      break
  if s<c and d==0:
    s=c
      
      
print(s)
Buggy code:
import sys
input = sys.stdin.readline

n = int(input())

from collections import defaultdict
d = defaultdict(list)

for i in range(n):
    a = int(input())
    for _ in range(a):
        x, y = [int(x) for x in input().split()]
        d[i].append((x - 1, y))
ans = 0
for k in range(2**n):
    res = 0
    j = bin(k)[2:].zfill(n)
    for i in range(n):
        if j[i] == "0":
            continue
        flag = 1
        for x, y in d[i]:
            if int(j[x]) != int(y):
                flag = 0
                break
        res += 1
    if flag:
        ans = max(ans, res)
print(ans)

Fixed code:
import sys
input = sys.stdin.readline

n = int(input())

from collections import defaultdict
d = defaultdict(list)

for i in range(n):
    a = int(input())
    for _ in range(a):
        x, y = [int(x) for x in input().split()]
        d[i].append((x - 1, y))
ans = 0
for k in range(2**n):
    res = 0
    j = bin(k)[2:].zfill(n)
    flag = 1
    for i in range(n):
        if j[i] == "0":
            continue
        for x, y in d[i]:
            if int(j[x]) != int(y):
                flag = 0
                break
        res += 1
    if flag:
        ans = max(ans, res)
print(ans)