Runtime error

cook your dish here

t=int(input())
for i in range(t):
n,k,F=map(int,input().split())
ft=0
f1=0
for i in range(n):
s,f=map(int,input().split())
if i==0:
f1=f
else:
ft+=(s-f1)
f1=f
if ft>=k:
print(“YES”)
break
if i==(n-1):
ft+=F-f
if ft>=k:
print(“YES”)
else:
ft=0
if ft<k:
print(“NO”)

please clarify, what is causing runtime error?

Please format your code using two double ticks (``) else, it becomes hard to read the code.

Please clarify, what is the problem that you’re solving?

1 Like

CTIME from may starters