PRAYAAS 2015 solutions

Hello!

The Prayaas contest ended a few days ago but the solutions are not made public yet. I am stuck on the following problem (CodeChef: Practical coding for everyone ) from quite some time and would like to know a solution or a possible approach.

Any help is appreciated. Thanks!

even i am waiting for the solutions.Please upload editorial or make solution public.Thanks