TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n, m = map(int, input().split())
ans = 999999
for _ in range(n):
  c, t = map(int, input().split())
  if t > m:
    continue
  ans = min(ans, c)
if ans = 999999:
  print('TLE')
else:
  print(ans)

    

n, m = map(int, input().split())
ans = 999999
for _ in range(n):
    c, t = map(int, input().split())
    if t > m:
        continue
    ans = min(ans, c)
if ans == 999999:
    print('TLE')
else:
    print(ans)



Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N,T = input().split(" ")
N,T = int(N),int(T)

time = dict()
for i in range(N):
	c,t = input().split(" ")
	time[int(c)] = int(t)
for key, value in sorted(time.items(), key=lambda item: item[1]):
	if value <= T:
		print(value)
		break
	else:
		print("TLE")
		break

N,T = input().split(" ")
N,T = int(N),int(T)

time = dict()
for i in range(N):
	c,t = input().split(" ")
	time[int(c)] = int(t)
cost = 10000
print(sorted(time.items(), key=lambda item: item[1]))
for key, value in sorted(time.items(), key=lambda item: item[1]):
	if value <= T:
		if cost > key:
			cost = key
			# print(cost)

if cost ==0:
	print("TLE")
else:
	print(cost)

N,T = input().split(" ")
N,T = int(N),int(T)

time = dict()
for i in range(N):
	c,t = input().split(" ")
	time[int(c)] = int(t)
cost = 10000

for key, value in sorted(time.items(), key=lambda item: item[1]):
	if value <= T:
		if cost > key:
			cost = key
			# print(cost)

if cost ==10000:
	print("TLE")
else:
	print(cost)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N,T=map(int,input().split())
l=[]
for i in range(N):
    c,t=map(int,input().split())
    if t <= T:
        l.append(c)
if len(c) > 0:
    print(min(c))        
else:
    print("TLE")



N,T=map(int,input().split())
l=[]
for i in range(N):
    c,t=map(int,input().split())
    if t <= T:
        l.append(c)
if len(l) > 0:
    print(min(l))        
else:
    print("TLE")



Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
d = list(map(int,(input().strip().split(' '))))
N = d[0]
T = d[1]
min = 100000000
for i in range(0, N-1):
    d = list(map(int,input().strip().split(' ')))
    c = d[0]
    t = d[1]
    if t <= T:
        if min >= c:
            min = c
if min == 100000000:
    print("TLE")
else:
    print(min)


N = d[0]
T = d[1]
min = 10000
for i in range(0, N-1):
    d = list(map(int,input().strip().split(' ')))
    c = d[0]
    t = d[1]
    if t <= T:
        if min >= c:
            min = c
if min == 10000:
    print("TLE")
    exit()
print(min)


d = list(map(int,(input().strip().split(' '))))
N = d[0]
T = d[1]
min = 10000
for i in range(0, N-1):
    d = list(map(int,input().strip().split(' ')))
    c = d[0]
    t = d[1]
    if t < T:
        if min >= c:
            min = c
if min == 10000:
    print("TLE")
else:
    print(min)


d = list(map(int,(input().strip().split(' '))))
N = d[0]
T = d[1]
min = 10000
for i in range(0, N-1):
    d = list(map(int,input().strip().split(' ')))
    c = d[0]
    t = d[1]
    if t <= T:
        if min > c:
            min = c
if min == 10000:
    print("TLE")
else:
    print(min)

d = list(map(int,(input().strip().split(' '))))
N = d[0]
T = d[1]
min = 10000
for i in range(0, N-1):
    d = list(map(int,input().strip().split(' ')))
    c = d[0]
    t = d[1]
    if t <= T:
        if min >= c:
            min = c
if min == 10000:
    print("TLE")
else:
    print(min)


d = list(map(int,(input().strip().split(' '))))
N = d[0]
T = d[1]
min = 100000000
for i in range(0, N):
    d = list(map(int,input().strip().split(' ')))
    c = d[0]
    t = d[1]
    if t <= T:
        if min >= c:
            min = c
if min == 100000000:
    print("TLE")
else:
    print(min)


Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N,T=map(int,input().split())
s=2000
for i in range(N):
    a,b=map(int,input().split())
    if b<=T:s=min(s,a)
print(s if ans<2000 else "TLE")


N,T=map(int,input().split())
s=2000
for i in range(N):
    a,b=map(int,input().split())
    if b<=T:s=min(s,a)
