欢迎来到淘码网(TMA.CN)

gift1

价格: ¥ 9 积分可抵¥ 9

最后更新: 2019-12-22 18:16:18

演示地址:

解答费: 免费

分类
参数1
参数1
参数1
参数1
参数1
参数1
大小
1 MB
发货方式
自动发货
下载方式
远程下载
1
1
1
备注说明
pascal 

所属分类Delphi/CppBuilder
开发工具:Pascal
文件大小:45KB
下载次数:68
上传日期:2009-03-30 21:49:25
说明:  USACO 1.1.2题解 描述 对于一群要互送礼物的朋友,你要确定每个人收到的礼物比送出的多多少(and vice versa for those who view gift giving with cynicism)(,反之亦然对于那些用贪婪的眼光来看礼物的人(by John))。 在这一个问题中,每个人都准备了一些钱来送礼物,而这些钱将会被平均分给那些将收到他的礼物的人。 然而,在任何一群朋友中,有些人将送出较多的礼物(可能是因为有较多的朋友),有些人有准备了较多的钱。 给出一群朋友, 没有人的名字会长于 14 字符,给出每个人将花在送礼上的钱,和将收到他的礼物的人的列表,请确定每个人收到的比送出的钱多的数目。
(Greedy Gift Givers 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 )

文件列表
gift1
.....\gift1.bak
.....\gift1.exe
.....\gift1.in
.....\gift1.o
.....\gift1.out
.....\gift1.pas
.....\gift1b.lpi
.....\gift1b.pas

0 (0%)

好评

0 (0%)

中评

0 (0%)

差评

  • 会员中心
  • 浏览记录
  • 我的订单
  • 我的收藏
  • 在线客服

    点击这里给我发消息 点击这里给我发消息

    官方微信

    仅处理投诉、举报及平台使用问题;
    商品问题请咨询商家客服!

  • 意见反馈
  • 返回顶部
浏览记录