{"task": {"agent_timeout": 600, "task": "137", "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 1: Tied Down [Brian Dean, 2012]\n\nAs we all know, Bessie the cow likes nothing more than causing mischief on\nthe farm.  To keep her from causing too much trouble, Farmer John decides\nto tie Bessie down to a fence with a long rope.  When viewed from above,\nthe fence consists of N posts (1 <= N <= 10) that are arranged along\nvertical line, with Bessie's position (bx, by) located to the right of this\nvertical line.  The rope FJ uses to tie down Bessie is described by a\nsequence of M line segments (3 <= M <= 10,000), where the first segment\nstarts at Bessie's position and the last ends at Bessie's position. No\nfence post lies on any of these line segments.  However, line segments may\ncross, and multiple line segments may overlap at their endpoints.\n\nHere is an example of the scene, viewed from above:\n\n\n\nTo help Bessie escape, the rest of the cows have stolen a saw from the\nbarn.  Please determine the minimum number of fence posts they must cut\nthrough and remove in order for Bessie to be able to pull free (meaning she\ncan run away to the right without the rope catching on any of the fence posts).\n\nAll (x,y) coordinates in the input (fence posts, Bessie, and line segment\nendpoints) lie in the range 0..10,000.  All fence posts have the same x\ncoordinate, and bx is larger than this value.\n\nPROBLEM NAME: tied\n\nINPUT FORMAT:\n\n* Line 1: Four space-separated integers: N, M, bx, by.\n\n* Lines 2..1+N: Line i+1 contains the space-separated x and y\n        coordinates of fence post i.\n\n* Lines 2+N..2+N+M: Each of these M+1 lines contains, in sequence, the\n        space-separated x and y coordinates of a point along the rope.\n        The first and last points are always the same as Bessie's\n        location (bx, by).\n\nSAMPLE INPUT:\n\n2 10 6 1\n2 3\n2 1\n6 1\n2 4\n1 1\n2 0\n3 1\n1 3\n5 4\n3 0\n0 1\n3 2\n6 1\n \n\nINPUT DETAILS:\n\nThere are two posts at (2,3) and (2,1).  Bessie is at (6,1).  The rope goes\nfrom (6,1) to (2,4) to (1,1), and so on, ending finally at (6,1). The shape\nof the rope is the same as in the figure above.\n\nOUTPUT FORMAT:\n\n* Line 1: The minimum number of posts that need to be removed in order\n        for Bessie to escape by running to the right.\n\nSAMPLE OUTPUT:\n\n1\n\nOUTPUT DETAILS:\n\nRemoving either post 1 or post 2 will allow Bessie to escape.\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": []}