ZhenlongDai/ACPR huggingface dataset:
Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
flag = 0
for i in range(n):
    n1, n2 = map(int, input().split())
    if n1 == n2:
        flag += 1
        if flag == 3:
            print("Yse")
            break
    else:
        flag = 0
print("No")

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

Expected output:
Yes

Actual output:
Yse
No


Fixed submission (verdict: Accepted):
n = int(input())
flag = 0
ans = 0
for i in range(n):
    n1, n2 = map(int, input().split())
    if n1 == n2:
        flag += 1
        ans = max(ans, flag)
    else:
        flag = 0
if ans >= 3:
    print("Yes")
else:
    print("No")

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def run(n, _in_list):
    
    is_doublet_count = 0
    for x in _in_list:
        _in = list(x)
        if _in[0] ==_in[1]:
            is_doublet_count += 1
        else:
            is_doublet_count = 0
    
    print('Yes' if is_doublet_count >= 3 else 'No')
    




if __name__ == '__main__':
    n = int(input())
    _in_list = [map(int, input().split()) for _ in range(n)]
    run(n, _in_list)

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

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
def run(n, _in_list):
    
    is_doublet_count = 0
    for x in _in_list:
        if is_doublet_count == 3:
            break
        _in = list(x)
        if _in[0] ==_in[1]:
            is_doublet_count += 1
        else:
            is_doublet_count = 0
    
    print('Yes' if is_doublet_count >= 3 else 'No')
    




if __name__ == '__main__':
    n = int(input())
    _in_list = [map(int, input().split()) for _ in range(n)]
    run(n, _in_list)

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys

n = int(input())
deme = [input().split() for i in range(n)]



toki = 0

for i in range(n):
  if deme[i][0] == deme[i][1]:
    toki += 1
    if toki >= 3:
      print("YES")
      sys.exit(0)
    
  else:toki = 0

print("NO")

    

Failing test case input:
6
-3 1
1 3
0 1
4 12
2 0
0 2

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
import sys

n = int(input())
deme = [input().split() for i in range(n)]



toki = 0

for i in range(n):
  if deme[i][0] == deme[i][1]:
    toki += 1
    if toki >= 3:
      print("Yes")
      sys.exit(0)
    
  else:toki = 0

print("No")

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
flg = False
count = 0
for i in range(N):
  D1,D2 =  map(int, input().split())

  if D1 == D2:
    count += 1
    if count >= 3:
      flg = True
      break
    else:
      count = 0

if flg:
  print('Yes')
else:
  print('No')

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

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N = int(input())
flg = False
count = 0
for i in range(N):
  D1,D2 =  map(int, input().split())

  if D1 == D2:
    count += 1
    if count >= 3:
      flg = True
  else:
    count = 0

if flg:
  print('Yes')
else:
  print('No')
Problem: p02547
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
N = int(input())
x = [0] * N
y = [0] * N
for i in range(N):
    x[i], y[i] = map(int, input().split())

ans=0    
for i in range(N):
    if x[i]==y[i]:
        ans+=1

if ans>=3:
    print('Yes')
else:
    print('No')

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

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
N = int(input())
x = [0] * N
y = [0] * N
for i in range(N):
    x[i], y[i] = map(int, input().split())

ansl=[]
ans=0
for i in range(N):
    if x[i]==y[i]:
        ans+=1
    else:
        ansl.append(ans)
        ans=0
ansl.append(ans)
if max(ansl)>=3:
    print('Yes')
else:
    print('No')

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
L=0
for i in range(N):
    K=set(map(int,input().split()))
    if len(K)==1:
        L+=1
    else:
        L=0
if L>=3:
    print('Yes')
else:
    print('No')


Failing test case input:
6
1 0
2 2
3 3
4 4
5 0
10 10

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
N=int(input())
L=0
for i in range(N):
    K=set(map(int,input().split()))
    if len(K)==1:
        L+=1
        if L==3:
            print('Yes')
            break
    else:
        L=0
if L<3:
    print('No')

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())

count = 0

for i in range(N):
    k, t = map(int, input().split())
    if count == 3:
      print ( "Yes" )
     
      break
      
    if not k == t:
        count *= 0
    if k == t:
       count += 1 
if count == 3:
        print ("Yes")
else:
  print ("No")



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

Expected output:
Yes


Actual output:
Yes
Yes


Fixed submission (verdict: Accepted):
N = int(input())

count = 0

for i in range(N):
    k, t = map(int, input().split())
      
    if not k == t:
        count *= 0
    if k == t:
       count += 1 
    if count == 3:
      print ( "Yes" )
     
      break
        
if count == 3:
        print ("")
else:
  print ("No")

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
d = [input().split(" ") for _ in range(n)]

f = False
for i in range(n-2):
    if d[i][0] == d[i][1] and not f :
        print(d[i+1], d[i+2])
        if d[i+1][0] == d[i+1][1] and d[i+2][0] == d[i+2][1]:
            f = True
if f:
    print("Yes")
else:
    print("No")

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

Expected output:
No


Actual output:
['2', '0'] ['8', '4']
No


Fixed submission (verdict: Accepted):
n = int(input())
d = [input().split(" ") for _ in range(n)]

f = False
for i in range(n-2):
    if d[i][0] == d[i][1] and not f :
        if d[i+1][0] == d[i+1][1] and d[i+2][0] == d[i+2][1]:
            f = True
