{"task": {"agent_timeout": 600, "task": "209", "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 2: Wifi Setup [Brian Dean, 2012]\n\nFarmer John's N cows (1 <= N <= 2000) are all standing at various positions\nalong the straight path from the barn to the pasture, which we can think of\nas a one-dimensional number line.  Since his cows like to stay in email\ncontact with each-other, FJ wants to install Wifi base stations at various\npositions so that all of the cows have wireless coverage.\n\nAfter shopping around, FJ learns that the cost of a Wifi base station\ndepends on distance it can transmit: a base station of power r costs A +\nB*r, where A is a fixed cost for installing the base station and B is a\ncost per unit of transmission distance.  If FJ installs such a device at\nposition x, then it can transmit data to any cow located in the range x-r\n... x+r.  A base station with transmission power of r=0 is allowed, but\nthis only provides coverage to a cow located at the same position as the\ntransmitter.\n\nGiven the values of A and B, as well as the locations of FJ's cows, please\ndetermine the least expensive way FJ can provide wireless coverage for all\nhis cows.\n\nPROBLEM NAME: wifi\n\nINPUT FORMAT:\n\n* Line 1: Three space-separated integers: N A B (0 <= A, B <= 1000).\n\n* Lines 2..1+N: Each line contains an integer in the range\n        0..1,000,000 describing the location of one of FJ's cows.\n\nSAMPLE INPUT:\n\n3 20 5\n7\n0\n100\n\nINPUT DETAILS:\n\nThere are 3 cows at positions 7, 0, and 100.  Installation of a base\nstation of power r costs 20 + 5*r.\n\nOUTPUT FORMAT:\n\n* Line 1: The minimum cost of providing wireless coverage to all cows.\n\nSAMPLE OUTPUT:\n\n57.5\n\nOUTPUT DETAILS:\n\nThe optimal solution is to build a base station at position 3.5 (with power\n3.5) and another at position 100 (with power 0).  The first base station\ncovers cows 1 and 2, and the second covers cow 3.\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": []}