C++/완전탐색,BFS,DFS(9)