- Build a graph with M + 2 nodes: one for each obstacle and one for each of the top and bottom walls.
- Add an edge between obstacles if they overlap.
- Check if the top wall is connected to the bottom wall using depth-first search (connected means no path)
First Solve: CTF_505