로딩
요청 처리 중입니다...

kakao - 길 찾기 게임

 kakao - 길 찾기 게임

할 때 answer.resize(2); 를 해줘야 한다는 것 까먹지 말기 preorder를 postorder에 복사해서 넣어서 실수함. 기본적인 트리구조 만들기 등 실습해볼 수 있는 기회였음.

//https://kswims.tistory.com/187 #include #include #include #include using namespace std; typedef struct { int x, y, index; }infos; typedef struct node{ struct node *left; struct node *right; int value, x; }nodes; nodes *root; bool cmp( infos& a, infos& b) { if (a.y == b.y) return a.x < b.x; return a.y > b.y; } void linking(nodes *curr, nodes *newNo...