Help me in solving MAXMINLEN problem

My issue

give me code for this

My code



Problem Link: https://www.codechef.com/problems/MAXMINLEN