how to optimize the time complexity.

could anyone suggest me how to reduce the time complexity…

Do not post code regarding any of the problems in a live contest during the contest.

Please remove your code.

Some one with enough karma or @admin please close this question.

@admin close this question