print(s if s<2000 else "TLE")


Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,t=map(int,input().split())
x=[]
for i in range(n):
  c,d=map(int,input().split())
  if d<=t:
    x+=c
print(min(x))
    

n,t=map(int,input().split())
x=[]
for i in range(n):
  c,d=map(int,input().split())
  if d<=t:
    x+=c
if x==[]:
  print('TLE')
else:
  print(min(x))
    


n,t=map(int,input().split())
x=1234
for i in range(n):
  c,d=map(int,input().split())
  if d<=t:
    if c<=x:
      x=c
if x==1234:
  print('TLE')
else:
  print(x)
    


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n, T = map(int, input().split())
out = list()
for _ in range(n):
    c, t = map(int, input().split())
    # if t > T: continue
    out.append((c, t))
print(min(out)[0]) if out and min(out)[0] <= T else print("TLE")

def a():
    n=list(map(int, input().split()))
    c=list()
    t = list()
    for i in range(n[0]):
        s = list(map(int, input().split()))
        c.append(s[0])
        t.append(s[1])
    z=list()
    z[len(z):]=t[:len(t)]
    z.sort()
    if z[0]>n[1]:
        print("TLE")
    else:
        x = list()
        x[len(x):] = c[:len(c)]
        x.sort()
        for i in x:
            print('i=',i,' c.index(i)=',c.index(i),' t[c.index(i)]=',t[c.index(i)])
            if t[c.index(i)]<=n[1]:
                print(i)
                break
a()

N,T=input().split()
a=0
b=0
i=0
for i in range(int(N)):
    c,t=input().split()
    if int(t)<=int(T):
        while b==0:
            a=c
            b+=1
        if int(c)<int (a):
            a=c
            i+=1
if i==0or a==0:
    print("TLE")
else :
    print(a)

N , T = map(int, input().split())
mini = T
for i in range(N):
    c , t = input().split()
for i in  range(N):
    if int(t[i])<mini:
        mini = int(t[i])
if mini<T:
    print(c[i])
else:
    print("TLE")

n,T=map(int, input().split())

x=[]

for i in range(n):
    c,t=map(int, input().split())
    if t<=T:
        x.append((i+1,c))
        
x.sort(key=lambda tup: tup[1])

print(x[0][0])

line = input()
a, b = [int(n) for n in line.split()]
tempo = b
custo = 1001
tle = True
for n in range(1, a+1):
    line = input()
    c, t = [int(n) for n in line.split()]
    if t<=tempo and c<=custo:
        custo = c
        tle = False

print(custo if tle==False else "TLE")


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
# -*- coding: utf-8 -*-
"""
Created on Sat Oct  6 14:05:15 2018

@author: rgraptin
"""

params = input()

n = int(params.split(' ')[0])
t = int(params.split(' ')[1])

data = []

for i in range(0, n) :
    d = input()
    data.append([int(d.split(' ')[0]),int(d.split(' ')[1])])
    
minimum_cost = 1000000
    
for cost in data :
    if cost[1] <= t : 
        
        if cost[0] < minimum_cost :
            print (cost)
            minimum_cost = cost[0]

if minimum_cost == 1000000:
    print ("TLE")
else :
    print (minimum_cost)

# -*- coding: utf-8 -*-
"""
Created on Sat Oct  6 14:05:15 2018

@author: rgraptin
"""

params = input()

n = int(params.split(' ')[0])
t = int(params.split(' ')[1])

data = []

for i in range(0, n) :
    d = input()
    data.append([int(d.split(' ')[0]),int(d.split(' ')[1])])
    
minimum_cost = 1000000
    
for cost in data :
    if cost[1] <= t : 
        
        if cost[0] < minimum_cost :
            minimum_cost = cost[0]

if minimum_cost == 1000000:
    print ("TLE")
else :
    print (minimum_cost)

Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
res = [0,0]
for i in range(n[0]):
    get = input().split(" ")
    get = list(map(int,get))
    

    if get[1] < n[1]:
        res[0] = get[0]
        res[1] = get[1]
    
if res[0]==0 and res[1]==0:
    print('TLE')
else:print(res[0])

res = [0,0]
for i in range(n[0]):
    get = input().split(" ")
    get = list(map(int,get))
    

    if get[1] < n[1]:
        res[0] = get[0]
        res[1] = get[1]
    
if res[0]==0 and res[1]==0:
    print('TLE')
else:print(res[0])

