资源描述:
《辽宁省acm竞赛赛题.docx》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、DinnerDescriptionLittleAisonememberofACMteam.HehadjustwonthegoldinWorldFinal.Tocelebrate,hedecidedtoinvitealltohaveonemeal.Asbowl,knifeandothertablewareisnotenoughinthekitchen,LittleAgoestotakebackuptablewareinwarehouse.Therearemanyboxesinwarehouse,oneboxcontainsonlyonething,andeachboxismarkedby
2、thenameofthingsinsideit.Forexample,if"basketball"iswrittenonthebox,whichmeanstheboxcontainsonlybasketball.Withthesemarks,LittleAwantstofindoutthetablewareeasily.So,theproblemforyouistohelphim,findoutallthetablewarefromallboxesinthewarehouse.InputTherearemanytestcases.Eachcasecontainsoneline,ando
3、neintegerNatthefirst,NindicatesthatthereareNboxesinthewarehouse.ThenNstringsfollow,eachstringisonenamewrittenonthebox.OutputForeachtestoftheinput,outputallthenameoftableware.SampleInput3basketballforkchopsticks2bowlletterSampleOutputforkchopsticksbowlHINT:Thetablewareonlycontains:bowl,knife,fork
4、andchopsticks.YouaremybrotherDescriptionLittleAgetstoknowanewfriend,LittleB,recently.Oneday,theyrealizethattheyarefamily500yearsago.Now,LittleAwantstoknowwhetherLittleBishiselder,youngerorbrother.InputTherearemultipletestcases.Foreachtestcase,thefirstlinehasasingleinteger,n(n<=1000).Thenextnline
5、shavetwointegersaandb(1<=a,b<=2000)each,indicatingbisthefatherofa.Onepersonhasexactlyonefather,ofcourse.LittleAisnumbered1andLittleBisnumbered2.Proceedtotheendoffile.OutputForeachtestcase,ifLittleBisLittleA’syounger,print“Youaremyyounger”.Otherwise,ifLittleBisLittleA’selder,print“Youaremyelder”.
6、Otherwise,print“Youaremybrother”.Theoutputforeachtestcaseoccupiedexactlyoneline.SampleInput513243546566132435465767SampleOutputYouaremyelderYouaremybrotherTimeDescriptionDigitalclockuse4digitstoexpresstime,eachdigitisdescribedby3*3characters(including”
7、”,”_”and”“).nowgiventhecurrenttime,pleasete
8、llushowcanitbeexpressedbythedigitalclock.InputThereareseveraltestcases.Eachcasecontains4integersinaline,separatedbyspace.Proceedtotheendoffile.OutputForeachtestcase,outputthetimeexpressedbythedigitalclocksuchasSampleOutput.S