if f:
    print("Yes")
else:
    print("No")
Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())  
num_list = []
for i in range(n):
    num_list.append(list(map(int,input().split())))

ans = []
for i in range(n):
  a = num_list[i]
  a1= a[0]
  a2 = a[1]
  if a1 == a2:
    ans.append(1)
    if i > 1 and ans[i-2] == 1 and ans[i-1] == 1 and ans[i] == 1:
      print('Yes')
      break
  else:
    ans.append(0)
if len(ans) == n and n != i+1 :
  print('No')

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

Expected output:
No


Actual output:

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

ans = []
for i in range(n):
  a = num_list[i]
  a1= a[0]
  a2 = a[1]
  if a1 == a2:
    ans.append(1)
    if i > 1 and ans[i-2] == 1 and ans[i-1] == 1 and ans[i] == 1:
      print('Yes')
      break
  else:
    ans.append(0)
if 0 in ans and len(ans) == n :
  print('No')

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())

mulArr = []
for _ in range(N):
  arr = list(map(int, input().split(" ")))
  mulArr.append(arr)
print(mulArr)

result = 0
for i in range(0, len(mulArr) - 2):
  print(i)
  if mulArr[i][0] == mulArr[i][1] and mulArr[i + 1][0] == mulArr[i + 1][1] and mulArr[i + 2][0] == mulArr[i + 2][1]:
    result += 1

print(result)
if result != 0:
  print("Yes")
else:
  print("No")


Failing test case input:
5
1 -2
8 4
5 0
6 1
4 3

Expected output:
No


Actual output:
[[1, -2], [8, 4], [5, 0], [6, 1], [4, 3]]
0
1
2
0
No


Fixed submission (verdict: Accepted):
N = int(input())

mulArr = []
for _ in range(N):
  arr = list(map(int, input().split(" ")))
  mulArr.append(arr)


result = 0
for i in range(0, len(mulArr) - 2):
  
  if mulArr[i][0] == mulArr[i][1] and mulArr[i + 1][0] == mulArr[i + 1][1] and mulArr[i + 2][0] == mulArr[i + 2][1]:
    result += 1


if result != 0:
  print("Yes")
else:
  print("No")

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
flag= True
count = 0
for i in range(n):
  a,b = list(map(int, input().split()))
  if a==b:
    count += 1
  else:
    count= 0
  if count==3:
    flag = True
if flag:
  print("yes")
else:
  print("no")

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

Expected output:
No


Actual output:
yes


Fixed submission (verdict: Accepted):
n = int(input())
flag= False
count = 0
for i in range(n):
  a,b = list(map(int, input().split()))
  if a==b:
    count += 1
  else:
    count= 0
  if count==3:
    flag = True
if flag:
  print("Yes")
else:
  print("No")
Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
l=[]
n=int(input())
for _ in range(n):
  a=list(map(int,input().split()))
  l.append(a)

flag=0
for i in range(1,n-1):
  if l[i-1][0]==l[i-1][1] and  l[i][0]==l[i][1] and  l[i+1][0]==l[i+1][1]:
    flag=1
    break

if flag==1:
  print("YES")
else:
  print("NO")

Failing test case input:
6
-2 1
1 3
0 1
4 7
2 0
8 3

Expected output:
No


Actual output:
NO


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

flag=0
for i in range(1,n-1):
  if l[i-1][0]==l[i-1][1] and  l[i][0]==l[i][1] and  l[i+1][0]==l[i+1][1]:
    flag=1
    break

if flag==1:
  print("Yes")
else:
  print("No")

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

last = 0
for item in l:
  if last == 0 and l[0] == l[1]:
    last = 1
  if last == 1 and l[0] == l[1]:
    last == 2
  if last == 2 and l[0] == l[1]:
    last == 3
    break
  last == 0

if last == 3:
  print('Yes')
else:
  print('No')

Failing test case input:
6
1 0
2 2
3 3
4 4
5 0
10 10

Expected output:
Yes


Actual output:
No


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

last = 0
for item in l:
  if last == 0 and item[0] == item[1]:
    last = 1
    continue
  elif last == 1 and item[0] == item[1]:
    last = 2
    continue
  elif last == 2 and item[0] == item[1]:
    last = 3
    break
  else:
    last = 0

if last == 3:
  print('Yes')
else:
  print('No')

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
xy = [map(int, input().split()) for _ in range(N)]
x, y = [list(i) for i in zip(*xy)]

count = 0

for i in range(N):
  if x[i] == y[i]:
    count += 1
    if count == 3:
      print("Yes")
    
  else:
    count = 0
    
  
print("No")

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

Expected output:
Yes

Actual output:
Yes
No


Fixed submission (verdict: Accepted):
N = int(input())
xy = [map(int, input().split()) for _ in range(N)]
x, y = [list(i) for i in zip(*xy)]

count = 0

for i in range(N):
  if x[i] == y[i]:
    count += 1
    if count == 3:
      print("Yes")
      exit()
    
  else:
    count = 0
    
  
print("No")
Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
count=0
lists=[]
for i in range(n):
    d1,d2=list(map(int,input().split()))
    lists.append([d1,d2])
