Bitmasking Video Solution
For the full video, you can check out this Youtube video \n\nSince n<=15 we can brute force our solution and generate all possibilities of good / bad people of 
For the full video, you can check out this [Youtube video]( https://youtu.be/v7sr-1Zbh6k) \n\nSince `n<=15` we can brute force our solution and generate all possibilities of good / bad people of our group.\nThen for each of those arrangement we will verify if there are no contradictions. \nIf there are no contradictions then we will count the `1` bit. \nThat is the number of good people. \n\n```\nclass Solution:        \n    def maximumGood(self, statements: List[List[int]]) -> int:\n        \n        n = len(statements)\n        res = 0\n        \n        def checkGood(person, mask):\n            if (mask>>person) & 1:\n                return True\n            return False\n        \n        def validateStatement(mask):\n            for i in range(n):\n                if checkGood(i, mask):\n                    for j in range(n):\n                        statement = statements[i][j]\n                        \n                        if (statement==0 and checkGood(j, mask)) or (statement==1 and not checkGood(j, mask)):\n                            return False\n            return True\n        \n        for i in range(1,1<<n): \n            if validateStatement(i):\n                res = max(res, bin(i).count(\'1\'))\n        return res\n```
['Bitmask', 'Python', 'Python3']