Runtime error (ZNEC) while submitting answer

I am getting ZNEC error while submitting solution.
Problem:- https://www.codechef.com/problems/PIPSQUIK

Solution :-

cook your dish here

tcase = int(input().strip())

while(tcase !=0):
count =0
n=h=y1=y2=l = 0
arr= []
arr1=[]

n,h,y1,y2,l = map(int,input().strip().split(' '))
bar = ''

for i in range(0,n):
    
    
   
    b,x = map(int,input().strip().split(' '))
    if b == 1:
        if h-y1 <= x:
            count+=1
        elif l != 0:
            count+=1
            l = l-1
            if l==0:
                count-=1 
                break
            
    elif b ==2:
        if y2 >= x:
            count +=1
        elif l != 0:
            count+=1
            l = l-1
            if l==0:
                count-=1 
                break


print(count)

tcase-=1

He solved it.