HDU 1242 (Priority Queue + bfs)