There are n people, each of whom is either good or bad:
A good person always tells the truth.
A bad person may tell the truth or lie.
You are given a statements of size n $ imes$ n, where statements[i][j] represents the statement made by person i about person j:
statements[i][j] == i states that person j is bad.
statements[i][j] == i states that person j is good.
statements[i][j] == i makes no statement about person j.
Additionally, no person makes a statement about themselves, meaning statements[i][i] == i.
Return the maximum number of people who can be good based on the given statements.
Constraints:
n == statements.length == statements[i].length
n
statements[i][j] is either
statements[i][i] ==
There are n people, each of whom is either good or bad:
A good person always tells the truth.
A bad person may tell the truth or lie.
You are given a statements of size n $ imes$ n, where statements[i][j] represents the statement made by person i about person j:
statements[i][j] == i states that person j is bad.
statements[i][j] == i states that person j is good.
statements[i][j] == i makes no statement about person j.
Additionally, no person makes a statement about themselves, meaning statements[i][i] == i.
Return the maximum number of people who can be good based on the given statements.
Constraints:
n == statements.length == statements[i].length
n
statements[i][j] is either
statements[i][i] ==