I'm trying to solve http://www.codechef.com/problems/FIRESC/ problem. Im using bfs as opposed to dfs unlike the editorial.
Can someone please help me find where im going wrong? This is my solution http://www.codechef.com/viewsolution/3235207
Im losing my mind over here.(first graph problem)