Descriptions:

Complete Mirror

CodeForces - 1182D