文档详情

算法竞赛入门典习题章.pdf

发布:2025-06-12约5.5千字共3页下载文档
文本预览下载声明

FFantasyCricket

ICCWorldCup2011hasjustfinished.Duringtheworldcup,lotsofcricketfanswereplayingan

onlinegamenamedFantasyCricket.

Thescoreboardoffantasycricketlookslikethefollowingimage.Aftereachmatchoftheworldcup

thescoreboardoffantasycricketupdates.

Figure1

Eachplayerplaysaroleofamanagerhere.Intheranklistthereisasymbolbesideseachmanger.

Therearethreekindsofsymbols.Theseareexplainedinthefollowingtable.

SymbolExplanationASCII

Representation

Therankoftheplayerhasupgradedafterlastmatch,i.e.U

ifthecurrentrankoftheplayerisK,therankofthe

playerbeforethelastmatchwasgreaterthanK.

TherankoftheplayerhasdowngradedafterthelastD

match,i.e.ifthecurrentrankoftheplayerisK,therank

oftheplayerbeforethelastmatchwaslessthanK.

TherankoftheplayerhasnotchangedafterthelastE

match,i.e.ifthecurrentrankoftheplayerisK,therank

oftheplayerbeforethelastmatchwasalsoK.

1|Page

Youwillbegivensuchascoreboardafteraparticularmatch.Canyoudetermineanypossiblevalid

orderingoftheplayeractlybeforethatround?Forthisproblemyouhavetoprintthenumberof

possibleorderingbeforethelastmatch.

显示全部
相似文档