AtCoder Beginner Contest 340D - Super Takahashi Bros
problemlinkThennnstagesantheirmutualpathwayscanbeintuitivelyseenasgraph,withstagesasnodes,andthepathwaysasedges.Theproblemseemstosolvablebysomeclevergreedyalgorithmduetothesemitree-likestructureofthen