n = input().split(" ")
n = list(map(int,n))


cost = 10000
res = [0,0]

for i in range(n[0]):
    get = input().split(" ")
    get = list(map(int,get))
    
    if get[1] <= n[1]:
        res[1] = get[1]
        if get[0] < cost:
            cost = get[0]


if res[1]==0:
    print('TLE')
else:print(cost)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,T=map(int, input().split())'
m=-1
for i in range(n):
  c,t=map(int, input().split())
  if t<=T:
    if m=-1:
      m=c
    else:
      m=min(m,c)
if m==-1:
  print('TLE')
else:
  print(m)

n,T=map(int, input().split())
m=-1
for i in range(n):
  c,t=map(int, input().split())
  if t<=T:
    if m=-1:
      m=c
    else:
      m=min(m,c)
if m==-1:
  print('TLE')
else:
  print(m)


n,T=map(int, input().split())
m=-1
for i in range(n):
  c,t=map(int, input().split())
  if t<=T:
    if m==-1:
      m=c
    else:
      m=min(m,c)
if m==-1:
  print('TLE')
else:
  print(m)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = map(int, input().split())
c = []
t = []
for i in range(N):
  c[i], t[i] = map(int, input().split())
 
costs = []
for i in range(N):
  if t[i] <= T:
    costs.append(c[i])
    
print(min(costs))

N, T = map(int, input().split())
c, t = list(map(int, input().split()))

costs = []
for i in range(N):
  if t[i] <= T:
    costs.append(c[i])
    
print(min(costs))

N, T = map(int, input().split())
c = []
t = []
c[i], t[i] = map(int, input().split())
 
costs = []
for i in range(N):
  if t[i] <= T:
    costs.append(c[i])
    
print(min(costs))

N, T = map(int, input().split())
cost = 10000

for i in range(N):
  c, t = map(int, input().split())
  if t <= T:
    cost = min(cost, c)
    
if cost == 10000:
  print('TLE')
else:
  print(cost)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = list(map(int, input().split()))
minc = 1001;
for i in range(N):
  c, t = list(map(int, input().split()))
  if(t <= T and c < minc):
    minc = 0
if(minc == 1001):
  print("TLE")
else:
  print(minc)

N, T = list(map(int, input().split()))
minc = 1001;
for i in range(N):
  c, t = list(map(int, input().split()))
  if(t <= T and c < minc):
    minc = c
if(minc == 1001):
  print("TLE")
else:
  print(minc)


Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n ,t = [int(x) for x in input().split()]
arr = [list(map(int, input().split())) for _ in range(n)]

ans = 9999
for i in range(n):
    if arr[i][1] <= t:
        if arr[i][0] <= ans:
            ans = arr[i][0]
if ans = 9999:
    print("TLE")
else:
    print(ans)

n ,t = [int(x) for x in input().split()]
arr = [list(map(int, input().split())) for _ in range(n)]

ans = 9999
for i in range(n):
    if arr[i][1] <= t:
        if arr[i][0] <= ans:
            ans = arr[i][0]
if ans == 9999:
    print("TLE")
else:
    print(ans)

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N,T = map(int,input().split())
ans = 1000
for i in N:
  c,t = map(int,input().split())
  if T >= t:
      ans = min(ans,c)
print(ans)

N,T = map(int,input().split())
ans = 1001
for i in range(N):
    c,t = map(int,input().split())
    if T >= t:
        ans = min(ans,c)
if ans == 1001:
    print("TLE")
else:
    print(ans)

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,t=list(map(int,input().split()))
l=[]
for i in range(n):
    l.append(tuple(map(int,input().split())))

l=sorted(l,key=lambda x:x[0],reverse=True)
for i in l:
    if i[1]<t:
        print(i[0])
        break
print('TLE')


n,t=list(map(int,input().split()))
l=[]
for i in range(n):
    l.append(tuple(map(int,input().split())))

l=sorted(l,key=lambda x:x[0])
for i in l:
    if i[1]<=t:
        print(i[0])
        exit()
print('TLE')


Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
T, N = list(map(int,input().split()))

ans_c = 1001
for i in range(T):
    c, t = list(map(int,input().split()))
    if (N >= t) and (c <= ans_c):
        ans_c = c

if ans_t == 1001:
    print("TLE")
else:
    print(ans_c)

T, N = list(map(int,input().split()))

ans_t = 1001
for i in range(T):
    c, t = list(map(int,input().split()))
    if N >= t and t <= ans_t:
        ans_t = t

