problem_id
stringlengths 6
6
| user_id
stringlengths 10
10
| time_limit
float64 1k
8k
| memory_limit
float64 262k
1.05M
| problem_description
stringlengths 48
1.55k
| codes
stringlengths 35
98.9k
| status
stringlengths 28
1.7k
| submission_ids
stringlengths 28
1.41k
| memories
stringlengths 13
808
| cpu_times
stringlengths 11
610
| code_sizes
stringlengths 7
505
|
---|---|---|---|---|---|---|---|---|---|---|
p03239 | u347629712 | 2,000 | 1,048,576 | 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. | ['d = list(map(int,(input().strip().split(\' \'))))\nN = d[0]\nT = d[1]\nmin = 100000000\nfor i in range(0, N-1):\n d = list(map(int,input().strip().split(\' \')))\n c = d[0]\n t = d[1]\n if t <= T:\n if min >= c:\n min = c\nif min == 100000000:\n print("TLE")\nelse:\n print(min)\n', 'N = d[0]\nT = d[1]\nmin = 10000\nfor i in range(0, N-1):\n d = list(map(int,input().strip().split(\' \')))\n c = d[0]\n t = d[1]\n if t <= T:\n if min >= c:\n min = c\nif min == 10000:\n print("TLE")\n exit()\nprint(min)\n', 'd = list(map(int,(input().strip().split(\' \'))))\nN = d[0]\nT = d[1]\nmin = 10000\nfor i in range(0, N-1):\n d = list(map(int,input().strip().split(\' \')))\n c = d[0]\n t = d[1]\n if t < T:\n if min >= c:\n min = c\nif min == 10000:\n print("TLE")\nelse:\n print(min)\n', 'd = list(map(int,(input().strip().split(\' \'))))\nN = d[0]\nT = d[1]\nmin = 10000\nfor i in range(0, N-1):\n d = list(map(int,input().strip().split(\' \')))\n c = d[0]\n t = d[1]\n if t <= T:\n if min > c:\n min = c\nif min == 10000:\n print("TLE")\nelse:\n print(min)', 'd = list(map(int,(input().strip().split(\' \'))))\nN = d[0]\nT = d[1]\nmin = 10000\nfor i in range(0, N-1):\n d = list(map(int,input().strip().split(\' \')))\n c = d[0]\n t = d[1]\n if t <= T:\n if min >= c:\n min = c\nif min == 10000:\n print("TLE")\nelse:\n print(min)\n', 'd = list(map(int,(input().strip().split(\' \'))))\nN = d[0]\nT = d[1]\nmin = 100000000\nfor i in range(0, N):\n d = list(map(int,input().strip().split(\' \')))\n c = d[0]\n t = d[1]\n if t <= T:\n if min >= c:\n min = c\nif min == 100000000:\n print("TLE")\nelse:\n print(min)\n'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s193487922', 's383230629', 's542232734', 's564579273', 's939245403', 's561103862'] | [3060.0, 2940.0, 3060.0, 3064.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 18.0] | [297, 242, 288, 287, 289, 295] |
p03239 | u348285568 | 2,000 | 1,048,576 | 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. | ['N,T=map(int,input().split())\ns=2000\nfor i in range(N):\n a,b=map(int,input().split())\n if b<=T:s=min(s,a)\nprint(s if ans<2000 else "TLE")\n', 'N,T=map(int,input().split())\ns=2000\nfor i in range(N):\n a,b=map(int,input().split())\n if b<=T:s=min(s,a)\nprint(s if s<2000 else "TLE")\n'] | ['Runtime Error', 'Accepted'] | ['s073672628', 's177209254'] | [2940.0, 2940.0] | [17.0, 17.0] | [143, 141] |
p03239 | u350093546 | 2,000 | 1,048,576 | 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. | ['n,t=map(int,input().split())\nx=[]\nfor i in range(n):\n c,d=map(int,input().split())\n if d<=t:\n x+=c\nprint(min(x))\n ', "n,t=map(int,input().split())\nx=[]\nfor i in range(n):\n c,d=map(int,input().split())\n if d<=t:\n x+=c\nif x==[]:\n print('TLE')\nelse:\n print(min(x))\n \n", "n,t=map(int,input().split())\nx=1234\nfor i in range(n):\n c,d=map(int,input().split())\n if d<=t:\n if c<=x:\n x=c\nif x==1234:\n print('TLE')\nelse:\n print(x)\n \n"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s081255228', 's596198788', 's858208404'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0] | [122, 156, 169] |
p03239 | u353919145 | 2,000 | 1,048,576 | 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. | ['n, T = map(int, input().split())\nout = list()\nfor _ in range(n):\n c, t = map(int, input().split())\n # if t > T: continue\n out.append((c, t))\nprint(min(out)[0]) if out and min(out)[0] <= T else print("TLE")', 'def a():\n n=list(map(int, input().split()))\n c=list()\n t = list()\n for i in range(n[0]):\n s = list(map(int, input().split()))\n c.append(s[0])\n t.append(s[1])\n z=list()\n z[len(z):]=t[:len(t)]\n z.sort()\n if z[0]>n[1]:\n print("TLE")\n else:\n x = list()\n x[len(x):] = c[:len(c)]\n x.sort()\n for i in x:\n print(\'i=\',i,\' c.index(i)=\',c.index(i),\' t[c.index(i)]=\',t[c.index(i)])\n if t[c.index(i)]<=n[1]:\n print(i)\n break\na()', 'N,T=input().split()\na=0\nb=0\ni=0\nfor i in range(int(N)):\n c,t=input().split()\n if int(t)<=int(T):\n while b==0:\n a=c\n b+=1\n if int(c)<int (a):\n a=c\n i+=1\nif i==0or a==0:\n print("TLE")\nelse :\n print(a)', 'N , T = map(int, input().split())\nmini = T\nfor i in range(N):\n c , t = input().split()\nfor i in range(N):\n if int(t[i])<mini:\n mini = int(t[i])\nif mini<T:\n print(c[i])\nelse:\n print("TLE")', 'n,T=map(int, input().split())\n\nx=[]\n\nfor i in range(n):\n c,t=map(int, input().split())\n if t<=T:\n x.append((i+1,c))\n \nx.sort(key=lambda tup: tup[1])\n\nprint(x[0][0])', 'line = input()\na, b = [int(n) for n in line.split()]\ntempo = b\ncusto = 1001\ntle = True\nfor n in range(1, a+1):\n line = input()\n c, t = [int(n) for n in line.split()]\n if t<=tempo and c<=custo:\n custo = c\n tle = False\n\nprint(custo if tle==False else "TLE")\n'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s235779410', 's548913258', 's793354148', 's839270896', 's894792323', 's483772149'] | [3060.0, 3064.0, 2940.0, 3060.0, 3060.0, 3060.0] | [17.0, 18.0, 17.0, 17.0, 18.0, 18.0] | [214, 550, 268, 207, 184, 279] |
p03239 | u358295478 | 2,000 | 1,048,576 | 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. | ['# -*- coding: utf-8 -*-\n"""\nCreated on Sat Oct 6 14:05:15 2018\n\n@author: rgraptin\n"""\n\nparams = input()\n\nn = int(params.split(\' \')[0])\nt = int(params.split(\' \')[1])\n\ndata = []\n\nfor i in range(0, n) :\n d = input()\n data.append([int(d.split(\' \')[0]),int(d.split(\' \')[1])])\n \nminimum_cost = 1000000\n \nfor cost in data :\n if cost[1] <= t : \n \n if cost[0] < minimum_cost :\n print (cost)\n minimum_cost = cost[0]\n\nif minimum_cost == 1000000:\n print ("TLE")\nelse :\n print (minimum_cost)', '# -*- coding: utf-8 -*-\n"""\nCreated on Sat Oct 6 14:05:15 2018\n\n@author: rgraptin\n"""\n\nparams = input()\n\nn = int(params.split(\' \')[0])\nt = int(params.split(\' \')[1])\n\ndata = []\n\nfor i in range(0, n) :\n d = input()\n data.append([int(d.split(\' \')[0]),int(d.split(\' \')[1])])\n \nminimum_cost = 1000000\n \nfor cost in data :\n if cost[1] <= t : \n \n if cost[0] < minimum_cost :\n minimum_cost = cost[0]\n\nif minimum_cost == 1000000:\n print ("TLE")\nelse :\n print (minimum_cost)'] | ['Wrong Answer', 'Accepted'] | ['s466801761', 's665956858'] | [3064.0, 3064.0] | [17.0, 17.0] | [536, 511] |
p03239 | u361647905 | 2,000 | 1,048,576 | 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. | ['res = [0,0]\nfor i in range(n[0]):\n get = input().split(" ")\n get = list(map(int,get))\n \n\n if get[1] < n[1]:\n res[0] = get[0]\n res[1] = get[1]\n \nif res[0]==0 and res[1]==0:\n print(\'TLE\')\nelse:print(res[0])', 'res = [0,0]\nfor i in range(n[0]):\n get = input().split(" ")\n get = list(map(int,get))\n \n\n if get[1] < n[1]:\n res[0] = get[0]\n res[1] = get[1]\n \nif res[0]==0 and res[1]==0:\n print(\'TLE\')\nelse:print(res[0])', 'n = input().split(" ")\nn = list(map(int,n))\n\n\ncost = 10000\nres = [0,0]\n\nfor i in range(n[0]):\n get = input().split(" ")\n get = list(map(int,get))\n \n if get[1] <= n[1]:\n res[1] = get[1]\n if get[0] < cost:\n cost = get[0]\n\n\nif res[1]==0:\n print(\'TLE\')\nelse:print(cost)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s459088237', 's625108003', 's722285040'] | [3060.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [236, 236, 306] |
p03239 | u363836311 | 2,000 | 1,048,576 | 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. | ["n,T=map(int, input().split())'\nm=-1\nfor i in range(n):\n c,t=map(int, input().split())\n if t<=T:\n if m=-1:\n m=c\n else:\n m=min(m,c)\nif m==-1:\n print('TLE')\nelse:\n print(m)", "n,T=map(int, input().split())\nm=-1\nfor i in range(n):\n c,t=map(int, input().split())\n if t<=T:\n if m=-1:\n m=c\n else:\n m=min(m,c)\nif m==-1:\n print('TLE')\nelse:\n print(m)\n", "n,T=map(int, input().split())\nm=-1\nfor i in range(n):\n c,t=map(int, input().split())\n if t<=T:\n if m==-1:\n m=c\n else:\n m=min(m,c)\nif m==-1:\n print('TLE')\nelse:\n print(m)\n"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s301977989', 's740069497', 's643871851'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [189, 189, 190] |
p03239 | u370721525 | 2,000 | 1,048,576 | 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. | ['N, T = map(int, input().split())\nc = []\nt = []\nfor i in range(N):\n c[i], t[i] = map(int, input().split())\n \ncosts = []\nfor i in range(N):\n if t[i] <= T:\n costs.append(c[i])\n \nprint(min(costs))', 'N, T = map(int, input().split())\nc, t = list(map(int, input().split()))\n\ncosts = []\nfor i in range(N):\n if t[i] <= T:\n costs.append(c[i])\n \nprint(min(costs))', 'N, T = map(int, input().split())\nc = []\nt = []\nc[i], t[i] = map(int, input().split())\n \ncosts = []\nfor i in range(N):\n if t[i] <= T:\n costs.append(c[i])\n \nprint(min(costs))', "N, T = map(int, input().split())\ncost = 10000\n\nfor i in range(N):\n c, t = map(int, input().split())\n if t <= T:\n cost = min(cost, c)\n \nif cost == 10000:\n print('TLE')\nelse:\n print(cost)"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s042278410', 's541276577', 's990825560', 's320696133'] | [3060.0, 2940.0, 3060.0, 9028.0] | [17.0, 17.0, 17.0, 29.0] | [200, 164, 179, 195] |
p03239 | u370793182 | 2,000 | 1,048,576 | 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. | ['N, T = list(map(int, input().split()))\nminc = 1001;\nfor i in range(N):\n c, t = list(map(int, input().split()))\n if(t <= T and c < minc):\n minc = 0\nif(minc == 1001):\n print("TLE")\nelse:\n print(minc)', 'N, T = list(map(int, input().split()))\nminc = 1001;\nfor i in range(N):\n c, t = list(map(int, input().split()))\n if(t <= T and c < minc):\n minc = c\nif(minc == 1001):\n print("TLE")\nelse:\n print(minc)\n'] | ['Wrong Answer', 'Accepted'] | ['s633563169', 's265578950'] | [3060.0, 2940.0] | [18.0, 18.0] | [204, 205] |
p03239 | u374146618 | 2,000 | 1,048,576 | 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. | ['n ,t = [int(x) for x in input().split()]\narr = [list(map(int, input().split())) for _ in range(n)]\n\nans = 9999\nfor i in range(n):\n if arr[i][1] <= t:\n if arr[i][0] <= ans:\n ans = arr[i][0]\nif ans = 9999:\n print("TLE")\nelse:\n print(ans)', 'n ,t = [int(x) for x in input().split()]\narr = [list(map(int, input().split())) for _ in range(n)]\n\nans = 9999\nfor i in range(n):\n if arr[i][1] <= t:\n if arr[i][0] <= ans:\n ans = arr[i][0]\nif ans == 9999:\n print("TLE")\nelse:\n print(ans)'] | ['Runtime Error', 'Accepted'] | ['s230752785', 's024858554'] | [2940.0, 3060.0] | [17.0, 17.0] | [262, 263] |
p03239 | u375500286 | 2,000 | 1,048,576 | 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. | ['N,T = map(int,input().split())\nans = 1000\nfor i in N:\n c,t = map(int,input().split())\n if T >= t:\n ans = min(ans,c)\nprint(ans)', 'N,T = map(int,input().split())\nans = 1001\nfor i in range(N):\n c,t = map(int,input().split())\n if T >= t:\n ans = min(ans,c)\nif ans == 1001:\n print("TLE")\nelse:\n print(ans)'] | ['Runtime Error', 'Accepted'] | ['s470036047', 's741347517'] | [3060.0, 3316.0] | [18.0, 22.0] | [133, 189] |
p03239 | u375616706 | 2,000 | 1,048,576 | 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. | ["n,t=list(map(int,input().split()))\nl=[]\nfor i in range(n):\n l.append(tuple(map(int,input().split())))\n\nl=sorted(l,key=lambda x:x[0],reverse=True)\nfor i in l:\n if i[1]<t:\n print(i[0])\n break\nprint('TLE')\n", "n,t=list(map(int,input().split()))\nl=[]\nfor i in range(n):\n l.append(tuple(map(int,input().split())))\n\nl=sorted(l,key=lambda x:x[0])\nfor i in l:\n if i[1]<=t:\n print(i[0])\n exit()\nprint('TLE')\n"] | ['Wrong Answer', 'Accepted'] | ['s915143186', 's839572593'] | [2940.0, 2940.0] | [19.0, 18.0] | [223, 212] |
p03239 | u382639013 | 2,000 | 1,048,576 | 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. | ['T, N = list(map(int,input().split()))\n\nans_c = 1001\nfor i in range(T):\n c, t = list(map(int,input().split()))\n if (N >= t) and (c <= ans_c):\n ans_c = c\n\nif ans_t == 1001:\n print("TLE")\nelse:\n print(ans_c)', 'T, N = list(map(int,input().split()))\n\nans_t = 1001\nfor i in range(T):\n c, t = list(map(int,input().split()))\n if N >= t and t <= ans_t:\n ans_t = t\n\nif ans_t == 1001:\n print("TLE")\nelse:\n print(ans_t)', 'T, N = list(map(int,input().split()))\n\nans_t = 1001\nfor i in range(T):\n c, t = list(map(int,input().split()))\n if N > t and t < ans_t:\n ans_t = t\n\nif ans_t == 1001:\n print("TLE")\nelse:\n print(ans_t)', 'T, N = list(map(int,input().split()))\n\nans_c = 1001\nfor i in range(T):\n c, t = list(map(int,input().split()))\n if (N >= t) and (c <= ans_c):\n ans_c = c\n\nif ans_c == 1001:\n print("TLE")\nelse:\n print(ans_c)'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s101415927', 's581141130', 's913643925', 's413588210'] | [9124.0, 9180.0, 9096.0, 9116.0] | [24.0, 30.0, 24.0, 28.0] | [223, 219, 217, 223] |
p03239 | u386122581 | 2,000 | 1,048,576 | 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. | ['N, T=map(int, input().split())\n\nc_list=[]\nt_list=[]\nans_list=[]\nfor i in N:\n c,t=map(int, input().split())\n c_list.append(c)\n t_list.append(t)\n\nct_dict=dict(zip(c_list, t_list)) \n \nif T<=min(t_list):\n print("TLE")\nelse:\n for k,v in ct_dict.items():\n if v<=T:\n ans_list.append(k)\n\nprint(min(ans_list))', 'N, T=map(int, input().split())\n \nc_list=[]\nt_list=[]\nans_list=[]\nfor i in range(N):\n c,t=map(int, input().split())\n c_list.append(c)\n t_list.append(t)\n \nct_dict=dict(zip(c_list, t_list)) \n \nif T<=min(t_list):\n print("TLE")\nelse:\n for k,v in ct_dict.items():\n if v<=T:\n ans_list.append(k)\n \n print(min(ans_list))'] | ['Runtime Error', 'Accepted'] | ['s037131372', 's662134623'] | [3064.0, 3064.0] | [17.0, 17.0] | [315, 327] |
p03239 | u391277538 | 2,000 | 1,048,576 | 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. | ['from operator import itemgetter\n\ndef main():\n\tn, t = map(int, input().split())\n\n\tcosts = []\n\tfor i in range(n):\n\t\tcosts.append(list(map(int, input().split())))\n\n\tcosts = sorted(costs, key=itemgetter(0))\n\tif costs[0][1]>t:\n\t\tprint("TLE")\n\t\treturn\n\tfor i in range(n):\n\t\tif costs[i][1] > t:\n\t\t\tprint("TLE")\n\t\t\treturn\n\t\tif costs[i][1] <= t:\n\t\t\tprint(costs[i][0])\n\t\t\treturn\n\nmain()', 'from operator import itemgetter\n\ndef main():\n\tn, t = map(int, input().split())\n\n\tcosts = []\n\tfor i in range(n):\n\t\tcosts.append(list(map(int, input().split())))\n\n\tcosts = sorted(costs, key=itemgetter(0))\n\tfor i in range(n):\n\t\tif costs[i][1] <= t:\n\t\t\tprint(costs[i][0])\n\t\t\treturn\n\tprint("TLE")\n\treturn\n\nmain()'] | ['Wrong Answer', 'Accepted'] | ['s631126280', 's630261207'] | [3064.0, 3060.0] | [18.0, 19.0] | [376, 307] |
p03239 | u391328897 | 2,000 | 1,048,576 | 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. | ['n, t = map(int, input().split())\nct = [list(map(int, input().split())) for _ in range(n)]\nans = []\n[ans.append(i[0]) for i in ct if i[1] <= t]\nprint(ans)\n', 'N, T = map(int, input().split())\nm = 1001\nfor i in range(N):\n c, t = map(int, input().split())\n if t <= T and c <= m:\n m = c\nprint("TLE" if m == 1001 else m)\n'] | ['Wrong Answer', 'Accepted'] | ['s915806689', 's543122886'] | [2940.0, 2940.0] | [19.0, 18.0] | [154, 171] |
p03239 | u391819434 | 2,000 | 1,048,576 | 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. | ["N,T=map(int,input().split())\n\nCT=[[0,0]]*N\ni=0\nwhile i<N:\n CT[i]=list(map(int,input().split()))\n i+=1\n\nCT=sorted(CT)\n\nprint(CT)\n\nans='TLE'\nfor x,y in CT:\n if y<=T:\n ans=x\n break\nprint(ans)\n", "N,T=map(int,input().split())\n\nCT=[[0,0]]*N\ni=0\nwhile i<N:\n CT[i]=list(map(int,input().split()))\n i+=1\n\nCT=sorted(CT)\n\nans='TLE'\nfor x,y in CT:\n if y<=T:\n ans=x\n break\nprint(ans)\n"] | ['Wrong Answer', 'Accepted'] | ['s691024467', 's339477079'] | [3060.0, 3060.0] | [18.0, 17.0] | [212, 201] |
p03239 | u393253137 | 2,000 | 1,048,576 | 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. | ['I = lambda:map(int,input().split())\nn,t = I()\n\n\n\nk = [c for c,s in [(I()) for _ in [0]*n] if s<=t]\nprint(k)', 'I = lambda:map(int,input().split())\nn,t = I()\n\n\n\nk = [c for c,s in [(I()) for _ in [0]*n] if s<=t]\nprint(min(k) if k!=[] else "TLE")'] | ['Wrong Answer', 'Accepted'] | ['s372958713', 's280352525'] | [3060.0, 3060.0] | [17.0, 18.0] | [218, 243] |
p03239 | u393693918 | 2,000 | 1,048,576 | 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. | ['N, T = map(int, input().split())\nans = 1000\nfor i in range(n):\n c, t = map(int, input().split())\n if t > T:\n continue\n if ans > c:\n ans = c\n\nprint(ans)\n ', "N, T = map(int, input().split())\nans = 1001\nfor i in range(n):\n c, t = map(int, input().split())\n if t > T:\n continue\n if ans > c:\n ans = c\n\nif ans = 1001:\n print('TLE')\nelse:\n print(ans)\n", "N, T = map(int, input().split())\nans = 1001\nfor i in range(N):\n c, t = map(int, input().split())\n if t > T:\n continue\n if ans > c:\n ans = c\n\nif ans = 1001:\n print('TLE')\nelse:\n print(ans)\n", "N, T = map(int, input().split())\nans = 1001\nfor i in range(N):\n c, t = map(int, input().split())\n if t > T:\n continue\n if ans > c:\n ans = c\n\nif ans == 1001:\n print('TLE')\nelse:\n print(ans)\n"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s032452406', 's062485861', 's485739103', 's369238833'] | [2940.0, 2940.0, 2940.0, 2940.0] | [23.0, 18.0, 18.0, 19.0] | [177, 217, 217, 218] |
p03239 | u395576337 | 2,000 | 1,048,576 | 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. | ["import numpy as np\n\ndataNum, timeMax = input().strip().split(' ')\ndataNum, timeMax = [int(dataNum), int(timeMax)]\n\ncost = []\ntime = []\n\nfor i in range(dataNum):\n A, B = list(map(int, input().strip().split(' ')))\n cost.append(A)\n time.append(B)\n\nif min(time) > timeMax:\n print('TLE')\nelse :\n print(min(cost))", "import numpy as np\n\ndataNum, timeMax = input().strip().split(' ')\ndataNum, timeMax = [int(dataNum), int(timeMax)]\n\ncost = [10000]\ntime = [10000]\n\n\nfor i in range(dataNum):\n A, B = list(map(int, input().strip().split(' '))) \n if B <= timeMax:\n cost.append(A)\n time.append(B)\n \nif min(time) > timeMax:\n print('TLE')\nelse :\n print(min(cost))\n"] | ['Wrong Answer', 'Accepted'] | ['s417153835', 's565974073'] | [12508.0, 12504.0] | [149.0, 152.0] | [322, 567] |
p03239 | u398846051 | 2,000 | 1,048,576 | 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. | ['N, T = map(int, input().split())\nx = [map(int, input().split()) for _ in range(N)]\nx.sort(key=lambda y:y[0], reverse=True)\nans = 0\nfor (c, t) in x:\n if t <= T:\n ans = c\nprint(ans)', "N, T = map(int, input().split())\nx = [list(map(int, input().split())) for _ in range(N)]\nx.sort(key=lambda y:y[0], reverse=True)\nans = 0\nfor (c, t) in x:\n if t <= T:\n ans = c\nif ans == 0:\n print('TLE')\nelse:\n print(ans)\n"] | ['Runtime Error', 'Accepted'] | ['s103334924', 's901992756'] | [3060.0, 3060.0] | [18.0, 17.0] | [189, 236] |
p03239 | u407016024 | 2,000 | 1,048,576 | 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. | ["N, T = map(int, input().split())\nc = []\nt = []\nfor i in range(N):\n a, b = map(int, input().split())\n c.append(a)\n t.append(b) \nprint(N, T)\nprint(c, t)\n\nans = []\n\nfor i, v in enumerate(t):\n if v <= T:\n ans.append(c[i])\n\nif len(ans) > 0:\n print(min(ans))\nelse:\n print('TLE')", "N, T = map(int, input().split())\nc = []\nt = []\n\nfor i in range(N):\n a, b = map(int, input().split())\n c.append(a)\n t.append(b) \n\nans = []\nfor i, v in enumerate(t):\n if v <= T:\n ans.append(c[i])\n\nif len(ans) > 0:\n print(min(ans))\nelse:\n print('TLE')"] | ['Wrong Answer', 'Accepted'] | ['s934332757', 's300917445'] | [3064.0, 3064.0] | [17.0, 18.0] | [302, 278] |
p03239 | u411544692 | 2,000 | 1,048,576 | 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. | ['N, T = map(int, input().split())\n\ncost = 1001\nfor i in range(N):\n c, t = map(int, input().split())\n if t <= T:\n cost = min(cost, t)\n else:\n continue\n\nif cost == 1001:\n print("TLE")\nelse:\n print(cost)', 'N, T = map(int, input().split())\n\ncost = 1001\nfor i in range(N):\n c, t = map(int, input().split())\n if t <= T:\n cost = min(cost, c)\n else:\n continue\n\nif cost == 1001:\n print("TLE")\nelse:\n print(cost)'] | ['Wrong Answer', 'Accepted'] | ['s200391853', 's805495252'] | [2940.0, 2940.0] | [17.0, 17.0] | [210, 210] |
p03239 | u411858517 | 2,000 | 1,048,576 | 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. | ["N, T = map(int, input().split())\nL = [list(map(int, input().split())) for i in range(N)]\n\nres = 10000\n\nfor i in range(N):\n if L[1] <= T:\n if res > L[0]:\n res = L[0]\n \nif res == 10000:\n res = 'TLE'\nprint(res)", "N, T = map(int, input().split())\nL = [list(map(int, input().split())) for i in range(N)]\n\nres = 10000\n\nfor i in range(N):\n if L[i][1] <= T:\n if res > L[i][0]:\n res = L[i][0]\n \nif res == 10000:\n res = 'TLE'\nprint(res)"] | ['Runtime Error', 'Accepted'] | ['s199381001', 's870480256'] | [3060.0, 3060.0] | [18.0, 17.0] | [221, 230] |
p03239 | u416758623 | 2,000 | 1,048,576 | 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. | ['n,T = map(int, input().split())\nans = float(\'inf\')\nflag = True\nfor i in range(n):\n c,t = map(int, input().split())\n if t <= T and c <= ans:\n ans = c\n flag = False\nif flag:\n print("TLE")\nelse:\n print("ans")', 'n,T = map(int, input().split())\nans = float(\'inf\')\nflag = True\nfor i in range(n):\n c,t = map(int, input().split())\n if t <= T and c <= ans:\n ans = c\n flag = False\nif flag:\n print("TLE")\nelse:\n print(ans)'] | ['Wrong Answer', 'Accepted'] | ['s447689886', 's609877499'] | [2940.0, 3060.0] | [17.0, 17.0] | [231, 229] |
p03239 | u419963262 | 2,000 | 1,048,576 | 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. | ['N,T=map(int,input().split())\ncc=1000\nfor i in range(N):\n c,t=map(int,input().split())\n if cc>c and T=>t:\n cc=c\nif cc==1000:\n print("TLE")\nelse:\n print(cc)', 'N,T=map(int,input().split())\ncc=1001\nfor i in range(N):\n c,t=map(int,input().split())\n if cc>c and T>=t:\n cc=c\nif cc==1001:\n print("TLE")\nelse:\n print(cc)\n'] | ['Runtime Error', 'Accepted'] | ['s578379104', 's298771735'] | [2940.0, 2940.0] | [17.0, 18.0] | [161, 162] |
p03239 | u424240341 | 2,000 | 1,048,576 | 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. | ['N,T=map(int,input().split())\nroot=[tuple(map(int,input().split())) for i in range(N)]\n\nminc=1000\nfor cand in range(N):\n if cand[1]<=T:\n if cand[0]<minc:\n minc=cand[0]\nif minc==1000:\n print("TLE")\nelse:\n print(minc)', ' N,T=map(int,input().split())\n root=[tuple(map(int,input().split())) for i in range(N)]\n \n minc=1000\n for cand in root:\n if cand[1]<=T:\n if cand[0]<minc:\n minc=cand[0]\n if minc==1000:\n print("TLE")\n else:\n print(minc)', ' N,T=map(int,input().split())\n root=[tuple(map(int,input().split())) for i in range(N)]\n \n minc=1000\n for cand in root(N):\n if cand[1]<=T:\n if cand[0]<minc:\n minc=cand[0]\n if minc==1000:\n print("TLE")\n else:\n print(minc)', 'N,T=map(int,input().split())\nroot=[tuple(map(int,input().split())) for i in range(N)]\n\nminc=1001\nfor cand in root:\n if cand[1]<=T:\n if cand[0]<minc:\n minc=cand[0]\nif minc==1001:\n print("TLE")\nelse:\n print(minc)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s172797429', 's481882677', 's644686371', 's318390326'] | [3060.0, 2940.0, 2940.0, 3060.0] | [18.0, 17.0, 17.0, 17.0] | [241, 286, 289, 237] |
p03239 | u427984570 | 2,000 | 1,048,576 | 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. | ['n,t = map(int,input().split())\nans = 0\nfor i in range(n):\n a,b = map(int,input().split())\n if t > b:\n ans = b\nprint(ans if ans > 0 else "TLE")', 'n,t = map(int,input().split())\nans = 10 **5\nfor i in range(n):\n a,b = map(int,input().split())\n if t >= b:\n ans = min(a,ans)\nprint(ans if ans < 10000 else "TLE")'] | ['Wrong Answer', 'Accepted'] | ['s066481491', 's354129897'] | [2940.0, 2940.0] | [18.0, 18.0] | [147, 166] |
p03239 | u428819890 | 2,000 | 1,048,576 | 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. | ['text = input()\ntextdata = list(map(int, text.split()))\nroute_num = textdata[0]\ntime_lim = textdata[1]\ncandidate = []\n\nfor i in range(route_num):\n if textdata[2*(i+1)+1] > time_lim:\n continue\n else:\n candidate += [textdata[2*(i+1)]]\n \nif len(candidate)==0:\n print("TLE")\nelse:\n print("{}".format(min(candidate)))', 'textdata = list(map(int, input().split()))\nroute_num = textdata[0]\ntime_lim = textdata[1]\ncandidate = []\n\nctlist = [list(map(int, input().split())) for _ in range(route_num)]\n\nfor c, t in ctlist:\n if t > time_lim:\n continue\n else:\n candidate += [c]\n \nif len(candidate)==0:\n print("TLE")\nelse:\n print(min(candidate))'] | ['Runtime Error', 'Accepted'] | ['s643866666', 's502043467'] | [3064.0, 3064.0] | [17.0, 18.0] | [344, 348] |
p03239 | u448655578 | 2,000 | 1,048,576 | 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. | ['N, T = map(int, input().split())\npaths = []\nfor i in range(N):\n\tcost, time = map(int, input().split())\n \tif time < T: \n\t \tpaths.append(cost)\nprint(min(paths))\n \n', 'N,T = map(int,input().split())\npaths = []\nfor i in range(N):\n\tcost, time = map(int,input().split())\n \tif time < T: \n\t \tpaths.append(cost)\nprint(min(paths))\n ', 'N,T = map(int,input().split())\npaths = []\nfor i in range(N):\n cost, time = map(int,input().split())\n if time <= T:\n paths.append(cost)\nif len(paths) == 0:\n print("TLE")\nelse:\n print(min(paths))\n \n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s303795127', 's858235757', 's346199843'] | [3188.0, 2940.0, 2940.0] | [18.0, 18.0, 18.0] | [167, 163, 206] |
p03239 | u452284862 | 2,000 | 1,048,576 | 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. | ['N,T = map(int,input().split())\n\nmin_c = -1\nfor i in range(T):\n c,t1 = map(int,input().split())\n if t1 <= T:\n if min_c == -1 or min_c > c:\n min_c = c\n\nif min_c == -1:\n print("TLE")\nelse:\n print(min_c)\n ', 'N,T = map(int,input().split())\n\nmin_c = -1\nfor i in range(N):\n c,t1 = map(int,input().split())\n if t1 <= T:\n if min_c == -1 or min_c > c:\n min_c = c\n\nif min_c == -1:\n print("TLE")\nelse:\n print(min_c)\n'] | ['Runtime Error', 'Accepted'] | ['s010782289', 's254433562'] | [2940.0, 2940.0] | [17.0, 17.0] | [234, 230] |
p03239 | u462434199 | 2,000 | 1,048,576 | 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. | ["n, t = input().split()\nret = 1001\nfor i in range(n):\n a, b = input().split()\n if b <= t:\n ret = min(a, ret)\n \nif ret == 1001:\n print('TLE')\nelse:\n print(ret)", "n, t = split(input())\nret = 1001\nfor i in range(n):\n a, b = split(input())\n if b <= t:\n ret = min(a, ret)\n \nif ret == 1001:\n print('TLE')\nelse:\n print(ret)", "n, t = input().split()\nret = 1001\nfor i in range(n):\n a, b = map(int, input().split())\n if b <= t:\n ret = min(a, ret)\n \nif ret == 1001:\n print('TLE')\nelse:\n print(ret)", "n, t = map(int, input().split())\nret = 1001\nfor i in range(n):\n a, b = map(int, input().split())\n if b <= t:\n ret = min(a, ret)\n \nif ret == 1001:\n print('TLE')\nelse:\n print(ret)"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s164222738', 's228651028', 's953566197', 's906331239'] | [2940.0, 2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0, 17.0] | [167, 165, 177, 187] |
p03239 | u463775490 | 2,000 | 1,048,576 | 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. | ["N,T = map(int,input().split())\nc = []\nt = []\nc1,t1 = [int(i) for i in input().split()]\nfor i in range(N):\n c.append(n1)\n t.append(t1)\nans = 10000\nfor i in range(N):\n if t[i] <= T:\n ans = min(ans,c[i])\nif ans == 10000:\n print('TLE')\nelse:\n print(ans)", "N,T = map(int,input().split())\nc = []\nt = []\nc1,t1 = [int(i) for i in input().split()]\nfor i in range(N):\n c.append(c1)\n t.append(t1)\nans = 10000\nfor i in range(N):\n if t[i] <= T:\n ans = min(ans,c[i])\nif ans == 10000:\n print('TLE')\nelse:\n print(ans)", "N,T = map(int,input().split())\nc = []\nt = []\nfor i in range(N):\n c1,t1 = [int(i) for i in input().split()]\n c.append(c1)\n t.append(t1)\nans = 10000\nfor i in range(N):\n if t[i] <= T:\n ans = min(ans,c[i])\nif ans == 10000:\n print('TLE')\nelse:\n print(ans)"] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s117538126', 's471345657', 's686633755'] | [3064.0, 3064.0, 3064.0] | [16.0, 17.0, 17.0] | [257, 257, 265] |
p03239 | u466331465 | 2,000 | 1,048,576 | 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. | ['N,T = [int(x) for x in input().split()]\nans =100000000\nfor i in range(N):\n c,t =[int(x) for x in input().split()]\n if t<=T:\n ans = min(c,ans)\nif ans!=100000000\n print(ans)\nelse:\n print("TLE")', 'N,T = [int(x) for x in input().split()]\nans =100000000\nfor i in range(N):\n c,t =[int(x) for x in input().split()]\n if t<=T:\n ans = min(c,ans)\nif ans!=100000000:\n print(ans)\nelse:\n print("TLE")'] | ['Runtime Error', 'Accepted'] | ['s698514457', 's211272562'] | [2940.0, 3060.0] | [17.0, 18.0] | [200, 199] |
p03239 | u467041847 | 2,000 | 1,048,576 | 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. | ['import numpy as np\nN, M = list(map(int, input().split()))\ncan = []\nfor i in range(1, int(np.sqrt(M)) + 1):\n\tif M % i == 0:\n\t\tif N <= M // i:\n\t\t\tcan.append(i)\n\t\tif N <= i:\n\t\t\tcan.append(M // i)\n\nif N == 1:\n\tprint(M)\nelse:\n\tprint(max(can))\n\n', 'N, T = list(map(int, input().split()))\ncan = []\nfor _ in range(N):\n\tc, t = list(map(int, input().split()))\n\tif t <= T:\n\t\tcan.append(c)\n \nif len(can) == 0:\n\tprint("TLE")\nelse:\t\n\tprint(min(can))'] | ['Runtime Error', 'Accepted'] | ['s675628385', 's356854721'] | [13228.0, 3060.0] | [162.0, 17.0] | [239, 192] |
p03239 | u469953228 | 2,000 | 1,048,576 | 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. | ["n=int(input())\nT=int(input())\nminimum=10000\nfor i in range(n):\n c=int(input())\n t=int(input())\n if t <= T :\n minimum = min(minimum,c)\nif minimum == 10000:\n print('TLE')\nelse:\n print(minimum)\n \n", 'n=int(input())\nT=int(input())\nminimum=1000\nfor i in range(n):\n c=int(input())\n t=int(input())\n if t <= T :\n minimum = min(minimum,c)\nprint(minimum)\n \n', 'n=int(input())\nT=int(input())\nminimum=1000\nfor i in range(n):\n c=int(input())\n t=int(input())\n if t <= T :\n minnimum = min(minimum,c)\nprint(minimum)\n \n', "n=int(input())\nT=int(input())\nminimum=10000\nfor i in range(n):\n c=int(input())\n t=int(input())\n if t <= T :\n minimum = min(minimum,c)\nif minimum = 10000:\n print('TLE')\nelse:\n print(minimum)\n \n", "n,T = map(int,input().split())\nminimum=10000\nfor i in range(n):\n c,t = map(int,input().split())\n if t <= T :\n minimum = min(minimum,c)\nif minimum == 10000:\n print('TLE')\nelse:\n print(minimum)\n \n"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s159250731', 's576452570', 's620174632', 's925649522', 's983004892'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0, 17.0, 19.0] | [204, 159, 160, 203, 204] |
p03239 | u474925961 | 2,000 | 1,048,576 | 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. | ['import sys\n\nif sys.platform ==\'ios\':\n sys.stdin=open(\'input_file.txt\')\n \nN,T= map(int,input().split())\n\nc=[]\nt=[]\n\nfor _ in range(N):\n\tC,T=map(int,input().split())\n\tc.append(C)\n\tt.append(T)\n\t\nfor j in range(N):\n\tif t[j]>T:\n\t\tc[j]=1001\n\nif min(c)=1001:\n\tprint("TLE")\n\nelse:\n\tprint(min(c))', 'import sys\n\nif sys.platform ==\'ios\':\n sys.stdin=open(\'input_file.txt\')\n \nN,T= map(int,input().split())\n\nc=[]\nt=[]\nm=10000\ncnt=0\nC=[list(map(int,input().split())) for _ in range(N)]\n\nfor j in range(N):\n\tif C[j][1]>T:\n\t\tcnt+=1\n\telse:\n\t\tm=min(C[j][0],m)\n\t\t\n\n\t\n\nif cnt==N:\n\tprint("TLE")\nelse:\n\tprint(m)'] | ['Runtime Error', 'Accepted'] | ['s644407562', 's796815752'] | [2940.0, 3064.0] | [17.0, 18.0] | [293, 304] |
p03239 | u494058663 | 2,000 | 1,048,576 | 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. | ['import sys\nN,T =map(int,input().split())\nc=[]\nt=[]\nt_count=0\nfor i in range(N):\n c_n,t_n=map(int,input().split())\n if t_n<=T:\n c.append(c_n)\n t.append(t_n)\n if i>len(t):\n break\n if t[i]>=T:\n t_count += 1\n \n\nif t_count==N:\n print("TLE")\n sys.exit()\n\nprint(min(c))', 'import sys\nN,T =map(int,input().split())\nc=[]\nt=[]\nt_count=0\nfor i in range(N):\n c_n,t_n=map(int,input().split())\n if t_n>T:\n t_count+=1\n if t_n<=T:\n c.append(c_n)\n t.append(t_n)\n #if i>len(t):\n #break\n \n \n\nif t_count==N:\n print("TLE")\n sys.exit()\n\nprint(min(c))'] | ['Runtime Error', 'Accepted'] | ['s366837413', 's880125470'] | [3064.0, 3064.0] | [18.0, 17.0] | [327, 326] |
p03239 | u497883442 | 2,000 | 1,048,576 | 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. | ['N,T = list(map(int, input().split()))\nmax = 0\nfor i in range(N):\n c,t = list(map(int, input().split()))\n if t <= T and c > max:\n max = c\nif max == 0:\n print("TLE")\nelse:\n print(max)', 'N,T = list(map(int, input().split()))\nmax = 0\nfor i in range(N):\n c,t = list(map(int, input().split()))\n if t <= T and c > max:\n max = c\nprint(max)', 'N,T = list(map(int, input().split()))\nmax = 10000\nfor i in range(N):\n c,t = list(map(int, input().split()))\n if t <= T and c <= max:\n max = c\nif max == 10000:\n print("TLE")\nelse:\n print(max)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s581184446', 's963270282', 's686081892'] | [3060.0, 2940.0, 3060.0] | [18.0, 17.0, 17.0] | [200, 160, 209] |
p03239 | u499966353 | 2,000 | 1,048,576 | 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. | ['n, tm = map(int, input().split())\nctl = []\nfor i in range(n):\n c, t = map(int, input().split())\n ctl.append([c, t])\n\nfilctl = []\nfor elm in ctl:\n if elm[1] <= tm:\n filctl.append(elm)\n\nfilctl = sorted(filctl)\nprint(filctl[0])', 'n, tm = map(int, input().split())\nctl = []\nfor i in range(n):\n c, t = map(int, input().split())\n ctl.append([c, t])\n\nfilctl = []\nfor elm in ctl:\n if elm[1] <= tm:\n filctl.append(elm)\nif len(filctl) != 0:\n filctl = sorted(filctl)\n print((filctl[0])[0])\nelse:\n print("TLE")'] | ['Runtime Error', 'Accepted'] | ['s993677626', 's410884821'] | [3060.0, 3060.0] | [19.0, 18.0] | [240, 296] |
p03239 | u503111914 | 2,000 | 1,048,576 | 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. | ['N,T = map(int,input().split())\nc = []\nt = []\nfor i in range(N):\n a,b = map(int,input(),split())\n c.append(a)\n t.append(b)\nresult = []\nfor j in range(N):\n if T >= t[j]:\n result.append(c[j])\n else:\n None\nprint(min(result))', 'N,T = map(int,input().split())\nc = []\nt = []\nfor i in range(N):\n a,b = map(int,input().split())\n c.append(a)\n t.append(b)\nresult = []\nfor j in range(N):\n if T >= t[j]:\n result.append(c[j])\n else:\n None\nprint(min(result) if len(result) > 0 else "TLE")'] | ['Runtime Error', 'Accepted'] | ['s656156243', 's534194462'] | [3064.0, 3064.0] | [23.0, 17.0] | [231, 261] |
p03239 | u506689504 | 2,000 | 1,048,576 | 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. | ["N, T = map(int, input().split())\nc = []\nt = []\nfor i in range(N):\n tmp1, tmp2 = map(int, input().split())\n c.append(tmp1)\n t.append(tmp2)\n\ntmp_min = float('inf')\n\nfor i in range(N):\n if t[i]<=T and tmp_min>c[i]:\n tmp_min = c[i]\n\nif tmp_min == float('inf'):\n print('TLE')\nelse tmp_min<=T:\n print(int(tmp_min))\n", "N, T = map(int, input().split())\nc = []\nt = []\nfor i in range(N):\n tmp1, tmp2 = map(int, input().split())\n c.append(tmp1)\n t.append(tmp2)\n\ntmp_min = 10**5\n\nfor i in range(N):\n if t[i]<=T and tmp_min>c[i]:\n tmp_min = c[i]\n\nif tmp_min == 10**5:\n print('TLE')\nelse:\n print(int(tmp_min))\n"] | ['Runtime Error', 'Accepted'] | ['s189715851', 's222552208'] | [2940.0, 3060.0] | [18.0, 18.0] | [334, 309] |
p03239 | u518042385 | 2,000 | 1,048,576 | 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. | ['n,t=map(int,input().split())\nl=[]\nm=[]\nfor i in range(1,n+1):\n p,q=map(int,input().split())\n if q<=t:\n l[i]=p\n m[i]=q\n else:\n pass\nif len(l)==0:\n print("TLE")\nelse:\n print(min(l))\n \n', 'n,t=map(int,input().split())\nd=0\nc=1000\nfor i in range(n):\n a,s=map(int,input().split())\n if s<=t and c>=a:\n c=a\n d=i+1\nif d==0:\n print("TLE")\nelse:\n print(d)\n ', 'n,m=map(int,input().split())\nl=[]\nfor i in range(n):\n l.append(list(map(int,input().split())))\nc=1000\nj=0\nfor i in range(n):\n if l[i][1]<=m and l[i][0]<c:\n c=l[i][0]\n j=i+1\nif j==0:\n print("TLE")\nelse: \n print(j)', 'n,t=map(int,input().split())\nl=[]\nm=[]\nfor i in range(1,n+1):\n p,q=map(int,input().split())\n if q<=t:\n l[i]=p\n m[i]=q\n else:\n pass\nif l==[]:\n print("TLE")\nelse:\n print(min(l))\n ', 'n,m=map(int,input().split())\nl=[]\nfor i in range(n):\n l.append(list(map(int,input().split())))\nl1=[]\nc=1000\nj=0\nfor i in range(n):\n if l[i][1]<=m and l[i][0]<c:\n c=l[i][0]\n j=i+1\nprint(j)\n ', 'n,t=map(int,input().split())\nd=0\nc=1000\nfor i in range(n):\n a,s=map(int,input().split())\n if s<=t and c>=a:\n c=a\n d=i+1\nif d==0:\n print("TLE")\nelse:\n print(c)\n \n'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s064185789', 's175553647', 's233515391', 's603600244', 's616716280', 's164377977'] | [2940.0, 2940.0, 3064.0, 3064.0, 3064.0, 2940.0] | [18.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [197, 173, 223, 192, 207, 174] |
p03239 | u518987899 | 2,000 | 1,048,576 | 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. | ["import sys\nlines = []\nfor line in sys.stdin:\n col = line.strip().split(' ')\n lines.append((int(col[0]), int(col[1])))\nmin = 1001\nfor cand in lines[1:]:\n if cand[1] < lines[0][1] and cand[0] < min:\n min = cand[1]\nprint(min if min < 1001 else 'TLE')", "import sys\nlines = []\nfor line in sys.stdin:\n col = line.strip().split(' ')\n lines.append((int(col[0]), int(col[1])))\nmin = 1001\nfor cand in lines[1:]:\n if cand[1] <= lines[0][1] and cand[0] < min:\n min = cand[0]\nprint(min if min < 1001 else 'TLE')"] | ['Wrong Answer', 'Accepted'] | ['s733149266', 's309594680'] | [3060.0, 3060.0] | [18.0, 18.0] | [253, 254] |
p03239 | u519939795 | 2,000 | 1,048,576 | 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. | ['n,t=map(int,input().split())\nl1=[]\nl2=[]\nwhile n>0:\n a,b=(map(int,input().split()))\n l1.append(a)\n l2.append(b)\n n-=1\nmn=[]\nfor i in range(n):\n if l2[i]>t:\n l1.remove(l1[i])\n l2.remove(l2[i])\nprint(min(l1))\nprint(l1)\nprint(l2)', 'n,T=[int(i) for i in input().split()]\nmn=10000\nprint(n)\nprint(t)\nfor i in range(n):\n c,t=[int(i) for i in input().split()]\n if t<=T:\n mn=min(mn,c)\nprint("TLE" if mn==10000 else mn)', 'n, T = map(int, input().split())\n\nans = float("inf")\nfor _ in range(n):\n c, t = map(int, input().split())\n if t <= T:\n ans = min(ans, c)\n\nif ans == float("inf"):\n ans = "TLE"\n\nprint(ans)\n'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s276978722', 's922167743', 's583003947'] | [3064.0, 3060.0, 2940.0] | [17.0, 18.0, 17.0] | [255, 193, 203] |
p03239 | u521866787 | 2,000 | 1,048,576 | 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. | ['x,y = map(int,input().split())\n\ncost = 1001\n\nfor i in range(x):\n a,b = map(int, input().split())\n if b <= y:\n cost = min(cost,x)\n\nprint("TLE" if cost==1001 else cost)', 'x,y = map(int,input().split())\n\ncost = 1001\n\nfor i in range(x):\n a,b = map(int, input().split())\n if b <= y:\n cost = min(cost,x)\n\nprint(cost)', 'x,y = map(int,input().split())\n\ncost = 1001\n\nfor i in range(x):\n a,b = map(int, input().split())\n if b <= y:\n cost = min(cost,a)\n\nprint("TLE" if cost==1001 else cost)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s100856055', 's192057773', 's884078292'] | [3060.0, 3060.0, 2940.0] | [17.0, 17.0, 36.0] | [179, 154, 179] |
p03239 | u527261492 | 2,000 | 1,048,576 | 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. | ["n,t=map(int,input().split())\na=[]\nb=[]\nfor i in range(n):\n a.append(int(input()))\n b.append(int(input()))\nc=[]\nfor j in range(n):\n if b[j]>t:\n c.append(1001)\n else:\n c.append(a[j])\nif c==[1001]*n:\n print('TLE')\nelse:\n print(min(c))\n\n ", "n,t=map(int,input().split())\na=[]\nb=[]\nfor i in range(n):\n s,u=map(int,input().split())\n a.append(s)\n b.append(u)\nc=[]\nfor j in range(n):\n if b[j]>t:\n c.append(1001)\n else:\n c.append(a[j])\nif c==[1001]*n:\n print('TLE')\nelse:\n print(min(c))\n\n \n"] | ['Runtime Error', 'Accepted'] | ['s838916522', 's187265467'] | [3060.0, 3064.0] | [17.0, 18.0] | [249, 259] |
p03239 | u531214632 | 2,000 | 1,048,576 | 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. | ["num,limit=input().strip().split(' ')\n\n\ncosts=[]\nfor i in range(int(num)):\n cost, time = input().strip().split(' ')\n if (int(time) > int(limit)):\n continue\n else:\n costs.append(int(cost))\nif costs:\n print(costs)\n print(min(costs))\nelse:\n print('TLE')\n", "num,limit=input().strip().split(' ')\n\n\ncosts=[]\nfor i in range(int(num)):\n cost, time = input().strip().split(' ')\n if (int(time) > int(limit)):\n continue\n else:\n costs.append(int(cost))\nif costs:\n print(min(costs))\nelse:\n print('TLE')\n"] | ['Wrong Answer', 'Accepted'] | ['s121319246', 's367806536'] | [3064.0, 2940.0] | [17.0, 17.0] | [282, 265] |
p03239 | u536377809 | 2,000 | 1,048,576 | 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. | ['[n,t]=list(map(int,input().split()))\nntlist=[list(map(int,input().split())) for _ in range(n)]\n\nanslist=[nt[0] for nt in ntlist if nt[1]<=t]\nif ans==[]:\n print("TLE")\nelse:\n print(min(ans))', '[n,t]=list(map(int,input().split()))\nntlist=[list(map(int,input().split())) for _ in range(n)]\n \nanslist=[nt[0] for nt in ntlist if nt[1]<=t]\nif anslist==[]:\n print("TLE")\nelse:\n print(min(anslist))'] | ['Runtime Error', 'Accepted'] | ['s568900411', 's347855980'] | [3060.0, 3060.0] | [18.0, 17.0] | [191, 200] |
p03239 | u540290227 | 2,000 | 1,048,576 | 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. | ["n, t = map(int, input().split())\nc = 999\nfor i in range(n):\n tmp = input().split()\n if t <= tmp[1]:\n if tmp[0] < c:\n c = tmp[0]\nif c == 999:\n print('TLE')\n exit()\nelse:\n print(c)", "n, t = map(int, input().split())\nc = 10000\nfor i in range(n):\n tmp = input().split()\n if t >= int(tmp[1]):\n if int(tmp[0]) < c:\n c = int(tmp[0])\nif c == 10000:\n print('TLE')\n exit()\nelse:\n print(c)"] | ['Runtime Error', 'Accepted'] | ['s955471074', 's232504940'] | [9100.0, 9164.0] | [28.0, 29.0] | [211, 230] |
p03239 | u546853743 | 2,000 | 1,048,576 | 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. | ["n,T=map(int,input().split())\nc=list(map(int,input().split('\\n')))\nk=1000\nl=1\nfor i in range(n):\n if c[i][1] <= T:\n l=0\n if c[i][0] < k:\n k = c[i][0]\nif l==1:\n print('TLE')\nelse:\n print(k)", "N,T=map(int,input().split())\nk=1000\nl=1\nfor i in range(N):\n c,t = int(input())\n if t[i] <= T:\n l=0\n if c[i] < k:\n k = c[i]\nif l==1:\n print('TLE')\nelse:\n print(k)", "N,T=map(int,input().split())\nk=1000\nl=1\nfor i in range(N):\n c,t=map(int,input().split())\n if t <= T:\n l=0\n if c < k:\n k = c\nif l==1:\n print('TLE')\nelse:\n print(k)"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s235240073', 's433510120', 's489332136'] | [9124.0, 9160.0, 8944.0] | [23.0, 25.0, 30.0] | [221, 198, 199] |
p03239 | u546959066 | 2,000 | 1,048,576 | 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. | ["N, T = list(map(int, input().split()))\nparis = []\nfor i in range(N):\n c, t = list(map(int, input().split()))\n if t<=T:\n pairs.append((c, t))\nif len(pairs)==0:\n print('TLE')\nelse:\n print(sorted(pairs, key=lambda p:p[0])[0][0])", "N, T = list(map(int, input().split()))\npairs = []\nfor i in range(N):\n c, t = list(map(int, input().split()))\n if t<=T:\n pairs.append((c, t))\nif len(pairs)==0:\n print('TLE')\nelse:\n print(sorted(pairs, key=lambda p:p[0])[0][0])"] | ['Runtime Error', 'Accepted'] | ['s404118201', 's009208756'] | [3060.0, 3060.0] | [17.0, 17.0] | [232, 232] |
p03239 | u548939859 | 2,000 | 1,048,576 | 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. | ['A=[]\nwhile True:\n try:\n A.append(list(map(int,input().split())))\n \n\n except:\n break;\n\nmin = A[1][1] \n\nfor i in range(1, len(A)):\n j = int(i)\n if A[j][1] =< A[0][1]:\n if A[j][0] < min:\n min = A[j][0]\n\nif min < A[0][1]:\n print(min)\nelse:\n print("TLE")\n ', 'A=[]\nwhile True:\n try:\n A.append(list(map(int,input().split())))\n \n \n except:\n break;\n\nT = A[0][1]\nTc = 0\nmin = A[1][0] \n \nfor i in range(1, len(A)):\n j = int(i)\n if A[j][1] <= T:\n Tc = Tc+1\n if A[j][0] <= min:\n min = A[j][0]\n \n \nif Tc == 0:\n print("TLE")\nelse:\n print(min)'] | ['Runtime Error', 'Accepted'] | ['s755236188', 's440200690'] | [2940.0, 3064.0] | [17.0, 18.0] | [382, 413] |
p03239 | u556086333 | 2,000 | 1,048,576 | 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. | ["#cording: utf-8\n\nN, T = map(int, input().split())\n\nct = []\nfor i in range(N):\n ct.append(list(map(int, input().split())))\n\nc_min = 1001\nfor i in range(N):\n if (ct[i][1] <= T) and (ct[i][0] <= c_min):\n c_min = ct[i][0]\n\nprint(minc if minc != 1001 else 'TLE')\n", "#cording: utf-8\n\nN, T = map(int, input().split())\n\nct = [], []\nfor i in range(N):\n ct.append(map(int, input().split()))\n\nif len(c) != 0:\n print(min(c))\nelse:\n print('TEL')\n", "#cording: utf-8\n\nN, T = map(int, input().split())\n\nct = []\nfor i in range(N):\n ct.append(list(map(int, input().split())))\n\nc_min = 1001\nfor i in range(N):\n if (ct[i][1] <= T) and (ct[i][0] <= c_min):\n c_min = ct[i][0]\n\nprint(c_min if c_min != 1001 else 'TLE')\n"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s403464563', 's521870096', 's790770182'] | [3060.0, 2940.0, 3060.0] | [18.0, 17.0, 18.0] | [271, 181, 273] |
p03239 | u566529875 | 2,000 | 1,048,576 | 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. | ['n = int(input())\nt = int(input())\nans = 1234567\nfor i in range(n):\n c = int(input())\n if int(input) <= t:\n ans = max(ans,c)\n\nif ans == 1234567:\n print("LTE")\nelse:\n print(ans)\n ', 'n,T = map(int,input().split())\n\nans = 12345\n\nfor i in range(n):\n c,t = map(int,input().split())\n if t <= T:\n ans = min(ans,c)\n\nif ans == 12345:\n print("TLE")\nelse:\n print(ans)\n '] | ['Runtime Error', 'Accepted'] | ['s792646567', 's346253060'] | [2940.0, 2940.0] | [17.0, 17.0] | [203, 203] |
p03239 | u569898420 | 2,000 | 1,048,576 | 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. | ['#\n\narray = list(map(int, input().strip().split(\' \')))\n\n\nN = array[0]\n\nT = array[1]\n\n\nprint(N)\nprint(T)\n\nif N < 1:\n quit()\n\nif N > 100:\n quit()\n\n\nif T < 1:\n quit()\n\nif T > 1000:\n quit()\n\n\nprint(N)\nprint(T)\n\nc_min = 9999\n\n\nfor i in range(N):\n array1 = list(map(int, input().strip().split(\' \')))\n cN = array1[0]\n\n tN = array1[1]\n\n if cN < 1:\n quit()\n\n if cN > 1000:\n quit()\n\n if tN < 1:\n quit()\n\n if tN > 1000:\n quit()\n\n if tN <= T:\n if c_min > cN:\n\n c_min = cN\n\nif c_min == 0:\n print("TLE")\n\nelse:\n print(c_min)\n', '#\n\narray = list(map(int, input().strip().split(\' \')))\n\n\nN = array[0]\n\nT = array[1]\n\n\n#print(N)\n#print(T)\n\nif N < 1:\n sys.exit()\n\nif N > 100:\n sys.exit()\n\n\nif T < 1:\n sys.exit()\n\nif T > 1000:\n sys.exit()\n\n\n\nc_min = 9999\n\n\nfor i in range(N):\n array1 = list(map(int, input().strip().split(\' \')))\n cN = array1[0]\n\n tN = array1[1]\n\n if cN < 1:\n sys.exit()\n\n if cN > 1000:\n sys.exit()\n\n if tN < 1:\n sys.exit()\n\n if tN > 1000:\n sys.exit()\n \n if tN <= T:\n if c_min > cN:\n\n c_min = cN\n\nif c_min == 9999:\n print("TLE")\n\nelse:\n print(c_min)\n\n \n'] | ['Wrong Answer', 'Accepted'] | ['s654927706', 's433170814'] | [3064.0, 3064.0] | [18.0, 18.0] | [602, 631] |
p03239 | u571445182 | 2,000 | 1,048,576 | 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. | ["#6727236\n\nソースコード \n\nCopy\nCopy\nTmp = []\nTmp = input().rstrip().split(' ')\n \nnN = int(Tmp[0])\nnT = int(Tmp[1])\n \nnCost = 1001\nnAns = 0\n \nfor i in range(nN):\n Tmp = input().rstrip().split(' ')\n \n nTmpCost = int(Tmp[0])\n nTmpT = int(Tmp[1])\n \n if nTmpT <= nT and nTmpCost < nCost:\n nCost = nTmpCost\n nAns = i+1\n\nif nAns == 0:\n print('TLE')\nelse:\n print(nCost)\n ", "Tmp = []\nTmp = input().rstrip().split(' ')\n \nnN = int(Tmp[0])\nnT = int(Tmp[1])\n \nnCost = 1001\nnAns = 0\n \nfor i in range(nN):\n Tmp = input().rstrip().split(' ')\n \n nTmpCost = int(Tmp[0])\n nTmpT = int(Tmp[1])\n \n if nTmpT =< nT and nTmpCost < nCost:\n nCost = nTmpCost\n nAns = i+1\n\nif nAns == 0:\n print('TLE')\nelse:\n print(nCost)\n ", "Tmp = []\nTmp = input().rstrip().split(' ')\n\nnN = int(Tmp[0])\nnT = int(Tmp[1])\n\nnCost = 1001\nnAns = 0\n\nfor i in range(nN):\n Tmp = input().rstrip().split(' ')\n\n nTmpCost = int(Tmp[0])\n nTmpT = int(Tmp[1])\n \n if nTmpT < nT and nTmpCost < nCost:\n nCost = nTmpCost\n nAns = i+1\n\nif nAns == 0:\n print('TLE')\nelse:\n print(nAns)\n\n \n\n ", "Tmp = []\nTmp = input().rstrip().split(' ')\n \nnN = int(Tmp[0])\nnT = int(Tmp[1])\n \nnCost = 1001\nnAns = 0\n \nfor i in range(nN):\n Tmp = input().rstrip().split(' ')\n \n nTmpCost = int(Tmp[0])\n nTmpT = int(Tmp[1])\n \n if nTmpT <= nT and nTmpCost < nCost:\n nCost = nTmpCost\n nAns = i+1\n\nif nAns == 0:\n print('TLE')\nelse:\n print(nCost)\n \n"] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s331969931', 's580502938', 's898670916', 's999003187'] | [3064.0, 2940.0, 3060.0, 3060.0] | [18.0, 17.0, 18.0, 17.0] | [381, 340, 342, 341] |
p03239 | u580362735 | 2,000 | 1,048,576 | 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. | ["N , T = map(int,input().split())\ntmp_a = 1000\nresult = 0\ncount = 1\nwhile count < N+1:\n a,b = map(int,input().split())\n if b <= T and a < tmp_a:\n result = count\n tmp_a = a\n count = count + 1\nif result == 0:\n print('TLE')\nelse:\n print(result)", "N , T = map(int,input().split())\ntmp_a = 1001\nresult = 1001\ncount = 1\nwhile count < N+1:\n a,b = map(int,input().split())\n if b < T and a < tmp_a:\n result = count\n tmp_a = a\n count = count + 1\nif result == 1001:\n print('TLE')\nelse:\n print(result)", "N , T = map(int,input().split())\ntmp_a = 1000\nresult = 0\nwhile N > 0:\n a,b = map(int,input().split())\n if b < T & a < tmp_a:\n result = N\n tmp_a = a\n N = N -1\nif result == 0:\n print('TLE')\nelse:\n print(result)", "N , T = map(int,input().split())\ntmp_a = 1000\nresult = 0\ncount = 0\nwhile count < N:\n a,b = map(int,input().split())\n if b < T and a < tmp_a:\n result = N\n tmp_a = a\n count = count + 1\nif result == 0:\n print('TLE')\nelse:\n print(result)", "N , T = map(int,input().split())\ntmp_a = 1000\nresult = 0\ncount = 1\nwhile count < N+1:\n a,b = map(int,input().split())\n if b < T and a < tmp_a:\n result = count\n tmp_a = a\n count = count + 1\nif result == 0:\n print('TLE')\nelse:\n print(result)", "N , T = map(int,input().split())\nresult = 1001\nwhile N > 0:\n a,b = map(int,input().split())\n if b <= T and a < result:\n result = a\n N = N - 1\nif result == 1001:\n print('TLE')\nelse:\n print(result)"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s028425907', 's492107257', 's588133952', 's669400302', 's751129203', 's955140752'] | [3060.0, 3060.0, 2940.0, 3060.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [243, 248, 211, 236, 242, 197] |
p03239 | u580697892 | 2,000 | 1,048,576 | 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. | ['#coding: utf-8\nN, T = map(int, input().split())\nans = T\nc = 0\nfor i in range(N):\n c, t = map(int, input().split())\n if t <= T:\n c, ans = c, t\nprint(c if c == 0 else "TLE")', '#coding: utf-8\nN, T = map(int, input().split())\ntans = T\ncans = 10 ** 5\nfor i in range(N):\n c, t = map(int, input().split())\n if c <= cans and t <= T:\n cans, tans = c, t\nprint(cans if cans < 10**5 else "TLE")'] | ['Wrong Answer', 'Accepted'] | ['s673346287', 's144075806'] | [3060.0, 3060.0] | [17.0, 17.0] | [184, 221] |
p03239 | u581187895 | 2,000 | 1,048,576 | 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. | ['n, t = map(int, input().split())\nw_dic = {}\nfor i in range(n):\n w, w_t = map(int, input().split())\n if w_t < t:\n w_dic[i+1] = w\nprint(min(w_dic, key=w_dic.get)) \n ', 'n, t = map(int, input().split())\nw_dic = {}\nfor i in range(n):\n w, w_t = map(int, input().split())\n if w_t < t:\n w_dic[i+1] = w\nif w_dic:\n print(min(w_dic, key=w_dic.get))\nelse:\n print("TLE")\n ', 'n, t = map(int, input().split())\nw_dic = {}\nfor i in range(n):\n w, w_t = map(int, input().split())\n if w_t < t:\n w_dic[i+1] = w\n else:\n w_dic["TLE"] = 0\nprint(min(w_dic, key=w_dic.get)) \n ', 'n, t = map(int, input().split())\nw_dic = {}\nfor i in range(n):\n w, w_t = map(int, input().split())\n if w_t <= t:\n w_dic[i+1] = w\nif w_dic:\n print(min(w_dic, key=w_dic.get))\nelse:\n print("TLE")\n ', 'N, T = map(int, input().split())\n\nans = 1<<60\nfor _ in range(N):\n cost, time = map(int, input().split())\n if time <= T:\n ans = min(cost, ans)\nprint(ans if ans < 1<<60 else "TLE") '] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s038978617', 's346805800', 's571736575', 's851854832', 's391671853'] | [2940.0, 2940.0, 3060.0, 2940.0, 2940.0] | [18.0, 18.0, 18.0, 17.0, 17.0] | [174, 203, 203, 204, 187] |
p03239 | u581403769 | 2,000 | 1,048,576 | 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. | ["n, t = map(int, input().split())\na = [list(map(int, input().split())) for i in range(n)]\nl = []\nflag = False\nfor i in range(n):\n if a[i][2] <= t:\n l.append(a[i][0])\n flag = True\nif flag:\n print(min(l))\nelse:\n print('TLE')", "n, t = map(int, input().split())\na = [list(map(int, input().split())) for i in range(n)]\nl = []\nflag = False\nfor i in range(n):\n if a[i][1] <= t:\n l.append(a[i][0])\n flag = True\nif flag:\n print(min(l))\nelse:\n print('TLE')"] | ['Runtime Error', 'Accepted'] | ['s296264670', 's017911127'] | [9044.0, 9184.0] | [27.0, 30.0] | [244, 244] |
p03239 | u584174687 | 2,000 | 1,048,576 | 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. | ["num, time_lim = list(map(int, input().spli()))\nans = 'TLE'\nfor i in range(num):\n cost, time_data = list(map(int, input().spli()))\n if time_data > time_lim:\n continue\n if ans == 'TLE':\n ans = cost\n if ans > cost:\n ans = cost\nprint(ans)", "num, time_lim = list(map(int, input().split()))\nans = 'TLE'\nfor i in range(num):\n cost, time_data = list(map(int, input().split()))\n if time_data > time_lim:\n continue\n if ans == 'TLE':\n ans = cost\n if ans > cost:\n ans = cost\nprint(ans)"] | ['Runtime Error', 'Accepted'] | ['s485005718', 's770587625'] | [3060.0, 3060.0] | [18.0, 18.0] | [247, 249] |
p03239 | u585101972 | 2,000 | 1,048,576 | 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. | ["N, T = map(int, input().split())\na = 9999\nfor _ in N:\n c, t = map(int, input().split())\n if t <= T:\n a = min(a, c)\nif a == 9999:\n print('TLE')\nelse:\n print(a)\n", "N, T = map(int, input().split())\na = 9999\nfor _ in range(N):\n c, t = map(int, input().split())\n if t <= T:\n a = min(a, c)\nif a == 9999:\n print('TLE')\nelse:\n print(a)\n"] | ['Runtime Error', 'Accepted'] | ['s125957477', 's933506366'] | [2940.0, 2940.0] | [18.0, 17.0] | [178, 185] |
p03239 | u588341295 | 2,000 | 1,048,576 | 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. | ["# -*- coding: utf-8 -*-\n\nN,T = map(int, input().split())\n\ncNtN = [[0] * 2 for i in range(N)]\nfor i in range(N):\n cNtN[i][0], cNtN[i][1] = map(int, input().split())\n\nmin_c = float('inf')\nfor i in range(N):\n if cNtN[i][1] <= T and cNtN[i][0] < min_C:\n min_c = cNtN[i][0]\n\nif min_c == float('inf'):\n print('TLE')\nelse:\n print(min_c)", "# -*- coding: utf-8 -*-\n\nN,T = map(int, input().split())\n\ncNtN = [[0] * 2 for i in range(N)]\nfor i in range(N):\n cNtN[i][0], cNtN[i][1] = map(int, input().split())\n\nmin_c = float('inf')\nfor i in range(N):\n if cNtN[i][1] <= T and cNtN[i][0] < min_c:\n min_c = cNtN[i][0]\n\nif min_c == float('inf'):\n print('TLE')\nelse:\n print(min_c)"] | ['Runtime Error', 'Accepted'] | ['s303686872', 's998193622'] | [3064.0, 3064.0] | [17.0, 17.0] | [348, 348] |
p03239 | u597374218 | 2,000 | 1,048,576 | 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. | ['n,t=map(int,input().split())\nm=1001\nfor i in range(n):\n c,t=map(int,input().split())\n if i<=t:m=min(m,c)\nprint("TLE" if m==1001 else m)', 'n,t=map(int,input().split())\nm=1001\nfor i in range(n):c,t=map(int,input().split())\n if i<=t:m=min(m,c)\nprint("TLE" if m==1001 else m)', 'N,T=map(int,input().split())\nmin_cost=1001\nfor i in range(N):\n c,t=map(int,input().split())\n if t<=T:\n min_cost=min(min_cost,c)\nprint("TLE" if min_cost==1001 else min_cost)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s202906299', 's706947256', 's087928507'] | [2940.0, 2940.0, 9084.0] | [18.0, 17.0, 27.0] | [141, 134, 185] |
p03239 | u597455618 | 2,000 | 1,048,576 | 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. | ['n, t= map(int, input().split())\nm = 1001\nfor i in range(n):\n c, t = map(int, input().split())\n if t < T:\n m = min(c, m)\nprint(c)', 'n, T= map(int, input().split())\nm = 1001\nfor i in range(n):\n c, t = map(int, input().split())\n if t <= T:\n m = min(c, m)\nif m == 1001:\n print("TLE")\nelse:\n print(m)'] | ['Runtime Error', 'Accepted'] | ['s103156695', 's924703884'] | [2940.0, 2940.0] | [18.0, 17.0] | [133, 171] |
p03239 | u598229387 | 2,000 | 1,048,576 | 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. | ["n, t = map(int, input().split())\nans = float('inf')\nfor i in range(n):\n c, t2 = map(int, input().split())\n if t2 <= t:\n ans = min(ans, c)\nprint('TLE' if ans = float('inf') else c)", "n, T = map(int,input().split())\ncost = 10000\nfor i in range(n):\n c, t = map(int, input().split())\n if t <= T:\n cost = min(cost, c)\nif cost == 10000:\n print('TLE')\nelse:\n print(cost)"] | ['Runtime Error', 'Accepted'] | ['s119543108', 's736069361'] | [2940.0, 3060.0] | [17.0, 18.0] | [192, 200] |
p03239 | u598530761 | 2,000 | 1,048,576 | 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. | ["N, T = map(int, input().split())\n\narray = [list(map(int, input().split())) for i in range(N)]\n\ncost = 0\n\nfor i in range(N):\n if array[i][1] <= T and (cost == 0 or cost < array[i][0]:\n \u3000 cost = arrayp[i][0]\nif cost == 0:\n print('TLE')\nprint(cost)\n", "N, T = map(int, input().split())\ncost = 1001\nfor i in range(N):\n ci, ti = map(int, input().split())\n if ti <= T and cost > ti:\n cost = ti\nif cost > 1000:\n print('TLE')\n exit()\nprint(cost)\n", "N, T = map(int, input().split())\ncost = 1001\nfor i in range(N):\n ci, ti = map(int, input().split())\n if ti <= T and cost > ci:\n cost = ti\nif cost > 1000:\n print('TLE')\n exit()\nprint(cost)\n", "N, T = map(int, input().split())\n\narray = [list(map(int, input().split())) for i in range(N)]\n\ncost = 0\n\nfor i in range(N):\n if array[i][1] <= T and (cost == 0 or cost < array[i][0]):\n cost = array[i][0]\nif cost == 0:\n print('TLE')\nprint(cost)\n", "N, T = map(int, input().split())\ncost = 1001\nfor i in range(N):\n ci, ti = map(int, input().split())\n if ti <= T and cost > ci:\n cost = ci\nif cost > 1000:\n print('TLE')\n exit()\nprint(cost)\n"] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s095052950', 's128363814', 's300329081', 's546773773', 's680437939'] | [2940.0, 2940.0, 2940.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 18.0] | [259, 208, 207, 257, 207] |
p03239 | u598600463 | 2,000 | 1,048,576 | 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. | ["# cording:utf-8\nn,t = (int(x) for x in input().split())\ncost_list = list()\ntime_list = list()\nwhile n >= 1:\n c,tn = (int(x) for x in input().split())\n if tn >= t:\n cost_list.append(c)\n time_list.append(tn)\n n = n - 1\n else:\n n = n - 1\nbest_time = min(time_list)\nif best_time <= t:\n best_time_number = time_list.index(best_time)\n print(cost_list[best_time_number])\nelse:\n print('TLE')", "# cording:utf-8\n\nn,t_limit = (int(x) for x in input().split())\n\ncost_list = list()\ntime_list = list()\n\nwhile n >= 1:\n ci,ti = (int(x) for x in input().split())\n if ti <= t_limit: \n cost_list.append(ci) \n time_list.append(ti) \n n = n - 1\n else:\n n = n - 1\nif not time_list: \n print('TLE')\nelse:\n print(min(cost_list))"] | ['Runtime Error', 'Accepted'] | ['s346339519', 's011030001'] | [3064.0, 3064.0] | [17.0, 18.0] | [429, 577] |
p03239 | u600402037 | 2,000 | 1,048,576 | 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. | ["# coding: utf-8\nimport sys\nimport numpy as np\n\nsr = lambda: sys.stdin.readline().rstrip()\nir = lambda: int(sr())\nlr = lambda: list(map(int, sr().split()))\n\nN, T = lr()\nCT = np.array([lr() for _ in range(N)])\nCT = CT[CT[:, 1] <= T]\ntime = CT[:, 0]\nif not time:\n print('TLE')\nelse:\n answer = time.min()\n print(answer)\n", "# coding: utf-8\nimport sys\nimport numpy as np\n\nsr = lambda: sys.stdin.readline().rstrip()\nir = lambda: int(sr())\nlr = lambda: list(map(int, sr().split()))\n\nN, T = lr()\nCT = np.array([lr() for _ in range(N)])\nCT = CT[CT[:, 1] <= T]\ntime = CT[:, 0]\nif len(time) == 0:\n print('TLE')\nelse:\n answer = time.min()\n print(answer)\n"] | ['Runtime Error', 'Accepted'] | ['s355107067', 's731767109'] | [12436.0, 12436.0] | [149.0, 148.0] | [325, 331] |
p03239 | u603234915 | 2,000 | 1,048,576 | 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. | ['N, T = map(int, input().split())\nA = []\nfor i in range(N):\n temp , B = map(int, input().split())\n if B <= T:\n A.append(temp)\nif not A:\n print("TLE")\nelse:\n print(A.min())', 'N, T = map(int, input().split())\nA = []\nfor i in range(N):\n temp , B = map(int, input().split())\n if B <= T:\n A.append(temp)\nif not A:\n print("TLE")\nelse:\n print(min(A))'] | ['Runtime Error', 'Accepted'] | ['s081377411', 's435356971'] | [3060.0, 2940.0] | [17.0, 17.0] | [189, 188] |
p03239 | u607563136 | 2,000 | 1,048,576 | 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. | ['n,t = map(int,input().split())\n\nm = 1001\n\nfor i in range(N):\n \n c,t = map(int,input().split())\n \n if t <= T:\n m=min(m,c)\n \nprint("TLE" if m==1001 else m)\n\n', 'N,T = map(int,input().split())\n\nm = 1001\n\nfor i in range(N):\n \n c,t = map(int,input().split())\n \n if t <= T:\n m=min(m,c)\n \nprint("TLE" if m==1001 else m)\n\n'] | ['Runtime Error', 'Accepted'] | ['s248062209', 's562096366'] | [9100.0, 9172.0] | [25.0, 27.0] | [181, 181] |
p03239 | u609814378 | 2,000 | 1,048,576 | 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. | ['N,T = map(int, input().split())\n\nans = []\n\nfor i in range(N):\n c,t = list(map(int, input().split()))\n if T > t[i]:\n number = c[i]\n ans.appned(number)\n \n\nif len(ans) == 0:\n print("TLE")\nelse:\n print(min(ans)) ', 'N,T = map(int, input().split())\n\nans = []\n\nfor i in range(N):\n c,t = map(int, input().split())\n if T > t[i]:\n ans.appned(c[i])\n \n\nif len(ans) == 0:\n print("TLE")\nelse:\n print(min(ans)) ', 'N,T = map(int, input().split())\n\nans = []\n\nfor i in range(N):\n c,t = map(int, input().split())\n if T > t:\n ans.appned(c)\n \n\nif len(ans) == 0:\n print("TLE")\nelse:\n print(min(ans)) \n \n', 'N, T = map(int,input().split())\nc = []\nt = []\n\nfor i in range(N):\n c1, t1 = map(int,input().split())\n c.append(c1)\n t.append(t1)\n \nans = []\n\nfor i in range(N):\n if t[i] <= T:\n ans.append(c[i])\n\nif len(ans) == 0:\n print("TLE")\nelse:\n print(min(ans))\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s231264697', 's273887619', 's752482182', 's772337705'] | [3060.0, 3060.0, 2940.0, 3060.0] | [18.0, 17.0, 17.0, 18.0] | [244, 210, 214, 259] |
p03239 | u611655181 | 2,000 | 1,048,576 | 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. | ['\nc=[]\nt=[]\nN,T= map(int, input().split())\n\nfor i in range (0,N):\n c_,t_= map(int, input().split())\n if(t_<=T):\n c.append(c_)\n t.append(t_)\nprint(N,T)\nprint(c,t)\n\nif( len(t)==0 ):\n print("TLE")\nelse:\n print(min(c))', '\nc=[]\nt=[]\nN,T= map(int, input().split())\n\nfor i in range (0,N):\n c_,t_= map(int, input().split())\n if(t_<=T):\n c.append(c_)\n t.append(t_)\n\nif( len(t)==0 ):\n print("TLE")\nelse:\n print(min(c))'] | ['Wrong Answer', 'Accepted'] | ['s279801797', 's414404335'] | [3064.0, 3060.0] | [18.0, 17.0] | [312, 290] |
p03239 | u617225232 | 2,000 | 1,048,576 | 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. | ["n,t = map(int,input().split())\nout = 1001\no = t+1\noutnum = 1001\nfor i in range(n):\n c, tim = map(int,input().split())\n if tim < t and c < out:\n out = c\n outnum = i\nif outnum == 1001:\n print('TLE')\nelse:\n print(outnum)", "n,t = map(int,input().split())\nout = 1001\no = t+1\noutnum = 1001\nfor i in range(n):\n c, tim = map(int,input().split())\n if tim <= t and c < out:\n out = c\n outnum = i\nif outnum == 1001:\n print('TLE')\nelse:\n print(out)\n"] | ['Wrong Answer', 'Accepted'] | ['s129042949', 's390721493'] | [3060.0, 2940.0] | [17.0, 17.0] | [227, 226] |
p03239 | u619379081 | 2,000 | 1,048,576 | 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. | ["N, T = list(map(int, input().split()))\nans = 1001\nfor i in range(N):\n c, t = list(map(int, input().split()))\n if T < t:\n break\n elif ans < c:\n break\n else:\n ans = c\nprint(ans if ans < 1001 else 'TLE')", "N, T = list(map(int, input().split()))\nans = 1001\nfor i in range(N):\n c, t = list(map(int, input().split()))\n if T < t:\n continue\n elif ans < c:\n continue\n else:\n ans = c\nprint(ans if ans < 1001 else 'TLE')"] | ['Wrong Answer', 'Accepted'] | ['s961629551', 's280786013'] | [3060.0, 3060.0] | [17.0, 17.0] | [233, 239] |
p03239 | u620846115 | 2,000 | 1,048,576 | 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. | ['a,b=map(int,inpu().split())\nmeta = int(a)\nfor i in range(a):\n x,y = map(int,input().split())\n if b > y and a > x:\n a = x\nif meta > a:\n print(a)\nelse:\n print("TLE")\n ', 'a,b=map(int,inpu().split())\nx,y = [list(map(int,input().split())) for i in range(a)]\nfor i in range(a):\n if b > y[i] and a > x[i]:\n a = x[i]\nprint(a)', 'a,b=map(int,inpu().split())\nx,y = [list(map(int,input().split())) for i in range(a)]\nif b < max(y):\n print("TLE")\nelse:\n for i in range(a):\n if b > y[i] and a > x[i]:\n a = x[i]\n print(a)\n ', 'N,T = map(int,input().split())\nm = 1001\nfor i in range(N):\n c,t=map(int,input().split())\n if t<=T:\n m = min(m,c)\nprint("TLE" if m == 1001 else m)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s111495228', 's208225755', 's645818608', 's452234026'] | [9076.0, 8756.0, 9052.0, 9156.0] | [28.0, 27.0, 29.0, 28.0] | [173, 153, 202, 150] |
p03239 | u623036684 | 2,000 | 1,048,576 | 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. | ['N, T = map(int, input().split())\ncage,cage2=[],[]\nfor i in range(N):\n c, t = map(int, input().split())\n if t<=T:\n\tcage.append(c)\nif cage==None:\n print("TLE")\nelse:\n print(soted(cage)[0])', 'N, T = map(int, input().split())\ncage,cage2=[],[]\nfor n,i in enumerate(N):\n c, t = map(int, input().split())\n if t<=T:\n\tcage.append(c)\n cage2.append(n)\nif cage==None:\n print("TLE")\nelse:\n print(soted(cage)[0]', 'N, T = map(int, input().split())\ncage,cage2=[],[]\nfor i in range(N):\n c, t = map(int, input().split())\n if t<=T:\n\tcage.append(c)\nif cage==None:\n print("TLE")\nelse:\n print(min(cage))', 'N, T = map(int, input().split())\ncage,cage2=[],[]\nfor i in range(N):\n c, t = map(int, input().split())\n if t<=T:\n\tcage.append(c)\n cage2.append(n)\nif cage==None:\n print("TLE")\nelse:\n print(soted(cage)[0])', 'N, T = map(int, input().split())\ncage,cage2=[],[]\nfor i in range(N):\n c, t = map(int, input().split())\n if t<=T:\n cage.append(c)\nif len(cage)==0:\n print("TLE")\nelse:\n print(min(cage))'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s111610808', 's647356400', 's695455703', 's937914191', 's133470831'] | [2940.0, 2940.0, 2940.0, 2940.0, 3060.0] | [17.0, 18.0, 17.0, 17.0, 18.0] | [190, 215, 185, 210, 192] |
p03239 | u623687794 | 2,000 | 1,048,576 | 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. | ['n,t = map(int,input().split())\nansseq=[]\nfor i in range(n):\n a,b = map(int,input().split())\n if b <= t:\n ansseq.append(b)\nif len(ansseq) == 0:\n print("TLE")\nelse:\n print(min(ansseq))', 'n,t = map(int,input().split())\nansseq=[]\nfor i in range(n):\n a,b = map(int,input().split())\n if b <= t:\n ansseq.append(a)\nif len(ansseq) == 0:\n print("TLE")\nelse:\n print(min(ansseq))\n'] | ['Wrong Answer', 'Accepted'] | ['s364138983', 's103160421'] | [3060.0, 2940.0] | [17.0, 19.0] | [189, 190] |
p03239 | u623819879 | 2,000 | 1,048,576 | 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. | ["N, T = map(int,input())\nans=10000\n\nfor i in range(N):\n c, tt==map(int,input())\n if tt <= T:\n ans=min(c,ans)\n\nif ans==10000:\n print('TLE')\nelse:\n print(ans)", "N, T = list(map(int, input().split()))\nans=10000\n\nfor i in range(N):\n c, tt==list(map(int, input().split()))\n if tt <= T:\n ans=min(c,ans)\n\nif ans==10000:\n print('TLE')\nelse:\n print(ans)", "N, T = map(int,input())\ntmp=10000\nans=0\n\nfor i in range(N):\n c, tt==map(int,input())\n if tt <= T:\n tmp=min(c,tmp)\n if c==ans:\n ans=i\n\nif ans==0:\n print('TLE')\nelse:\n print(ans)", "N, T = list(map(int, input().split()))\nans=10000\n\nfor i in range(N):\n c, tt=list(map(int, input().split()))\n if tt <= T:\n ans=min(c,ans)\n\nif ans==10000:\n print('TLE')\nelse:\n print(ans)"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s453207014', 's904187104', 's962465714', 's122845599'] | [2940.0, 3060.0, 2940.0, 3060.0] | [18.0, 17.0, 18.0, 18.0] | [162, 192, 191, 191] |
p03239 | u624160088 | 2,000 | 1,048,576 | 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. | ["import numpy as np\nN,T = map(int, input().split())\n\nc_list = []\nt_list=[]\nfor i in range(N):\n\tc,t=map(int, input().split())\n\tc_list.append(c)\n\tt_list.append(t)\n\nc_list = np.array(c_list)\nt_list = np.array(t_list)\t\n\nif t_list[t_list<=T]:\n\tprint('TLE')\nelse:\n\tprint(min(c_list[t_list<=T]))", "import numpy as np\nN,T = map(int, input().split())\n\nc_list = []\nt_list=[]\nfor i in range(N):\n\tc,t=map(int, input().split())\n\tc_list.append(c)\n\tt_list.append(t)\n\nc_list = np.array(c_list)\nt_list = np.array(t_list)\t\n\nif not np.any(t_list[t_list<=T]):\n\tprint('TLE')\nelse:\n\tprint(min(c_list[t_list<=T]))"] | ['Runtime Error', 'Accepted'] | ['s338359668', 's205790291'] | [21508.0, 21408.0] | [1116.0, 341.0] | [287, 299] |
p03239 | u626337957 | 2,000 | 1,048,576 | 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. | ["N, T = map(int, input().split())\nct = [list(map(int, input().split()), idx+1) for idx in range(N)]\n\ncosts = list(filter(lambda x: x[1] <= T, ct))\nif len(costs) == 0:\n print('TLE')\nelse:\n costs.sort(key=lambda x: x[0])\n print(costs[0][2])", "N, T = map(int, input().split())\nct = [list(map(int, input().split())) for _ in range(N)]\ncosts = list(filter(lambda x: x[1] <= T, ct))\nif len(costs) == 0:\n print('TLE')\nelse:\n costs.sort(key=lambda x: x[0])\n print(costs[0][0])"] | ['Runtime Error', 'Accepted'] | ['s637374905', 's678985939'] | [3064.0, 3060.0] | [17.0, 18.0] | [240, 230] |
p03239 | u628581330 | 2,000 | 1,048,576 | 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. | ['N,T = map(int,input().split())\nCT = [list(map(int,input().split())) for i in range(N)]\nCT = list(filter(lambda x:x[1]<=N,CT))\nprint(min(CT[0]))', "N,T = map(int,input().split())\nCT = [list(map(int,input().split())) for i in range(N)]\nCT = list(filter(lambda x:x[1]<=T,CT))\nif len(CT)==0:\n print('TLE')\nelse:\n print(min(CT)[0])"] | ['Runtime Error', 'Accepted'] | ['s607566132', 's224062589'] | [3060.0, 3060.0] | [17.0, 17.0] | [143, 185] |
p03239 | u628965061 | 2,000 | 1,048,576 | 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. | ['n,T=map(int,input().split())\nc_l=[]\nt_l=[]\nfor i in range(n):\n\tc,t=map(int,input().split())\n\tif t>T:\n\t\tc=1001\n\tc_l.append(c)\n\tt_l.append(t)\nprint("TLE") if min(c_l) == 1001 else min(c_l)', 'n,T=map(int,input().split())\nc_l=[]\nt_l=[]\nfor i in range(n):\n\tc,t=map(int,input().split())\n\tif t>T:\n\t\tc=1001\n\tc_l.append(c)\n\tt_l.append(t)\nprint("TLE" if min(c_l) == 1001 else min(c_l))'] | ['Wrong Answer', 'Accepted'] | ['s349213254', 's428234004'] | [3060.0, 3060.0] | [18.0, 17.0] | [186, 186] |
p03239 | u633548583 | 2,000 | 1,048,576 | 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. | ["n,T=map(int,input().split())\nc,t=[map(int,input().split() for i in range(n))]\nk=[]\nif all(t)>T:\n print('TLE')\nelse:\n for i in range(n):\n if t[i]<=T:\n k.append(c[j])\n print(min(k))\n", "n,T=map(int,input().split())\nc,t=[int(input().split()) for i in range(n)]\nk=[]\nif all(t)>T:\n print('TLE')\nelse:\n for i in range(n):\n if t[i]<=T:\n k.append(c[j])\n print(min(k))", "n,T=map(int,input().split())\nm=1001\nfor i in range(n):\n c,t=map(int,input().split())\n if t<=T:\n m=min(m,c)\n print(m)\n else:\n print('TLE')\n", "n,T=map(int,input().split())\nm=1001\nfor i in range(n):\n c,t=map(int,input().split())\n if t<=T:\n m=min(m,c)\nif m==1001:\n print('TLE')\nelse:\n print(m)\n"] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s285758279', 's391495750', 's395071475', 's309479654'] | [2940.0, 3060.0, 2940.0, 2940.0] | [17.0, 18.0, 18.0, 17.0] | [207, 202, 168, 168] |
p03239 | u633763428 | 2,000 | 1,048,576 | 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. | ["n_list = list(map(int, input().split()))\n\n\nn = n_list[0]\ntime = n_list[1]\n\nx = 0\noutput = 'TLE'\nnum = 1\n\nwhile num <= n:\n n_list2 = list(map(int, input().split()))\n if time - n_list2[1] > 0:\n if x - (time - n_list2[1]) < 0:\n output = n_list2[1]\n num += 1\n else:\n num += 1\n else:\n num += 1\n\nprint(output)\n", 'n,TIME = list(map(int, input().split()))\n\nx = 0\nnum = 1\ncosts = []\n\nwhile num <= n:\n cost, time = list(map(int, input().split()))\n num += 1\n if TIME - time >= 0:\n costs.append(cost)\n\nif len(costs) != 0:\n output = min(costs)\nelse:\n output = "TLE"\nprint(output)\n'] | ['Wrong Answer', 'Accepted'] | ['s059619418', 's405425508'] | [3064.0, 3060.0] | [17.0, 17.0] | [363, 282] |
p03239 | u634461820 | 2,000 | 1,048,576 | 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. | ['N, T = map(int,input().split())\nans = float("inf")\n\nfor i in range(N):\n c,t = map(int,input(),split())\n if t <= T:\n ans = min(num,c)\n\nif ans == float("inf"):\n print("TLE")\nelse:\n print(ans)\n', 'N, T = map(int,raw_input().split())\nans = float("inf")\n\nfor i in range(N):\n c,t = map(int,input().split())\n if t <= T:\n ans = min(ans,c)\n\nif ans == float("inf"):\n print("TLE")\nelse:\n print(ans)\n', 'N, T = map(int,input().split())\nans = float("inf")\n\nfor i in range(N):\n c,t = map(int,input(),split())\n if t <= T:\n ans = min(ans,c)\n\nif ans == float("inf"):\n print("TLE")\nelse:\n print(ans)\n', 'N, T = map(int,raw_input().split())\nans = float("inf")\n\nfor i in range(N):\n c,t = map(int,input(),split())\n if t <= T:\n ans = min(ans,c)\n\nif ans == float("inf"):\n print("TLE")\nelse:\n print(ans)\n', 'N, T = map(int,raw_input().split())\nans = float("inf")\n\nfor i in range(N):\n c,t = map(int,input(),split())\n if t <= T:\n ans = min(num,c)\n\nif ans == float("inf"):\n print("TLE")\nelse:\n print(ans)\n', 'N, T = map(int, raw_input().split())\nans = float("inf")\n\nfor i in range(0,N):\n c,t = map(int,input(),split())\n if t <= T:\n ans = min(num,c)\n\nif ans == float("inf"):\n print("TLE")\nelse:\n print(ans)\n', 'N, T = map(int,input().split())\nans = float("inf")\n\nfor i in range(N):\n c,t = map(int,input().split())\n if t <= T:\n ans = min(ans,c)\n\nif ans == float("inf"):\n print("TLE")\nelse:\n print(ans)\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s092770639', 's240761954', 's605037411', 's786906256', 's855409903', 's998567440', 's244456987'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 18.0, 18.0, 18.0] | [209, 213, 209, 213, 213, 216, 209] |
p03239 | u636162168 | 2,000 | 1,048,576 | 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. | ['n,t=map(int,input().split())\nct=[list(map(int,input().split()))for i in range(n)]\nct.sort()\nfor i in ct:\n if i[1]<=t:\n print(i[0])\n break\nct.sort(key=lambda x:x[1])\nif ct[-1][1]>t:\n print("TLE")\n', 'n,t=map(int,input().split())\nct=[list(map(int,input().split()))for i in range(n)]\nct.sort()\na=False\nfor i in ct:\n if i[1]<=t:\n b=i[0]\n a=True\n break\nif a:\n print(b)\nelse:\n print("TLE")'] | ['Wrong Answer', 'Accepted'] | ['s234897050', 's703575929'] | [2940.0, 3060.0] | [21.0, 18.0] | [215, 214] |
p03239 | u639592190 | 2,000 | 1,048,576 | 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. | ['N,T=map(int,input().split())\nans=0\nfor _ in range(N):\n c,t=map(int,input().split())\n if t<=T:\n ans=max(ans,c)\nprint(ans)', 'N,T=map(int,input().split())\nans=0\nfor _ in range(N):\n c,t=map(int,input().split())\n if t<=T:\n ans=max(ans,c)\nif ans==0:\n print("TLE")\nelse:\n print(ans)', 'N,T=map(int,input().split())\nans=1001\nfor _ in range(N):\n c,t=map(int,input().split())\n if t<=T:\n ans=min(ans,c)\nif ans==1001:\n print("TLE")\nelse:\n print(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s586801431', 's891238588', 's021487769'] | [2940.0, 2940.0, 3064.0] | [17.0, 18.0, 23.0] | [125, 159, 165] |
p03239 | u640415051 | 2,000 | 1,048,576 | 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. | ['N, T = map(int, input().split())\nc = []\nfor _ in range(N):\n ci, ti = map(int, input().split())\n if ti <= T:\n c.append(ci)\n\nif len(c) == 0:\n print("TLE")\nelse:\n print(min(ct2))\n', 'N, T = map(int, input().split())\nc = []\nfor _ in range(N):\n ci, ti = map(int, input().split())\n if ti <= T:\n c.append(ci)\n\nif len(c) == 0:\n print("TLE")\nelse:\n print(min(c))\n'] | ['Runtime Error', 'Accepted'] | ['s945569584', 's810416799'] | [2940.0, 2940.0] | [18.0, 17.0] | [185, 183] |
p03239 | u642418876 | 2,000 | 1,048,576 | 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. | ["n,t=map(int,input().split())\nc,t=[list(map(int,input().split())) for _ in range(n)]\nl=[]\nfor i in range(n):\n if t[i]<=t:\n l.append([c[i],t[i]])\n if len(l)==0:\n print('TLE')\n else:\n l.sort()\n print(l[0][0])\n ", "n,T=map(int,input().split())\nans=1001\nfor i in range(n):\n c,t=map(int,input().split())\n if t<=T:\n ans=min(ans,c)\nif ans==1001:\n print('TLE')\nelse:\n print(ans)\n "] | ['Runtime Error', 'Accepted'] | ['s904224633', 's895930520'] | [3060.0, 2940.0] | [18.0, 18.0] | [237, 168] |
p03239 | u643081547 | 2,000 | 1,048,576 | 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. | ['\nN,T=input().split(\' \')\nN=int(N)\nT=int(T)\na=list()\nfor i in range(N):\n c,t=input().split(\' \')\n c=int(c)\n t=int(t)\n a.append((c,t))\n\nminValue=0x3FF\nprint(minValue)\nfor it in a:\n if it[1]>T:\n continue\n if it[0]<minValue:\n minValue=it[0]\nif(minValue==0x3FF):\n print("TLE")\nelse:\n print(minValue)\n\n', '\nN,T=input().split(\' \')\nN=int(N)\nT=int(T)\na=list()\nfor i in range(N):\n c,t=input().split(\' \')\n c=int(c)\n t=int(t)\n a.append((c,t))\n\nminValue=0x3FF\n\nfor it in a:\n if it[1]>T:\n continue\n if it[0]<minValue:\n minValue=it[0]\nif(minValue==0x3FF):\n print("TLE")\nelse:\n print(minValue)\n\n'] | ['Wrong Answer', 'Accepted'] | ['s019778940', 's516729963'] | [3064.0, 3064.0] | [17.0, 18.0] | [332, 317] |
p03239 | u645217306 | 2,000 | 1,048,576 | 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. | ['N,T = map(int,input().split())\nans = 1001\nfor i in range(N):\n c,t = map(int,input().split())\n if t <= T and c <= ans:\n ans = c\n if ans == 1001:\n print("TLE")\n else:\n print(ans)\n', 'N,T = map(int,input().split())\nans = 1001\nfor i in range(N):\n c,t = map(int,input().split())\n if t <= T and c <= ans:\n ans = c\n if ans = 1001:\n print("TLE")\n else:\n print(ans)', 'ans = 1001\nN,T = map(int,input().split())\nfor i in range(N):\n c,t = map(int,input().split())\n if t <= T and c <= ans:\n ans = c\n if ans = 1001:\n print("TLE")\n else:\n print(ans)', 'ans = 1001\nN,T = map(int,input().split())\nfor i in range(N):\n c,t = map(int,input().split())\n if t <= T and c <= T\n ans = c\n if ans = 1001:\n print("TLE")\n else:\n print(ans)', 'N = int()\nT = int()\nans = 1001\n\nfor i in range(N):\n c = int()\n t = int()\n if t <= T:\n ans = min(ans,c)\n \n if ans == 1001:\n print("TLE")\n \n else:\n print(ans)', 'ans = []\nN,T = map(int,input().split())\nfor i in range(N):\n c,t = map(int,input().split())\n if t <= T:\n ans = min(anc,c)\n if not a:\n print("TLE")', 'ans = 1001\nN,T = map(int,input().split())\nfor i in range(N):\n c,t = map(int,input().split())\n if t <= T and c <= ans\n ans = c\n if ans = 1001:\n print("TLE")\n else:\n print(ans)', 'N,T = map(int,input().split())\nans = 1001\nfor i in range(N):\n c,t = map(int,input().split())\n if t <= T and c <= ans:\n ans = c\nif ans == 1001:\n print("TLE")\nelse:\n print(ans)\n'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s022817933', 's089914060', 's355118062', 's383877329', 's435994010', 's657274440', 's763864909', 's164622104'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [19.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [190, 188, 188, 185, 174, 154, 187, 183] |
p03239 | u652081898 | 2,000 | 1,048,576 | 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. | ['n, time = map(int, input().split())\nlist = []\nlist_ok = []\nfor i in range(n):\n c, t = map(int, input().split())\n object = [c, t]\n list.append(object)\n \nprint(list)\n\nfor j in range(n):\n if list[j][1] > time:\n continue\n else:\n list_ok.append(list[j][0])\n\nans = min(list_ok)\n\nprint(ans)', 'n, time = map(int, input().split())\nlist = []\nlist_ok = []\n\nfor i in range(n):\n c, t = map(int, input().split())\n object = [c, t]\n list.append(object)\n \ncount = 0\n\nfor j in range(n):\n if list[j][1] > time:\n continue\n else:\n list_ok.append(list[j][0])\n count += 1\n\nif count == 0:\n print("TLE")\nelse:\n ans = min(list_ok)\n print(ans)'] | ['Runtime Error', 'Accepted'] | ['s814867796', 's592086646'] | [3064.0, 3064.0] | [17.0, 17.0] | [315, 378] |
p03239 | u652264802 | 2,000 | 1,048,576 | 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. | ['N, T = [int(s) for s in input().split()]\n\nc = []\nt = []\nfor n in range(N):\n inputs = input().split()\n c.append(int(inputs[0]))\n t.append(int(inputs[1]))\n\nmin_cost = None\nfor i in range(N):\n if t[i] <= T and (min_cost is None or c[i] <= min_cost):\n min_cost = c[i]\n result = i\n\nif min_cost is None:\n print("TLE")\nelse:\n print(i+1)\n', 'N, T = [int(s) for s in input().split()]\n\nc = []\nt = []\nfor n in range(N):\n inputs = input().split()\n c.append(int(inputs[0]))\n t.append(int(inputs[1]))\n\nmin_cost = "TLE"\nfor i in range(N):\n if t[i] <= T and (min_cost is "TLE" or c[i] <= min_cost):\n min_cost = c[i]\n\nprint(min_cost)'] | ['Wrong Answer', 'Accepted'] | ['s438189811', 's280739938'] | [3064.0, 3064.0] | [18.0, 18.0] | [362, 301] |
p03239 | u655048024 | 2,000 | 1,048,576 | 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. | ['n,T = list(map(int,input().split()))\nans = 10000\nfor i in range(n):\n c,t = map(int,input().split())\n if(t<=T):\n ans=min(ans,c)\n else:\n None\nif(ans = 10000):\n print("TLE")\nelse:\n print(ans)\n', 'n,T = list(map(int,input().split()))\nans = 10000\nfor i in range(n):\n c,t = map(int,input().split())\n if(t<=T):\n ans=min(ans,c)\n else:\n None\nif(ans == 10000):\n print("TLE")\nelse:\n print(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s230426699', 's124178441'] | [2940.0, 3064.0] | [17.0, 17.0] | [200, 201] |
p03239 | u657994700 | 2,000 | 1,048,576 | 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. | ["N, T = map(int,input().split())\n\nC,t = [], []\n\nfor i in range(N):\n CT = list(map(int,input().split()))\n C.append(CT[0])\n t.append(CT[1])\n\nC_min = 10000\nfor i,t_i in enumerate(t):\n print(t_i, C[i], C_min)\n if t_i <= T and C_min > C[i]:\n C_min = C[i]\n \nif C_min == 0:\n print('TLE')\nelse:\n print(C_min)", "N, T = map(int,input().split())\n\nC,t = [], []\n\nfor i in range(N):\n CT = list(map(int,input().split()))\n C.append(CT[0])\n t.append(CT[1])\n\nC_min = 10000\nfor i,t_i in enumerate(t):\n if t_i <= T and C_min >= C[i]:\n C_min = C[i]\n \nif C_min == 10000:\n print('TLE')\nelse:\n print(C_min)"] | ['Wrong Answer', 'Accepted'] | ['s169244371', 's114117151'] | [3064.0, 3064.0] | [18.0, 18.0] | [334, 311] |
p03239 | u661455670 | 2,000 | 1,048,576 | 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. | ['N = int(input())\nT = int(input())\nd = {}\nfor i in range(N):\n\tc = int(input())\n\tt = int(input())\n\td[c] = t\nfor c, t in sorted(d.items(), key=lambda x: x[0]):\n\tif t <= T:\n\t\tprint(c)\n\t\tbreak\nelse:\n\tprint("TLE")', 'NT_in = input()\nNT = NT_in.split()\nN = int(NT[0])\nT = int(NT[1])\nd = {}\nfor i in range(N):\n\tstr_num = input()\n\tnum = str_num.split()\n\td[int(num[0])] = int(num[1])\nfor c, t in sorted(d.items(), key=lambda x: x[0]):\n\tif t <= T:\n\t\tprint(c)\n\t\tbreak\nelse:\n\tprint("TLE")'] | ['Runtime Error', 'Accepted'] | ['s487532959', 's875018465'] | [3060.0, 3064.0] | [17.0, 18.0] | [207, 264] |
p03239 | u661757553 | 2,000 | 1,048,576 | 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. | ['n, t = map(int, input().split())\n\nleast = 10000\n\nfor _ in range(n):\n\tthisTime, thisCost = map(int, input().split())\n\t\n\tif thisTime <= t:\n\t\tleast = min(least, thisCost)\nprint(least)', 'n, t = map(int, input().split())\n\nleast = 10000\n\nfor _ in range(n):\n\tthisCost, thisTime = map(int, input().split())\n\t\n\tif thisTime <= t:\n\t\tif thisCost < least:\n\t\t\tleast = thisCost\n\t\t\t\nif least == 10000:\n\tprint("TLE")\nelse:\n\tprint(least)'] | ['Wrong Answer', 'Accepted'] | ['s118361912', 's558037567'] | [2940.0, 2940.0] | [17.0, 19.0] | [180, 236] |
p03239 | u663014688 | 2,000 | 1,048,576 | 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. | ["N,T = int(input())\nmin_cost = 1001\n\nfor i in range(N):\n l = input()\n if l[1] <= T:\n if l[0] < min_cost:\n min_cost = l[0]\n\nif min_cost = 1001:\n print('TLE')\nelse:\n print(min_cost)\n", "N,T = map(int, input().split())\nmin_cost = 1001\n\nfor i in range(N):\n c,t = map(int, (input().split()))\n if t <= T:\n if c < min_cost:\n min_cost = c\n\nif min_cost == 1001:\n print('TLE')\nelse:\n print(min_cost)\n"] | ['Runtime Error', 'Accepted'] | ['s253053619', 's698093123'] | [2940.0, 2940.0] | [17.0, 17.0] | [209, 236] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.