Problem : http://www.codechef.com/problems/H1
This is my implementation
http://www.codechef.com/viewplaintext/2707780
I am implementing a BFS to check all reachable states and mapping the states reached in a trie.
But I am unable to get it to run within the time limits. I will be grateful if someone can throw some light on how to improve my code.