[BGL] single pair problem with bfs