{"task": {"agent_timeout": 600, "task": "1303", "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]\n\n**Note: The time limit for this problem is 4s, two times the default.**\n\nSomebody has been grazing in Farmer John's $(1 \\le G \\le 10^5)$\nprivate gardens! Using his expert forensic knowledge, FJ has been able to\ndetermine the precise time each garden was grazed.  He has also determined that\nthere was a single cow that was responsible for every grazing incident.\n\nIn response to these crimes each of FJ's $N$ $(1 \\le N \\le 10^5)$\ncows have provided an alibi that proves the cow was in a specific location at a\nspecific time.  Help FJ test whether each of these alibis demonstrates the cow's\ninnocence.\n\nA cow can be determined to be innocent if it is impossible for her to have\ntravelled between all of the grazings and her alibi.  Cows travel at a rate of 1\nunit distance per unit time.\n\nINPUT FORMAT (input arrives from the terminal / stdin):\nThe first line of input will contain $G$ and $N$ separated by a space.\n\nThe next $G$ lines contain the integers $x$, $y$, and $t$\n$(-10^9 \\le x, y \\le 10^9; 0 \\le t \\le 10^9)$ separated by a space\ndescribing the location and time of the grazing.  It will always be possible for\na single cow to travel between all grazings.\n\nThe next $N$ lines contain $x$, $y$, and $t$\n$(-10^9 \\le x, y \\le 10^9; 0 \\le t \\le 10^9)$ separated by a space\ndescribing the location and time of each cow's alibi.\n\nOUTPUT FORMAT (print output to the terminal / stdout):\nOutput a single integer: the number of cows with alibis that prove their\ninnocence.\n\nSAMPLE INPUT:\n2 4\n0 0 100\n50 0 200\n0 50 50\n1000 1000 0\n50 0 200\n10 0 170\nSAMPLE OUTPUT: \n2\n\nThere were two grazings; the first at $(0, 0)$ at time $100$ and the\nsecond at $(50, 0)$ at time $200$.\n\nThe first cow's alibi does not prove her innocence.  She has just enough time to\narrive at the first grazing.\n\nThe second cow's alibi does prove her innocence.  She is nowhere near any of the\ngrazings.\n\nUnfortunately for the third cow, being at the scene of the crime does not prove\ninnocence.\n\nFinally, the fourth cow is innocent because it's impossible to make it from her\nalibi to the final grazing in time.\n\nSCORING:\nInputs 2-4: $1 \\le G, N \\le 10^3$. Also, for both the fields and alibis,\n$-10^6 \\le x, y \\le 10^6$ and  $0 \\le t \\le 10^6$. Inputs 5-11: No additional constraints.\n\n\nProblem credits: Mark Gordon\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": []}