{"task": {"agent_timeout": 600, "task": "839", "verifier_timeout": 7200, "instruction": "Please implement a Python 3 solution to the below problem.\nReason through the problem and:\n1. Restate the problem in plain English\n2. Conceptualize a solution first in plain English\n3. Write a pseudocode solution\n4. Save your solution as solution.py\nNo outside libraries are allowed.\n\n[BEGIN PROBLEM]\nFarmer John is bringing his $N$ cows, conveniently numbered $1 \\ldots N$, to the\ncounty fair, to compete in the annual bovine talent show!  His $i$th cow has a\nweight $w_i$ and talent level $t_i$, both integers.\n\nUpon arrival, Farmer John is quite surprised by the new rules for this year's \ntalent show:\n\n(i) A group of cows of total weight at least $W$ must be entered into the show\n(in order to ensure strong teams of cows are competing, not just strong \nindividuals), and\n\n(ii) The group with the largest ratio of total talent to total weight shall win.\n\nFJ observes that all of his cows together have weight at least $W$, so he should\nbe able to enter a team satisfying (i).  Help him determine the optimal ratio of\ntalent to weight he can achieve for any such team.\n\nINPUT FORMAT:\nThe first line of input contains $N$ ($1 \\leq N \\leq 250$) and $W$\n($1 \\leq W \\leq 1000$). The next $N$ lines each describe a cow using two\nintegers $w_i$ ($1 \\leq w_i \\leq 10^6$) and $t_i$ ($1 \\leq t_i \\leq 10^3$).\n\nOUTPUT FORMAT:\nPlease determine the largest possible ratio of total talent over total weight\nFarmer John can achieve using a group of cows of total weight at least $W$.  If\nyour answer is $A$, please print out the floor of $1000A$ in order to keep the\noutput integer-valued (the floor operation discards any fractional part by\nrounding down to an integer, if the number in question is not already an\ninteger).\n\nSAMPLE INPUT:\n3 15\n20 21\n10 11\n30 31\nSAMPLE OUTPUT: \n1066\n\nIn this example, the best talent-to-weight ratio overall would be to use just\nthe single cow with talent 11 and weight 10, but since we need at least  15\nunits of weight, the optimal solution ends up being to use this cow plus the cow\nwith talent 21 and weight 20.  This gives a talent-to-weight ratio of\n(11+21)/(10+20) = 32/30 = 1.0666666..., which when multiplied by 1000 and\nfloored gives 1066.\n\n\nProblem credits: Brian Dean\n\n[END PROBLEM]\n", "memory": "2048m", "runnable": false, "difficulty": "medium", "language": "", "cpus": 1, "instruction_truncated": false, "category": "python_programming", "compose": false, "has_solution": true, "oracle": null, "docker_image": "", "taskset": "usaco", "tags": ["python", "programming", "usaco"]}, "runs": []}