for i in range(n-2):
    if lists[i][0]==lists[i][1] and lists[i+1][0]==lists[i+1][1] and lists[i+2][0]==lists[i+2][1]:
        print('Yes')
        break
    elif i==n-2:
        print('No')
    else:
        continue


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

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
n=int(input())
count=0
lists=[]
for i in range(n):
    d1,d2=list(map(int,input().split()))
    lists.append([d1,d2])
for i in range(n-2):
    if lists[i][0]==lists[i][1] and lists[i+1][0]==lists[i+1][1] and lists[i+2][0]==lists[i+2][1]:
        print('Yes')
        break
    elif i==n-3:
        print('No')
        break
    else:
        continue

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
d = []
for i in range(n):
    x = list(map(int, input().split()))
    d.append(x)

d2 = []
ans = "No"

for i in range(n):
    for j in range(2):
        d2.append(d[i][j])

for i in range(0, len(d2)-2):
    if d2[i] == d2[i+1] and d2[i] == d2[i+2]:
        ans = "Yes"
        break

print(ans)

Failing test case input:
6
1 0
2 2
3 3
4 4
5 0
10 10

Expected output:
Yes


Actual output:
No


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

d2 = []
ans = "No"

for i in range(n):
    if d[i][0] == d[i][1]:
        d2.append(1)
    else:
        d2.append(0)

for i in range(0, n-2):
    if d2[i] == 1 and d2[i+1] == 1 and d2[i+2] == 1:
        ans = "Yes"
        break

print(ans)

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
count = 0
for i in range(N):
    di_1, di_2 = [int(i) for i in input().split()]
    if di_1 == di_2:
        count += 1
    else:
        count = 0
if count >= 3:
    print("Yes")
else:
    print("No")

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

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
N = int(input())
count = 0
count_max = count
for i in range(N):
    di_1, di_2 = [int(i) for i in input().split()]
    if di_1 == di_2:
        count += 1
    else:
        count_max = max([count_max, count])
        count = 0
count_max = max([count_max, count])
if count_max >= 3:
    print("Yes")
else:
    print("No")
Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())

X=[]
Y=[]
for _ in range(N):
    x, y = map(int, input().split())
    X.append(x)
    Y.append(y)
    
A="NO"
for n in range(N-2):
    if X[n]==Y[n]:
        if X[n+1]==Y[n+1]:
            if X[n+2]==Y[n+2]:
                A="YES"
                break
            else:
                continue
        else:
            continue
    else:
        continue
print(A)

Failing test case input:
6
-7 1
1 3
0 2
5 12
2 0
0 3

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
N=int(input())

X=[]
Y=[]
for _ in range(N):
    x, y = map(int, input().split())
    X.append(x)
    Y.append(y)
    
A="No"
for n in range(N-2):
    if X[n]==Y[n]:
        if X[n+1]==Y[n+1]:
            if X[n+2]==Y[n+2]:
                A="Yes"
                break
            else:
                continue
        else:
            continue
    else:
        continue
print(A)

Problem: p02547
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())

pv = []
con = 0

while n > 0:
    n -= 1
    s = str(input())
    d = s.split()
    if d[0] == d[1]:
        con += 1
    else:
        pv += [con]
        con = 0

pv += [con]
ans = max(pv)

if int(ans) >= 3:
    print('Yes')
else:
    print('NO')

Failing test case input:
6
-2 1
1 3
0 1
4 12
2 0
0 2

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
n = int(input())

pv = []
con = 0

while n > 0:
    n -= 1
    s = str(input())
    d = s.split()
    if d[0] == d[1]:
        con += 1
    else:
        if con >= 3:
            break
        pv += [con]
        con = 0

pv += [con]
ans = max(pv)

if ans >= 3:
    print('Yes')
else:
    print('No')

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def readInt():
    return int(input())
def readList():
    return list(map(int,input().split()))
def readMap():
	return map(int,input().split())
def readStr():
    return input()
inf=float('inf')
mod = 10**9+7
import math
def solve(n,A):
    count=0
    for x,y in A:
        if x==y:
            count+=1
        else:
            count=0
        if count==3:
            return True
    return False

n=readInt()
A=[]
for _ in range(n):
    A.append(readList())
if solve(n,A):
    print("YES")
else:
    print("NO")

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

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
def readInt():
    return int(input())
def readList():
    return list(map(int,input().split()))
def readMap():
	return map(int,input().split())
def readStr():
    return input()
inf=float('inf')
mod = 10**9+7
import math
def solve(n,A):
    count=0
    for x,y in A:
        if x==y:
            count+=1
        else:
            count=0
        if count==3:
            return True
    return False

n=readInt()
A=[]
for _ in range(n):
    A.append(readList())
if solve(n,A):
    print("Yes")
else:
    print("No")
Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
i=0
cnt = 0
flg = 1

while i < N:
    i += 1
    a, b = map(int, input().split())
    if a==b:
        cnt += 1
    else:
        cnt = 0

if cnt >= 3:
    print("Yes")
else:
    print("No")

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

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
N = int(input())
i=0
cnt = 0
flg = 0

while i < N:
    i += 1
    a, b = map(int, input().split())
    if a == b:
        cnt += 1
        if cnt >= 3:
            flg = 1
    else:
        cnt = 0

if flg == 1:
    print("Yes")
else:
    print("No")

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
s = 0
for i in range(n):
  a, b = map(int, input().split())
  if a == b:
    s += 1
  else:
    s = 0
