猫鼠游戏第五季 sara:翻译下文-Greedy Gift Givers

来源:百度文库 编辑:高考问答 时间:2024/04/27 23:32:13
A group of NP (2 ≤ NP ≤ 10) uniquely named friends has decided to exchange gifts of money. Each of these friends might or might not give some money to any or all of the other friends. Likewise, each friend might or might not receive money from any or all of the other friends. Your goal in this problem is to deduce how much more money each person gives than they receive.

The rules for gift-giving are potentially different than you might expect. Each person sets aside a certain amount of money to give and divides this money evenly among all those to whom he or she is giving a gift. No fractional money is available, so dividing 3 among 2 friends would be 1 each for the friends with 1 left over -- that 1 left over stays in the giver's "account".

In any group of friends, some people are more giving than others (or at least may have more acquaintances) and some people have more money than others.

Given a group of friends, no one of whom has a name longer than 14 characters, the money each person in the group spends on gifts, and a (sub)list of friends to whom each person gives gifts, determine how much more (or less) each person in the group gives than they receive.

一组NP(2小于等于 NP小于等于 10)唯一命名朋友已经决定交换钱的天赋。 这些朋友中的每个可以或可以不把一些钱给到任何或者所有其它朋友。 同样,每位朋友可以或可以不从任何或者所有其它朋友得到钱。 与他们收到比,每个人给还有多少钱,在这个问题里的你的目标是推断。

与你可能期望比,给礼物的规章潜在不同。 每个人在全部对谁他或者她中平均留出一定量钱给并且分这钱正给一个礼物的那些人。 没有辅币是可提供的,因此在2位朋友之间分3 将是那些朋友用推迟的1的每一个1 -- 在给予者"账"里的那1 推迟的停留。

在任何群朋友里, 一些人更给其它人(既没至少可能有更多朋友)一些人有更多的钱比其它人。

给一群朋友, 没有其中一人有一个名字比14个字符长, 每个在组的人在礼物上花费的钱, 以及一个每个人给礼物的朋友的(附属)名单, 确定与他们收到比,(或更少)在组的每个人给还有多少。

一个小组NP (2 ¡ Ü NP ¡ Ü 10)独特地说出的朋友决定交换金钱礼物。 每一个个这些个朋友也许或也许不给一些钱任一或所有其他朋友。 同样, 每个朋友也许或也许从任一或所有其他朋友不接受金钱。 您的目标在这个问题是推论多少更多金钱每个人比他们接受给。

规则为礼物给比您也许期望潜在地不同的。 每个人留出某一金额给并且在所有之中均匀地划分这金钱那些对谁他或她给礼物。 辅币不是可利用的, 如此划分3在2个朋友之中是1每为朋友与1左 -- 那1在送礼者的“帐户”把结束逗留留在。

在任何小组朋友, 某些人比其他(或可以至少有更多相识)是指定和某些人比其他有更多金钱。每个人在小组在礼物上花的金钱, 并且每个人给礼物朋友的a (次级)名单, 比他们接受确定多少更多(或)每个人在小组给。

给出一个小组朋友, 没人谁有命名更长比14个字符,