editorial for CDMN17C

Help in the reaching up to a solution of the problem code CDMN17C . I am even unable to crack the logic behind the solution of this problem ,till now not got an answer coding geeks welcomed to crack the nuts out of the problem.