problems icon indicating copy to clipboard operation
problems copied to clipboard

Adds extra check for Plurality

Open NaiculS opened this issue 4 years ago • 1 comments

This extra check ensures that only the winner's name is printed, even if the losers tied, thus preventing some hack around logic, such as can be seen on my first check50 submission of the problem as an example.

NaiculS avatar Nov 02 '20 12:11 NaiculS

Unless I see the "hack-around" code and it changes my mind, I see minimal value in this PR.

Though for complete thoroughness, it is not a bad quick change to make. Still, a whole new case is unnecessary. Simply just change one of the loser's amount of votes in a print_winner function to match the other loser. For example, I would just change line 84 in testing.c to candidates[2].votes = 1

RemArcAble08 avatar Feb 27 '24 03:02 RemArcAble08