print("Yes" if s >= 3 else "No")

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

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
n = int(input())
s = 0
for i in range(n):
  if s == 3:
    break
  a, b = map(int, input().split())
  if a == b:
    s += 1
  else:
    s = 0
print("Yes" if s >= 3 else "No")

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
c = 0
for x in range(n):
  a,b = map(int,input().split())
  if a==b:
    c+=1
    if c==3:
      print('Yes')
      break
  else:
    c=0
  

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

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
n = int(input())
c = 0
c1=0
for x in range(n):
  a,b = map(int,input().split())
  if a==b:
    c+=1
    if c==3:
        c1 = 1
        print('Yes')
        break
  else:
    c=0
if c1==0:
    print('No')
Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def ProgramB():
    
    num = int(input())
    
    before = 'No'
    count = 0
    max_count = 0

    for i in range(num):
        data = list(map(int,input().split()))

        if num == 0:

            if data[0] == data[1]:
                before = 'Yes'
                count = count + 1
                
                if count > max_count:
                    max_count = count
    
            else:
                before = 'No'
                count = 0

        else:
            if data[0] == data[1] and before == 'Yes':
                before = 'Yes'
                count = count + 1
                
                if count > max_count:
                    max_count = count
    
            else:
                before = 'No'
                count = 0
            
            
    if max_count >= 3:        
        print('Yes')
        
    else:
        print('No')
        
        
if __name__ == '__main__':
    ProgramB()



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

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
def ProgramB():
    
    num = int(input())
    
    count = 0
    max_count = 0

    for i in range(num):
        data = list(map(int,input().split()))

        if num == 0:

            if data[0] == data[1]:
                count = count + 1
                
                if count > max_count:
                    max_count = count
    
            else:
                count = 0

        else:
            if data[0] == data[1]:
                count = count + 1
                
                if count > max_count:
                    max_count = count
    
            else:
                count = 0
            
            
    if max_count >= 3:        
        print('Yes')
        
    else:
        print('No')
        
        
if __name__ == '__main__':
    ProgramB()

Problem: p02547
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())
df_de = [list(map(int, input().split())) for _ in range(n)]
ans = 0
cand = []
for d1, d2 in df_de:
    if d1 == d2:
        ans += 1
    else:
        cand.append(ans)
        ans = 0
print("Yes" if len([i for i in cand if i >= 3]) else "No")

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

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
n = int(input())
df_de = [list(map(int, input().split())) for _ in range(n)]
ans = 0
cand = []
for d1, d2 in df_de:
    if d1 == d2:
        ans += 1
    else:
        cand.append(ans)
        ans = 0
cand.append(ans)
print("Yes" if len([i for i in cand if i >= 3]) else "No")
Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
g=0
for i in range(n):
  a,b=map(int,input().split(" "))
  if a==b:
    g=g+1
    if g==3:
      break
      break
  else:
    g=0
print(g)
if g==3:
  print("Yes")
else:
  print("No")

Failing test case input:
5
1 -1
8 3
4 1
6 1
2 2

Expected output:
No


Actual output:
1
No


Fixed submission (verdict: Accepted):
n=int(input())
g=0
for i in range(n):
  a,b=map(int,input().split(" "))
  if a==b:
    g=g+1
    if g==3:
      break
      break
  else:
    g=0


if g==3:
  print("Yes")
else:
  print("No")

Problem: p02547
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
cnt = 0
n = int(input())
for i in range(0,n):
    d1, d2 = map(int, input().split())
    if d1 == d2:
        cnt += 1
        if cnt == 3 :
            print("Yes")
            break
    else:
        cnt == 0
        
    if cnt != 3 and i == n-1:
        print("No")

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

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
cnt = 0
n = int(input())
for i in range(0,n):
    d1, d2 = map(int, input().split())
    if d1 == d2:
        cnt += 1
        if cnt == 3 :
            print("Yes")
            break
    elif  cnt >= 0 and d1 != d2:
        cnt = 0 
    if i == n-1:
        print("No")

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
D1 = [0] * N
D2 = [0] * N
for i in range(N):
    D1[i], D2[i]= map(int, input().split())
for i in range(N-2):
    if D1[i]==D2[i]:
        if D1[i+1]==D2[i+1]:
            if D1[i+2]==D2[i+2]:
                print("Yes")
                break
        else:
            print("No")

Failing test case input:
6
-4 1
1 3
0 1
4 12
2 0
0 2

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
N=int(input())
D1 = [0] * N
D2 = [0] * N
for i in range(N):
    D1[i], D2[i]= map(int, input().split())
count=0
for i in range(N-2):
    if D1[i]==D2[i]:
        if D1[i+1]==D2[i+1]:
            if D1[i+2]==D2[i+2]:
                count=count+1
if count>=1:
    print("Yes")
else:
    print("No")

Problem: p02547
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())

pv = []
con = 0

while n > 0:
    n -= 1
    s = str(input())
    d = s.split()
    if d[0] == d[1]:
        con += 1
    else:
        if con >= 3:
            break
        pv += [con]
        con = 0

pv += [con]
ans = max(pv)

if ans >= 3:
    print('Yes')
else:
    print('NO')

Failing test case input:
5
1 2
2 2
4 4
9 5
0 6

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
n = int(input())

pv = []
con = 0

while n > 0:
    n -= 1
    s = str(input())
    d = s.split()
    if d[0] == d[1]:
        con += 1
    else:
        if con >= 3:
            break
        pv += [con]
        con = 0

