{"task": {"agent_timeout": 600, "task": "394", "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: Mirror Field [Mark Gordon]\n\nFarmer John has left some old mirrors sitting outside his house, and his\ncows, feeling mischievous as always, have stolen them!  \n\nThe cows have set up the mirrors in a rectangular field measuring N by M\nsquares (1 <= N, M <= 1,000).  In each square, they have placed a double\nsided mirror between two of its opposite corners.  These two possible\nconfigurations are represented by the '/' character (a mirror connecting\nthe lower-left corner to the upper-right corner) and the '\\' character (a\nmirror connecting the upper-left corner to the lower-right corner).\n\nOne evening, Bessie the cow brings a laser pointer out to the mirror field.\nStanding outside the field, she shines the beam of light either\nhorizontally or vertically along either a row or column of the field,\ncausing it to bounce of some number of mirrors.  Since the mirrors are all\ndiagonally oriented, a horizontal beam of light that reflects off a mirror\nwill end up traveling vertically, and vice versa.  Bessie wonders what is\nthe maximum number of mirrors on which her beam of light can be reflected\nat the same time.  Given the layout of the mirror field, please help Bessie\ncompute this number.\n\nPROBLEM NAME: mirror\n\nINPUT FORMAT:\n\n* Line 1: The integers N and M, separated by a space.\n\n* Lines 2..1+N: Each line will contain M '/' or '\\' characters,\n        describing a row of the mirror field.\n\nSAMPLE INPUT:\n\n3 3\n/\\\\\n\\\\\\\n/\\/\n\nOUTPUT FORMAT:\n\n* Line 1: A single integer indicating the maximum number of times a\n        horizontal or vertical beam originating outside the mirror\n        field could be reflected.  Please output -1 if it could be\n        reflected indefinitely.\n\nSAMPLE OUTPUT:\n\n3\n\nOUTPUT DETAILS:\n\nBessie can shine the beam downwards above the middle column of her\nfield to have it reflected 3 times.\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": []}