Array, re(nzec) error, working clearly on my pc

cook your dish here

n=int(input())
for i in range(n):
x,y,k,N=map(int,input().split())
for j in range(N):
a,b=map(int,input().split())
if a>=x-y and b<=k:
print(“LuckyChef”)
break
if j==N-1:
print(“UnluckyChef”)

CNOTE Problem - CodeChef[quote=“ankursoni1974, post:1, topic:77822, full:true”]

cook your dish here

n=int(input())
for i in range(n):
x,y,k,N=map(int,input().split())
for j in range(N):
a,b=map(int,input().split())
if a>=x-y and b<=k:
print(“LuckyChef”)
break
if j==N-1:
print(“UnluckyChef”)

[/quote]

You are breaking the loop before taking all the input required for a test case. So eventually the remaining part of input of that testcase is included in the next testcase.
The irregular inputs in each line will somewhere cause unpacking error and RTE.

Yaa, got it thanx

1 Like