{"problem":{"name":"Time Limit Exceeded","description":{"content":"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","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc112_b"},"statements":[{"statement_type":"Markdown","content":"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.\nYou, the smartwatch, has found $N$ routes to his home.\nIf Mr. X uses the $i$\\-th of these routes, he will get home in time $t_i$ at cost $c_i$.\nFind the smallest cost of a route that takes not longer than time $T$.\n\n## Constraints\n\n*   All values in input are integers.\n*   $1 \\leq N \\leq 100$\n*   $1 \\leq T \\leq 1000$\n*   $1 \\leq c_i \\leq 1000$\n*   $1 \\leq t_i \\leq 1000$\n*   The pairs $(c_i, t_i)$ are distinct.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $T$\n$c_1$ $t_1$\n$c_2$ $t_2$\n$:$\n$c_N$ $t_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc112_b","tags":[],"sample_group":[["3 70\n7 60\n1 80\n4 50","4\n\n*   The first route gets him home at cost $7$.\n*   The second route takes longer than time $T = 70$.\n*   The third route gets him home at cost $4$.\n\nThus, the cost $4$ of the third route is the minimum."],["4 3\n1 1000\n2 4\n3 1000\n4 500","TLE\n\nThere is no route that takes not longer than time $T = 3$."],["5 9\n25 8\n5 9\n4 10\n1000 1000\n6 1","5"]],"created_at":"2026-03-03 11:01:14"}}