摘要: splay第一道题,没什么感想。 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxn=1000010; 6 int pre[maxn],ch[maxn][2],key[maxn]; 7 int root,tot; 8 void newnode(int &r,int fa,int k) 9 { 10 r=++tot; 11 pre[r]=fa; 12 key[r]=k; 13 ch[r][1]=ch[r][0]=0; 14 } 15 void initi... 阅读全文
posted @ 2013-11-06 15:21 sooflow 阅读(163) 评论(0) 推荐(0) 编辑