[Python3] Fast Recursive DP (N * 2^N)
we should iterate the matrix and for each person check 2 possibilities, \nwhether he might be telling the truth or he might be a lier. in both cases we should d
we should iterate the matrix and for each person check 2 possibilities, \nwhether he might be telling the truth or he might be a lier. in both cases we should dig deeper and count the maximum number of good people.\nIn case he is telling the truth, we must consider all his judgements as valid and add them to already **good** and **bad** people we collected.\nIn case the person is a lier we should not consider his judgements and we should only add him to the **bad** list.\n```\nclass Solution:\n    def maximumGood(self, statements):\n        def dp(idx: int, good: List[int], bad: List[int]):\n            if idx == len(statements):\n                return len(good)\n            a, b = 0, 0\n            if idx not in bad and all(i not in bad if s == 1 else i not in good for i, s in enumerate(statements[idx]) if\n                   i != idx and s != 2):\n                a = dp(\n                    idx + 1,\n                    list(set([idx] + good + [i for i, s in enumerate(statements[idx]) if s == 1])),\n                    list(set(bad + [i for i, s in enumerate(statements[idx]) if s == 0])),\n                )\n            if idx not in good:\n                b = dp(\n                    idx + 1,\n                    good,\n                    list(set(bad + [idx]))\n                )\n            return max(a, b)\n\n        return dp(0, [], [])\n```
[]