pv += [con]
ans = max(pv)

if ans >= 3:
    print('Yes')
else:
    print('No')
Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
c=1
count=0
for i in range(n):
    a,b=map(int,input().split())
    if a==b:
        count+=1
    else:
        count=0
    if count==3:
        c=1
if c==1:
    print("Yes")
else:
    print("No")


    

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

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n=int(input())
c=0
count=0
for i in range(n):
    a,b=map(int,input().split())

    if a==b:
        count+=1
    else:
        count=0
    if count==3:
        c=1
if c==1:
    print("Yes")
else:
    print("No")

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n =int(input())
first =[]
second =[]
for i  in range(n):
    d1 , d2 = map(int , input().split())
    first.append(d1)
    second.append(d2)

for i in range(n-2):
    count = 0
    for j in range(i ,i+3):
        if first[j]==second[j]:
            count +=1
           
    if count ==3:
        print("YES")
        break
else:
    print("NO")

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

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
n =int(input())
first =[]
second =[]
for i  in range(n):
    d1 , d2 = map(int , input().split())
    first.append(d1)
    second.append(d2)

for i in range(n-2):
    count = 0
    for j in range(i ,i+3):
        if first[j]==second[j]:
            count +=1
        else:
            break
           
    if count ==3:
        print("Yes")
        break
else:
    print("No")

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

last = 0
for item in l:
  if last == 0 and l[0] == l[1]:
    last = 1
  elif last == 1 and l[0] == l[1]:
    last = 2
  elif last == 2 and l[0] == l[1]:
    last = 3
    break
  last == 0

if last == 3:
  print('Yes')
else:
  print('No')

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

Expected output:
Yes


Actual output:
No


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

last = 0
for item in l:
  if last == 0 and item[0] == item[1]:
    last = 1
    continue
  elif last == 1 and item[0] == item[1]:
    last = 2
    continue
  elif last == 2 and item[0] == item[1]:
    last = 3
    break
  else:
    last = 0

if last == 3:
  print('Yes')
else:
  print('No')

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
from itertools import groupby as gb
l=[eval(input().replace(' ','==')) for i in range(n)]

var=[(a,len(list(b))) for a,b in gb(l)]
for a,b in var:
    if b>=3:print("Yes");exit()
print("No")

Failing test case input:
5
1 2
2 2
4 1
9 5
0 6

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
n=int(input())
from itertools import groupby as gb
l=[eval(input().replace(' ','==')) for i in range(n)]

var=[(a,len(list(b))) for a,b in gb(l)]
for a,b in var:
    if  a and b>=3:print("Yes");exit()
print("No")
Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
count = 0
for i in range(n):
  d1, d2 = map(int, input().split())
  if count > 2:
    break
  elif d1 == d2:
    count += 1
  else:
    count == 0
if count > 2:
  print("Yes")
else:
  print("No")

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

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
n = int(input())
count = 0
for i in range(n):
  d1, d2 = map(int, input().split())
  if count > 2:
    break
  else:
    if d1 == d2:
      count += 1
    else:
      count = 0
if count > 2:
  print("Yes")
else:
  print("No")

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
D = []

ans =0
for _ in range(N):
    N,M=(map(int, input().split()))
    if N==M:
        ans +=1

if ans == N:
    print("Yes")
else:
    print("No")


Failing test case input:
6
-4 1
1 3
0 1
5 12
2 0
0 2

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
N = int(input())
D = []

ans =0
key =0
for _ in range(N):
    N,M=(map(int, input().split()))
    if N==M:
        ans +=1
    else:
        ans =0
    if ans >=3:
        key =1

if key > 0:
    print("Yes")
else:
    print("No")

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())

d1=[]
d2=[]

cont=0
for i in range(N):
    D1,D2=map(int,input().split())

    d1.append(D1)
    d2.append(D2)

for i in range(len(d1)):
    if d1[i]==d2[i]:
        cont+=1

if cont>=3:
    print("Yes")
else:
    print("No")

    

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

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
N = int(input())

d1=[]
d2=[]

cont=0
for i in range(N):
    D1,D2=map(int,input().split())

    d1.append(D1)
    d2.append(D2)

for i in range(len(d1)):
    if d1[i]==d2[i]:
        cont+=1
    else:
        cont=0

    if cont==3:
        break
    
if cont>=3:
    print("Yes")
else:
    print("No")

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
xy = [map(int, input().split()) for _ in range(n)]
x, y = [list(i) for i in zip(*xy)]
count = 0
for k in range(n-2):
    if x[k] == y[k] and x[k+1] == y[k+1] and x[k+2] == y[k+2]:
        count += 1
if count >= 1:
    print('Yes')
else:
    print('NO')

Failing test case input:
6
-2 1
1 3
0 1
4 12
2 0
8 3

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
n = int(input())
xy = [map(int, input().split()) for _ in range(n)]
x, y = [list(i) for i in zip(*xy)]
count = 0
for k in range(n-2):
    if x[k] == y[k] and x[k+1] == y[k+1] and x[k+2] == y[k+2]:
        count += 1
if count >= 1:
    print('Yes')
else:
    print('No')
Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n=int(input())
ans=0
for _ in range(n):
  a,b=map(int,input().split())
  if a==b:
    ans+=1
    if ans==3:
      break
  else:
    n=0
if ans==3:
  print("Yes")
