{"task": {"agent_timeout": 600, "task": "228", "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: Party Invitations [Travis Hance, 2012]\n\nFarmer John is throwing a party and wants to invite some of his cows to\nshow them how much he cares about his herd.  However, he also wants to\ninvite the smallest possible number of cows, remembering all too well the\ndisaster that resulted the last time he invited too many cows to a party.\n\nAmong FJ's cows, there are certain groups of friends that are hard to\nseparate.  For any such group (say, of size k), if FJ invites at least k-1\nof the cows in the group to the party, then he must invite the final cow as\nwell, thereby including the entire group.  Groups can be of any size and\nmay even overlap with each-other, although no two groups contain exactly\nthe same set of members.  The sum of all group sizes is at most 250,000.\n\nGiven the groups among FJ's cows, please determine the minimum number of\ncows FJ can invite to his party, if he decides that he must definitely\nstart by inviting cow #1 (his cows are conveniently numbered 1..N, with N\nat most 1,000,000).\n\nPROBLEM NAME: invite\n\nINPUT FORMAT:\n\n* Line 1: Two space-separated integers: N (the number of cows), and G\n        (the number of groups).\n\n* Lines 2..1+G: Each line describes a group of cows.  It starts with\n        an integer giving the size S of the group, followed by the S\n        cows in the group (each an integer in the range 1..N).\n\nSAMPLE INPUT:\n\n10 4\n2 1 3\n2 3 4\n6 1 2 3 4 6 7\n4 4 3 2 1\n\nINPUT DETAILS:\n\nThere are 10 cows and 4 groups.  The first group contains cows 1 and 3, and\nso on.\n\nOUTPUT FORMAT:\n\n* Line 1: The minimum number of cows FJ can invite to his party.\n\nSAMPLE OUTPUT:\n\n4\n\nOUTPUT DETAILS:\n\nIn addition to cow #1, FJ must invite cow #3 (due to the first group\nconstraint), cow #4 (due to the second group constraint), and also cow #2\n(due to the final group constraint).\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": []}