shunfurh 于 2017.01.03 17:00 提问

Parliament

Description

New convocation of The Fool Land's Parliament consists of N delegates. According to the present regulation delegates should be divided into disjoint groups of different sizes and every day each group has to send one delegate to the conciliatory committee. The composition of the conciliatory committee should be different each day. The Parliament works only while this can be accomplished.
You are to write a program that will determine how many delegates should contain each group in order for Parliament to work as long as possible.
Input

The input file contains a single integer N (5<=N<=1000 ).
Output

Write to the output file the sizes of groups that allow the Parliament to work for the maximal possible time. These sizes should be printed on a single line in ascending order and should be separated by spaces.
Sample Input

7
Sample Output

3 4

1个回答

devmiao      2017.01.03 18:42

The part-time parliament笔记

Peaceful Commission_hdu1814_2-sat
Problem Description The Public Peace Commission should be legislated in Parliament of The Democratic Republic of Byteland according to The Very Important Law. Unfortunately one of the obstacles
The_Part-Time_Parliament (Paxos算法中文翻译)
Paxos算法是分布式技术大师Lamport提出的，主要目的是通过这个算法，让参与分布式处理的每个参与者逐步达成一致意见。用好理解的方式来说，就是在一个选举过程中，让不同的选民最终做出一致的决定。 Lamport为了讲述这个算法，假想了一个叫做Paxos的希腊城邦进行选举的情景，这个算法也是因此而得名。在他的假想中，这个城邦要采用民主提议和投票的方式选出一个最终的决议，但由于城邦的居民没有人愿意把全部时间和精力放在这种事情上，所以他们只能不定时的来参加提议，不定时来了解提议、投票进展，不定时的表达自己的投票意见。Paxos算法的目标就是让他们按照少数服从多数的方式，最终达成一致意见。
HDOJ 1814 Peaceful Commission

Crimean Parliament Declares Independence After
Crimean Parliament Declares Independence After
ACM Parliament
ParliamentTime Limit: 1000 ms Memory Limit: 65536 KiB Submit Statistic Discuss Problem Description New convocation of The Fool Land's Parliament consists of N delegates. A...
POJ1032 Parliament
Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 16685   Accepted: 7038 Description New convocation of The Fool Land's Parliament consists of N delegates. According to
The Part-Time Parliament
The Part-Time Parliament This article appeared in ACM Transactions on Computer Sys- tems 16, 2 (May 1998), 133-169. Minor corrections were made on 29 August 2000. lamport
1032 Parliament
拆成从2开始的递增数列,余下的部分倒回去加2轮,证明比较多,可以看此题的Discuss//4540529_AC_47MS_424K /***********************************************************************       Online Judge   : POJ*       Problem Title
POJ2215 Parliament