About a month ago in [Augest-Long-Challenge[2016]](https://www.codechef.com/AUG16) a question — ["Funny — Genome"](https://www.codechef.com/problems/SHAIKHGN) was asked in [CodeChef](https://www.codechef.com/).↵
Although no Official Editorial was released for it , "wodahs_cc" suggested that we need to use "Four Russian Method" to solve for the problem in the [forum](https://discuss.codechef.com/questions/84409/funny-gnomes-tutorial).↵
I've searched the Internet and also gone through the [Video](https://www.youtube.com/watch?v=cYJrMUvJQGc) for it, but I could not find a proper implementation to it,↵
So I've [Implemented it](http://ideone.com/kG7j9u) with my own understanding of the algorithm but still got "Time-Limit-Exceeded" error for some test cases.↵
I don't know what I did wrong. I request you people of Code-Forces community to kindly provide an Implementation for the Four-Russian-Method.↵
I thank you all in advance.↵
↵
P.S : A [Link](http://ideone.com/kG7j9u) to my Implementation.
Although no Official Editorial was released for it , "wodahs_cc" suggested that we need to use "Four Russian Method" to solve for the problem in the [forum](https://discuss.codechef.com/questions/84409/funny-gnomes-tutorial).↵
I've searched the Internet and also gone through the [Video](https://www.youtube.com/watch?v=cYJrMUvJQGc) for it, but I could not find a proper implementation to it,↵
So I've [Implemented it](http://ideone.com/kG7j9u) with my own understanding of the algorithm but still got "Time-Limit-Exceeded" error for some test cases.↵
I don't know what I did wrong. I request you people of Code-Forces community to kindly provide an Implementation for the Four-Russian-Method.↵
I thank you all in advance.↵
↵
P.S : A [Link](http://ideone.com/kG7j9u) to my Implementation.