{"task": {"agent_timeout": 600, "task": "210", "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]\nProblem 3: Milk Routing [Brian Dean, 2012]\n\nFarmer John's farm has an outdated network of M pipes (1 <= M <= 500) for\npumping milk from the barn to his milk storage tank.  He wants to remove\nand update most of these over the next year, but he wants to leave exactly\none path worth of pipes intact, so that he can still pump milk from the\nbarn to the storage tank.\n\nThe pipe network is described by N junction points (1 <= N <= 500), each of\nwhich can serve as the endpoint of a set of pipes.  Junction point 1 is the\nbarn, and junction point N is the storage tank.  Each of the M\nbi-directional pipes runs between a pair of junction points, and has an\nassociated latency (the amount of time it takes milk to reach one end of\nthe pipe from the other) and capacity (the amount of milk per unit time\nthat can be pumped through the pipe in steady state).  Multiple pipes\ncan connect between the same pair of junction points.\n\nFor a path of pipes connecting from the barn to the tank, the latency\nof the path is the sum of the latencies of the pipes along the path,\nand the capacity of the path is the minimum of the capacities of the\npipes along the path (since this is the \"bottleneck\" constraining the\noverall rate at which milk can be pumped through the path).  If FJ\nwants to send a total of X units of milk through a path of pipes with\nlatency L and capacity C, the time this takes is therefore L + X/C.\n\nGiven the structure of FJ's pipe network, please help him select a single\npath from the barn to the storage tank that will allow him to pump X units\nof milk in a minimum amount of total time.\n\nPROBLEM NAME: mroute\n\nINPUT FORMAT:\n\n* Line 1: Three space-separated integers: N M X (1 <= X <= 1,000,000).\n\n* Lines 2..1+M: Each line describes a pipe using 4 integers: I J L C. \n        I and J (1 <= I,J <= N) are the junction points at both ends\n        of the pipe.  L and C (1 <= L,C <= 1,000,000) give the latency\n        and capacity of the pipe.\n\nSAMPLE INPUT:\n\n3 3 15\n1 2 10 3\n3 2 10 2\n1 3 14 1\n\nINPUT DETAILS:\n\nFJ wants to send 15 units of milk through his pipe network.  Pipe #1\nconnects junction point 1 (the barn) to junction point 2, and has a latency\nof 10 and a capacity of 3.  Pipes #2 and #3 are similarly defined.\n\nOUTPUT FORMAT:\n\n* Line 1: The minimum amount of time it will take FJ to send milk\n        along a single path, rounded down to the nearest integer.\n\nSAMPLE OUTPUT:\n\n27\n\nOUTPUT DETAILS:\n\nThe path 1->3 takes 14 + 15/1 = 29 units of time.  The path 1->2->3 takes\n20 + 15/2 = 27.5 units of time, and is therefore optimal.\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": []}