Design Tutorial: Inverse the Problem

CodeForces - 472D