if ans_t == 1001:
    print("TLE")
else:
    print(ans_t)

T, N = list(map(int,input().split()))

ans_t = 1001
for i in range(T):
    c, t = list(map(int,input().split()))
    if N > t and t < ans_t:
        ans_t = t

if ans_t == 1001:
    print("TLE")
else:
    print(ans_t)

T, N = list(map(int,input().split()))

ans_c = 1001
for i in range(T):
    c, t = list(map(int,input().split()))
    if (N >= t) and (c <= ans_c):
        ans_c = c

if ans_c == 1001:
    print("TLE")
else:
    print(ans_c)

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T=map(int, input().split())

c_list=[]
t_list=[]
ans_list=[]
for i in N:
  c,t=map(int, input().split())
  c_list.append(c)
  t_list.append(t)

ct_dict=dict(zip(c_list, t_list))  
  
if T<=min(t_list):
  print("TLE")
else:
  for k,v in ct_dict.items():
    if v<=T:
      ans_list.append(k)

print(min(ans_list))

N, T=map(int, input().split())
 
c_list=[]
t_list=[]
ans_list=[]
for i in range(N):
  c,t=map(int, input().split())
  c_list.append(c)
  t_list.append(t)
 
ct_dict=dict(zip(c_list, t_list))  
  
if T<=min(t_list):
  print("TLE")
else:
  for k,v in ct_dict.items():
    if v<=T:
      ans_list.append(k)
 
  print(min(ans_list))

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
from operator import itemgetter

def main():
	n, t = map(int, input().split())

	costs = []
	for i in range(n):
		costs.append(list(map(int, input().split())))

	costs = sorted(costs, key=itemgetter(0))
	if costs[0][1]>t:
		print("TLE")
		return
	for i in range(n):
		if costs[i][1] > t:
			print("TLE")
			return
		if costs[i][1] <= t:
			print(costs[i][0])
			return

main()

from operator import itemgetter

def main():
	n, t = map(int, input().split())

	costs = []
	for i in range(n):
		costs.append(list(map(int, input().split())))

	costs = sorted(costs, key=itemgetter(0))
	for i in range(n):
		if costs[i][1] <= t:
			print(costs[i][0])
			return
	print("TLE")
	return

main()

Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n, t = map(int, input().split())
ct = [list(map(int, input().split())) for _ in range(n)]
ans = []
[ans.append(i[0]) for i in ct if i[1] <= t]
print(ans)


N, T = map(int, input().split())
m = 1001
for i in range(N):
    c, t = map(int, input().split())
    if t <= T and c <= m:
        m = c
print("TLE" if m == 1001 else m)


Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N,T=map(int,input().split())

CT=[[0,0]]*N
i=0
while i<N:
    CT[i]=list(map(int,input().split()))
    i+=1

CT=sorted(CT)

print(CT)

ans='TLE'
for x,y in CT:
    if y<=T:
        ans=x
        break
print(ans)


N,T=map(int,input().split())

CT=[[0,0]]*N
i=0
while i<N:
    CT[i]=list(map(int,input().split()))
    i+=1

CT=sorted(CT)

ans='TLE'
for x,y in CT:
    if y<=T:
        ans=x
        break
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
I = lambda:map(int,input().split())
n,t = I()



k = [c for c,s in [(I()) for _ in [0]*n] if s<=t]
print(k)

I = lambda:map(int,input().split())
n,t = I()



k = [c for c,s in [(I()) for _ in [0]*n] if s<=t]
print(min(k) if k!=[] else "TLE")

Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = map(int, input().split())
ans = 1000
for i in range(n):
    c, t = map(int, input().split())
    if t > T:
        continue
    if ans > c:
        ans = c

print(ans)
  

N, T = map(int, input().split())
ans = 1001
for i in range(n):
    c, t = map(int, input().split())
    if t > T:
        continue
    if ans > c:
        ans = c

if ans = 1001:
    print('TLE')
else:
    print(ans)


N, T = map(int, input().split())
ans = 1001
for i in range(N):
    c, t = map(int, input().split())
    if t > T:
        continue
    if ans > c:
        ans = c

if ans = 1001:
    print('TLE')
else:
    print(ans)


N, T = map(int, input().split())
ans = 1001
for i in range(N):
    c, t = map(int, input().split())
    if t > T:
        continue
    if ans > c:
        ans = c

