Problem 037——UVa 207 - PGA Tour Prize Money

该博客介绍了一个程序,用于根据PGA Tour赛事规则分配奖金。程序处理输入包括比赛总奖金、各名次奖金百分比以及球员四轮比赛成绩。输出包括获奖球员名单、排名、总成绩和奖金数额。博客中提到作者遇到的实现挑战,并分享了参考的解决方案。

 PGA Tour Prize Money 

A PGA (Professional Golf Association) Tour event is a golf tournament in which prize money is awarded to the best players. The tournament is broken into four rounds of 18 holes apiece. All players are eligible to play the first two rounds. Only those with the best scores from those 36 holes ``make the first cut" to play the final two rounds and qualify for prize money. Players with the best 72-hole aggregate scores (the lowest scores) earn prize money.

You must write a program to determine how the total prize money (called the tournament ``purse") is to be allocated for a tournament. Specifications are as follows.

1)
All players will play at least two 18-hole rounds (36 holes in all) unless they are disqualified for some reason.
2)
Any player who is disqualified stops playing at the time of the disqualification. Players who are disqualified during the first two rounds are ineligible to make the cut. Players who are disqualified during either of the last two rounds are ineligible to win prize money.
3)
At the end of the first two rounds, the field of players is cut to the 70 players with the lowest 36-hole scores plus ties. So if 10 players are tied for 70th place, then 79 players make the 36-hole cut. Players who do not make the 36-hole cut are eliminated from the playing field and do not win any prize money.
4)
The players who do make the 36-hole cut play an additional 36 holes (two 18-hole rounds) and are paid a percentage of the total prize money depending on their 72-hole aggregate score. The lower the score, the more prize money a player wins.
5)
Players are paid percentages of the the tournament purse according to their final standings. For example, if the tournament purse were $1,000,000 and the winner's share were 18%, the winner would earn $180,000.
6)
There will be only one winner of this tournament. (In an actual golf tournament, when there is a tie for the low 72-hole score, there is be a play-off among the tied players. We will ignore that situation.)
7)
There may be a tie for any or all of the positions between 2 and 70. If there is a tie among  n players for position  k, the money designated for positions  k through  n +  k - 1 is pooled and allocated equally among
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值