bzoj 1269 文本编辑器editor splay(二)
); } else if(cmd[0] == 'R'){ scanf("%d",&x); spt.ROTATE(x); } else if(cmd[0] == 'G'){ spt.rotateto(pos+1,null); printf("%c\n",root->val); } /*printf("----------cmd=%d-------------\n",++kase); printf("pos=%d sz=%d\n",pos,root->sz); printf("%c\n",L(R(root))->val); spt.print(root); printf("-------------------------------------\n");*/ } } return 0; }