题目
407:Heritage
描述
Your rich uncle died recently, and the heritage needs to be divided among your relatives and the church (your uncle insisted in his will that the church must get something). There are N relatives (N <= 18) that were mentioned in the will. They are sorted in descending order according to their importance (the first one is the most important). Since you are the computer scientist in the family, your relatives asked you to help them. They need help, because there are some blanks in the will left to be filled. Here is how the will looks:
Relative #1 will get 1 / … of the whole heritage,
Relative #2 will get 1 / … of the whole heritage,
---------------------- …
Relative #n will get 1 / … of the whole heritage.
The logical desire of the relatives is to fill the blanks in such way that the uncle’s will is preserved (i.e the fractions are non-ascending and the church gets something) and the amount of heritage

家庭财产分割问题中,使用递推方法确定每个亲戚的遗产比例,确保教堂份额最大化,涉及大整数处理技巧。
最低0.47元/天 解锁文章
469

被折叠的 条评论
为什么被折叠?



