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 |
|---|---|---|---|---|---|---|---|---|---|---|
p03238 | u981931040 | 2,000 | 1,048,576 | In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him. | ['N = int(input())\na = int(input())\nb = int(input())\n\nif N == 1:\n print("Hello World")\nelse:\n print(a + b)', 'N = int(input())\nif N == 1:\n print("Hello World")\nelse:\n a = int(input())\n b = int(input())\n print(a + b)'] | ['Runtime Error', 'Accepted'] | ['s773934321', 's954991851'] | [2940.0, 2940.0] | [17.0, 17.0] | [106, 109] |
p03238 | u987164499 | 2,000 | 1,048,576 | In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him. | ['n = int(input())\nlow = 0\nhi = 10**9\n\nli = []\nlin = []\n\nfor _ in range(n):\n x,y,h = map(int,input().split())\n if h != 0:\n li.append((x,y,h))\n lin.append((x,y,h))\n\nfor i in range(101):\n for j in range(101):\n flag = True\n h = li[0][2]+abs(i-li[0][0])+abs(j-li[0][1])\n for a,b,c in lin:\n if max(h-abs(i-a)-abs(j-b),0) != c:\n flag = False\n break\n if flag:\n print(i,j,h)\n exit()', 'n = int(input())\nif n == 1:\n print("Hello World")\nelse:\n a = int(input())\n b = int(input())\n print(a+b)'] | ['Runtime Error', 'Accepted'] | ['s785654553', 's191489324'] | [3064.0, 2940.0] | [18.0, 17.0] | [482, 115] |
p03238 | u989385104 | 2,000 | 1,048,576 | In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him. | ['N = int(input())\n\nif N == 1:\n print("Hello World")\nelse if N == 2:\n A, B = map(int, input().split())\n print(A + B)\n', 'N = int(input())\n\nif N == 1:\n print("Hello World")\nelse N == 2:\n A = int(input())\n B = int(input())\n print(A + B)', 'N = int(input())\n\nif N == 1:\n print("Hello World")\nelse if N == 2:\n A, B = input() for i in 2\n print(A + B)\n', 'N = int(input())\n\nif N == 1:\n print("Hello World")\nelse if N == 2:\n A = int(input())\n B = int(input())\n print(A + B)\n', 'N = int(input())\n\nif N == 1:\n print("Hello World")\nelse :\n A = int(input())\n B = int(input())\n print(A + B)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s525986743', 's675565512', 's931238011', 's984926411', 's491746819'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [118, 117, 111, 121, 111] |
p03238 | u989817703 | 2,000 | 1,048,576 | In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him. | ['N=int(input())\nif N == 1:\n print("hello world")\nelse:\n A = int(input())\n B = int(input())\n print(A+B)', 'N=int(input())\nif N == 1:\n print("hello world")\nelif N == 2:\n A = int(input())\n B = int(input())\n print(A+B)', 'N=int(input())\nif N == 1:\n print("hello world")\nelse:\n A = float(input())\n B = float(input())\n print(A+B)', 'N=int(input())\nif N == 1:\n print("Hello World")\nelif N == 2:\n A = int(input())\n B = int(input())\n print(A+B)'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s311243904', 's605447094', 's853551921', 's337068369'] | [2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 18.0, 18.0, 18.0] | [113, 120, 117, 120] |
p03238 | u992759582 | 2,000 | 1,048,576 | In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him. | ["n = int(input())\na = int(input())\nb = int(input())\n\nif n ==1:\n print('Hello World')\nif n == 2:\n print(a+b)", "n = int(input())\n\n\nif n ==1:\n print('Hello World')\nif n == 2:\n a = int(input())\n b = int(input())\n print(a+b)"] | ['Runtime Error', 'Accepted'] | ['s300610924', 's922179235'] | [3064.0, 2940.0] | [18.0, 17.0] | [112, 121] |
p03238 | u993461026 | 2,000 | 1,048,576 | In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him. | ['N = int(input())\nif N == 1:\n print("Hello Wolrd")\nelse:\n print(int(input())+int(input()))', 'N = int(input())\nif N == 1:\n print("Hello World")\nelse:\n print(int(input())+int(input()))'] | ['Wrong Answer', 'Accepted'] | ['s386266459', 's470871122'] | [3316.0, 2940.0] | [21.0, 17.0] | [95, 95] |
p03238 | u994988729 | 2,000 | 1,048,576 | In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him. | ['n=int(input())\na=int(input())\nb=int(input())\nif n==1:\n print("Hello World")\nelse:\n print(a+b)', 'n=int(input())\nif n==1:\n print("Hello World")\nelse:\n print(int(input())+int(input()))\n '] | ['Runtime Error', 'Accepted'] | ['s928617234', 's941474733'] | [2940.0, 2940.0] | [17.0, 18.0] | [95, 90] |
p03238 | u995102075 | 2,000 | 1,048,576 | In 2020, AtCoder Inc. with an annual sales of more than one billion yen (the currency of Japan) has started a business in programming education. One day, there was an exam where a one-year-old child must write a program that prints `Hello World`, and a two-year-old child must write a program that receives integers A, B and prints A+B. Takahashi, who is taking this exam, suddenly forgets his age. He decides to write a program that first receives his age N (1 or 2) as input, then prints `Hello World` if N=1, and additionally receives integers A, B and prints A+B if N=2. Write this program for him. | ['N = input()\n\nif N == 1:\n print("Hello World")\nelse:\n A, B = map(int, input().split())\n print(A + B)\n', 'N = int(input())\n\nif N == 1:\n print("Hello World")\nelse:\n A = int(input())\n B = int(input())\n print(A + B)\n'] | ['Runtime Error', 'Accepted'] | ['s515563307', 's276245357'] | [2940.0, 2940.0] | [18.0, 17.0] | [109, 119] |
p03239 | u013408661 | 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())\nnavi=[]\nfor i in range(n):\n k=list(map(int,input().split()))\nnavi.sort()\nfor i in navi:\n if i[1]<=t:\n print(i[0])\n exit()\nprint('TLE')", "n,t=map(int,input().split())\nnavi=[]\nfor i in range(n):\n k=list(map(int,input().split()))\nnavi.sort()\nflag=False\nfor i in navi:\n if i[1]<=t:\n print(i[0])\n flag=True\n break\nif flag==False:\n print('TLE')", "n,t=map(int,input().split())\nnavi=[]\nfor i in range(n):\n k=list(map(int,input().split()))\n navi.append(k)\nnavi.sort()\nfor i in navi:\n if i[1]<=t:\n print(i[0])\n exit()\nprint('TLE')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s354880057', 's462499570', 's817413430'] | [2940.0, 3064.0, 3060.0] | [17.0, 17.0, 18.0] | [171, 213, 188] |
p03239 | u013756322 | 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 = [None] * N\nfor i in range(N):\n ct[i] = list(map(int, input().split()))\nct = list(filter(lambda x: x[1] <= T, ct))\nif not len(ct) > 0:\n ct.append([0, 'TLE'])\nct = sorted(ct, key=lambda x: x[0])\nprint(ct[0][1])\n", "N, T = map(int, input().split())\nct = [None] * N\nfor i in range(N):\n ct[i] = list(map(int, input().split()))\nct = sorted([x[0] for x in ct if x[1] <= T]) + ['TLE']\nprint(ct[0])"] | ['Wrong Answer', 'Accepted'] | ['s444280123', 's353892273'] | [3060.0, 3060.0] | [18.0, 17.0] | [249, 177] |
p03239 | u018586085 | 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(map(int, input().strip().split(\' \')))\nb = n[1]\nh = 100000\nc = 100000\nint(c)\na = []\nfor i in range(n[0]):\n a.append(list(map(int, input().split())))\n if a[i][1] <= n[1] and a[i][0] <= c:\n h = a[i][1]\n c = a[i][0]\n \n\nprint(h)\nprint(c)\nif h < n[1]:\n print(c)\nelse:\n print("TLE")', 'n = list(map(int, input().strip().split(\' \')))\nb = n[1]\nh = 100000\nc = 100000\nint(c)\na = []\nfor i in range(n[0]):\n a.append(list(map(int, input().split())))\n if a[i][1] <= n[1] and a[i][0] <= c:\n h = a[i][1]\n c = a[i][0]\n \n\nif h <= n[1]:\n print(c)\nelse:\n print("TLE")'] | ['Wrong Answer', 'Accepted'] | ['s220516821', 's009903711'] | [3064.0, 3064.0] | [17.0, 17.0] | [299, 282] |
p03239 | u018679195 | 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()\na=0\nb=0\nfor i in range(int(N)):\n c,t=input().split()\n if int(t)<=int(T):\n if b==0:\n a=c\n b+=1\n if int(c)<int (a):\n a=c\n i+=1\nif a==0:', 'A,B = (input().split())\nA = int(A)\nB = int(B)\nroads = []\nfor i in range(A):\n a, b = input().split()\n a = int(a)\n if t in range(1, B + 1):\n roads.append((int(a), b))\n\nif len(roads) == 0:\n print("TLE")\nelse:\n roads.sort()\n print(roads[0][0])', 'N , T = map(int, input().split())\ncost = []\nerror=[]\nfor i in range(0 , N ):\n x = [int(x) for x in input().split()]\nfor i in range (len(x)):\n if x[1]<=T :\n cost.append(x[i][0])\n if x[1] > T:\n error.append(x[i][1])\nif len(error) == N :\n print("TLE")\nelse:\n print(min(cost))\n\n', 'n, t = map(int, input().split())\n\nc = []\n\nfor i in range(0,n):\n c_i, t_i = map(int, input().split())\n\n if t_i <= t:\n c.append(c_i)\n\nif len(c) > 0:\n print(min(c))\nelse:\n print("TLE")'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s627382183', 's627413812', 's648250147', 's520945713'] | [2940.0, 3060.0, 3060.0, 9072.0] | [18.0, 17.0, 17.0, 28.0] | [217, 264, 303, 200] |
p03239 | u024245528 | 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())\nlist_aaa = [list(map(int,input().split())) for i in range(N)]\n\nmin_aaa =1001\n\nfor i in range(N):\n if T>= list_aaa[i][1]:\n min_aaa = min(min_aaa,list_aaa[i][1])\n\nif min_aaa ==1001:\n print(TLE)\nelse:\n print(min_aaa)\n\n\n', 'N,T = map(int,input().split())\nlist_aaa = [list(map(int,input().split())) for i in range(N)]\n\nmin_aaa =1001\n\nfor i in range(N):\n if T>= list_aaa[i][1]:\n min_aaa = min(min_aaa,list_aaa[i][0])\n\nif min_aaa ==1001:\n print("TLE")\nelse:\n print(min_aaa)\n\n\n'] | ['Runtime Error', 'Accepted'] | ['s872419896', 's990246608'] | [3060.0, 3060.0] | [17.0, 18.0] | [263, 265] |
p03239 | u026788530 | 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(i) for i in input()]\nans = LTE\nfor i in range(N):\n c1,c2 = [int(j) for j in input()]\n \n if c2 <= T:\n ans = c1\n \nprint(ans)', 'N, T = [int(i) for i in input().split()]\nans = LTE\nfor i in range(N):\n c1, c2 = [int(j) for j in input().split()]\n\n if c2 <= T:\n ans = c1\n\nprint(ans)', 'N, T = [int(i) for i in input().split()]\nans = 1500\nfor i in range(N):\n c1, c2 = [int(j) for j in input().split()]\n\n if c2 <= T:\n ans = min(c1,ans)\n\nif ans == 1500:\n ans = "TLE"\nprint(ans)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s241356227', 's404629901', 's301830068'] | [3056.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0] | [142, 162, 205] |
p03239 | u027026942 | 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)\nroutes = []\nfor _ in range(n):\n routes.append(tuple(map(int, input().split)))\nprint(min(route[0] for route in routes if route[1]<t))', 'n, t = map(int, input().split())\nroutes = []\nfor _ in range(n):\n routes.append(tuple(map(int, input().split())))\ntry:\n print(min(route[0] for route in routes if route[1]<=t))\nexcept:\n print("TLE")'] | ['Runtime Error', 'Accepted'] | ['s819438167', 's340510653'] | [3060.0, 3060.0] | [17.0, 17.0] | [164, 199] |
p03239 | u033524082 | 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=[]\nfor i in range(n):\n c,time=map(int,input().split())\n if time>=t:\n l.append(c)\nprint(min(l))', 'n,t=map(int,input().split())\nl=[]\nfor i in range(n):\n c,time=map(int,input().split())\n if time<=t:\n l.append(c)\nprint(min(l) if l!=[] else "TLE")'] | ['Runtime Error', 'Accepted'] | ['s013290499', 's559614575'] | [2940.0, 2940.0] | [18.0, 18.0] | [138, 158] |
p03239 | u039189422 | 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())\nres=1001\n\nfor _ in range(N):\n\tc,t=map(int,input().split())\n\tif t<=T:\n\t\tres=min(res,c)\n\nif res=1001:\n\tprint("TLE")\nelse:\n\tprint(res)', 'N,T=map(int,input().split())\nres=1001\n\nfor _ in range(N):\n\tc,t=map(int,input().split())\n\tif t<=T:\n\t\tres=min(res,c)\n\nif res==1001:\n\tprint("TLE")\nelse:\n\tprint(res)'] | ['Runtime Error', 'Accepted'] | ['s511566994', 's479136285'] | [2940.0, 2940.0] | [17.0, 18.0] | [160, 161] |
p03239 | u041075929 | 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, os\n\nf = lambda:list(map(int,input().split()))\nif 'local' in os.environ :\n sys.stdin = open('./input.txt', 'r')\n\ndef solve():\n n , T =f()\n\n minc = 10000\n for i in range(n):\n c,t = f()\n if t<= T:\n mic = min(minc, c)\n \n if minc == 10000:\n print('TLE')\n else:\n print(minc)\n\nsolve()", "import sys, os\n\nf = lambda:list(map(int,input().split()))\nif 'local' in os.environ :\n sys.stdin = open('./input.txt', 'r')\n\ndef solve():\n n , T =f()\n\n minc = 10000\n for i in range(n):\n c,t = f()\n if t<= T:\n minc = min(minc, c)\n \n if minc == 10000:\n print('TLE')\n else:\n print(minc)\n\nsolve()"] | ['Wrong Answer', 'Accepted'] | ['s173339584', 's320257139'] | [3064.0, 3060.0] | [18.0, 17.0] | [349, 350] |
p03239 | u046585946 | 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().spplit())\nct=[list(map(int,input().split())) for i in range(n)]\nans=1001\nfor i in range(n):\n if ct[n][1]<=t and ct[n][0]<=ans:\n ans=ct[n][0]\nif ans<1001:\n print(ans)\nelse:\n print("TLE")', 'n,t=map(int,input().split())\nct=[list(map(int,input().split())) for i in range(n)]\nans=1001\nfor i in range(n):\n if ct[n][1]<=t and ct[n][0]<=ans:\n ans=ct[n][0]\nif ans<1001:\n print(ans)\nelse:\n print("TLE")', 'n,t=map(int,input().split())\nct=[list(map(int,input().split())) for i in range(n)]\nans=1001\nfor i in range(n):\n if ct[i][0]<=ans and ct[i][1]<=t:\n ans=ct[i][0]\nif ans<1001:\n print(ans)\nelse:\n print("TLE")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s332529257', 's486032010', 's228735401'] | [3060.0, 3060.0, 3060.0] | [17.0, 18.0, 17.0] | [211, 210, 210] |
p03239 | u048945791 | 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())\n\nxyh = []\n\nfor i in range(n):\n xyh.append(list(map(int, input().split())))\n\nisOk = False\ni = 0\nj = 0\nconstant = -1\n\nfor i in range(101):\n for j in range(101):\n\n constant = -1\n for xyhTemp in xyh:\n if xyhTemp[2] != 0:\n temp = xyhTemp[2] + abs(i - xyhTemp[0]) + abs(j - xyhTemp[1])\n\n if constant == -1:\n constant = temp\n\n if constant != temp:\n break\n else:\n\n for p in xyh:\n if p[2] == 0 and constant - abs(i - p[0]) - abs(j - p[1]) > 0:\n break\n else:\n isOk = True\n break\n \n if isOk:\n break\n\nprint(i, j, constant)\n \n', 'N, T = list(map(int, input().split()))\n\nans = 100000\nfor i in range(N):\n c, t = list(map(int, input().split()))\n if t <= T and c <= ans:\n ans = c\n\nif ans == 100000:\n print("TLE")\nelse:\n print(ans)'] | ['Runtime Error', 'Accepted'] | ['s955278104', 's980722358'] | [3064.0, 3060.0] | [18.0, 17.0] | [761, 215] |
p03239 | u050121913 | 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\nList = []\n \nfor _ in range(N):\n list = list(map(int,input().split(' ')))\n List.append(list)\n \nList = [x[0] for x in List if x[1]<=T]\n \nprint(min(List))", "N,T = map(int,input().split(' '))\n\nfor _ in range(N):\n list = list(map(int,input().split(' ')))\n List.append(list)\n\nList = [x[0] for x in List if x[1]<=T]\n \nprint(min(List))", "N,T = map(int,input().split(' '))\n\nclist = []\ntlist = []\n\nfor _ in range(N):\n L = list(map(int,input().split(' ')))\n clist.append(L[0])\n tlist.append(L[1])\n \nList = [c for c,t in zip(clist,tlist) if t<=T]\n\nif len(List):\n print(min(List))\nelse:\n print('TLE')"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s231083347', 's811259107', 's635658371'] | [3060.0, 3060.0, 3060.0] | [17.0, 17.0, 21.0] | [189, 176, 263] |
p03239 | u050698451 | 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 sys import stdin\nN, T = [int(x) for x in stdin.readline().rstrip().split()]\nd = N+1\nfor i in range(N):\n l = list(map(int, input().split()))\n if l[1] <= T:\n if l[0] < d:\n d = l[0]\nif d < N+1:\n print(d)\nelse:\n print('TLE')", "from sys import stdin\nN, T = [int(x) for x in stdin.readline().rstrip().split()]\nd = 1001\nfor i in range(N):\n l = list(map(int, input().split()))\n if l[1] <= T:\n if l[0] < d:\n d = l[0]\nif d < N+1:\n print(d)\nelse:\n print('TLE')", "from sys import stdin\nN, T = [int(x) for x in stdin.readline().rstrip().split()]\nd = 1001\nfor i in range(N):\n l = list(map(int, input().split()))\n if l[1] <= T:\n if l[0] < d:\n d = l[0]\nif d < 1001:\n print(d)\nelse:\n print('TLE')"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s394923296', 's586257001', 's573781115'] | [3060.0, 3060.0, 3060.0] | [18.0, 18.0, 18.0] | [237, 238, 239] |
p03239 | u059210959 | 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. | ['#encoding utf-8\nfrom operator import itemgetter\n\n\nn,t = map(int, input().split())\n\nct = []\nfor i in range(n):\n c_0,t_0 = map(int, input().split())\n ct.append([c_0,t_0])\n\nct0 = list(ct)\nct.sort(key=itemgetter(1))\n# print(ct)\n# print(ct0)\nif ct[0][1] <= t:\n for i in range(len(ct0)):\n if ct[0] == ct0[i]:\n print(int(i)+1)\nelse:\n print("TLE")\n', '#encoding utf-8\nfrom operator import itemgetter\n\n\nn,t = map(int, input().split())\n\nct = []\nfor i in range(n):\n c_0,t_0 = map(int, input().split())\n ct.append([c_0,t_0])\n\ntime_flag = 0\nfor i in range(len(ct)):\n if ct[i][1] < t:\n time_flag += 1\n else:\n ct[i][0] = 1001\n\nct0=list(ct)\nct.sort(key=itemgetter(0))\n# print(ct)\n\nif time_flag == 0:\n print("TLE")\nelse:\n for i in range(len(ct0)):\n if ct[0] == ct0[i]:\n print(int(i)+1)', '#!/usr/bin/env python3\n# encoding:utf-8\nimport copy\nimport random\nimport bisect \nimport fractions \nimport math\nimport sys\nimport collections\nfrom decimal import Decimal \n\nmod = 10**9+7\nsys.setrecursionlimit(mod) \n\nd = collections.deque()\ndef LI(): return list(map(int, sys.stdin.readline().split()))\n\nN, T = LI()\ncosts = []\nfor i in range(N):\n c, t = LI()\n if t <= T:\n costs.append(c)\n\nif len(costs) > 0:\n\n costs.sort()\n print(costs[0])\nelse:\n print("TLE")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s190218679', 's358236606', 's268308194'] | [3064.0, 3064.0, 10832.0] | [18.0, 19.0, 43.0] | [370, 474, 640] |
p03239 | u065137691 | 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())\nList = []\nList2 = []\nmin = 1000\n\nfor i in range(N):\n M, B = map(int, input().split())\n List.append([M,B])\n M, B = 0, 0\n\nfor k in range(N):\n if int(List[k][1]) <= T:\n List2.append(List[k])\n\nfor n in range(len(List2)):\n if List2[n][0] <= min:\n min = List[n][0]\n\nif min > T:\n print('TLE')\nelse:\n print(min)", "N, T = map(int, input().split())\nList = []\nList2 = []\nmin = 1000\n\nfor i in range(N):\n M, B = map(int, input().split())\n List.append([M,B])\n M, B = 0, 0\n\nfor k in range(N):\n if int(List[k][1]) <= T:\n List2.append(List[k])\n\nfor n in range(len(List2)):\n if List2[n][0] <= min:\n min = List[n][0]\n\nif min == 1001:\n print('TLE')\nelse:\n print(min)", "N, T = map(int, input().split())\nList = []\nList2 = []\nmin = 1000\n\nfor i in range(N):\n M, B = map(int, input().split())\n List.append([M,B])\n M, B = 0, 0\n\nfor k in range(N):\n if int(List[k][1]) <= T:\n List2.append(List[k])\n\nfor n in range(len(List2)):\n if List2[n][0] <= min:\n min = List[n][0]\n\nif min == 1000:\n print('TLE')\nelse:\n print(min)", 'N, T = map(int, input().split())\nList = []\nList2 = []\nmin = 1000\n\nfor i in range(N):\n M, B = map(int, input().split())\n List.append([M,B])\n M, B = 0, 0\n\nfor k in range(N):\n if int(List[k][1]) <= T:\n List2.append(List[k])\n\nfor n in range(len(List2)):\n if List2[n][0] <= min:\n min = List[n][0]\n\nprint(min)', "N, T = map(int, input().split())\nList = []\nList2 = []\nmin = 1001\n\nfor i in range(N):\n M, B = map(int, input().split())\n List.append([M,B])\n M, B = 0, 0\n\nfor k in range(N):\n if int(List[k][1]) <= T:\n List2.append(List[k])\n\nfor n in range(len(List2)):\n if List2[n][0] <= min:\n min = List2[n][0]\n\nif min == 1001:\n print('TLE')\nelse:\n print(min)\n"] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s152618414', 's255261224', 's451088149', 's543146146', 's238843010'] | [3064.0, 3064.0, 3064.0, 3188.0, 3064.0] | [17.0, 18.0, 18.0, 19.0, 18.0] | [371, 375, 375, 332, 377] |
p03239 | u074338678 | 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_max = 1001\n\nfor i in range(N):\n c,t = map(int, input.split())\n if t <=T:\n c_max=min(c_max, c)\nprint("TLE" if c_max==1001 else 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:m=min(m,c)\nprint("TLE" if m==1001 else m)'] | ['Runtime Error', 'Accepted'] | ['s978403316', 's059383546'] | [2940.0, 3060.0] | [18.0, 17.0] | [166, 141] |
p03239 | u077019541 | 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 = [c for c,t in sorted([(input().split()) for i in range(N)],key=lambda x :x[1]) if int(t)<=T][-1]\nif len(ans)!=0:\n print(ans)\nelse:\n print("TLE")', 'N,T = map(int,input().split())\nans = [c[-1] for c,t in sorted([(input().split()) for i in range(N)],key=lambda x :x[1]) if int(t)<=T]\nif len(ans)!=0:\n print(ans)\nelse:\n print("TLE")', 'N,T = map(int,input().split())\nans = [int(c) for c,t in [(input().split()) for i in range(N)] if int(t)<=T]\nif len(ans)!=0:\n print(ans)\n print(min(ans))\nelse:\n print("TLE")', 'N,T = map(int,input().split())\nans = [int(c) for c,t in [(input().split()) for i in range(N)] if int(t)<=T]\nif len(ans)!=0:\n print(min(ans))\nelse:\n print("TLE")'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s154606338', 's305261986', 's916006987', 's632817283'] | [3060.0, 3060.0, 3060.0, 3060.0] | [18.0, 18.0, 18.0, 18.0] | [187, 187, 181, 166] |
p03239 | u081688405 | 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())\nr = [tuple(map(int, input().split())) for _ in range(n)]\nf = [(c, t) for c, t in r if t <= T]\nprint(min(f, key=lambda x: x[0]))', "N, T = map(int, input().split())\nr = [tuple(map(int, input().split())) for _ in range(N)]\nf = [(c, t) for c, t in r if t <= T]\nif len(f)==0:\n print('TLE')\nelse:\n print(min(f, key=lambda x: x[0])[0])\n"] | ['Runtime Error', 'Accepted'] | ['s971271492', 's930560178'] | [3060.0, 2940.0] | [17.0, 18.0] | [160, 201] |
p03239 | u083960235 | 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=[]\nfor i in range(n):\n l.append(list(map(int,input().split())))\nc=[]\nt=[]\nfor i in range(n):\n c.append(l[i][0])\n t.append(l[i][1])\n\nc_n=[]\nt_n=[]\nfor i in range(n):\n if t[i]<=T:\n c_n.append(c[i])\n t_n.append(t[i])\n\nif len(c_n)==0:\n print("TLE")\nelse:\n for i in range(len(c_n)):\n if t_n[i]==max(t_n):\n print(c_n[i])\n break\n\n\n', 'n,T=map(int,input().split())\nl=[]\nfor i in range(n):\n l.append(list(map(int,input().split())))\nc=[]\nt=[]\nfor i in range(n):\n c.append(l[i][0])\n t.append(l[i][1])\n\nc_n=[]\nt_n=[]\nfor i in range(n):\n if t[i]<=T:\n c_n.append(c[i])\n t_n.append(t[i])\n\nif len(c_n)==0:\n print("TLE")\nelse:\n for i in range(len(c_n)):\n if c_n[i]==min(c_n):\n print(c_n[i])\n break\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s188831125', 's934803754'] | [3064.0, 3064.0] | [18.0, 18.0] | [416, 416] |
p03239 | u087187808 | 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().strip().split())\nans = 1e9\nfor i in range(n):\n x, y = map(int, input().strip().split())\n if y <= t:\n x = min(x, ans)\nprint(ans if ans < 1e6 else 'TLE')\n", "n, t = map(int, input().strip().split())\nans = 1e9\nfor i in range(n):\n x, y = map(int, input().strip().split())\n if y <= t:\n ans = min(x, ans)\nprint(ans if ans < 1e6 else 'TLE')"] | ['Wrong Answer', 'Accepted'] | ['s982635859', 's697369903'] | [3064.0, 2940.0] | [18.0, 17.0] | [181, 182] |
p03239 | u087373960 | 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(i) for i in input().split()]\nC = []\n\nfor i in range(N):\n C.append([int(i) for i in input().split()])\n\nmin = T\nres = []\n\nfor c in C:\n cost = c[0]\n time = c[1]\n if time <= min:\n res.append(cost)\n \n\nif len(res) == 0:\n print("TLE")\nelse:\n print(min(res))', 'N, T = [int(i) for i in input().split()]\nC = []\n\nfor i in range(N):\n C.append([int(i) for i in input().split()])\n\nx = T\nres = []\n\nfor c in C:\n cost = c[0]\n time = c[1]\n if time <= x:\n res.append(cost)\n \n\nif len(res) == 0:\n print("TLE")\nelse:\n p = min(res)\n print(p)'] | ['Runtime Error', 'Accepted'] | ['s537723465', 's363204384'] | [3064.0, 3064.0] | [17.0, 17.0] | [290, 296] |
p03239 | u089142196 | 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. | ['def main():\n N,T= (int(i) for i in input().split())\n A=[]\n B=[]\n \n for i in range(N):\n ai,bi= (int(j) for j in input().split()) \n A.append(ai)\n B.append(bi)\n\n if (min(A)) <= T:\n print(min((A))\n else:\n print("TLE")\n \n \nmain()', 'def main():\n N,T= (int(i) for i in input().split())\n A=[]\n B=[]\n \n for i in range(N):\n ai,bi= (int(j) for j in input().split()) \n A.append(ai)\n B.append(bi)\n\n if (min(B)) <= T:\n print(min(A))\n else:\n print("TLE")\n \nmain()', 'def main():\n N,T= (int(i) for i in input().split())\n a_min=1001\n\n for i in range(N):\n ai,bi= (int(j) for j in input().split()) \n if bi<= T:\n if ai <= a_min:\n a_min = ai\n\n if a_min==1001:\n print("TLE")\n else:\n print(a_min)\n \n \nmain()'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s355714090', 's542100642', 's590087302'] | [2940.0, 3060.0, 2940.0] | [17.0, 20.0, 18.0] | [293, 282, 315] |
p03239 | u089230684 | 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. | ['line = input()\nX, Y = [int(n) for n in line.split()]\n\nvalue = "TLE"\nroute_cost = []\nfor i in range(X):\n line = input()\n cost, time = [int(n) for n in line.split()]\n route_cost.append([cost, time, i])\n\nroute_cost.sort(key=lambda x: x[0])\nfor cost, time, i in route_cost:\n if time > Y:\n continue\n else:\n value = i\n print(value)', 'if __name__ == "__main__":\n N, T = map(int, input().split())\n minCost = float("inf")\n answer = None\n for i in range(1,N+1):\n c,t = map(int, input().split())\n if c < minCost and t <= T:\n minCost = c\n answer = i\n if answer: \n print(i)\n else:\n print("TLE")\n \n', 'line = input()\nn, t = [int(n) for n in line.split()]\nmin_coust = 0\nroute = 0\nfor _ in range(n):\n line = input()\n coust, time = [int(n) for n in line.split()]\n if min_coust == 0 and time <= t:\n min_coust = coust\n elif time <= t and coust <= min_coust:\n min_coust = coust\nans = "TLE" if min_coust== 0 else min_coust\nprint(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s046347314', 's890421464', 's577286364'] | [3064.0, 2940.0, 3064.0] | [18.0, 17.0, 18.0] | [357, 328, 350] |
p03239 | u094191970 | 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())\nmin_c = 10**5\nfor n in range(N):\n c, t = map(int, input().split())\n if t <= T:\n min_c = min(min_c, c)\n\nif count == 1001:\n print(min_c)\nelse:\n print('TLE')", "N, T = map(int, input().split())\nmin_c = 1001\nfor n in range(N):\n c, t = map(int, input().split())\n if t <= T:\n min_c = min(min_c, c)\n\nif min_c == 1001:\n print(min_c)\nelse:\n print('TLE')", "N,T=map(int,input().split())\n\nans=10**4\nfor i in range(N):\n c,t=map(int,input().split())\n if t<=T:\n ans=min(ans,c)\n\nprint(ans if ans!=10**4 else 'TLE')"] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s559240343', 's616947887', 's031785006'] | [3064.0, 2940.0, 3060.0] | [17.0, 18.0, 17.0] | [206, 205, 152] |
p03239 | u102960641 | 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())\nmydict = {}\nfor i in range(n):\n a, b = map(int,input().split())\n mydict.setdefault(a, b)\nsortedDict = sorted(mydict.items())\nprint(sortedDict)\nk = 0\nfor j in sortedDict:\n k += 1\n if j[1] <= t:\n print(j[0])\n break\n if k == len(sortedDict):\n \tprint("TLE")\n break', 'n, t = map(int,input().split())\nmydict = {}\nfor i in range(n):\n a, b = map(int,input().split())\n mydict.setdefault(a, b)\nsortedDict = sorted(mydict.items())\nk = 0\nfor j in sortedDict:\n k += 1\n if j[1] <= t:\n print(j[0])\n break\n if k == len(sortedDict):\n \tprint("TLE")\n\tbreak', 'n, t = map(int,input().split())\nmydict = {}\nfor i in range(n):\n\ta, b = map(int,input().split())\n\tmydict.setdefault(a, b)\nsortedDict = sorted(mydict.items())\nk = 0\nfor j in sortedDict:\n\tk += 1\n\tif j[1] <= t:\n\t\tprint(j[0])\n break\n\tif k == len(sortedDict):\n\t\tprint("TLE")\n', 'n, t = map(int,input().split())\nmydict = {}\nfor i in range(n):\n a, b = map(int,input().split())\n mydict.setdefault(a, b)\nsortedDict = sorted(mydict.items())\nk = 0\nfor j in sortedDict:\n k += 1\n if j[1] <= t:\n print(j[1])\n break\n if k == len(sortedDict):\n \tprint("TLE")\n\n', 'n,t = map(int, input().split())\na = []\nb = 0\nfor i in range(n):\n l = list(map(int, input().split()))\n a.append(l)\na.sort()\nfor i in range(n):\n if a[i][1] <= t:\n b = a[i][0]\n break\nif b > 0:\n print(b)\nelse:\n print("TLE")\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s188864525', 's208092331', 's459861249', 's739917916', 's548028068'] | [3060.0, 2940.0, 2940.0, 3060.0, 3060.0] | [17.0, 18.0, 17.0, 17.0, 19.0] | [307, 286, 276, 281, 231] |
p03239 | u103730790 | 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. | ['li = str(input).split(" ")\nNT = list(map(int,li))\nN = NT[0]\nT = NT[1]\ni = 1\nmi = 9999\nwhile i <= 3:\n a = list(map(int,input.split()))\n c = a[0]\n t = a[1]\n if t <= T and c < mi:\n mi = c\n i += 1\n\nif mi == 9999:\n print("TLE")\nelse:\n print()\n', 'Input = input()\nli = Input.split(" ")\nNT = list(map(int,li))\nN = NT[0]\nT = NT[1]\ni = 1\nmi = 9999\n\nwhile i <= N:\n Input = input()\n li = Input.split(" ")\n a = list(map(int,li))\n c = a[0]\n t = a[1]\n if t <= T and c < mi:\n mi = c\n i += 1\n\nif mi == 9999:\n print("TLE")\nelse:\n print(mi)'] | ['Runtime Error', 'Accepted'] | ['s371573199', 's018439363'] | [3060.0, 3064.0] | [17.0, 18.0] | [266, 314] |
p03239 | u114920558 | 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,input().split())\ncost = list()\nm = B + 1\nfor i in range(A):\n x, y = map(int, input().split())\n if y < min:\n m = y\n cost.append(x)\nprint(min(cost) if m <= B else 'TLE')", "A, B = map(int,input().split())\ncost = list()\nm = B + 1\nfor i in range(A):\n x, y = map(int, input().split())\n if y < m:\n cost.append(x)\nprint(min(cost) if len(cost) != 0 else 'TLE')"] | ['Runtime Error', 'Accepted'] | ['s859300324', 's678329995'] | [3060.0, 3060.0] | [18.0, 18.0] | [190, 186] |
p03239 | u121161758 | 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\nkeep_cost = 1001\n\nfor i in range(n):\n c,t = map(int, input().split())\n if T >= t:\n if c <= keep_cost:\n keep_cost = c\n\n\nprint(keep_cost if keep_cos != 1001 else "TLE")', 'n, T = map(int, input().split())\n\nkeep_cost = 1001\n\nfor i in range(n):\n c,t = map(int, input().split())\n if T >= t:\n if c <= keep_cost:\n keep_cost = c\n\n\nprint(keep_cost if keep_cost != 1001 else "TLE")'] | ['Runtime Error', 'Accepted'] | ['s273991592', 's087293317'] | [3060.0, 3064.0] | [17.0, 18.0] | [224, 225] |
p03239 | u124592621 | 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\nINF = 10001\nminimum = INF\nfor i in range(N):\n c,t = map(int, input())\n if t <= T:\n minimum = min(minimum, c)\n\nif minimum == INF:\n print('TLE')\nelse\n print(minimum)\n\n", "N, T = map(int, input().split())\n\nINF = 10001\nminimum = INF\nfor i in range(N):\n c, t = map(int, input().split())\n if t <= T:\n minimum = min(minimum, c)\n\nif minimum == INF:\n print('TLE')\nelse:\n print(minimum)\n"] | ['Runtime Error', 'Accepted'] | ['s144314910', 's301374432'] | [2940.0, 2940.0] | [17.0, 17.0] | [218, 227] |
p03239 | u127499732 | 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=0\nfor _ in range(n):\n a,b=map(int,input().split())\n if b<=t:\n c=min(c,a)\nprint("TLE" if c==0 else c)', 'n,t=map(int,input().split())\nans=1001\nfor _ in range(n):\n cost,time=map(int,input().split())\n if time<=t:\n ans=min(ans,cost)\nprint(ans if ans!=1001 else "TLE")'] | ['Wrong Answer', 'Accepted'] | ['s983744288', 's895506388'] | [2940.0, 2940.0] | [17.0, 18.0] | [136, 164] |
p03239 | u129019798 | 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()\nmin=1001\nfor i in range(N):\n cost,time=input().split()\n if time<=T and cost<min:\n min=cost\nif min==1001:\n print('TLE')\nelse:\n print(min)", "N,T=input().split()\nmin=1001\nfor i in range(int(N)):\n cost,time=input().split()\n if int(time)<=int(T) and int(cost)<min:\n min=int(cost)\nif min==1001:\n print('TLE')\nelse:\n print(min)\n"] | ['Runtime Error', 'Accepted'] | ['s035369836', 's577724667'] | [2940.0, 2940.0] | [17.0, 22.0] | [163, 189] |
p03239 | u129749062 | 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()\nfor _ in range(N):\n s, t = map(int,i)nput().split\n if t <= T:\n ct.append(s, t)\n#ct = [input().split() for _ in range(N)]\n', 'N,T = map(int,input().split())\nc = 0\nfor _ in range(N):\n _c, _t = map(int,input().split())\n if _t <= T:\n if c == 0:\n c = _c\n elif c != 0 and _c <= c:\n c = _c\nprint(c if c != 0 else "TLE")'] | ['Runtime Error', 'Accepted'] | ['s526614591', 's942643747'] | [2940.0, 3060.0] | [17.0, 18.0] | [169, 205] |
p03239 | u130900604 | 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())\nclist,tlist=[],[]\nfor i in range(n):\n c,t=map(int,input().split())\n clist.append(c)\n tlist.append(t)\n\nans=10100\nflag=False\nfor d,e in zip(c,t):\n if e<=T:\n ans=min(ans,d)\n flag=True\nif flag == False:\n print("TLE")\nelse:\n print(ans)', 'n,T=map(int,input().split())\nclist,tlist=[],[]\nfor i in range(n):\n c,t=map(input().split())\n clist.append(c)\n tlist.append(t)\n\nans=10100\nflag=False\nfor d,e in zip(c,t):\n if e<=T:\n ans=min(ans,d)\n flag=True\nif flag == False:\n print("TLE")\nelse:\n print(ans)', 'N,T=map(int,input().split())\nINF=float("inf")\nans=INF\nfor _ in range(N):\n c,t=map(int,input().split())\n if t<=T:\n ans=min(ans,c)\nif ans==INF:\n print("TLE")\nelse:\n print(ans)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s192496940', 's534946269', 's761531095'] | [3064.0, 3064.0, 9024.0] | [18.0, 18.0, 27.0] | [271, 267, 180] |
p03239 | u132583371 | 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()))\nt = list(map(int,input().split()))\nmin = 1000\nfor i in range(n):\n if T > t[i] and min > c[i]:\n min = c[i]\nif min ==1000:\n print('TLE')\nelse:\n print(min)\n", "n,T = map(int,input().split())\nc = list(map(int,input().split()))\nt = list(map(int,input().split()))\nmin = 1000\nfor i in range(n):\n if T > t[i] and min > c[i]:\n min = c[i]\nif min ==1000:\n print('TLE')\nelse:\n print(min)", "n,T = map(int,input().split())\nc = list(input().split())\nt = list(input().split())\nmin = 1000\nfor i in range(n):\n if T > int(t[i]) and min > int(c[i]):\n min = int(c[i])\nif min ==1000:\n print('TLE')\nelse:\n print(min)\n", "n,T= map(int,input().split())\n\nmin = 1000\nfor i in range(n):\n c,t = map(int,input().split())\n if T > t[i] and min > c[i]:\n min = c[i]\nif min ==1000:\n print('TLE')\nelse:\n print(min)", "n= int(input())\nT = int(input())\nc = list(input().split())\nt = list(input().split())\nmin = 1000\nfor i in range(n):\n if int(T) > int(t[i]) and min > int(c[i]):\n min = int(c[i])\nif min ==1000:\n print('TLE')\nelse:\n print(min)", "n,T = map(int,input().split())\nc = list(input().split())\nt = list(input().split())\nmin = 1000\nfor i in range(n):\n if int(T) > int(t[i]) and min > int(c[i]):\n min = int(c[i])\nif min ==1000:\n print('TLE')\nelse:\n print(min)", "n,T= map(int,input().split())\nmin = 1001\nfor i in range(n):\n c,t = map(int,input().split())\n if T >= t and min > c:\n min = c\nif min > 1000:\n print('TLE')\nelse:\n print(min)"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s137168890', 's246333748', 's272988832', 's861930587', 's947609053', 's987307919', 's149166065'] | [3064.0, 3060.0, 2940.0, 3060.0, 3064.0, 3060.0, 2940.0] | [17.0, 17.0, 18.0, 17.0, 17.0, 18.0, 17.0] | [234, 234, 232, 199, 238, 236, 190] |
p03239 | u133347536 | 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())\nclist = []\nfor i in range(0, N):\n c = int(input())\n t = int(input())\n if t <= T:\n clist.append(c)\nclist.sort()\nif clist == []:\n print("TLE")\nelse:\n print(clist[0])\n', 'InStr = input()\nInList = InStr.split()\nN = int(InList[0])\nT = int(InList[1])\nccalist = []\nfor i in range(N):\n InStr = input()\n InList = InStr.split()\n cc = int(InList[0])\n ct = int(InList[1])\n if ct <= T:\n ccalist.append(cc)\nif ccalist == []:\n print("TLE")\nelse:\n ccalist.sort()\n print(ccalist[0])\n'] | ['Runtime Error', 'Accepted'] | ['s381443176', 's431390914'] | [2940.0, 3064.0] | [17.0, 18.0] | [220, 329] |
p03239 | u137228327 | 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())\nmn = 10**10\nfor i in range(N):\n c,t = map(int,input().split())\n print(c,t)\n if t <= T and c <= mn:\n mn = c\nif mn == 10**10:\n print("TLE")\nelse:\n print(mn)\n\n', 'N,T = map(int,input().split())\nmn = 10**10\nfor i in range(N):\n c,t = map(int,input().split())\n #print(c,t)\n if t <= T and c <= mn:\n mn = c\nif mn == 10**10:\n print("TLE")\nelse:\n print(mn)\n\n'] | ['Wrong Answer', 'Accepted'] | ['s560698360', 's268392741'] | [9092.0, 9164.0] | [30.0, 31.0] | [209, 210] |
p03239 | u143173995 | 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 = map(int, input().split())\n\nans = 1001\n\nfor i in range(N):\n cost, time = map(int, input().split())\n if time <= T:\n ans = min(ans, cost)\n\nif ans == 1001:\n print("TLE")\nelse:\n print(ans)', 'N, T = map(int, input().split())\nans = 1001\nfor i in range(N):\n cost, tm = map(int, input().split())\n if tm <= T:\n ans = min(ans, cost)\nif ans == 1001:\n ans = "TLE"\nprint(ans)', '\nN, T = map(int, input().split())\n\nans = 1001\n\nfor i in range(N):\n cost, time = map(int, input().split())\n if time <= T:\n ans = min(ans, cost)\n\nif ans == 1001:\n ans = "TLE"\nprint(ans)', '\nN, T = map(int, input().split())\n\nans = 1001\n\nfor i in range(N):\n cost, time = map(int, input().split())\n if time <= T:\n ans = min(ans, cost)\n\nif ans == 1001:\n ans = "TLE"\nprint(ans)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s019887108', 's410855177', 's830322621', 's556678171'] | [3064.0, 2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0, 19.0] | [332, 193, 321, 319] |
p03239 | u144980750 | 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(i) for i in input().split()]\nans=[]\nfor i in range(n):\n c,t=[int(i) for i in input().split()]\n if t<=T:\n ans.append(c)\nprint(min(ans) if len(c)!=0 else "TLE")\n', 'n,T=[int(i) for i in input().split()]\nans=[]\nfor i in range(n):\n c,t=[int(i) for i in input().split()]\n if t<=T:\n ans.append(c)\nprint(min(ans) if len(ans)!=0 else "TLE")'] | ['Runtime Error', 'Accepted'] | ['s956078728', 's699627925'] | [2940.0, 3060.0] | [17.0, 18.0] | [173, 174] |
p03239 | u145600939 | 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 = 2000\nfor i in range(n):\n c,t = map(int,input().split())\n if t <= T:\n ans = min(ans, t)\nif ans == 2000:\n print('TLE')\nelse:\n print(ans)\n", "n,T = map(int,input().split())\nans = 2000\nfor i in range(n):\n c,t = map(int,input().split())\n if t <= T:\n ans = min(ans, c)\nif ans == 2000:\n print('TLE')\nelse:\n print(ans)\n"] | ['Wrong Answer', 'Accepted'] | ['s309593318', 's581183243'] | [2940.0, 2940.0] | [18.0, 17.0] | [179, 179] |
p03239 | u152614052 | 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 = map(int, input().split(' '))\n# print(num, time)\n\ncolumns = []\nable_columns = []\nmy_dict = {}\n\n\nfor i in range(num):\n columns = (list(map(int,input().rstrip().split(' '))))\n columns.append(i+1)\n if columns[1] < time:\n able_columns.append(columns)\n\nif able_columns == []:\n print('TLE')\n\n# print(able_columns)\n# print(min(able_columns[0]))\n\nelse:\n for i in able_columns:\n my_dict[i[0]] = i[2]\n \n min_cost = min(my_dict)\n min_cost_num = my_dict[min_cost]\n print(min_cost_num)\n", "num, time = map(int, input().split(' '))\n# print(num, time)\n\ncolumns = []\nable_columns = []\nmy_dict = {}\n\n\nfor i in range(num):\n columns = (list(map(int,input().rstrip().split(' '))))\n if columns[1] <= time:\n able_columns.append(columns)\n\nif able_columns == []:\n print('TLE')\n\n\nelse:\n for i in able_columns:\n my_dict[i[0]] = i[1]\n print(min(my_dict))\n"] | ['Wrong Answer', 'Accepted'] | ['s741644080', 's390979790'] | [3064.0, 2940.0] | [17.0, 17.0] | [525, 380] |
p03239 | u159335277 | 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()))\n\npath = []\nfor _ in range(N):\n c, t = list(map(int, input().split()))\n if t <= T:\n path.append(c)\nsort(path)\nreverse(path)\nif len(path) > 0:\n print(path[0])\nelse:\n print(path[0])', "N, T = list(map(int, input().split()))\n\npath = []\nfor _ in range(N):\n c, t = list(map(int, input().split()))\n if t <= T:\n path.append(c)\npath.sort()\nif len(path) > 0:\n print(path[0])\nelse:\n print('TLE')\n"] | ['Runtime Error', 'Accepted'] | ['s628510944', 's825976314'] | [3060.0, 2940.0] | [17.0, 17.0] | [224, 210] |
p03239 | u166696759 | 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())\nres=2000\nfor i in N:\n c,t=map(int,input().split())\n if t>T:\n continue\n else:\n res=min(res,c)\nif res==2000:\n print("TLE")\nelse:\n print(res)', 'N,T=map(int,input().split())\nres=2000\nfor i in N:\n c,t=map(int,input())\n if t>T:\n continue\n else:\n res=min(res,c)\nif res=2000:\n print("TLE")\nelse:\n print(res)', 'N,T=map(int,input())\nres=2000\nfor i in N:\n c,t=map(int,input())\n if t>T:\n continue\n else:\n res=min(res,c)\nif res=2000:\n print("TLE")\nelse:\n print(res)', 'N,T=map(int,input().split())\nres=2000\nfor i in N:\n c,t=map(int,input().split())\n if t>T:\n continue\n else:\n res=min(res,c)\nif res=2000:\n print("TLE")\nelse:\n print(res)', 'N,T=map(int,input().split())\nres=2000\nfor i in range(N):\n c,t=map(int,input().split())\n if t>T:\n continue\n else:\n res=min(res,c)\nif res==2000:\n print("TLE")\nelse:\n print(res)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s324045607', 's348322474', 's437490537', 's943296458', 's318867985'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [19.0, 18.0, 18.0, 18.0, 18.0] | [178, 169, 161, 177, 185] |
p03239 | u169696482 | 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 a = list(map(int, input().split()))\n if a[1] =< t:\n A.append(a[0])\nif len(A) == 0:\n print('TLE')\nelse:\n print(min(A))", "n, t = map(int, input().split())\nA = []\nfor i in range(n):\n a = list(map(int, input().split()))\n if a[1] <= t:\n A.append(a[0])\nif len(A) == 0:\n print('TLE')\nelse:\n print(min(A))"] | ['Runtime Error', 'Accepted'] | ['s703142773', 's518509396'] | [2940.0, 3064.0] | [17.0, 18.0] | [184, 184] |
p03239 | u170077602 | 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\ninput = sys.stdin.readline\n\nN, T = map(int,input().split())\nct=[list(map(int, input().split())) for _ in range(N)]\nans = 10000\nfor i in range(N):\n if cn[i][1] > T: continue\n ans = min(ans,cn[i][0])\nprint(ans)', 'import sys\ninput = sys.stdin.readline\n\nN, T = map(int,input().split())\nct=[list(map(int, input().split())) for _ in range(N)]\nINF = 100000\nans = INF\nfor i in range(N):\n if ct[i][1] > T: continue\n ans = min(ans,ct[i][0])\nif ans == INF:\n ans="TLE"\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s823450047', 's293075485'] | [3060.0, 3060.0] | [17.0, 17.0] | [225, 265] |
p03239 | u170650966 | 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 = 1005\nfor i in range(N):\n c,t = map(int, input().split())\n if t <= T:\n ans = min(ans, c)\nprint("TLE" if m == 1005 else ans)\n', 'N,T = map(int, input().split())\nans = 1005\nfor i in range(N):\n c,t = map(int, input().split())\n if t <= T:\n ans = min(ans, c)\nprint("TLE" if ans == 1005 else ans)\n'] | ['Runtime Error', 'Accepted'] | ['s216461000', 's584453686'] | [2940.0, 2940.0] | [17.0, 18.0] | [174, 176] |
p03239 | u175590965 | 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(m,c)\nprint('TLE' if m == 1001 else m)", "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', 'Accepted'] | ['s389704798', 's815086866'] | [3060.0, 2940.0] | [17.0, 17.0] | [162, 162] |
p03239 | u178192749 | 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 = [[map(int,input().split())] for _ in range(n)]\ncost = 9999\nfor i in range(n):\n c,t = ct[i][0],ct[i][1]\n if t<=T:\n cost = min(cost,c)\nprint(cost if cost != 9999 else 'TLE')", "n,T = map(int,input().split())\nct = [[map(int,input().split())] for _ in range(n)]\ncost = 9999\nfor i in range(n):\n c,t = ct[i][0],ct[i][1]\n if t<=T:\n cost = min(cost,c)\nprint(cost if cost != 9999 else 'TLE')", "n,T = map(int,input().split())\nct = [list(map(int,input().split())) for _ in range(n)]\ncost = 9999\nfor i in range(n):\n c,t = ct[i][0],ct[i][1]\n if t<=T:\n cost = min(cost,c)\nprint(cost if cost != 9999 else 'TLE')"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s418490127', 's790597462', 's408515368'] | [3064.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [212, 220, 224] |
p03239 | u179169725 | 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=100000\nfor _ in range(N):\n c,t=map(int,input().split())\n if t<=T:\n ans=min(ans,c)\nprint('TLE' if ans=100000 else ans)", "N,T=map(int,input().split())\nans=100000\nfor _ in range(N):\n c,t=map(int,input().split())\n if t<=T:\n ans=min(ans,c)\nprint('TLE' if ans==100000 else ans)\n"] | ['Runtime Error', 'Accepted'] | ['s163544231', 's832842047'] | [9036.0, 9080.0] | [23.0, 28.0] | [155, 157] |
p03239 | u185037583 | 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=100000000\nfor i in range(n):\n c,t=map(int,input().split())\n if t>T: continue\n ans=min(c,ans)\nprint(ans if ans<100000000 else 'TLE')", "N,T=map(int,input().split())\nans=100000000\nfor i in range(N):\n c,t=map(int,input().split())\n if t>T: continue\n ans=min(c,ans)\nprint(ans if ans<100000000 else 'TLE')"] | ['Runtime Error', 'Accepted'] | ['s824458718', 's402658154'] | [2940.0, 2940.0] | [21.0, 17.0] | [159, 167] |
p03239 | u186838327 | 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())\ndic = {}\nfor i in range(N):\n c, t = [int(i) for i in input().split()]\n dic[t].append(c)\nif max(dic) <= T:\n print(dic[max(dic)])\nelse:\n print('TLE')", "N, T = map(int, input().split())\ndic = {}\nfor i in range(N):\n c, t = map(int, input().split())\n dic[t].append(c)\nif max(dic) <= T:\n print(dic[max(dic)])\nelse:\n print('TLE')", "N, T = input().split()\ndic = {}\nfor i in range(int(input()):\n c, t = [int(i) in input().split()]\n dic[t].append(c)\nif max(dic) <= T:\n print(dic[max(dic)])\nelse:\n print('TLE')", "N, T = input().split()\ndic = {}\nfor i in range(int(input()):\n\tc, t = [int(i) in input().split()]\n dic[t].append(c)\nif max(dic) <= T:\n\tprint(dic[max(dic)])\nelse:\n\tprint('TLE')\n\n \n", "N, T = input().split()\ndic = {}\nfor i in range(N):\n c, t = [int(i) for i in input().split()]\n dic[t].append(c)\nif max(dic) <= T:\n print(dic[max(dic)])\nelse:\n print('TLE')", "N, T = input().split()\ndic = {}\nfor i in range(int(input()):\n\tc, t = [int(i) in input().split()]\n dic[t].append(c)\nif max(dic) <= T:\n\tprint(dic[max(dic)])\nelse:\n\tprint('TLE')", "N, T = map(int, input().split())\ndic = {}\nfor i in range(N):\n c, t = map(int, input().split())\n dic[t] = c\nif max(dic) <= T:\n print(dic[max(dic)])\nelse:\n print('TLE')", "N, T = input().split()\ndic = {}\nfor i in range(int(input()):\n c, t = [int(i) for i in input().split()]\n dic[t].append(c)\nif max(dic) <= T:\n print(dic[max(dic)])\nelse:\n print('TLE')", "N, T = map(int, input().split())\ncosts = []\nfor i in range(N):\n c, t = map(int, input().split())\n if t <= T:\n costs.append(c)\nif len(costs) == 0:\n print('TLE')\nelse:\n print(min(costs))"] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s015754146', 's060250181', 's104286687', 's164061104', 's359271032', 's448085001', 's602430225', 's626583727', 's892130587'] | [3060.0, 3060.0, 2940.0, 2940.0, 3060.0, 2940.0, 3060.0, 2940.0, 3064.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 18.0, 17.0, 17.0, 17.0] | [192, 184, 186, 192, 182, 177, 178, 192, 203] |
p03239 | u200030766 | 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. | ["ct=[]\nfor i in range(N):\n ct.append(list(map(int, input().strip().split(' '))))\n \ntle=True\nc=100000000\n\nfor i in range(N):\n if ct[i][1]<=T:\n tle=False\n c=min(c,ct[i][0])\n \nif tle:\n print('TLE')\nelse:\n print(c)", "ct=[]\nfor i in range(N):\n ct.append(list(map(int, input().strip().split(' '))))\n \ntle=True\nc=10000\n\nfor i in range(N):\n if ct[i][1]<=T:\n tle=False\n c=min(c,ct[i][0])\n \nif tle:\n print('TLE')\nelse:\n print(c)", "N, T=map(int,input().strip().split(' '))\n\nct=[]\nfor i in range(N):\n ct.append(list(map(int, input().strip().split(' '))))\n \ntle=True\nc=100000000\n\nfor i in range(N):\n if ct[i][1]<=T:\n tle=False\n c=min(c,ct[i][0])\n \nif tle:\n print('TLE')\nelse:\n print(c)"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s181165779', 's407481371', 's756390077'] | [3064.0, 3060.0, 3064.0] | [17.0, 17.0, 17.0] | [245, 241, 287] |
p03239 | u214434454 | 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())\nmin_cost = 10**3 + 1\nfor i in range(n):\n c, t = map(int,input().split())\n if t <= T and c < min_cost:\n min_cost = c\nif c != 10**3 + 1:\n print(min_cost)\nelse:\n print("TLE")', 'N,T = map(int,input().split())\nmin_cost = 10**3 + 1\nfor i in range(N):\n c, t = map(int,input().split())\n if t <= T and c < min_cost:\n min_cost = c\nif min_cost != 10**3 + 1:\n print(min_cost)\nelse:\n print("TLE")'] | ['Runtime Error', 'Accepted'] | ['s812344813', 's431183519'] | [3064.0, 3060.0] | [17.0, 17.0] | [221, 228] |
p03239 | u214547877 | 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()))\nminCos = 10000\nans = 0\nfor i in range(N):\n c,t=list(map(int,input().split()))\n if t < T:\n if min(minCos,c) == c:\n ans = i+1\n minCos = c\nif ans == 0:\n print("TLE")\nelse:\n print(ans)', 'N,T=list(map(int,input().split()))\nminCos = 10000\nans = 0\nfor i in range(N):\n c,t=list(map(int,input().split()))\n if t <= T:\n if min(minCos,c) == c:\n ans = i+1\n minCos = c\nif ans == 0:\n print("TLE")\nelse:\n print(ans)', 'N,T=list(map(int,input().split()))\nminCos = 10000\nans = 0\nfor i in range(N):\n c,t=list(map(int,input().split()))\n if t <= T:\n if min(minCos,c) == c:\n ans = c\n minCos = c\nif ans == 0:\n print("TLE")\nelse:\n print(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s008543854', 's366751430', 's552326602'] | [9004.0, 9028.0, 9088.0] | [32.0, 29.0, 31.0] | [232, 233, 231] |
p03239 | u215018528 | 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:m=min(m,c)\nprint("TLE" if m==1001 else m', 'N, T = map(int, input().split())\nm = 1001\nfor i in range(N):\n c,t = map(int,input().split())\n if t <= T: m = min(m,c)\nprint("TLE" if m == 1001 else m)'] | ['Runtime Error', 'Accepted'] | ['s289656657', 's586364003'] | [2940.0, 2940.0] | [17.0, 17.0] | [144, 156] |
p03239 | u216631280 | 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())\nminCost = 1001\nfor i range in n:\n cc, tt = map(int, input().split())\n if tt <= t and cc < minCost:\n minCost = cc\nif minCost == 1001:\n print('TLE')\nelse:\n print(minCost)", "n, t = map(int, input().split())\nminCost = 1001\nfor i in range(n):\n cc, tt = map(int, input().split())\n if tt <= t and cc < minCost:\n minCost = cc\nif minCost == 1001:\n print('TLE')\nelse:\n print(minCost)"] | ['Runtime Error', 'Accepted'] | ['s406855171', 's842104222'] | [2940.0, 2940.0] | [17.0, 17.0] | [220, 221] |
p03239 | u217940964 | 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 = [None] * N\nt = [None] * N\n\nfor i in range(N):\n c[i], t[i] = map(int, input.split())\n\na = [x for x, y in zip(c, t) if y <= T]\nif len(a) > 0:\n print(min(a))\nelse:\n print('TLE')", "N, T = map(int, input().split())\nc = [None] * N\nt = [None] * N\n\nfor i in range(N):\n c[i], t[i] = map(int, input().split())\n\na = [x for x, y in zip(c, t) if y <= T]\nif len(a) > 0:\n print(min(a))\nelse:\n print('TLE')"] | ['Runtime Error', 'Accepted'] | ['s389129673', 's888591771'] | [3060.0, 3060.0] | [18.0, 18.0] | [212, 216] |
p03239 | u218494572 | 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(" ")))\nc = []\nt = []\n\nfor i in range(N):\n ci, ti = input().split(" ")\n c.append(int(ci))\n t.append(int(ti))\nif min(t) > T:\n print("TLE\\n")\n\nelse:\n cost = 10000\n for i in range(N):\n if cost > c[i] and T >= t[i]:\n cost = c[i]\n print(', 'N, T = list(map(int, input().split(" ")))\nc = []\nt = []\n\nfor i in range(N):\n ci, ti = input().split(" ")\n c.append(int(ci))\n t.append(int(ti))\nif min(t) > T:\n print("TLE\\n")\n\nelse:\n cost = 10000\n for i in range(N):\n if cost > c[i] and T >= t[i]:\n cost = c[i]\n print(cost)'] | ['Runtime Error', 'Accepted'] | ['s743994709', 's644118798'] | [3064.0, 3064.0] | [17.0, 17.0] | [305, 310] |
p03239 | u220870679 | 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, b = map(int, input().split())\n A.append(a)\n B.append(b)\n i += 1\nprint(A,B)\nif T >= min(B):\n for j in range(len(A)-1):\n if B[j] > T:\n A.pop(j)\n B.pop(j)\n else:\n pass\n print(min(A))\nelse:\n print("TLE")', 'N, T = map(int, input().split())\nans = "TLE"\nx = 1001\nfor i in range(N):\n c, t = map(int, input().split())\n if c <= x and t <= T:\n x = c\n ans = c\n else:\n pass\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s364849750', 's155787292'] | [3064.0, 2940.0] | [19.0, 17.0] | [337, 199] |
p03239 | u224983328 | 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\nway = []\n\nfor i in range(N):\n c,t = map(int, input().split(" "))\n if T >= t:\n way.append([c])\n \nif len(way) == 0:\n print("TLE")\nelse:\n way.sort()\n print(way[0])', 'N,T = map(int, input().split(" "))\n\nway = []\n\nfor i in range(N):\n c,t = map(int, input().split(" "))\n if T >= t:\n way.append(c)\n \nif len(way) == 0:\n print("TLE")\nelse:\n way.sort()\n print(way[0])'] | ['Wrong Answer', 'Accepted'] | ['s545531716', 's483174215'] | [3060.0, 3060.0] | [17.0, 17.0] | [205, 203] |
p03239 | u229518917 | 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 a in range(N)]\n\nct=sorted(ct, key=lambda x:(x[0],x[1]))\n\nfor i in range(N):\n if ct[i][1]<=t:\n print(ct[i][0])\n break\nelse:\n print('TLE')", "N,T=map(int,input().split())\nct=[list(map(int,input().split())) for a in range(N)]\n\nct=sorted(ct, key=lambda x:(x[0],x[1]))\n\nfor i in range(N):\n if ct[i][1]<=T:\n print(ct[i][0])\n break\n else:\n print('TLE')\n break", "N,T=map(int,input().split())\nct=[list(map(int,input().split())) for a in range(N)]\n\nct=sorted(ct, key=lambda x:(x[0],x[1]))\n\nfor i in range(N):\n if ct[i][1]<=T:\n print(ct[i][0])\n break\nelse:\n print('TLE')"] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s132749646', 's366190047', 's788751351'] | [3064.0, 3060.0, 3060.0] | [18.0, 18.0, 17.0] | [224, 246, 224] |
p03239 | u236536206 | 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()))\nc=[]\nt=[]\nfor i in range(n):\n C,T=map(int,input().split())\n c.append(C)\n t.append(T)\n#print(c)\n#print(t)\nif min(t)>time:\n print("TLE")\nelse:\n p=[]\n for i in range(len(t)):\n if t[i]>time:\n p.append(i)\n if len(p)==1:\n print(c[p[0]])\n #print(p)\n for i in p:\n del t[i]\n del c[i]\n print(min(c))', 'n,time=(map(int,input().split()))\nc=[]\nt=[]\nfor i in range(n):\n C,T=map(int,input().split())\n c.append(C)\n t.append(T)\n#print(c)\n#print(t)\nif min(t)>time:\n print("TLE")\nelse:\n for i in range(len(t)):\n if t[i]>time:\n c[i]=max(c)\n\n\n #print(c)\n if len(c)==1:\n print(c[0])\n elif len(c)==2:\n if c[0]>=c[1]:\n print(c[1])\n else:\n print(c[0])\n else:\n print(min(c))'] | ['Runtime Error', 'Accepted'] | ['s164907872', 's408368394'] | [3064.0, 3064.0] | [17.0, 18.0] | [392, 451] |
p03239 | u239342230 | 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. | ['4 3\n1 1000\n2 4\n3 1000\n4 500', 'N, T = map(int,input().split())\n\nclist = []\nfor i in range(N):\n c, t = map(int,input().split())\n if t <= T:\n clist.append(c)\nif len(clist) > 0:\n print(min(clist))\nelse:\n print("TLE")'] | ['Runtime Error', 'Accepted'] | ['s606414084', 's303681945'] | [2940.0, 3060.0] | [19.0, 18.0] | [27, 201] |
p03239 | u240630407 | 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())\ncost = 1001\nfor i in range(N):\n\tc, t = map(int, input().split())\n\tif t < T:\n\t\tif c < cost:\n\t\t\tcost = c\n\nif cost == 1001\n\tprint("TLE")\nelse\n\tprint(cost)', 'N, T = map(int, input().split())\ncost = 1001\nfor i in range(N):\n\tc, t = map(int, input().split())\n\tif t <= T:\n\t\tif c < cost:\n\t\t\tcost = c\n\nif cost == 1001:\n\tprint("TLE")\nelse:\n\tprint(cost)'] | ['Runtime Error', 'Accepted'] | ['s466021679', 's315705533'] | [2940.0, 2940.0] | [17.0, 17.0] | [184, 187] |
p03239 | u243572357 | 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 = 'TLE'\nfor i in range(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)\nprint(ans if ans != 1001 else 'TLE')\n"] | ['Runtime Error', 'Accepted'] | ['s684822933', 's685252775'] | [3060.0, 2940.0] | [17.0, 17.0] | [144, 170] |
p03239 | u244836567 | 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=input().split()\na=int(a)\nb=int(b)\nc=[input().split() for i in range(a)]\nd=1001\nfor i in range(a-1):\n if int(c[i][1])<=b:\n if d>int(c[i][0]):\n d=int(c[i][0])\nprint(d)\n ', 'a,b=input().split()\na=int(a)\nb=int(b)\nc=[input().split() for i in range(a)]\nd=1001\nfor i in range(a-1):\n if int(c[i][1])<=b:\n if d>int(c[i][0]):\n d=int(c[i][0])\nif d==1001:\n print("TLE")\nelse:\n print(d)\n ', 'a,b=input().split()\na=int(a)\nb=int(b)\nc=[input().split() for i in range(a)]\nd=1001\nfor i in range(a):\n if int(c[i][i])<=b:\n if d>int(c[i][i]):\n d=int(c[i][i])\nprint(d)\n ', 'a,b=input().split()\na=int(a)\nb=int(b)\nc=[input().split() for i in range(a)]\nd=1001\nfor i in range(a):\n if int(c[i][1])<=b:\n if d>int(c[i][0]):\n d=int(c[i][0])\nif d==1001:\n print("TLE")\nelse:\n print(d)\n '] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s580951729', 's669020158', 's915375688', 's065282467'] | [9104.0, 9124.0, 9084.0, 9044.0] | [31.0, 31.0, 23.0, 26.0] | [185, 220, 183, 218] |
p03239 | u247623772 | 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=[]\nfor i in range(N):\n c,t=map(int,input().split())\n if t < T:\n l.append(c)\nif l =[]:\n print("TLE")\nelif:\n print(min(l))', 'N,T=map(int,input().split())\nl=[]\nfor i in range(N):\n c,t=map(int,input().split())\n if t <= T:\n l.append(c)\nif not l:\n print("TLE")\nelse:\n print(min(l))'] | ['Runtime Error', 'Accepted'] | ['s070461932', 's119555896'] | [2940.0, 2940.0] | [17.0, 17.0] | [170, 171] |
p03239 | u255280439 | 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\nimport math\nimport collections\nimport itertools\nimport array\nimport inspect\n\n\nsys.setrecursionlimit(1000000)\n\n\n# Debug output\ndef chkprint(*args):\n names = {\n id(v): k\n for k, v in inspect.currentframe().f_back.f_locals.items()\n }\n print(\', \'.join(\n names.get(id(arg), \'???\') + \' = \' + repr(arg) for arg in args))\n\n\n# Binary converter\ndef to_bin(x):\n return bin(x)[2:]\n\n\ndef li_input():\n return [int(_) for _ in input().split()]\n\n\ndef gcd(n, m):\n if n % m == 0:\n return m\n else:\n return gcd(m, n % m)\n\n\ndef gcd_list(L):\n v = L[0]\n\n for i in range(1, len(L)):\n v = gcd(v, L[i])\n\n return v\n\n\ndef lcm(n, m):\n return (n * m) // gcd(n, m)\n\n\ndef lcm_list(L):\n v = L[0]\n\n for i in range(1, len(L)):\n v = lcm(v, L[i])\n\n return v\n\n\n# Width First Search (+ Distance)\ndef wfs_d(D, N, K):\n \n\n dfk = [-1] * (N + 1)\n dfk[K] = 0\n\n cps = [(K, 0)]\n r = [False] * (N + 1)\n r[K] = True\n while len(cps) != 0:\n n_cps = []\n for cp, cd in cps:\n for i, dfcp in enumerate(D[cp]):\n if dfcp != -1 and not r[i]:\n dfk[i] = cd + dfcp\n n_cps.append((i, cd + dfcp))\n r[i] = True\n\n cps = n_cps[:]\n\n return dfk\n\n\n# Depth First Search (+Distance)\ndef dfs_d(v, pre, dist):\n \n\n global D\n global D_dfs_d\n\n D_dfs_d[v] = dist\n\n for next_v, d in D[v]:\n if next_v != pre:\n dfs_d(next_v, v, dist + d)\n\n return\n\n\ndef sigma(N):\n ans = 0\n for i in range(1, N + 1):\n ans += i\n return ans\n\n\ndef comb(n, r):\n if n - r < r: r = n - r\n if r == 0: return 1\n if r == 1: return n\n\n numerator = [n - r + k + 1 for k in range(r)]\n denominator = [k + 1 for k in range(r)]\n\n for p in range(2, r + 1):\n pivot = denominator[p - 1]\n if pivot > 1:\n offset = (n - r) % p\n for k in range(p - 1, r, p):\n numerator[k - offset] /= pivot\n denominator[k] /= pivot\n\n result = 1\n for k in range(r):\n if numerator[k] > 1:\n result *= int(numerator[k])\n\n return result\n\ndef bisearch(L, target):\n low = 0\n high = len(L) - 1\n \n while low <= high:\n mid = (low + high) // 2\n guess = L[mid]\n if guess == target:\n return True\n elif guess < target:\n low = mid + 1\n elif guess > target:\n high = mid - 1\n if guess != target:\n return False\n\n# --------------------------------------------\n\ndp = None\n\n\ndef main():\n N, T = li_input()\n A = []\n\n for i in range(N):\n A.append(li_input())\n\n ans = 9999999999999999999\n\n for a in A:\n c, t = a\n\n if t <= T and c < ans:\n ans = c\n if ans != 9999999999999999999\n print(ans)\n else:\n print("TLE")\n\n\nmain()\n', 'import sys\nimport math\nimport collections\nimport itertools\nimport array\nimport inspect\n\n\nsys.setrecursionlimit(1000000)\n\n\n# Debug output\ndef chkprint(*args):\n names = {\n id(v): k\n for k, v in inspect.currentframe().f_back.f_locals.items()\n }\n print(\', \'.join(\n names.get(id(arg), \'???\') + \' = \' + repr(arg) for arg in args))\n\n\n# Binary converter\ndef to_bin(x):\n return bin(x)[2:]\n\n\ndef li_input():\n return [int(_) for _ in input().split()]\n\n\ndef gcd(n, m):\n if n % m == 0:\n return m\n else:\n return gcd(m, n % m)\n\n\ndef gcd_list(L):\n v = L[0]\n\n for i in range(1, len(L)):\n v = gcd(v, L[i])\n\n return v\n\n\ndef lcm(n, m):\n return (n * m) // gcd(n, m)\n\n\ndef lcm_list(L):\n v = L[0]\n\n for i in range(1, len(L)):\n v = lcm(v, L[i])\n\n return v\n\n\n# Width First Search (+ Distance)\ndef wfs_d(D, N, K):\n \n\n dfk = [-1] * (N + 1)\n dfk[K] = 0\n\n cps = [(K, 0)]\n r = [False] * (N + 1)\n r[K] = True\n while len(cps) != 0:\n n_cps = []\n for cp, cd in cps:\n for i, dfcp in enumerate(D[cp]):\n if dfcp != -1 and not r[i]:\n dfk[i] = cd + dfcp\n n_cps.append((i, cd + dfcp))\n r[i] = True\n\n cps = n_cps[:]\n\n return dfk\n\n\n# Depth First Search (+Distance)\ndef dfs_d(v, pre, dist):\n \n\n global D\n global D_dfs_d\n\n D_dfs_d[v] = dist\n\n for next_v, d in D[v]:\n if next_v != pre:\n dfs_d(next_v, v, dist + d)\n\n return\n\n\ndef sigma(N):\n ans = 0\n for i in range(1, N + 1):\n ans += i\n return ans\n\n\ndef comb(n, r):\n if n - r < r: r = n - r\n if r == 0: return 1\n if r == 1: return n\n\n numerator = [n - r + k + 1 for k in range(r)]\n denominator = [k + 1 for k in range(r)]\n\n for p in range(2, r + 1):\n pivot = denominator[p - 1]\n if pivot > 1:\n offset = (n - r) % p\n for k in range(p - 1, r, p):\n numerator[k - offset] /= pivot\n denominator[k] /= pivot\n\n result = 1\n for k in range(r):\n if numerator[k] > 1:\n result *= int(numerator[k])\n\n return result\n\ndef bisearch(L, target):\n low = 0\n high = len(L) - 1\n \n while low <= high:\n mid = (low + high) // 2\n guess = L[mid]\n if guess == target:\n return True\n elif guess < target:\n low = mid + 1\n elif guess > target:\n high = mid - 1\n if guess != target:\n return False\n\n# --------------------------------------------\n\ndp = None\n\n\ndef main():\n N, T = li_input()\n A = []\n\n for i in range(N):\n A.append(li_input())\n\n ans = 9999999999999999999\n\n for a in A:\n c, t = a\n\n if t <= T and c < ans:\n ans = c\n\n if ans != 9999999999999999999:\n print(ans)\n else:\n print("TLE")\n\n\nmain()\n'] | ['Runtime Error', 'Accepted'] | ['s625316466', 's882646522'] | [3192.0, 5284.0] | [17.0, 47.0] | [3274, 3276] |
p03239 | u255943004 | 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 = []\nfor n in range(N):\n c,t = map(int,input().split())\n CT.append([c,t])\nsorted(CT,key=lambda x: x[0])\nfor ct in CT:\n if ct[1] <= T:\n print(ct[0])\n break', 'N,T = map(int,input().split())\nCT = []\nfor n in range(N):\n c,t = map(int,input().split())\n CT.append([c,t])\nCT = sorted(CT,key=lambda x: x[0])\nans = False\nfor ct in CT:\n if ct[1] <= T:\n print(ct[0])\n ans = True\n break\nif ans:\n print("TLE") \n', 'N,T = map(int,input().split())\nCT = []\nfor n in range(N):\n c,t = map(int,input().split())\n CT.append([c,t])\nCT = sorted(CT,key=lambda x: x[0])\nans = True\nfor ct in CT:\n if ct[1] <= T:\n print(ct[0])\n ans = False\n break\nif ans:\n print("TLE") \n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s093072491', 's141394321', 's574259830'] | [3060.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0] | [197, 254, 254] |
p03239 | u256464928 | 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())\ncost = 1001\nfor i in range(N):\n c,t = map(int,input().split())\n if t<=T:cost=min(m,c)\nprint("TLE" if cost==1001 else m)\n', 'N,T = map(int,input().split())\ncost = 1001\nfor i in range(n):\n c,t = map(int,input().split())\n if t<=T:cost=min(m,c)\nprint("TLE" if cost==1001 else m)', 'N,T = map(int,input().split())\ncost = 1001\nfor i in range(N):\n c,t = map(int,input().split())\n if t<=T:cost=min(cost,c)\nprint("TLE" if cost==1001 else cost)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s252910308', 's849262826', 's689096594'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [153, 152, 158] |
p03239 | u266569040 | 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())\ncomp = []\nfor i in range(N):\n nt = [int(i) for i in input().split()]\n comp.append(nt)\nprint(comp)\n\n\ncost = []\nfor i in range(N):\n if comp[i][1] <= T:\n temp = [comp[i][0],comp[i][1]]\n cost.append(temp)\ncost = sorted(cost, key = lambda x:x[1])\nprint(cost[0][0])', 'N,T = map(int,input().split())\ncomp = []\nfor i in range(N):\n nt = [int(i) for i in input().split()]\n comp.append(nt)\n\n\n\ncost = []\nfor i in range(N):\n if comp[i][1] <= T:\n temp = [comp[i][0],comp[i][1]]\n cost.append(temp)\ncost.sort()\nprint(cost[0][1])', 'N,Y = map(int,input().split())\nct = {}\nfor i in range(N):\n temp = [int(i) for i in input().split()]\n if temp[1] > Y:\n pass\n else:\n ct[temp[0]] = temp[1]\n\nif len(ct) > 0:\n ct = sorted(ct.items(),key=lambda x: x[0])\n print(ct[0][0])\nelse:\n print("TLE")'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s341742277', 's855947479', 's832332638'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [313, 273, 282] |
p03239 | u281303342 | 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. | ['# Python3 (3.4.3)\nimport sys\ninput = sys.stdin.readline\n\n# -------------------------------------------------------------\n# function\n# -------------------------------------------------------------\n\n\n# -------------------------------------------------------------\n# main\n# -------------------------------------------------------------\nN,T = map(int,input().split())\nCT = [tuple(map(int,input().split())) for _ in range(N)]\n\nans = -1\nnc = 9999\nfor i in range(N):\n c,t = CT[i]\n if t <= T and c < nc:\n ans = i\n\nprint(i+1)', '# Python3 (3.4.3)\nimport sys\ninput = sys.stdin.readline\n\n# -------------------------------------------------------------\n# function\n# -------------------------------------------------------------\n\n\n# -------------------------------------------------------------\n# main\n# -------------------------------------------------------------\nN,T = map(int,input().split())\nCT = [tuple(map(int,input().split())) for _ in range(N)]\n\nINF = float("inf")\nans = INF\nfor c,t in CT:\n if t <= T and c < ans:\n ans = c\n\nprint(ans if ans != INF else "TLE")'] | ['Wrong Answer', 'Accepted'] | ['s390252056', 's226241711'] | [3064.0, 3060.0] | [19.0, 24.0] | [529, 545] |
p03239 | u284363684 | 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. | ['# input\nN, T = map(int, input().split())\nrhr = []\nr_append = rhr.append\nfor i in range(1, N + 1):\n c, t = map(int, input().split())\n r_append(\n {\n "index": i,\n "cost": c,\n "time": t\n }\n )\n\ntarget_routes = [\n r\n for r in rhr\n if r["time"] < T\n]\n\nif not target_routes:\n print("TLE")\nelse:\n rhr.sort(key=lambda x: x["cost"] / x["time"])\n print(rhr[0]["index"])', '# input\nN, T = map(int, input().split())\nrhr = []\nr_append = rhr.append\nfor i in range(1, N + 1):\n c, t = map(int, input().split())\n r_append(\n {\n "index": i,\n "cost": c,\n "time": t\n }\n )\n\ntarget_routes = [\n r\n for r in rhr\n if r["time"] <= T\n]\n\nif not target_routes:\n print("TLE")\nelse:\n target_routes.sort(key=lambda x: x["cost"])\n print(target_routes[0]["cost"])'] | ['Wrong Answer', 'Accepted'] | ['s040722294', 's668223257'] | [3064.0, 3064.0] | [18.0, 18.0] | [431, 439] |
p03239 | u285022453 | 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. | ['route_num, limit = map(int, input().split(\' \'))\n\ncosts = []\nspends = []\nfor i in range(route_num):\n cost, spend = map(int, input().split(\' \'))\n costs.append(cost)\n spends.append(spend)\n\nmax_cost = 2000\nfor cost, spend in zip(costs, spends):\n if spend <= limit and cost < max_cost:\n min_cost = cost\n\nif max_cost == 2000:\n print("TLE")\nelse:\n print(max_cost)\n', 'route_num, limit = map(int, input().split(\' \'))\n\ncosts = []\nspends = []\nfor i in range(route_num):\n cost, spend = map(int, input().split(\' \'))\n costs.append(cost)\n spends.append(spend)\n\nmax_cost = 2000\nfor cost, spend in zip(costs, spends):\n if spend <= limit and cost < max_cost:\n max_cost = cost\n\nif max_cost == 2000:\n print("TLE")\nelse:\n print(max_cost)\n'] | ['Wrong Answer', 'Accepted'] | ['s657473113', 's413579456'] | [3060.0, 3060.0] | [17.0, 17.0] | [382, 382] |
p03239 | u286623856 | 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= list(map(int,input().split())) \n\nroot_list = []\ncost = 1001\nfor i in range(N[0]):\n root_list.append(list(map(int,input().split())))\n\n if root_list[i][1] > N[1]:\n if root_list[i][0] < cost:\n cost = root_list[i][0]\n\n\nif cost == 1001:\n print("TLE")\nelse:\n print(cost)', '\nN= list(map(int,input().split())) \n\nroot_list = []\ncost = 1001\nfor i in range(N[0]):\n root_list.append(list(map(int,input().split())))\n\n if root_list[i][1] <= N[1]:\n if root_list[i][0] < cost:\n cost = root_list[i][0]\n\n\nif cost == 1001:\n print("TLE")\nelse:\n print(cost)'] | ['Wrong Answer', 'Accepted'] | ['s886828255', 's902310907'] | [3064.0, 3064.0] | [17.0, 18.0] | [317, 318] |
p03239 | u288430479 | 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#print(l)\na = []\nfor i in range(N):\n if l[0][i] < T:\n a.append(l[0][i])\nt = min(a)\nprint(t)', 'N,T = map(int,input().split())\nl = [list(map(int,input().split())) for i in range(N)]\n##print(l)\na = []\nfor i in range(N):\n if l[i][1] <= T:\n a.append(l[i][0])\nif a != []:\n t = min(a) \n print(t)\nelse:\n print("TLE")'] | ['Runtime Error', 'Accepted'] | ['s217531144', 's772078271'] | [2940.0, 3060.0] | [18.0, 17.0] | [181, 221] |
p03239 | u294385082 | 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)]\nT = []\n\nfor h in range(n):\n T.append(ct[i][1])\n \nif min(T) > t:\n print("TLE")\n exit()\nelse:\n for j in range(n):\n if ct[j][1] <= t:\n c = ct[j][0]\n k = j\n break\n \n\nfor i in range(k+1,n):\n if ct[i][1] <= t:\n c = min(c,ct[i][0])\n \nprint(c)', 'n,T = map(int,input().split())\ntmp = 114514\n\nfor i in range(n):\n c,t = map(int,input().split())\n if t <= T:\n tmp = min(tmp,c)\n\nif tmp == (114514):\n print("TLE")\nelse:\n print(tmp)'] | ['Runtime Error', 'Accepted'] | ['s285199794', 's932889852'] | [2940.0, 3060.0] | [17.0, 17.0] | [346, 185] |
p03239 | u296518383 | 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())\nc_min = -1\n\nfor i in range(N):\n c = int(input())\n t = int(input())\n if t <= T:\n if c_min == -1:\n c_min = c\n else:\n if c < c_min:\n c_min = c\nif c_min == -1:\n print("TLE")\nelse:\n print(c)', 'N = int(input())\nT = int(input())\nc_min = -1\n\nfor i in range(N):\n c = int(input())\n t = int(input())\n if t <= T:\n if c_min == -1:\n c_min = c\n else:\n if c < c_min:\n c_min = c\nif c_min == -1:\n print("TLE")\nelse:\n print(c)', 'N,T=map(int,input().split())\nmin_c = 10**10\nfor i in range(N):\n c,t=map(int,input().split())\n if t<=T:\n min_c=min(min_c,c)\nprint("TLE" if min_c==10**10 else min_c)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s253554201', 's776722354', 's358093374'] | [3060.0, 3060.0, 2940.0] | [17.0, 18.0, 17.0] | [285, 285, 176] |
p03239 | u300828133 | 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())\nList=[list(input().split()) for i in range(N)]\nList2=[]\nList3=[]\nfor i in List:\n List2.append([int(s) for s in i])\nfor i in List2:\n if i[1] <= T:\n List3.append(i[0])\n else:\n List3.append("TLE")\nprint(min(List3))', 'N,T=map(int,input().split())\nList=[list(input().split()) for i in range(N)]\nList2=[]\nList3=[]\nfor i in List:\n List2.append([int(s) for s in i])\nfor i in List2:\n if i[1] <= T:\n List3.append(i[0])\nif List3 == []:\n print("TLE")\nelse:\n print(min(List3))'] | ['Runtime Error', 'Accepted'] | ['s490049232', 's405694855'] | [3064.0, 3060.0] | [18.0, 19.0] | [291, 292] |
p03239 | u305138793 | 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\na=input()\nc=a.split(" ")\nc[0]=int(c[0])\nc[1]=int(c[1])\nb=[input().split(" ") for x in range(c[0])]\n\nfor i in range(len(b)):\n for x in range(2):\n b[i][x]=int(b[i][x])\n\n\n\nb.sort(key=lambda x:x[1])\n\nprint(b)\n\nif c[1] < b[0][1]:\n print("TLE")\n sys.exit()\nb.sort(key=lambda x:x[0])\nfor i in range(len(b)):\n if b[i][1] < c[1]:\n print(b[i][0])\n break', 'import sys\na=input()\nc=a.split(" ")\nc[0]=int(c[0])\nc[1]=int(c[1])\nb=[input().split(" ") for x in range(c[0])]\n\nfor i in range(len(b)):\n for x in range(2):\n b[i][x]=int(b[i][x])\n\n\n\nb.sort(key=lambda x:x[1])\n\n\nif c[1] < b[0][1]:\n print("TLE")\n sys.exit()\n\nb.sort(key=lambda x:x[0])\n\nmini=10000000000\nfor i in range(len(b)):\n if b[i][1] <= c[1]:\n if b[i][0] <= mini:\n mini=i\nprint(b[mini][0])\n'] | ['Wrong Answer', 'Accepted'] | ['s304789446', 's821137533'] | [3064.0, 3064.0] | [18.0, 17.0] | [387, 427] |
p03239 | u308488583 | 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\nbest=-1\nbest_c=-1\nfor _ in range(N):\n c,t = map(int,input().split())\n if t <= T:\n if best_c == -1:\n best_c = c\n else if best_c > c:\n best_c = c\nif best == -1:\n print("TLE")\nelse: \n print(best)', 'N,T = map(int,input().split())\n\nbest=-1\nbest_c=-1\nfor _ in range(N):\n c,t = map(int,input().split())\n if t <= T:\n if best_c == -1:\n best_c = c\n elif best_c > c:\n best_c = c\nif best_c == -1:\n print("TLE")\nelse: \n print(best_c)'] | ['Runtime Error', 'Accepted'] | ['s320110156', 's641104211'] | [2940.0, 3068.0] | [18.0, 17.0] | [272, 273] |
p03239 | u310678820 | 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,k=map(int, input().split())\ncnt=0\nfor i in range(min(a,b)+1,0,-1):\n if a%i==0 and b%i==0:\n cnt+=1\n if cnt==k:\n print(i)', "n,t = map(int, input().split())\nct = [list(map(int, input().split())) for i in range(n)]\nct=sorted(ct, key=lambda cti : cti[0])\nfor i in range(n):\n if ct[i][1]<=t:\n print(ct[i][0])\n exit()\nprint('TLE') \n \n "] | ['Runtime Error', 'Accepted'] | ['s335782486', 's922745445'] | [2940.0, 2940.0] | [17.0, 17.0] | [151, 244] |
p03239 | u313498252 | 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\ndata = []\n\nfor i in range(n):\n tmp = input().split()\n tmp[0] = int(tmp[0])\n tmp[1] = int(tmp[1])\n data.append(tmp)\n\ndata.sort()\n\n\nflg = False\nfor i in range(len(data)):\n if data[i][0] <= t:\n print(data[i][1])\n flg = True\n break\n\nif not flg:\n print("TLE")', 'n, t = map(int, input().split())\n\ndata = []\n\nfor i in range(n):\n tmp = input().split()\n tmp[0] = int(tmp[0])\n tmp[1] = int(tmp[1])\n data.append(tmp)\n\ndata.sort()\n\n\nflg = False\nfor i in range(len(data)):\n if data[i][1] <= t:\n print(data[i][1])\n flg = True\n break\n\nif not flg:\n print("TLE")', 'n, t = map(int, input().split())\n\ndata = []\n\nfor i in range(n):\n tmp = input().split()\n tmp[0] = int(tmp[0])\n tmp[1] = int(tmp[1])\n data.append(tmp)\n\ndata.sort()\n\n\nflg = False\nfor i in range(len(data)):\n if data[i][1] <= t:\n print(data[i][0])\n flg = True\n break\n\nif not flg:\n print("TLE")'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s860276145', 's942623998', 's724465419'] | [3064.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [327, 327, 327] |
p03239 | u314050667 | 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())\nd = [list(map(int, input().split())) for i in range(n)]\n\nans = [d[i][0] for i in range(len(d)-1) if d[i][1] <= t]\nif len(ans) == 0:\n print("TLE")\nelse:\n print(min(ans))', 'n,t=map(int,input().split())\nd = [list(map(int, input().split())) for i in range(n)]\n\nans = [d[i][0] for i in range(len(d)) if d[i][1] <= t]\nif len(ans) == 0:\n print("TLE")\nelse:\n print(min(ans))'] | ['Wrong Answer', 'Accepted'] | ['s221961469', 's173238104'] | [3060.0, 3060.0] | [18.0, 18.0] | [203, 201] |
p03239 | u328510800 | 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\nmax_cost = 10 ** 9\n\nfor _ in range(n):\n c, tt = map(int, input().split())\n if tt <= t:\n max_cost = max(max_cost, c)\n \nprint(max_cost)', 'n, t = map(int, input.split())\n\nmax_cost = 10 ** 9\n\nfor _ in range(n):\n c, tt = map(int, input().split())\n if tt <= t:\n max_cost = max(max_cost, c)\n \nprint(max_cost)', "n, t = map(int, input().split())\n\nmax_cost = 10 ** 9\n\nfor _ in range(n):\n c, tt = map(int, input().split())\n if tt <= t:\n max_cost = max(max_cost, c)\n \nprint('TLE' if max_cost == 10 ** 9 else max_cost)", 'n,T=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\nif ans==10000:\n print("TLE")\nelse:\n print(ans)'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s066587936', 's438288079', 's617595985', 's341777777'] | [9096.0, 8932.0, 9096.0, 9016.0] | [33.0, 24.0, 29.0, 29.0] | [175, 173, 209, 168] |
p03239 | u328755070 | 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 a.append(list(map(int, input().split())))\n\nb = []\ncount = 0\nfor i in range(N):\n if a[i][1] <= T:\n b.append(a[i][0])\nif count == 0:\n print('TLE')\n\nelse:\n print(min(b))\n", "N, T = map(int, input().split())\na = []\nfor i in range(N):\n a.append(list(map(int, input().split())))\n\nb = []\ncount = 0\nfor i in range(N):\n if a[i][1] <= T:\n b.append(a[i][0])\n count += 1\nif count == 0:\n print('TLE')\n\nelse:\n print(min(b))\n"] | ['Wrong Answer', 'Accepted'] | ['s788199907', 's568078257'] | [3060.0, 3060.0] | [17.0, 18.0] | [246, 265] |
p03239 | u329049771 | 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 = [int(input()) for i in range(n)]\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(m)', "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\nif m == 1001:\n print('TLE')\nelse:\n print(m)"] | ['Runtime Error', 'Accepted'] | ['s929944458', 's315491682'] | [3056.0, 2940.0] | [17.0, 17.0] | [180, 184] |
p03239 | u339550873 | 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. | ['#! /usr/bin/env python3\n# -*- coding: utf-8 -*-\nN,T = [int(x) for x in input().split()]\ncost = []\nfor _ in range(N):\n c,t = [int(x) for x in input().split()]\n if t <= T:\n cost.append(c)\n\nif cost == True:\n print(min(cost))\nelse:\n print("TLE")', '#! /usr/bin/env python3\n# -*- coding: utf-8 -*-\nN,T = [int(x) for x in input().split()]\ncost = []\nfor _ in range(N):\n c,t = [int(x) for x in input().split()]\n if t <= T:\n cost.append(c)\n\nif cost is True:\n print(min(cost))\nelse:\n print("TLE")', '#! /usr/bin/env python3\n# -*- coding: utf-8 -*-\nN,T = [int(x) for x in input().split]\ncost = []\nfor _ in range(n):\n c,t = [int(x) for x in input().split]\n if t <= T:\n cost.append(c)\n\nif cost == True:\n print(min(cost))\nelse:\n print("TLE")', '#! /usr/bin/env python3\n# -*- coding: utf-8 -*-\nN,T = [int(x) for x in input().split]\ncost = []\nfor _ in range(N):\n c,t = [int(x) for x in input().split]\n if t <= T:\n cost.append(c)\n\nif cost == True:\n print(min(cost))\nelse:\n print("TLE")', '#! /usr/bin/env python3\n# -*- coding: utf-8 -*-\nN,T = [int(x) for x in input().split()]\ncost = []\nfor _ in range(N):\n c,t = [int(x) for x in input().split()]\n if t <= T:\n cost.append(c)\n\nif cost:\n print(min(cost))\nelse:\n print("TLE")'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s277838172', 's433145445', 's451960519', 's704718488', 's443176298'] | [3060.0, 3060.0, 3060.0, 3060.0, 3060.0] | [17.0, 18.0, 18.0, 17.0, 17.0] | [260, 260, 256, 256, 252] |
p03239 | u340781749 | 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, m = map(int, input().split())\nans = 999999\nfor _ in range(n):\n c, t = map(int, input().split())\n if t > m:\n continue\n ans = min(ans, c)\nif ans = 999999:\n print('TLE')\nelse:\n print(ans)\n\n ", "n, m = map(int, input().split())\nans = 999999\nfor _ in range(n):\n c, t = map(int, input().split())\n if t > m:\n continue\n ans = min(ans, c)\nif ans == 999999:\n print('TLE')\nelse:\n print(ans)\n\n"] | ['Runtime Error', 'Accepted'] | ['s793560887', 's941502469'] | [2940.0, 2940.0] | [17.0, 17.0] | [201, 212] |
p03239 | u342051078 | 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\nli = list(map(int, input().split())) for i in range(N)\n \nli2 = list(li for t in li[,1] <= T)\n minli = min(li2[0,])\n \nprint(minli)', 'N, T = map(int, input().split())\nli = []\ntry:\n li = [list(map(int, input().split())) for i in range(N)]\nexcept EOFError:\n pass\n\nli2 = [] \n\nfor s in li:\n if s[0:] <= T:\n li2 = li2.append(s)\n for t in li2:\n minli = min(li2[:1])\n print(minli)\n \n else:\n print("TLE")', '\n#include<algorithm>\n\n\nusing namespace std;\n\nint main(){\n int N, T; cin >> N >> T;\n vector<int> c[i], t[i];\n for(int i = 0, i < N; ++i) {\n cin >> c[i] >> t[i];\n }\n int MAX = 1 << 30;\n int ans = MAX;\n\n for (int i = 0; i < N; ++i){\n if(t[i] <= T){\n ans = min(ans, c[i]);\n \n }\n }\n\n if (ans < MAX){\n cout << ans << endl;\n }\n else {\n cout << "TLE" << endl;\n }\n}', '\n#include<algorithm>\n\n\nusing namespace std;\n\nint main(){\n int N, T; cin >> N >> T;\n vector<int> c[N], t[N];\n for(int i = 0, i < N; ++i) {\n cin >> c[i] >> t[i];\n }\n int MAX = 1 << 30;\n int ans = MAX;\n\n for (int i = 0; i < N; ++i){\n if(t[i] <= T){\n ans = min(ans, c[i]);\n \n }\n }\n\n if (ans < MAX){\n cout << ans << endl;\n }\n else {\n cout << "TLE" << endl;\n }\n}', 'import numpy as np\nN, T = map(int, input().split())\n\nli = [list(map(int, input().split())) for i in range(N)\n \nli2 = list[li for t in li[,1] <= T]\n minli = min(li2[0,])\n \nprint(minli)', 'N, T = map(int, input().split())\nli = [list(map(int, input().split())) for i in range(N)]\nli2 = [] \n\nfor s in li:\n if s[0:] <= T:\n li2 = li2.append(s)\n for t in li2:\n minli = min(li2[:1])\n print(minli)\n \n else:\n print("TLE")', '\n#include<algorithm>\n\n\nusing namespace std;\n\nint main(){\n int N, T; \n cin >> N >> T;\n vector<int> c[N]\n vector<int> t[N];\n for(int i = 0; i < N; ++i) {\n cin >> c[i] >> t[i];\n }\n int MAX = 1 << 30;\n int ans = MAX;\n\n for (int i = 0; i < N; ++i){\n if(t[i] <= T){\n ans = min(ans, c[i]);\n \n }\n }\n\n if (ans < MAX){\n cout << ans << endl;\n }\n else {\n cout << "TLE" << endl;\n }\n}', 'import numpy as np\nN, T = map(int, input().split()) \n\nli = list(map(int, input().split())) for i in range(N)\u3000、二次元リスト完成\nli2 = []\n\nfor s in li:\n if s[0:] <= T:\n li2 = li2.append(s)\u3000\u3000\u3000\u3000\n\nfor t in li2:\n minli = min(li2[[:1]])\n\nprint(minli)', '\n#include<algorithm>\n\n\nusing namespace std;\n\nint main(){\n int N, T; \n cin >> N >> T;\n vector<int> c[N], t[N];\n for(int i = 0, i < N; ++i) {\n cin >> c[i] >> t[i];\n }\n int MAX = 1 << 30;\n int ans = MAX;\n\n for (int i = 0; i < N; ++i){\n if(t[i] <= T){\n ans = min(ans, c[i]);\n \n }\n }\n\n if (ans < MAX){\n cout << ans << endl;\n }\n else {\n cout << "TLE" << endl;\n }\n}', 'N, T = map(int, input().split())\ndata = [list(map(int, input().split())) for i in range(N)\n \nl = list[s for s in data if data.split([:1]) <= T\n \nminl = t for t in min(l.split([0:])\n \nprint(minl)', 'N, T = map(int, input().split())\nli = [list(map(int, input().split())) for i in range(N)]\nli2 = []\n\nif \n\n\nfor s in li:\n if s[0:] <= T:\n li2 = li2.append(s)\n for t in li2:\n minli = min(li2[:1])\n print(minli)\n \n else:\n print("TLE")', "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', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s142814944', 's225811715', 's384303968', 's545672090', 's595029360', 's641797490', 's670014574', 's733854041', 's760437286', 's843948160', 's857392839', 's983953980'] | [2940.0, 3060.0, 2940.0, 2940.0, 2940.0, 3060.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 3060.0] | [18.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [199, 290, 428, 428, 200, 250, 444, 335, 431, 210, 255, 189] |
p03239 | u343671593 | 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(" ")\nN,T = int(N),int(T)\n\ntime = dict()\nfor i in range(N):\n\tc,t = input().split(" ")\n\ttime[int(c)] = int(t)\nfor key, value in sorted(time.items(), key=lambda item: item[1]):\n\tif value <= T:\n\t\tprint(value)\n\t\tbreak\n\telse:\n\t\tprint("TLE")\n\t\tbreak', 'N,T = input().split(" ")\nN,T = int(N),int(T)\n\ntime = dict()\nfor i in range(N):\n\tc,t = input().split(" ")\n\ttime[int(c)] = int(t)\ncost = 10000\nprint(sorted(time.items(), key=lambda item: item[1]))\nfor key, value in sorted(time.items(), key=lambda item: item[1]):\n\tif value <= T:\n\t\tif cost > key:\n\t\t\tcost = key\n\t\t\t# print(cost)\n\nif cost ==0:\n\tprint("TLE")\nelse:\n\tprint(cost)', 'N,T = input().split(" ")\nN,T = int(N),int(T)\n\ntime = dict()\nfor i in range(N):\n\tc,t = input().split(" ")\n\ttime[int(c)] = int(t)\ncost = 10000\n\nfor key, value in sorted(time.items(), key=lambda item: item[1]):\n\tif value <= T:\n\t\tif cost > key:\n\t\t\tcost = key\n\t\t\t# print(cost)\n\nif cost ==10000:\n\tprint("TLE")\nelse:\n\tprint(cost)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s380530280', 's497335398', 's572501494'] | [3060.0, 3064.0, 3064.0] | [17.0, 17.0, 17.0] | [262, 371, 377] |
p03239 | u344959886 | 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=[]\nfor i in range(N):\n c,t=map(int,input().split())\n if t <= T:\n l.append(c)\nif len(c) > 0:\n print(min(c)) \nelse:\n print("TLE")\n\n', 'N,T=map(int,input().split())\nl=[]\nfor i in range(N):\n c,t=map(int,input().split())\n if t <= T:\n l.append(c)\nif len(l) > 0:\n print(min(l)) \nelse:\n print("TLE")\n\n'] | ['Runtime Error', 'Accepted'] | ['s708419650', 's544984450'] | [2940.0, 2940.0] | [18.0, 18.0] | [186, 186] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.