{"task": {"agent_timeout": 600, "task": "1021", "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]\nFarmer John's pasture can be represented by a $N\\times N$  square grid\n$(1\\le N\\le 300)$ consisting of positions $(i,j)$ for all $1\\le i,j\\le N$. For\neach square of the grid, the corresponding character in the input is equal to\n'*' if there exists a single cow at that position and '.' if there does not\nexist a cow at that position.\n\nFJ believes that the beauty of his pasture is directly proportional to the\nnumber of triples of cows such that their positions are equidistant from each\nother. In other words, they form an equilateral triangle. Unfortunately, it was\nonly quite recently that FJ realized that since all of his cows are located at\ninteger coordinates, no beautiful triples can possibly exist if Euclidean\ndistance is used! Thus, FJ has decided to switch to use \"Manhattan\" distance\ninstead. Formally, the Manhattan distance between two positions $(x_0,y_0)$ and\n$(x_1,y_1)$ is equal to $|x_0-x_1|+|y_0-y_1|$.\n\nGiven the grid representing the positions of the cows, compute the number of\nequilateral triples.\n\nSCORING:\nThere will be fourteen test cases aside from the sample, one for each of\n$N\\in \\{50,75,100,125,150,175,200,225,250,275,300,300,300,300\\}.$\n\nINPUT FORMAT:\nThe first line contains a single integer $N.$\n\nFor each $1\\le i\\le N,$ line $i+1$ of the input contains a string of length $N$\nconsisting solely of the characters '*' and '.'. The $j$th character \ndescribes whether there exists a cow at position $(i,j)$ or not.\n\nOUTPUT FORMAT:\nOutput a single integer containing the answer. It can be shown that it fits into\na signed 32-bit integer.\n\nSAMPLE INPUT:\n3\n*..\n.*.\n*..\nSAMPLE OUTPUT: \n1\n\nThere are three cows, and they form an equilateral triple because the Manhattan\ndistance between each pair of cows is equal to two.\n\n\nProblem credits: Benjamin Qi\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": []}