3. 30 people are lined up in six rows of five people each. Each of them is either a knight, who always tells the truth, or a liar, who always lies, and they all know who among them is a knight and who is a liar. A journalist asked each of them: “Is it true that there will be at least 4 rows in which liars are in the majority?”. What is the maximum number of "yes" answers he could hear?
Answer: 21. Solution: Let's call a row blue if it contains more than half (that is, no less than three) liars and red if there are no more than two liars in it.

Suppose the knights said "yes." Then we have no more than two red and no less than four blue rows. In the red rows, there are no more than 10 knights, and in the blue rows - no more than $2 \cdot 4=8$ knights. Therefore, in this case, the number of "yes" answers is no more than 18.

Suppose the liars said "yes." Then we have no more than three blue rows and no less than three red rows. In the blue rows, there are no more than 15 liars, and in the red rows - no more than $2 \cdot 3=6$ liars, in total - no more than 21 liars, that is, no more than 21 "yes" answers in this case. Exactly 21 "yes" answers are possible if in three rows there are 5 liars each, and in the other three rows, there are 2 liars each.