class Solution { public: struct Node { int key,val; Node *left,*right; Node(int _key,int _val):key(_key),val(_val),left(NULL),right(NULL){} }*L,*R; Solution(){ //初始化 L=new Node(-1,-1); R=new Node(-1,-1); L->right=R; R->lef...