#include <iostream>
#include <map>
using namespace std;
map<int,int> father;//store node's father
typedef struct BTNode {
int value;
struct BTNode* lc, * rc;
}BTNode, * BST;
void InsertTree(BST& T,int temp, int x)
{
if (T == NULL)
{
T = new BTNode;
T...