else:
  print("No")

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

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
n=int(input())
ans=0
for _ in range(n):
  a,b=map(int,input().split())
  if a==b:
    ans+=1
    if ans==3:
      break
  else:
    ans=0
if ans==3:
  print("Yes")
else:
  print("No")

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
xy = [map(int, input().split()) for _ in range(N)]
x, y = [list(i) for i in zip(*xy)]
cnt=0
result="No"


for i in range(N):
    cnt+=1 if x[i]==y[i] else 0
    if cnt>2:
        result="Yes"
print(result)

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

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
N=int(input())
xy = [map(int, input().split()) for _ in range(N)]
x, y = [list(i) for i in zip(*xy)]
cnt=0
result="No"


for i in range(N):
    cnt=cnt+1 if x[i]==y[i] else 0
    if cnt>2:
        result="Yes"
print(result)

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
d = [input().split(" ") for _ in range(n)]

f = False
for i in range(n-2):
    if d[i][0] == d[i][1] or not f :
        if d[i+1][0] == d[i+1][1] and d[i+2][0] == d[i+2][1]:
            f = True
if f:
    print("Yes")
else:
    print("No")

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

Expected output:
No

Actual output:
Yes


Fixed submission (verdict: Accepted):
n = int(input())
d = [input().split(" ") for _ in range(n)]

f = False
for i in range(n-2):
    if d[i][0] == d[i][1] and not f :
        if d[i+1][0] == d[i+1][1] and d[i+2][0] == d[i+2][1]:
            f = True
if f:
    print("Yes")
else:
    print("No")

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = int(input())
d = [[int(v) for v in input().split()] for i in range(s)]
print(d)
ans = False
cnt = 0
for j in range(len(d)):
    if all(elem == d[j][0] for elem in d[j]):
        cnt += 1
    else:
        cnt = 0

    if cnt == 3:
        ans = True
        break
if ans:
    print ("Yes")
else:
    print("No")

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

Expected output:
No


Actual output:
[[0, 0], [2, 3], [6, 1], [4, 4], [2, 0], [8, 4]]
No


Fixed submission (verdict: Accepted):
s = int(input())
d = [[int(v) for v in input().split()] for i in range(s)]
ans = False
cnt = 0
for j in range(len(d)):
    if all(elem == d[j][0] for elem in d[j]):
        cnt += 1
    else:
        cnt = 0

    if cnt == 3:
        ans = True
        break
if ans:
    print ("Yes")
else:
    print("No")
Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())

cnt = 0
for i in range(N):
    d1, d2 = map(int, input().split())
    if d1 == d2:
        cnt += 1
    else:
        cnt = 0
    if cnt == 3:
        print("Yes")
        break

Failing test case input:
6
-2 1
1 3
0 1
4 12
2 0
8 3

Expected output:
No


Actual output:

Fixed submission (verdict: Accepted):
N = int(input())

cnt = 0
for i in range(N):
    d1, d2 = map(int, input().split())
    if d1 == d2:
        cnt += 1
    else:
        cnt = 0
    if cnt == 3:
        print("Yes")
        break
    if i == N-1 and cnt != 3:
        print("No")

Problem: p02547
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
l = [list(map(int, input().split())) for i in range(n)]


ans = n-3
ans1 = 0

for m in range(ans):
  if l[m][0]  == l[m][1] and l[m+1][0] == l[m+1][1] and l[m+2][0] == l[m+2][1]:
    ans1 += 1
  else:
    ans1 = 0
    
    
if ans1 >= 1:
  print("Yes")
else:
  print("No")

Failing test case input:
6
1 0
2 2
3 3
4 4
5 0
10 10

Expected output:
Yes


Actual output:
No


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


ans = n-2
ans1 = 0

for m in range(ans):
  if l[m][0]  == l[m][1] and l[m+1][0] == l[m+1][1] and l[m+2][0] == l[m+2][1]:
    ans1 += 1
 
    
    
if ans1 >= 1:
  print("Yes")
else:
  print("No")
Problem: p02911
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,k,q = map(int, list(input().split()))
a = [int(input()) for i in range(q)]

point=[k]*n
for i in range(q):
	point[a[i]-1]+=1
for i in range(n):
    if point[i]==max(point):
        print("Yes")
    else:
        print("No")

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

Expected output:
No
No
No
No
No
No


Actual output:
No
No
Yes
No
No
No


Fixed submission (verdict: Accepted):
n,k,q = map(int, list(input().split()))
point=[k]*n
a=[]
	
for i in range(q):
	a.append(int(input()))
	point[a[i]-1]+=1
for i in range(n):
    if point[i]-q>0:
        print("Yes")
    else:
        print("No")

Problem: p02911
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, k, q = map(int, input().split())
candis = [k] * n
candis = list(map(lambda x: x - q, candis))
for _ in range(q):
    candis[int(input()) - 1] += 1
print(candis)
for score in candis:
    if score <= 0:
        print("No")
    else:
        print("Yes")


Failing test case input:
8 5 3
3
0
4
2

Expected output:
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes


Actual output:
[2, 2, 3, 3, 2, 2, 2, 3]
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes


Fixed submission (verdict: Accepted):
n, k, q = map(int, input().split())
candis = [k] * n
candis = list(map(lambda x: x - q, candis))
for _ in range(q):
    candis[int(input()) - 1] += 1