if ans == 1001:
    print('TLE')
else:
    print(ans)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
import numpy as np

dataNum, timeMax = input().strip().split(' ')
dataNum, timeMax = [int(dataNum), int(timeMax)]

cost = []
time = []

for i in range(dataNum):
    A, B = list(map(int, input().strip().split(' ')))
    cost.append(A)
    time.append(B)

if min(time) > timeMax:
    print('TLE')
else :
    print(min(cost))

import numpy as np

dataNum, timeMax = input().strip().split(' ')
dataNum, timeMax = [int(dataNum), int(timeMax)]

cost = [10000]
time = [10000]


for i in range(dataNum):
    A, B = list(map(int, input().strip().split(' ')))   
    if B <= timeMax:
        cost.append(A)
        time.append(B)
    
if min(time) > timeMax:
    print('TLE')
else :
    print(min(cost))


Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = map(int, input().split())
x = [map(int, input().split()) for _ in range(N)]
x.sort(key=lambda y:y[0], reverse=True)
ans = 0
for (c, t) in x:
    if t <= T:
        ans = c
print(ans)

N, T = map(int, input().split())
x = [list(map(int, input().split())) for _ in range(N)]
x.sort(key=lambda y:y[0], reverse=True)
ans = 0
for (c, t) in x:
    if t <= T:
        ans = c
if ans == 0:
    print('TLE')
else:
    print(ans)


Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = map(int, input().split())
c = []
t = []
for i in range(N):
    a, b = map(int, input().split())
    c.append(a)
    t.append(b)      
print(N, T)
print(c, t)

ans = []

for i, v in enumerate(t):
    if v <= T:
        ans.append(c[i])

if len(ans) > 0:
    print(min(ans))
else:
    print('TLE')

N, T = map(int, input().split())
c = []
t = []

for i in range(N):
    a, b = map(int, input().split())
    c.append(a)
    t.append(b)      

ans = []
for i, v in enumerate(t):
    if v <= T:
        ans.append(c[i])

if len(ans) > 0:
    print(min(ans))
else:
    print('TLE')

Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = map(int, input().split())

cost = 1001
for i in range(N):
  c, t = map(int, input().split())
  if t <= T:
    cost = min(cost, t)
  else:
    continue

if cost == 1001:
  print("TLE")
else:
  print(cost)

N, T = map(int, input().split())

cost = 1001
for i in range(N):
  c, t = map(int, input().split())
  if t <= T:
    cost = min(cost, c)
  else:
    continue

if cost == 1001:
  print("TLE")
else:
  print(cost)

Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = map(int, input().split())
L = [list(map(int, input().split())) for i in range(N)]

res = 10000

for i in range(N):
  if L[1] <= T:
    if res > L[0]:
      res = L[0]
     
if res == 10000:
  res = 'TLE'
print(res)

N, T = map(int, input().split())
L = [list(map(int, input().split())) for i in range(N)]

res = 10000

for i in range(N):
  if L[i][1] <= T:
    if res > L[i][0]:
      res = L[i][0]
     
if res == 10000:
  res = 'TLE'
print(res)

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,T = map(int, input().split())
ans = float('inf')
flag = True
for i in range(n):
    c,t = map(int, input().split())
    if t <= T and c <= ans:
        ans = c
        flag = False
if flag:
    print("TLE")
else:
    print("ans")

n,T = map(int, input().split())
ans = float('inf')
flag = True
for i in range(n):
    c,t = map(int, input().split())
    if t <= T and c <= ans:
        ans = c
        flag = False
if flag:
    print("TLE")
else:
    print(ans)

Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N,T=map(int,input().split())
cc=1000
for i in range(N):
  c,t=map(int,input().split())
  if cc>c and T=>t:
    cc=c
if cc==1000:
  print("TLE")
else:
  print(cc)

N,T=map(int,input().split())
cc=1001
for i in range(N):
  c,t=map(int,input().split())
  if cc>c and T>=t:
    cc=c
if cc==1001:
  print("TLE")
else:
  print(cc)


Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N,T=map(int,input().split())
root=[tuple(map(int,input().split())) for i in range(N)]

minc=1000
for cand in range(N):
    if cand[1]<=T:
        if cand[0]<minc:
            minc=cand[0]
if minc==1000:
    print("TLE")
