VoteComputer Science Level 2
Alice and Bob are candidates for a presidential election in Brilliant Club. There are 1001 voters in the club, who will vote for either Alice or Bob, but never both. After they decide their ideal candidate, they queue up in front of a stage. Then, the voter at the head of the queue, say \(x\), will follow the plan:
- If the stage is empty, \(x\) stands on the stage.
- If the people on the stage vote the same as \(x\), \(x\) stands on the stage.
- If the people on the stage vote against \(x\), dismiss both \(x\) and one person on the stage.
This process continues until the queue is empty. In the end, the people on the stage vote for Alice. Who receives the majority votes?