Golang
Code\n\nfunc maximumGood(statements [][]int) int {\n    n := len(statements)\n    maxCount := 0\n    for i := 0; i < (1 << n); i++ {\n        if isValid(i, stat
# Code\n```\nfunc maximumGood(statements [][]int) int {\n    n := len(statements)\n    maxCount := 0\n    for i := 0; i < (1 << n); i++ {\n        if isValid(i, statements) && numOnes(i) > maxCount {\n            maxCount = numOnes(i)\n        }\n    }\n    return maxCount\n}\n\nfunc isValid(mask int, statements [][]int) bool {\n    n := len(statements)\n    for i := 0; i < n; i++{\n        if ((1<<i) & mask) == (1<<i) {\n            for j := 0; j < n; j++ {\n                if statements[i][j] != 2 && (statements[i][j]<<j) != (mask & (1<<j)) {\n                    return false\n                }\n            }\n        } \n    }\n    return true\n}\n\nfunc numOnes(i int) int {\n    count := 0\n    for i > 0 {\n        count += i & 1\n        i >>= 1\n    }\n    return count\n}\n\n\n```
['Go']