AboynamedGenareallywantstogettothe"RussianCodeCup"finals,oratleastgetat-shirt.Buttheofferedproblemsaretoocomplex,sohemadeanarrangementwithhis n friendsthattheywillsolvetheproblemsforhim.Theparticipantsareoffered m problemsonthecontest.Foreachfriend,Genaknowswhatproblemshecansolve.ButGena'sfriendswon'tagreetohelpGenafornothing:the i-thfriendasksGena xi rublesforhishelp insolvin...
ThelastproductoftheR2companyinthe2Dgames'fieldisanewrevolutionaryalgorithmofsearchingfortheshortestpathina 2 × nmaze.Imagineamazethatlookslikea 2 × n rectangle,dividedintounitsquares.Eachunitsquareiseitheranemptycelloranobstacle.Inoneunitoftime,apersoncanmovefromanemptycellofthemazetoanyside-adjacentemptycell.Theshortestpathproblemisformulatedasfollows.Giventwofreemazecells,younee...
Pashahastwohamsters:ArthurandAlexander.Pashaput n applesinfrontofthem.PashaknowswhichapplesArthurlikes.Similarly,PashaknowswhichapplesAlexanderlikes.Pashadoesn'twantanyconflictbetweenthehamsters(astheymaylikethesameapple),sohedecidedtodistributetheapplesbetweenthehamstersonhisown.HeisgoingtogivesomeapplestoArthurandsomeapplestoAlexander.Itdoesn'tmatterhowmanyappleseachhamstergetsbu...
NearlyeachprojectoftheFcompanyhasawholeteamofdevelopersworkingonit.Theyoftenareindifferentroomsoftheofficeindifferentcitiesandevencountries.Tokeepintouchandtracktheresultsoftheproject,theFcompanyconductssharedonlinemeetingsinaSpykechat.OnedaythedirectoroftheFcompanygotholdoftherecordsofapartofanonlinemeetingofonesuccessfulteam.Thedirectorwatchedtherecordandwantedtotalktotheteamleader.But...
Recently,astartupbytwostudentsofastateuniversityofcityFgainedincrediblepopularity.Nowit'stimetostartanewcompany.Butwhatdowecallit?Themarketanalystscameupwithaverysmartplan:thenameofthecompanyshouldbeidenticaltoitsreflectioninamirror!Inotherwords,ifwewriteoutthenameofthecompanyonapieceofpaperinaline(horizontally,fromlefttoright)withlargeEnglishletters,thenputthispieceofpaperinfrontofthemirro...
'Jeopardy!'isanintellectualgamewhereplayersanswerquestionsandearnpoints.CompanyQconductsasimplified'Jeopardy!'tournamentamongthebestITcompanies.Byaluckycoincidence,theoldrivalsmadeittothefinals:companyR1andcompanyR2.Thefinalswillhave n questions, m ofthemareauctionquestionsand n - m ofthemareregularquestions.Eachquestionhasaprice.Thepriceofthe i-thquestionis ai points.Durin...
近期评论