{"task": {"agent_timeout": 600, "task": "93", "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: Cow Steeplechase [Brian Dean]\n\nFarmer John has a brilliant idea for the next great spectator sport: Cow\nSteeplechase! As everyone knows, regular steeplechase involves a group of\nhorses that race around a course filled with obstacles they must jump over.\nFJ figures the same contest should work with highly-trained cows, as long\nas the obstacles are made short enough.\n\nIn order to design his course, FJ makes a diagram of all the N (1 <= N <=\n250) possible obstacles he could potentially build. Each one is represented\nby a line segment in the 2D plane that is parallel to the horizontal or\nvertical axis. Obstacle i has distinct endpoints (X1_i, Y1_i) and (X2_i,\nY2_i) (1 <= X1_i, Y1_i, X2_i, Y2_i <= 1,000,000,000). An example is as follows:\n\n   --+-------   \n-----+-----\n  ---+---     |\n     |     |  |\n   --+-----+--+-   |\n     |     |  |  | |\n     |   --+--+--+-+-\n           |  |  | |\n              |\n\nFJ would like to build as many of these obstacles as possible, subject to\nthe constraint that no two of them intersect. Starting with the diagram\nabove, FJ can build 7 obstacles:\n\n   ----------   \n-----------\n  -------     |\n           |  |\n           |  |    |\n           |  |  | |\n           |  |  | |\n           |  |  | |\n              |\n\nTwo segments are said to intersect if they share any point in common, even\nan endpoint of one or both of the segments.  FJ is certain that no two\nhorizontal segments in the original input diagram will intersect, and that\nsimilarly no two vertical segments in the input diagram will intersect.\n\nPlease help FJ determine the maximum number of obstacles he can build.\n\nPROBLEM NAME: steeple\n\nINPUT FORMAT:\n\n* Line 1: A single integer: N.\n\n* Lines 2..N+1: Line i+1 contains four space-separated integers\n        representing an obstacle: X1_i, Y1_i, X2_i, and Y2_i.\n\nSAMPLE INPUT:\n\n3\n4 5 10 5\n6 2 6 12\n8 3 8 5\n\nINPUT DETAILS:\n\nThere are three potential obstacles. The first is a horizontal segment\nconnecting (4, 5) to (10, 5); the second and third are vertical segments\nconnecting (6, 2) to (6, 12) and (8, 3) to (8, 5).\n\nOUTPUT FORMAT:\n\n* Line 1: The maximum number of non-crossing segments FJ can choose.\n\nSAMPLE OUTPUT:\n\n2\n\nOUTPUT DETAILS:\n\nThe optimal solution is to choose both vertical segments.\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": []}