for score in candis:
    if score <= 0:
        print("No")
    else:
        print("Yes")

Problem: p02911
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,K,Q = map(int,input().split())
A = []
for _ in range(Q):
  A.append(int(input()))
point_list = [K-Q] * N
for i in range(Q):
  point_list[A[i]-1] += 1
  
print (point_list)
for ii in range(N):
  if point_list[ii] > 0 :
    print('Yes')
  else :
    print('No')

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

Expected output:
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes


Actual output:
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes


Fixed submission (verdict: Accepted):
N,K,Q = map(int,input().split())
A = []
for _ in range(Q):
  A.append(int(input()))
point_list = [K-Q] * N
for i in range(Q):
  point_list[A[i]-1] += 1
for ii in range(N):
  if point_list[ii] > 0 :
    print('Yes')
  else :
    print('No')

Problem: p02911
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N, K ,Q  = map(int, input().split())
result = {}
for i in range(Q):
  winner = int(input())
  result[winner] = result.get(winner,0) + 1


for i in range(N):


  if (Q - result.get(i + 1, 0)) < K:
    print("yes")
  else:
    print("No")

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

Expected output:
Yes


Actual output:
yes


Fixed submission (verdict: Accepted):
N, K, Q = map(int, input().split())
result = {}
for i in range(Q):
    winner = int(input())
    result[winner] = result.get(winner, 0) + 1

for i in range(N):
    if K - (Q - result.get(i + 1, 0)) > 0:
        print("Yes")
    else:
        print("No")
Problem: p02911
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,k,q=map(int,input().split())
a=[int(input()) for _ in range(q)]
if k-q>0:
  for _ in range(n):
    print("No")
else:
  for i in range(n):
    if k-q+a.count(i+1)>0:
      print("Yes")
    else:
      print("No")

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

Expected output:
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes


Actual output:
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
n,k,q=map(int,input().split())
a=[int(input()) for _ in range(q)]
b=[0]*n
for i in range(q):
  b[a[i]-1]+=1
if k-q>0:
  for _ in range(n):
    print("Yes")
else:
  for i in range(n):
    if k-q+b[i]>0:
      print("Yes")
    else:
      print("No")

Problem: p02911
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
num,k,q = map(int,input().split())

arr = [0]*num


for i in range(q):
    a = int(input())
    arr[a-1] +=1

print(arr)
arr = [i-(q-k) for i in arr]

for i in range(len(arr)):
    if arr[i] > 0:
        print("Yes")
    else:
        print("No")
    

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

Expected output:
Yes
Yes
Yes
Yes
Yes
Yes

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


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

arr = [0]*num


for i in range(q):
    a = int(input())
    arr[a-1] +=1

arr = [i-(q-k) for i in arr]

for i in range(len(arr)):
    if arr[i] > 0:
        print("Yes")
    else:
        print("No")

Problem: p02911
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, k, q = map(int, input().split())
answers = []
for _ in range(q):
    answers.append(int(input()))

cnt_list = [(k-q)]*n
if q < k:
    for _ in range(n):
        print('Yes')
else:
    for i in answers:
        cnt_list[i-1] += 1

for i in cnt_list:
    print('Yes') if i > 0 else print('No')

Failing test case input:
12 1 0
6
1
5
1

Expected output:
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes


Actual output:
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes


Fixed submission (verdict: Accepted):
n, k, q = map(int, input().split())
answers = []
for _ in range(q):
    answers.append(int(input()))

cnt_list = [(k-q)]*n
if q < k:
    for _ in range(n):
        print('Yes')
else:
    for i in answers:
        cnt_list[i-1] += 1
    for i in cnt_list:
        print('Yes') if i > 0 else print('No')
Problem: p02911
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, k, q = map(int, input().split())

scores = [k] * n

for index in range(q):
    winner = int(input())
    for participant in range(n):
        if not participant == winner:
            scores[participant] -= 1

for participant in range(n):
    print('Yes') if scores[participant] > 0 else print('No')


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

Expected output:
No
No
No
No
No
Yes


Actual output:
No
No
No
No
No
No


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

scores = [k - q] * n

for index in range(q):
    winner = int(input())
    scores[winner - 1] += 1

for participant in range(n):
    print('Yes') if scores[participant] > 0 else print('No')

Problem: p02911
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import collections

n, k, q = map(int,input().split())
a = [int(input()) for _ in range(q)]

c=collections.Counter(a)
print(c)

for i in range(1,n+1):
    if k-q+c[i]>=1:
        print('Yes')
    else:
        print('No')


Failing test case input:
6 3 4
6
1
3
1

Expected output:
Yes
No
No
No
No
No


Actual output:
Counter({1: 2, 6: 1, 3: 1})
Yes
No
No
No
No
No


Fixed submission (verdict: Accepted):
import collections

n, k, q = map(int,input().split())
a = [int(input()) for _ in range(q)]

c=collections.Counter(a)

for i in range(1,n+1):
    if k-q+c[i]>=1:
        print('Yes')
    else:
        print('No')

Problem: p02911
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, k, q = map(int, input().split())

n_points = [0 for _ in range(n)]

for _ in range(q):
    a = int(input())
    n_points[a-1] += 1

print(n_points)
for n_point in n_points:
    if n_point + k > q:
        print('Yes')
    else:
        print('No')


Failing test case input:
6 3 3
3
1
3
4

Expected output:
Yes
No
Yes
No
No
No


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


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