else:
    print(minc)

    N,T=map(int,input().split())
    root=[tuple(map(int,input().split())) for i in range(N)]
     
    minc=1000
    for cand in root:
        if cand[1]<=T:
            if cand[0]<minc:
                minc=cand[0]
    if minc==1000:
        print("TLE")
    else:
        print(minc)

    N,T=map(int,input().split())
    root=[tuple(map(int,input().split())) for i in range(N)]
     
    minc=1000
    for cand in root(N):
        if cand[1]<=T:
            if cand[0]<minc:
                minc=cand[0]
    if minc==1000:
        print("TLE")
    else:
        print(minc)

N,T=map(int,input().split())
root=[tuple(map(int,input().split())) for i in range(N)]

minc=1001
for cand in root:
    if cand[1]<=T:
        if cand[0]<minc:
            minc=cand[0]
if minc==1001:
    print("TLE")
else:
    print(minc)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,t = map(int,input().split())
ans = 0
for i in range(n):
  a,b = map(int,input().split())
  if t > b:
    ans = b
print(ans if ans > 0 else "TLE")

n,t = map(int,input().split())
ans = 10 **5
for i in range(n):
  a,b = map(int,input().split())
  if t >= b:
    ans = min(a,ans)
print(ans if ans < 10000 else "TLE")

Verdicts: Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
text = input()
textdata = list(map(int, text.split()))
route_num = textdata[0]
time_lim = textdata[1]
candidate = []

for i in range(route_num):
    if textdata[2*(i+1)+1] > time_lim:
        continue
    else:
        candidate += [textdata[2*(i+1)]]
        
if len(candidate)==0:
    print("TLE")
else:
    print("{}".format(min(candidate)))

textdata = list(map(int, input().split()))
route_num = textdata[0]
time_lim = textdata[1]
candidate = []

ctlist = [list(map(int, input().split())) for _ in range(route_num)]

for c, t in ctlist:
    if t > time_lim:
        continue
    else:
        candidate += [c]
        
if len(candidate)==0:
    print("TLE")
else:
    print(min(candidate))

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = map(int, input().split())
paths = []
for i in range(N):
	cost, time = map(int, input().split())
   	if time < T: 
	  	paths.append(cost)
print(min(paths))
    


N,T = map(int,input().split())
paths = []
for i in range(N):
	cost, time = map(int,input().split())
   	if time < T: 
	  	paths.append(cost)
print(min(paths))
    

N,T = map(int,input().split())
paths = []
for i in range(N):
  cost, time = map(int,input().split())
  if time <= T:
    paths.append(cost)
if len(paths) == 0:
  print("TLE")
else:
  print(min(paths))
    


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N,T = map(int,input().split())

min_c = -1
for i in range(T):
    c,t1 = map(int,input().split())
    if t1 <= T:
        if min_c == -1 or min_c > c:
            min_c = c

if min_c == -1:
    print("TLE")
else:
    print(min_c)
    

N,T = map(int,input().split())

min_c = -1
for i in range(N):
    c,t1 = map(int,input().split())
    if t1 <= T:
        if min_c == -1 or min_c > c:
            min_c = c

if min_c == -1:
    print("TLE")
else:
    print(min_c)


Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n, t = input().split()
ret = 1001
for i in range(n):
  a, b = input().split()
  if b <= t:
    ret = min(a, ret)
    
if ret == 1001:
  print('TLE')
else:
  print(ret)

n, t = split(input())
ret = 1001
for i in range(n):
  a, b = split(input())
  if b <= t:
    ret = min(a, ret)
    
if ret == 1001:
  print('TLE')
else:
  print(ret)

n, t = input().split()
ret = 1001
for i in range(n):
  a, b = map(int, input().split())
  if b <= t:
    ret = min(a, ret)
    
if ret == 1001:
  print('TLE')
else:
  print(ret)

n, t = map(int, input().split())
ret = 1001
for i in range(n):
  a, b = map(int, input().split())
  if b <= t:
    ret = min(a, ret)
    
if ret == 1001:
  print('TLE')
else:
  print(ret)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N,T = map(int,input().split())
c = []
t = []
c1,t1 = [int(i) for i in input().split()]
for i in range(N):
  c.append(n1)
  t.append(t1)
ans = 10000
for i in range(N):
  if t[i] <= T:
    ans = min(ans,c[i])
if ans == 10000:
  print('TLE')
else:
  print(ans)

N,T = map(int,input().split())
c = []
t = []
c1,t1 = [int(i) for i in input().split()]
for i in range(N):
  c.append(c1)
  t.append(t1)
