{"task": {"agent_timeout": 600, "task": "963", "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]\nIn order to improve their physical fitness, the cows have taken up gymnastics!\nFarmer John designates his favorite cow Bessie to coach the $N$ other cows and\nto assess their progress as they learn various gymnastic skills.\n\nIn each of $K$ practice sessions ($1 \\leq K \\leq 10$), Bessie ranks the $N$ cows according to their \nperformance ($1 \\leq N \\leq 20$).  Afterward, she is curious about the consistency in these rankings.\nA pair of two distinct cows is consistent if one cow did better than the\nother one in every practice session.\n\nHelp Bessie compute the total number of consistent pairs.\n\nINPUT FORMAT:\nThe first line of the input file contains two positive integers $K$ and $N$. The next $K$ lines will each contain the\nintegers $1 \\ldots N$ in some order, indicating the rankings of the cows (cows\nare identified by the numbers $1 \\ldots N$). If $A$ appears before $B$ in one of\nthese lines, that means cow $A$ did better than cow $B$.\n\nOUTPUT FORMAT:\nOutput, on a single line, the number of consistent pairs.\n\nSAMPLE INPUT:\n3 4\n4 1 2 3\n4 1 3 2\n4 2 1 3\nSAMPLE OUTPUT: \n4\n\nThe consistent pairs of cows are $(1,4)$, $(2,4)$, $(3,4)$, and $(1,3)$.\n\n\nProblem credits: Nick Wu\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": []}