@vpyati, Thank you very much!! It means a lot to me that people appreciate my work here as a member of Codechef community and if I managed to inspire at least one person with my work, then I am really, really happy!! 
Thank you very much @i_wanna_rokk, I always try to give my best in everything and if its something I love, like Algorithms, even more 
But, above all I am here to learn 
Best regards,
Bruno
Hello @hrculiz, If you have learnt something new from my text, then it means I am doing things right!!
And it’s my pleasure!
Good work bruno, it was painful to watch you struggle with this problem for 2-3 days, but I am really happy for you that you pulled it off, and also hats off to your determination 
Thank you very much @v_akshay, your words of motivation also helped me a lot
And this problem only proves I need to learn many, many new things like Graphs, DP, Trees… I know it’s a long road, but Im also sure I will get there with time and hard work 
Thank you very much @ravi it’s really wonderful to see that people enjoyed this text
And ofc my own personal goal is to keep learning more and more so I can write texts like this for a wider range of problems!! My personal goal now is to work on DP and graphs in a more specfic way and study new data structures so I can implement classic algorithms like LCS, suffix array, etc 
Good job @arjunc
I have came across that website during contest but actually failed to use the ideas described there and I chose this method instead, so, congratulations 