退出投票
Get Out The Vote
题目详情
梦幻岛微型州的初选!
此状态遵循以下规则:令 D 为要代表的人数 当选,N 总票数和 各票数 候选人我。最初,每位候选人都会分配到楼层 (D * /N) 名代表 其中 Floor() 是标准楼层函数。然后,剩余的代表(如果 任何)按余数的降序分配 D * /N – Floor(D * /N)。 也就是说,如果还有 K 名剩余代表,则拥有 K 名候选人 最大余数 D * /N – Floor(D * /N) 将各收到一名代表。
计票后发现102张选票,无一张无效或无效选票 无效,仅有的三位候选人哈利、拉里和玛丽被分配为 2、2、 和 3 名代表。
后来,审计委员会发现存在两个错误:
**1.**需要分配 8 名代表,而不是 7 名。
**2.**第 103 次投票被错过,多了一张票投给了哈利。
纠正这些错误后,最终结果表明 Harry 失去一名代表。
哈利很愤怒!怎么会这样? 每位候选人得了多少票 在这次选举中获胜?
Primary elections in the micro-state of Neverland!
This state follows the following rules: let D be the number of delegates to be elected, N the total number of votes and Xi the number of ballots cast for each candidate i. Initially, each candidate gets assigned Floor(D * Xi/N) delegates where Floor() is the standard floor function. Then, the remaining delegates (if any) get assigned in decreasing order of the remainders D * Xi/N – Floor(D * Xi/N). That is, if there are K remaining delegates, the K candidates who have the largest remainders D * Xi/N – Floor(D * Xi/N) will each receive a delegate.
After counting the votes, 102 ballots were found, none of which were invalid or void, and the only three candidates Harry, Larry, and Mary got assigned 2, 2, and 3 delegates respectively.
Later on, an audit commission found two mistakes were made:
1. There were 8 delegates to assign, not 7.
2. A 103rd ballot had been missed, with an extra vote for Harry.
After correcting for those errors, the final results show that Harry lost one delegate.
Harry is outraged! How could this happen?? How many votes did each candidate receive in this election?
解析
哈利以这种方式失去代表的唯一方式是 原始投票计数为 (Harry, Larry, Mary) = (20,34,48)。 本来Harry的余数是3个中最大的,但是加上额外的余数后 代表和他的额外投票,哈利的票成为三人中最低的!
恭喜本月所有正确的求解者!
Original Explanation
The only way in which Harry could have lost a delegate in this fashion would be for the original vote counts to have been (Harry, Larry, Mary) = (20,34,48). Originally Harry’s remainder is the highest of the 3, but after adding the extra delegate and his extra vote, Harry’s becomes the lowest of the 3!
Congratulations to all of this month’s correct solvers!