0-1 BFS in C++ for Competitive Programming