Just a runnable solution
Code\n\nimpl Solution {\n    pub fn maximum_good(statements: Vec<Vec<i32>>) -> i32 {\n        let mut ans = 0;\n        for i in 1..(1 << statements.len()) {\n 
# Code\n```\nimpl Solution {\n    pub fn maximum_good(statements: Vec<Vec<i32>>) -> i32 {\n        let mut ans = 0;\n        for i in 1..(1 << statements.len()) {\n            let mut chk = 1;\n            for j in 0..statements.len() {\n                if i & (1 << j) == 0 {\n                    continue;\n                }\n                for k in 0..statements.len() {\n                    if ((i & (1 << k) != 0) && statements[j][k] == 0) || ((i & (1 << k) == 0) && statements[j][k] == 1)\n                    {\n                        chk = -1;\n                        break;\n                    }\n                }\n                if chk == -1 {\n                    break;\n                }\n            }\n            if chk == 1 {\n                let mut cnt = 0;\n                let mut n1 = i;\n                while n1 > 0 {\n                    if 1 & n1 != 0 {\n                        cnt += 1;\n                    }\n                    n1 >>= 1;\n                }\n                ans = ans.max(cnt);\n            }\n        }\n        ans\n    }\n}\n```
['Rust']