One liner for fun (Python)
\nclass Solution:\n    def maximumGood(self, s):\n        return max(bin(b).count(\'1\') for b in range(1 << len(s)) # go through all combinations of good, bad\
```\nclass Solution:\n    def maximumGood(self, s):\n        return max(bin(b).count(\'1\') for b in range(1 << len(s)) # go through all combinations of good, bad\n                   if all(all(g == (b >> i) & 1 for i, g in enumerate(s[w]) if g != 2) # check good\'s statements match ours\n                          for w in range(len(s)) if b & (1 << w))) # for each good \n```
[]