n_points = [0 for _ in range(n)]

for _ in range(q):
    a = int(input())
    n_points[a-1] += 1

for n_point in n_points:
    if n_point + k > q:
        print('Yes')
    else:
        print('No')

Problem: p02911
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, k, q  = list(map(int, input().split()))
a = []
for i in range(q):
    a.append(int(input()))
 
point = [0]*n
for i in range(q):
    point[a[i]-1] += 1
    print([a[i]-1])

for i in range(n):
    if k-(q-point[i]) > 0:
        print("Yes")
    else:
        print("No")

Failing test case input:
6 0 4
2
2
6
4

Expected output:
No
No
No
No
No
No


Actual output:
[1]
[1]
[5]
[3]
No
No
No
No
No
No


Fixed submission (verdict: Accepted):
n, k, q  = list(map(int, input().split()))
a = []
for i in range(q):
    a.append(int(input()))
 
point = [0]*n
for i in range(q):
    point[a[i]-1] += 1

for i in range(n):
    if k-(q-point[i]) > 0:
        print("Yes")
    else:
        print("No")
Problem: p02911
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, k, q = map(int, input().split())
if k-q >=1:
    for _ in range(n):
        print("Yes")
out = [k-q for _ in range(n)]
for _ in range(q):
    a = int(input())-1
    out[a] += 1
for i in range(n):
    msg = "Yes" if out[i] >= 1 else "No"
    print(msg)

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

Expected output:
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes


Actual output:
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes


Fixed submission (verdict: Accepted):
n, k, q = map(int, input().split())
out = [k-q for _ in range(n)]
for _ in range(q):
    a = int(input())-1
    out[a] += 1
for i in range(n):
    msg = "Yes" if out[i] > 0 else "No"
    print(msg)

Problem: p02911
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, k, q = map(int, input().split())
alist = [int(input()) for i in range(q)]
ans = [k - q] * n

for Ai in alist:
    ans[Ai - 1] += 1

for Ai in alist:
    print('Yes') if Ai > 0 else print('No')

Failing test case input:
37 8 15
3
0
4
1
5
0
2
6
5
6
5
8
1
7
13

Expected output:
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No


Actual output:
Yes
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes


Fixed submission (verdict: Accepted):
n, k, q = map(int, input().split())
alist = [int(input()) for i in range(q)]
ans = [k - q] * n

for Ai in alist:
    ans[Ai - 1] += 1

for Ai in ans:
    print('Yes') if Ai > 0 else print('No')

Problem: p02911
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import sys
input = sys.stdin.readline
N, K, Q = map(int, input().split())
A = [int(input().rstrip()) for i in range(Q)]

score =[0]*(N)


for i in range(Q):
    score[A[i]-1] += 1


for i in range(N):
    if K+score[i]-Q >0:
        print('yes')
    else:
        print('No')

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

Expected output:
Yes
Yes
Yes
Yes
Yes
Yes

Actual output:
yes
yes
yes
yes
yes
yes


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline
N, K, Q = map(int, input().split())
A = [int(input().rstrip()) for i in range(Q)]

score =[0]*(N)


for i in range(Q):
    score[A[i]-1] += 1


for i in range(N):
    if K+score[i]-Q >0:
        print('Yes')
    else:
        print('No')
Problem: p02911
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,K,Q = map(int,input().split())

min_c = Q - K + 1

print(type(min_c))

num = [0]*N

for i in range(Q):
    a = int(input())
    num[a-1]+=1

print(min_c , num)
for j in num:
    if j >= min_c:
        print('Yes')
    else:
        print('No')

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

Expected output:
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No


Actual output:
<class 'int'>
1 [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
No
No
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No


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

min_c = Q - K + 1

num = [0]*N

for i in range(Q):
    a = int(input())
    num[a-1]+=1

for j in num:
    if j >= min_c:
        print('Yes')
    else:
        print('No')

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

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

p = [0]*(n+1)

for i in range(q):
  p[a[i]] += 1
  

for i in range(1,n+1):
  if p[i]>k-q:
    print("Yes")
  else:
    print("No")

Failing test case input:
37 12 15
5
1
8
1
9
0
2
6
5
8
5
22
1
1
0

Expected output:
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No


Actual output:
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes


Fixed submission (verdict: Accepted):

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

p = [0]*(n+1)

for i in range(q):
  p[a[i]] += 1
  

for i in range(1,n+1):
  if p[i]>q-k:
    print("Yes")
  else:
    print("No")

Problem: p02911
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,k,q = map(int,input().split(" "))
point = [k-q] * n
print(point)
for i in range(0,q):
    point[int(input())-1] += 1 
for j in range(0,n):
    if point[j] > 0:
        print("Yes")
    else:
        print("No")

Failing test case input:
10 13 15
3
1
4
1
5
9
2
6
5
3
5
8
9
7
9

Expected output:
No
No
No
No
Yes
No
No
No
Yes
No

Actual output:
[-2, -2, -2, -2, -2, -2, -2, -2, -2, -2]
No
No
No
No
Yes
No
No
No
Yes
No


Fixed submission (verdict: Accepted):
n,k,q = map(int,input().split(" "))
point = [k-q] * n
for i in range(0,q):
    point[int(input())-1] += 1
for j in range(0,n):
    if point[j] > 0:
        print("Yes")
    else:
        print("No")