ans = 10000
for i in range(N):
  if t[i] <= T:
    ans = min(ans,c[i])
if ans == 10000:
  print('TLE')
else:
  print(ans)

N,T = map(int,input().split())
c = []
t = []
for i in range(N):
    c1,t1 = [int(i) for i in input().split()]
    c.append(c1)
    t.append(t1)
ans = 10000
for i in range(N):
  if t[i] <= T:
    ans = min(ans,c[i])
if ans == 10000:
  print('TLE')
else:
  print(ans)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N,T = [int(x) for x in input().split()]
ans =100000000
for i in range(N):
  c,t =[int(x) for x in input().split()]
  if t<=T:
    ans = min(c,ans)
if ans!=100000000
    print(ans)
else:
  print("TLE")

N,T = [int(x) for x in input().split()]
ans =100000000
for i in range(N):
  c,t =[int(x) for x in input().split()]
  if t<=T:
    ans = min(c,ans)
if ans!=100000000:
  print(ans)
else:
  print("TLE")

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
import numpy as np
N, M = list(map(int, input().split()))
can = []
for i in range(1, int(np.sqrt(M)) + 1):
	if M % i == 0:
		if N <= M // i:
			can.append(i)
		if N <= i:
			can.append(M // i)

if N == 1:
	print(M)
else:
	print(max(can))



N, T = list(map(int, input().split()))
can = []
for _ in range(N):
	c, t = list(map(int, input().split()))
	if t <= T:
		can.append(c)
 
if len(can) == 0:
	print("TLE")
else:	
	print(min(can))

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n=int(input())
T=int(input())
minimum=10000
for i in range(n):
  c=int(input())
  t=int(input())
  if t <= T :
    minimum = min(minimum,c)
if minimum == 10000:
  print('TLE')
else:
  print(minimum)
    


n=int(input())
T=int(input())
minimum=1000
for i in range(n):
  c=int(input())
  t=int(input())
  if t <= T :
    minimum = min(minimum,c)
print(minimum)
    


n=int(input())
T=int(input())
minimum=1000
for i in range(n):
  c=int(input())
  t=int(input())
  if t <= T :
    minnimum = min(minimum,c)
print(minimum)
    


n=int(input())
T=int(input())
minimum=10000
for i in range(n):
  c=int(input())
  t=int(input())
  if t <= T :
    minimum = min(minimum,c)
if minimum = 10000:
  print('TLE')
else:
  print(minimum)
    


n,T = map(int,input().split())
minimum=10000
for i in range(n):
  c,t = map(int,input().split())
  if t <= T :
    minimum = min(minimum,c)
if minimum == 10000:
  print('TLE')
else:
  print(minimum)
    


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
N,T= map(int,input().split())

c=[]
t=[]

for _ in range(N):
	C,T=map(int,input().split())
	c.append(C)
	t.append(T)
	
for j in range(N):
	if t[j]>T:
		c[j]=1001

if min(c)=1001:
	print("TLE")

else:
	print(min(c))

import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
N,T= map(int,input().split())

c=[]
t=[]
m=10000
cnt=0
C=[list(map(int,input().split())) for _ in range(N)]

for j in range(N):
	if C[j][1]>T:
		cnt+=1
	else:
		m=min(C[j][0],m)
		

	

if cnt==N:
	print("TLE")
else:
	print(m)

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
import sys
N,T =map(int,input().split())
c=[]
t=[]
t_count=0
for i in range(N):
    c_n,t_n=map(int,input().split())
    if t_n<=T:
        c.append(c_n)
        t.append(t_n)
        if i>len(t):
            break
        if t[i]>=T:
            t_count += 1
    

if t_count==N:
    print("TLE")
    sys.exit()

print(min(c))

import sys
N,T =map(int,input().split())
c=[]
t=[]
t_count=0
for i in range(N):
    c_n,t_n=map(int,input().split())
    if t_n>T:
        t_count+=1
    if t_n<=T:
        c.append(c_n)
        t.append(t_n)
        #if i>len(t):
            #break
        
    

if t_count==N:
    print("TLE")
    sys.exit()

print(min(c))

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N,T = list(map(int, input().split()))
max = 0
for i in range(N):
    c,t = list(map(int, input().split()))
    if t <= T and c > max:
        max = c
if max == 0:
    print("TLE")
else:
    print(max)

N,T = list(map(int, input().split()))
max = 0
for i in range(N):
    c,t = list(map(int, input().split()))
    if t <= T and c > max:
        max = c
print(max)

N,T = list(map(int, input().split()))
max = 10000
for i in range(N):
    c,t = list(map(int, input().split()))
    if t <= T and c <= max:
        max = c
if max == 10000:
    print("TLE")
else:
    print(max)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n, tm = map(int, input().split())
ctl = []
for i in range(n):
    c, t = map(int, input().split())
    ctl.append([c, t])

filctl = []
for elm in ctl:
    if elm[1] <= tm:
        filctl.append(elm)

filctl = sorted(filctl)
print(filctl[0])

n, tm = map(int, input().split())
ctl = []
for i in range(n):
    c, t = map(int, input().split())
    ctl.append([c, t])

filctl = []
for elm in ctl:
    if elm[1] <= tm:
        filctl.append(elm)
if len(filctl) != 0:
    filctl = sorted(filctl)
    print((filctl[0])[0])
else:
    print("TLE")

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N,T = map(int,input().split())
c = []
t = []
for i in range(N):
  a,b = map(int,input(),split())
  c.append(a)
  t.append(b)
result = []
for j in range(N):
  if T >= t[j]:
    result.append(c[j])
  else:
    None
print(min(result))

N,T = map(int,input().split())
c = []
t = []
for i in range(N):
  a,b = map(int,input().split())
  c.append(a)
  t.append(b)
result = []
for j in range(N):
  if T >= t[j]:
    result.append(c[j])
  else:
    None
print(min(result) if len(result) > 0 else "TLE")

Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
N, T = map(int, input().split())
c = []
t = []
for i in range(N):
    tmp1, tmp2 = map(int, input().split())
    c.append(tmp1)
    t.append(tmp2)

tmp_min = float('inf')

for i in range(N):
    if t[i]<=T and tmp_min>c[i]:
        tmp_min = c[i]

if tmp_min == float('inf'):
    print('TLE')
else tmp_min<=T:
    print(int(tmp_min))


N, T = map(int, input().split())
c = []
t = []
for i in range(N):
    tmp1, tmp2 = map(int, input().split())
    c.append(tmp1)
    t.append(tmp2)

tmp_min = 10**5

for i in range(N):
    if t[i]<=T and tmp_min>c[i]:
        tmp_min = c[i]

if tmp_min == 10**5:
    print('TLE')
else:
    print(int(tmp_min))


Verdicts: Runtime Error

Accepted
Problem: When Mr. X is away from home, he has decided to use his smartwatch to search the best route to go back home, to participate in ABC.  You, the smartwatch, has found N routes to his home.  If Mr. X uses the i-th of these routes, he will get home in time t_i at cost c_i.  Find the smallest cost of a route that takes not longer than time T.

Submission attempts (in order):
n,t=map(int,input().split())
l=[]
m=[]
for i in range(1,n+1):
  p,q=map(int,input().split())
  if q<=t:
    l[i]=p
    m[i]=q
  else:
    pass
if len(l)==0:
  print("TLE")
else:
  print(min(l))
  


n,t=map(int,input().split())
d=0
c=1000
for i in range(n):
  a,s=map(int,input().split())
  if s<=t and c>=a:
    c=a
    d=i+1
if d==0:
  print("TLE")
else:
  print(d)
    

n,m=map(int,input().split())
l=[]
for i in range(n):
  l.append(list(map(int,input().split())))
c=1000
j=0
for i in range(n):
  if l[i][1]<=m and l[i][0]<c:
    c=l[i][0]
    j=i+1
if j==0:
  print("TLE")
else:  
  print(j)

n,t=map(int,input().split())
l=[]
m=[]
for i in range(1,n+1):
  p,q=map(int,input().split())
  if q<=t:
    l[i]=p
    m[i]=q
  else:
    pass
if l==[]:
  print("TLE")
else:
  print(min(l))
  

n,m=map(int,input().split())
l=[]
for i in range(n):
  l.append(list(map(int,input().split())))
l1=[]
c=1000
j=0
for i in range(n):
  if l[i][1]<=m and l[i][0]<c:
    c=l[i][0]
    j=i+1
print(j)
           

n,t=map(int,input().split())
d=0
c=1000
for i in range(n):
  a,s=map(int,input().split())
  if s<=t and c>=a:
    c=a
    d=i+1
if d==0:
  print("TLE")
else:
  print(c)
    


Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Accepted