TwilightSparklewasplayingLudowithherfriendsRainbowDash,AppleJackandFlutterShy.Butshekeptlosing.Havingreturnedtothecastle,TwilightSparklebecameinterestedinthedicethatwereusedinthegame.Thedicehas m faces:thefirstfaceofthedicecontainsadot,thesecondonecontainstwodots,andsoon,the m-thfacecontains m dots.TwilightSparkleissurethatwhenthediceistossed,eachfaceappearswithprobability .A...
Devuwantstodecoratehisgardenwithflowers.Hehaspurchased n boxes,wherethe i-thboxcontains fi flowers.Allflowersinasingleboxareofthesamecolor(hencetheyareindistinguishable).Also,notwoboxeshaveflowersofthesamecolor.NowDevuwantstoselect exactly s flowersfromtheboxestodecoratehisgarden.Devuwouldliketoknow,inhowmanydifferentwayscanheselecttheflowersfromeachbox?Sincethisnumbermaybeverylarg...
AfterwinninggoldandsilverinIOI2014,AkshatandMalvikawanttohavesomefun.Nowtheyareplayingagameonagridmadeof nhorizontaland m verticalsticks.An intersectionpoint isanypointonthegridwhichisformedbytheintersectionofonehorizontalstickandoneverticalstick.Inthegridshownbelow, n = 3 and m = 3.Thereare n + m = 6 sticksintotal(horizontalsticksareshowninredandverticalsticksareshowni...
Andreyneedsonemoreproblemtoconductaprogrammingcontest.Hehas n friendswhoarealwayswillingtohelp.Hecanasksomeofthemtocomeupwithacontestproblem.Andreyknowsonevalueforeachofhisfiends—theprobabilitythatthisfriendwillcomeupwithaproblemifAndreyaskshim.HelpAndreychoosepeopletoask.Asheneedsonlyoneproblem,Andreyisgoingtobereallyupsetifnoonecomesupwithaproblemorifhegetsmorethanoneproblemfromhisfr...
近期评论