Yourcityhas n junctions.Thereare m one-way roadsbetweenthejunctions.Asamayorofthecity,youhavetoensurethesecurityofallthejunctions.Toensurethesecurity,youhavetobuildsomepolicecheckposts.Checkpostscanonlybebuiltinajunction.Acheckpostatjunction icanprotectjunction j ifeither i = j orthepolicepatrolcarcangoto j from i andthencomebackto i.Buildingcheckpostscostssomemoney.Assome...
Thepolicedepartmentofyourcityhasjuststarteditsjourney.Initially,theydon’thaveanymanpower.So,theystartedhiringnewrecruitsingroups.Meanwhile,crimeskeepsoccurringwithinthecity.Onememberofthepoliceforcecaninvestigateonlyonecrimeduringhis/herlifetime.Ifthereisnopoliceofficerfree(isn'tbusywithcrime)duringtheoccurrenceofacrime,itwillgountreated.Giventhechronologicalorderofcrimeoccurrencesandrecru...
近期评论