
Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
You should test every possible assignment of good and bad people, using a bitmask.
In each bitmask, if the person i is good, then his statements should be consistent with the bitmask in order for the assignment to be valid.
If the assignment is valid, count how many people are good and keep track of the maximum.