트리

    [class6] (백준 14725) 개미굴

    HTML 삽입 미리보기할 수 없는 소스 #include #include using namespace std; struct Node { int depth = 0; map m; }; int N; string ChangeStr(string str,int count) { string temp = ""; while (count-- > 1) { temp += "--"; } return temp + str; } Node* AddTree(Node* root, string str, int count) { str = ChangeStr(str, count); if (root->m.find(str) != root->m.end()) { return root->m[str]; } Node* node = new Node(); nod..