Editorial for The Contest Contest 1 P1 - A Typical Codeforces Problem
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
Hint
The tester can be forced to vote yes if the first testers vote yes and another tester , votes yes.
Full Solution
For every tester that votes yes, it is possible to force every tester , to vote yes. By selecting only tester for the interval, there is one yes and so tester must vote yes. From the hint, it follows that tester can be forced to vote yes, then tester , and so on until tester . Therefore, it is possible to force a majority of the testers to vote yes if there exists a tester , who votes yes.
Time Complexity:
Comments