Click here to read the complete problem statement.
Can anyone give any hints for this question
I also need some hints