How this solution works ?
this is a solution for problem H from last contest , can anyone explain to me how this solution works ?
AMA: TheOneYouWant
Atcoder ABC #351 Short Solution Discussion