2016chengdu.pdfVIP

  • 24
  • 0
  • 约2.61万字
  • 约 19页
  • 2018-03-30 发布于河南
  • 举报
2016chengdu.pdf

The ACMInternationalCollegiate ProgrammingContestAsiaChengduRegionalContest 1 e ACMInternational Collegiate ProgrammingContest AsiaChengduRegional Contest ProblemList ProblemA Assignment ForPrincess ProblemB Beautiful Soup ProblemC Clumsy Algorithm ProblemD Dinner ComingSoon ProblemE Exhausted Robot ProblemF Fibonacci Tree ProblemG GRE WordsRevenge ProblemH Hard Disk Drive ProblemI ICPC Ranking ProblemJ Just Random The ACMInternationalCollegiate ProgrammingContestAsiaChengduRegionalContest 3 ProblemA: Assignment ForPrincess Description Long long ago, in the Kingdom Far Far Away, there lived many lile animals. And you are the beloved princess who is marrying the prince of a rich neighboring kingdom. e prince, who turns out to be a handsomeguy,o?ered youa goldenengagementringthatcanruncomputerprograms! e wedding will be held next summer because your father, the king, wants you to ?nish your university ?rst. Butyoudid’tevenhaveaclueonyourgraduationproject. Yourterribleprojectwastoconstructa mapforyourkingdom. Yourmother,thequeen,wantedtomakesurethatyoucouldgraduateintime. Or your wedding would have to be delayed to the next winter. So she told you how your ancestors built the kingdomwhichis called the Roads Principle: 1. Yourkingdomconsistsof castles and directed roads. 2. ereis at mostoneroadbetween a pair of castles. 3. erewon’tbeanyroadsthat start at one castle and leadtothesameone. Shehopedthosemaybehelpfultoyourproject. enyouaskedyourcousinCoachPang Yes,he isyourtroublingcousin,he alwaysasks youto solveallkindsofproblemsevenyouareaprincess. , the Minister of Tra?c, about the castles and roads. Your cousin, sadly, doesn’t have a map of the kingdom. ough he said the technology isn’t well developed and it depends on your generation to contribute to the map, he told you the Travelers Guide, the way travelers describe the amazing road system: 1. Nomaer whichcastleyoustart with, youcan arriveatanyothercastles

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档