{"id":334,"date":"2013-02-13T18:55:00","date_gmt":"2013-02-13T10:55:00","guid":{"rendered":"http:\/\/nike0good.jp1.rpvhost.net\/238"},"modified":"2013-02-13T18:55:00","modified_gmt":"2013-02-13T10:55:00","slug":"bzoj_1500_noi2005_the_maintenance_series-splay_number_of_columns_maintenance","status":"publish","type":"post","link":"https:\/\/nike0good.com\/?p=334","title":{"rendered":"BZOJ 1500([NOI2005]\u7ef4\u4fee\u6570\u5217-Splay\u7684\u6570\u5217\u7ef4\u62a4)"},"content":{"rendered":"<p><center style=\"font-family:arial,verdana,helvetica,sans-serif; font-size:14px\"><\/p>\n<h2 style=\"color:blue\">1500: [NOI2005]\u7ef4\u4fee\u6570\u5217<\/h2>\n<p><span class=\"green\">Time Limit:&nbsp;<\/span>10 Sec&nbsp;&nbsp;<span class=\"green\">Memory Limit:&nbsp;<\/span>64 MB<br \/>\n<span class=\"green\">Submit:&nbsp;<\/span>3087&nbsp;&nbsp;<span class=\"green\">Solved:&nbsp;<\/span>920<br \/>\n[<a href=\"http:\/\/www.lydsy.com\/JudgeOnline\/submitpage.php?id=1500\" style=\"color:blue; text-decoration:none\">Submit<\/a>][<a href=\"http:\/\/www.lydsy.com\/JudgeOnline\/problemstatus.php?id=1500\" style=\"color:blue; text-decoration:none\">Status<\/a>][<a href=\"http:\/\/www.lydsy.com\/JudgeOnline\/bbs.php?id=1500\" style=\"color:blue; text-decoration:none\">Discuss<\/a>]<\/center><\/p>\n<h2 style=\"font-family:arial,verdana,helvetica,sans-serif; color:blue\">Description<\/h2>\n<div class=\"content\" style=\"font-family:arial,verdana,helvetica,sans-serif; height:auto; background-color:rgb(228,240,248); margin:0px; padding:0px 20px; font-size:14px\">\n<img decoding=\"async\" src=\"http:\/\/nike0good.jp1.rpvhost.net\/wp-content\/uploads\/csdn\/other_site\/img_my_1360751373_4390.png\" alt=\"\" \/><\/div>\n<h2 style=\"font-family:arial,verdana,helvetica,sans-serif; color:blue\">Input<\/h2>\n<div class=\"content\" style=\"font-family:arial,verdana,helvetica,sans-serif; height:auto; background-color:rgb(228,240,248); margin:0px; padding:0px 20px; font-size:14px\">\n\u8f93\u5165\u6587\u4ef6\u7684\u7b2c1\u884c\u5305\u542b\u4e24\u4e2a\u6570N\u548cM\uff0cN\u8868\u793a\u521d\u59cb\u65f6\u6570\u5217\u4e2d\u6570\u7684\u4e2a\u6570\uff0cM\u8868\u793a\u8981\u8fdb\u884c\u7684\u64cd\u4f5c\u6570\u76ee\u3002 \u7b2c2\u884c\u5305\u542bN\u4e2a\u6570\u5b57\uff0c\u63cf\u8ff0\u521d\u59cb\u65f6\u7684\u6570\u5217\u3002 \u4ee5\u4e0bM\u884c\uff0c\u6bcf\u884c\u4e00\u6761\u547d\u4ee4\uff0c&#26684;\u5f0f\u53c2\u89c1\u95ee\u9898\u63cf\u8ff0\u4e2d\u7684\u8868&#26684;\u3002<\/div>\n<h2 style=\"font-family:arial,verdana,helvetica,sans-serif; color:blue\">Output<\/h2>\n<div class=\"content\" style=\"font-family:arial,verdana,helvetica,sans-serif; height:auto; background-color:rgb(228,240,248); margin:0px; padding:0px 20px; font-size:14px\">\n\u5bf9\u4e8e\u8f93\u5165\u6570\u636e\u4e2d\u7684GET-SUM\u548cMAX-SUM\u64cd\u4f5c\uff0c\u5411\u8f93\u51fa\u6587\u4ef6\u4f9d\u6b21\u6253\u5370\u7ed3\u679c\uff0c\u6bcf\u4e2a\u7b54\u6848\uff08\u6570\u5b57\uff09\u5360\u4e00\u884c\u3002<\/div>\n<h2 style=\"font-family:arial,verdana,helvetica,sans-serif; color:blue\">Sample Input<\/h2>\n<div class=\"content\" style=\"font-family:arial,verdana,helvetica,sans-serif; height:auto; background-color:rgb(228,240,248); margin:0px; padding:0px 20px; font-size:14px\">\n<span class=\"sampledata\" style=\"font-family:monospace; white-space:pre; background-color:rgb(141,184,255); font-size:18px\">9 8<br style=\"font-family:arial,verdana,helvetica,sans-serif!important\" \/><br \/>\n2 -6 3 5 1 -5 -3 6 3<br style=\"font-family:arial,verdana,helvetica,sans-serif!important\" \/><br \/>\nGET-SUM 5 4<br style=\"font-family:arial,verdana,helvetica,sans-serif!important\" \/><br \/>\nMAX-SUM<br style=\"font-family:arial,verdana,helvetica,sans-serif!important\" \/><br \/>\nINSERT 8 3 -5 7 2<br style=\"font-family:arial,verdana,helvetica,sans-serif!important\" \/><br \/>\nDELETE 12 1<br style=\"font-family:arial,verdana,helvetica,sans-serif!important\" \/><br \/>\nMAKE-SAME 3 3 2<br style=\"font-family:arial,verdana,helvetica,sans-serif!important\" \/><br \/>\nREVERSE 3 6<br style=\"font-family:arial,verdana,helvetica,sans-serif!important\" \/><br \/>\nGET-SUM 5 4<br style=\"font-family:arial,verdana,helvetica,sans-serif!important\" \/><br \/>\nMAX-SUM<br style=\"font-family:arial,verdana,helvetica,sans-serif!important\" \/><br \/>\n<\/span><\/div>\n<h2 style=\"font-family:arial,verdana,helvetica,sans-serif; color:blue\">Sample Output<\/h2>\n<div class=\"content\" style=\"font-family:arial,verdana,helvetica,sans-serif; height:auto; background-color:rgb(228,240,248); margin:0px; padding:0px 20px; font-size:14px\">\n<span class=\"sampledata\" style=\"font-family:monospace; white-space:pre; background-color:rgb(141,184,255); font-size:18px\">-1<br style=\"font-family:arial,verdana,helvetica,sans-serif!important\" \/><br \/>\n10<br style=\"font-family:arial,verdana,helvetica,sans-serif!important\" \/><br \/>\n1<br style=\"font-family:arial,verdana,helvetica,sans-serif!important\" \/><br \/>\n10<br style=\"font-family:arial,verdana,helvetica,sans-serif!important\" \/><br \/>\n<\/span><\/div>\n<h2 style=\"font-family:arial,verdana,helvetica,sans-serif; color:blue\">HINT<\/h2>\n<div class=\"content\" style=\"font-family:arial,verdana,helvetica,sans-serif; height:auto; background-color:rgb(228,240,248); margin:0px; padding:0px 20px; font-size:14px\">\n<p><img decoding=\"async\" src=\"http:\/\/nike0good.jp1.rpvhost.net\/wp-content\/uploads\/csdn\/other_site\/img_my_1360751380_3687.png\" alt=\"\" \/><\/p>\n<\/div>\n<p><span style=\"font-size:14px\">Splay\u89e3\u51b3\u6570\u5217\u7ef4\u62a4\u3002<\/span><\/p>\n<p><span style=\"font-size:14px\">\u63a8\u8350\uff1a<a href=\"http:\/\/wenku.baidu.com\/view\/db0f77661ed9ad51f01df23f.html\">\u7528\u4f38\u5c55\u6811\u89e3\u51b3\u6570\u5217\u7ef4\u62a4\u95ee\u9898<\/a><\/span><\/p>\n<p>\n<\/p>\n<p><pre name=\"code\" class=\"cpp\">#include&lt;cstdio&gt;\n#include&lt;cstring&gt;\n#include&lt;algorithm&gt;\n#include&lt;functional&gt;\n#include&lt;iostream&gt;\n#include&lt;cstdlib&gt;\n#include&lt;cmath&gt;\nusing namespace std;\n#define MAXN (500000+10)\n#define MAXM (20000+10)\n#define INF (0xfffffff)\nstruct node\n{\n\tint value,MaxL,MaxR,MaxM,sum,size;\n\tbool rev,same;\n\tnode *ch[2],*pre;\n\tnode(node *f,int _value,int _MaxL,int _MaxR,int _MaxM,int _sum,int _size):value(_value),MaxL(_MaxL),MaxR(_MaxR),MaxM(_MaxM),sum(_sum),size(_size){rev=same=0,pre=f,ch[0]=ch[1]=NULL;}\n\tnode(){rev=same=0;}\n\tint l_siz(){if (ch[0]) return ch[0]-&gt;size;else return 0;}\n\/\/\tint r_siz(){return (ch[1])?ch[1]-&gt;size:0;}\n\n\tfriend void pushdown(node *x)\n\t{\n\t\tif (x)\n\t\t{\n\t\t\tif (x-&gt;rev)\n\t\t\t{\n\t\t\t\tx-&gt;rev=0;\n\t\t\t\tif (x-&gt;ch[0]) x-&gt;ch[0]-&gt;rev^=1;\n\t\t\t\tif (x-&gt;ch[1]) x-&gt;ch[1]-&gt;rev^=1;\n\t\t\t\tswap(x-&gt;ch[0],x-&gt;ch[1]);\n\t\t\t\tswap(x-&gt;MaxL,x-&gt;MaxR);\n\t\t\t}\n\t\t\tif (x-&gt;same)\n\t\t\t{\n\t\t\t\tx-&gt;same=0;\n\t\t\t\tif (x-&gt;ch[0]) {x-&gt;ch[0]-&gt;same=1;x-&gt;ch[0]-&gt;value=x-&gt;value;x-&gt;ch[0]-&gt;sum=x-&gt;value*x-&gt;ch[0]-&gt;size;x-&gt;ch[0]-&gt;MaxL=x-&gt;ch[0]-&gt;MaxR=x-&gt;ch[0]-&gt;MaxM=max(x-&gt;value,x-&gt;ch[0]-&gt;sum);}\n\t\t\t\tif (x-&gt;ch[1]) {x-&gt;ch[1]-&gt;same=1;x-&gt;ch[1]-&gt;value=x-&gt;value;x-&gt;ch[1]-&gt;sum=x-&gt;value*x-&gt;ch[1]-&gt;size;x-&gt;ch[1]-&gt;MaxL=x-&gt;ch[1]-&gt;MaxR=x-&gt;ch[1]-&gt;MaxM=max(x-&gt;value,x-&gt;ch[1]-&gt;sum);}\n\t\t\t}\n\t\t}\n\t}\n\tfriend void update(node *x)\n\t{\n\t\tif (x)\n\t\t{\n\t\t\tpushdown(x-&gt;ch[0]);pushdown(x-&gt;ch[1]); \/\/\u7531\u4e8e\u6709\u5751\u7239\u7684rev\u64cd\u4f5c\uff0c\u5fc5\u987b\u5148down.\n\t\t\tx-&gt;size=((x-&gt;ch[0])?x-&gt;ch[0]-&gt;size:0)+((x-&gt;ch[1])?x-&gt;ch[1]-&gt;size:0)+1;\n\t\t\tx-&gt;sum=((x-&gt;ch[0])?x-&gt;ch[0]-&gt;sum:0)+((x-&gt;ch[1])?x-&gt;ch[1]-&gt;sum:0)+x-&gt;value;\n\t\t\tx-&gt;MaxL=max(((x-&gt;ch[0])?x-&gt;ch[0]-&gt;MaxL:x-&gt;value),((x-&gt;ch[0])?x-&gt;ch[0]-&gt;sum:0)+x-&gt;value+max(0,((x-&gt;ch[1])?x-&gt;ch[1]-&gt;MaxL:0)));\n\t\t\tx-&gt;MaxR=max(((x-&gt;ch[1])?x-&gt;ch[1]-&gt;MaxR:x-&gt;value),((x-&gt;ch[1])?x-&gt;ch[1]-&gt;sum:0)+x-&gt;value+max(0,((x-&gt;ch[0])?x-&gt;ch[0]-&gt;MaxR:0)));\n\t\t\/\/\tcout&lt;&lt;((x-&gt;ch[1])?x-&gt;ch[1]-&gt;MaxR:x-&gt;value)&lt;&lt;' '&lt;&lt;+max(0,(((x-&gt;ch[0])?x-&gt;ch[0]-&gt;MaxR:0)))&lt;&lt;endl;\n\t\t\tx-&gt;MaxM=max(max(((x-&gt;ch[0])?x-&gt;ch[0]-&gt;MaxM:x-&gt;value),((x-&gt;ch[1])?x-&gt;ch[1]-&gt;MaxM:x-&gt;value)),((x-&gt;ch[0])?max(x-&gt;ch[0]-&gt;MaxR,0):0)+((x-&gt;ch[1])?max(x-&gt;ch[1]-&gt;MaxL,0):0)+x-&gt;value);\n\t\t}\n\t}\n};\nnode *q[MAXN];\nint q_siz=0;\nint n,m,a[MAXN];\nnode* newnode(node *f,int value,int MaxL,int MaxR,int MaxM,int sum,int size)\n{\n\tif (q_siz)\n\t{\n\t\tq[q_siz]-&gt;value=value;\n\t\tq[q_siz]-&gt;MaxL=MaxL;\n\t\tq[q_siz]-&gt;MaxR=MaxR;\n\t\tq[q_siz]-&gt;MaxM=MaxM;\n\t\tq[q_siz]-&gt;sum=sum;\n\t\tq[q_siz]-&gt;size=size;\n\t\tq[q_siz]-&gt;rev=q[q_siz]-&gt;same=0;q[q_siz]-&gt;pre=f;q[q_siz]-&gt;ch[0]=q[q_siz]-&gt;ch[1]=NULL;\n\t\treturn q[q_siz--];\n\t}\n\tnode *x=new node(f,value,MaxL,MaxR,MaxM,sum,size);\n\treturn x;\n}\nnode* newnode()\n{\n\tif (q_siz) return q[q_siz--];\n\tnode *x=new node();\n\treturn x;\n}\nvoid addnode(node *x)\n{\n\tq[++q_siz]=x;\n\t*x=node();\n}\nstruct Splay\n{\n\tnode *root;\n\tSplay()\n\t{\n\t\troot=newnode(NULL,-INF,-INF,-INF,-INF,0,2);\n\t\troot-&gt;ch[0]=newnode(root,-INF,-INF,-INF,-INF,0,1);\n\t}\n\tvoid Print(node *x)\n\t{\n\t\tif (x-&gt;ch[0]) {cout&lt;&lt;&quot;(&quot;,Print(x-&gt;ch[0]),cout&lt;&lt;&quot;)-&quot;;}\n\t\tcout&lt;&lt;x-&gt;same;\n\t\tif (x-&gt;ch[1]) cout&lt;&lt;&quot;-(&quot;,Print(x-&gt;ch[1]),cout&lt;&lt;&quot;)&quot;;\n\t}\n\tvoid rotate(node *x,int c) \/\/0\u5de6\u65cb 1\u53f3\u65cb\n\t{\n\t\tnode *y=x-&gt;pre;\n\t\tpushdown(y),pushdown(x);\n\t\ty-&gt;ch[!c]=x-&gt;ch[c];\n\t\tif (x-&gt;ch[c]!=NULL) x-&gt;ch[c]-&gt;pre=y;\n\t\tx-&gt;pre=y-&gt;pre;\n\t\tif (y-&gt;pre!=NULL)\n\t\t{\n\t\t\tif (y-&gt;pre-&gt;ch[0]==y) y-&gt;pre-&gt;ch[0]=x;\n\t\t\telse y-&gt;pre-&gt;ch[1]=x;\n\t\t}\n\t\tx-&gt;ch[c]=y;y-&gt;pre=x;\n\t\tif (y==root) root=x;\n\t\tupdate(y);\n\t}\n\tvoid splay(node *x,node *f)\n\t{\n\t\tfor(pushdown(x);x-&gt;pre!=f;)\n\t\t{\n\t\t\tif (x-&gt;pre-&gt;pre==f)\n\t\t\t{\n\t\t\t\tif (x-&gt;pre-&gt;ch[0]==x) rotate(x,1);\n\t\t\t\telse rotate(x,0);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tnode *y=x-&gt;pre,*z=y-&gt;pre;\n\t\t\t\tpushdown(z);pushdown(y);pushdown(x); \/\/rev\u6539\u53d8\u6811\u7ed3\u6784\n\t\t\t\tif (y-&gt;ch[0]==x&amp;&amp;z-&gt;ch[0]==y) rotate(y,1),rotate(x,1);\n\t\t\t\telse if (y-&gt;ch[1]==x&amp;&amp;z-&gt;ch[1]==y) rotate(y,0),rotate(x,0);\n\t\t\t\telse if (y-&gt;ch[0]==x&amp;&amp;z-&gt;ch[1]==y) rotate(x,1),rotate(x,0);\n\t\t\t\telse if (y-&gt;ch[1]==x&amp;&amp;z-&gt;ch[0]==y) rotate(x,0),rotate(x,1);\n\t\t\t}\n\t\t\tupdate(x);\n\t\t\t\/\/Print(root);cout&lt;&lt;endl;\n\t\t}\n\t}\n\tnode* find_kth(node *x,int k)\n\t{\n\t\tpushdown(x); \/\/\u786e\u4fddx\u6b63\u786e\n\t\tif (x-&gt;l_siz()&gt;=k) return find_kth(x-&gt;ch[0],k);\n\t\tif (x-&gt;l_siz()+1==k) return x;\n\t\telse return find_kth(x-&gt;ch[1],k-x-&gt;l_siz()-1);\n\t}\n\tvoid build(node *f,node *x,int l,int r)\n\t{\n\t\tif (l&gt;r) return;\n\t\tint m=(l+r)&gt;&gt;1;\n\t\t*x=node(f,a[m],a[l],a[r],a[m],a[m],1);\n\t\tif (l&lt;m) build(x,x-&gt;ch[0]=newnode(),l,m-1);\n\t\tif (m&lt;r) build(x,x-&gt;ch[1]=newnode(),m+1,r);\n\t\tif (l&lt;r) update(x);\n\t}\n\tvoid del(node *x)\n\t{\n\t\tif (x-&gt;ch[0]) del(x-&gt;ch[0]);\n\t\tif (x-&gt;ch[1]) del(x-&gt;ch[1]);\n\t\taddnode(x);\n\t}\n\tvoid insert(int pos,int tot)\n\t{\n\t\tsplay(find_kth(root,pos+1),NULL);\n\t\tsplay(find_kth(root,pos+2),root);\n\t\troot-&gt;ch[1]-&gt;ch[0]=newnode();\n\t\tbuild(root-&gt;ch[1],root-&gt;ch[1]-&gt;ch[0],1,tot);\n\t\tupdate(root-&gt;ch[1]);update(root);\n\t}\n\tvoid delet(int pos,int tot)\n\t{\n\t\tsplay(find_kth(root,pos),NULL);\n\t\tsplay(find_kth(root,pos+1+tot),root);\n\t\t\/\/Print(root);\n\t\tdel(root-&gt;ch[1]-&gt;ch[0]);\n\t\troot-&gt;ch[1]-&gt;ch[0]=NULL;\n\t\tupdate(root-&gt;ch[1]);update(root);\n\t}\n\tvoid reverse(int pos,int tot)\n\t{\n\t\tsplay(find_kth(root,pos),NULL);\n\t\tsplay(find_kth(root,pos+1+tot),root);\n\t\troot-&gt;ch[1]-&gt;ch[0]-&gt;rev^=1;\n\t\tupdate(root-&gt;ch[1]);update(root);\n\t}\n\tvoid make_same(int pos,int tot,int c)\n\t{\n\t\tsplay(find_kth(root,pos),NULL);\n\t\tsplay(find_kth(root,pos+1+tot),root);\n\t\tnode *x=root-&gt;ch[1]-&gt;ch[0];\n\t\tx-&gt;same=1;\n\t\tx-&gt;value=c;\n\t\tx-&gt;sum=c*x-&gt;size;\n\t\tx-&gt;MaxL=x-&gt;MaxR=x-&gt;MaxM=max(x-&gt;value,x-&gt;sum);\n\t\tupdate(root-&gt;ch[1]);update(root);\n\t}\n\tvoid get_sum(int pos,int tot)\n\t{\n\t\tif (tot==0)\n\t\t{\n\t\t\tprintf(&quot;0n&quot;);\n\t\t\treturn;\n\t\t}\n\t\tsplay(find_kth(root,pos),NULL);\n\t\t\/\/Print(root);cout&lt;&lt;endl;\n\t\tsplay(find_kth(root,pos+1+tot),root);\n\t\t\/\/Print(root);cout&lt;&lt;endl;\n\t\tnode *x=root-&gt;ch[1]-&gt;ch[0];\n\t\tprintf(&quot;%dn&quot;,x-&gt;sum);\n\t}\n\tvoid max_sum()\n\t{\n\t\tsplay(find_kth(root,1),NULL);\n\t\tsplay(find_kth(root,root-&gt;size),root);\n\t\tprintf(&quot;%dn&quot;,root-&gt;ch[1]-&gt;ch[0]-&gt;MaxM);\n\t}\n}S;\nint main()\n{\n\/\/\tfreopen(&quot;bzoj1500.in&quot;,&quot;r&quot;,stdin);\n\tcin&gt;&gt;n&gt;&gt;m;\n\tfor (int i=1;i&lt;=n;i++) cin&gt;&gt;a[i];\n\tS.insert(0,n);\n\t\/\/S.Print(S.root);cout&lt;&lt;endl;\n\tfor (int i=1;i&lt;=m;i++)\n\t{\n\t\/\/\tcout&lt;&lt;i&lt;&lt;':';\n\t\tchar s[10];\n\t\tscanf(&quot;%s&quot;,s);\n\t\tswitch (s[2])\n\t\t{\n\t\t\tcase'S':\n\t\t\t\t{\n\t\t\t\t\tint pos,tot;\n\t\t\t\t\tscanf(&quot;%d%d&quot;,&amp;pos,&amp;tot);\n\t\t\t\t\tfor (int i=1;i&lt;=tot;i++) scanf(&quot;%d&quot;,&amp;a[i]);\n\t\t\t\t\tS.insert(pos,tot);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase'L':\n\t\t\t\t{\n\t\t\t\t\tint pos,tot;\n\t\t\t\t\tscanf(&quot;%d%d&quot;,&amp;pos,&amp;tot);\n\t\t\t\t\tS.delet(pos,tot);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase'K':\n\t\t\t\t{\n\t\t\t\t\tint pos,tot,c;\n\t\t\t\t\tscanf(&quot;%d%d%d&quot;,&amp;pos,&amp;tot,&amp;c);\n\t\t\t\t\tS.make_same(pos,tot,c);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase'V':\n\t\t\t\t{\n\t\t\t\t\tint pos,tot;\n\t\t\t\t\tscanf(&quot;%d%d&quot;,&amp;pos,&amp;tot);\n\t\t\t\t\tS.reverse(pos,tot);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase'T':\n\t\t\t\t{\n\t\t\t\t\tint pos,tot;\n\t\t\t\t\tscanf(&quot;%d%d&quot;,&amp;pos,&amp;tot);\n\t\t\t\t\tS.get_sum(pos,tot);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase'X':\n\t\t\t\t{\n\t\t\t\t\tS.max_sum();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}\n\t\t\/\/S.Print(S.root);cout&lt;&lt;endl;\n\t}\n\treturn 0;\n}<\/pre><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1500: [NOI2005]\u7ef4\u4fee\u6570\u5217 Time Limit:&nbsp;10 Sec&nbsp;&nbsp; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","footnotes":""},"categories":[3],"tags":[47],"class_list":["post-334","post","type-post","status-publish","format-standard","hentry","category-defaultcategory","tag-splay"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>BZOJ 1500([NOI2005]\u7ef4\u4fee\u6570\u5217-Splay\u7684\u6570\u5217\u7ef4\u62a4) - nike0good<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/nike0good.com\/?p=334\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"BZOJ 1500([NOI2005]\u7ef4\u4fee\u6570\u5217-Splay\u7684\u6570\u5217\u7ef4\u62a4) - nike0good\" \/>\n<meta property=\"og:description\" content=\"1500: [NOI2005]\u7ef4\u4fee\u6570\u5217 Time Limit:&nbsp;10 Sec&nbsp;&nbsp; [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/nike0good.com\/?p=334\" \/>\n<meta property=\"og:site_name\" content=\"nike0good\" \/>\n<meta property=\"article:published_time\" content=\"2013-02-13T10:55:00+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/nike0good.jp1.rpvhost.net\/wp-content\/uploads\/csdn\/other_site\/img_my_1360751373_4390.png\" \/>\n<meta name=\"author\" content=\"nike0good\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"nike0good\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=334#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=334\"},\"author\":{\"name\":\"nike0good\",\"@id\":\"https:\\\/\\\/nike0good.com\\\/#\\\/schema\\\/person\\\/4defa38da89de87e400861e73396baad\"},\"headline\":\"BZOJ 1500([NOI2005]\u7ef4\u4fee\u6570\u5217-Splay\u7684\u6570\u5217\u7ef4\u62a4)\",\"datePublished\":\"2013-02-13T10:55:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=334\"},\"wordCount\":53,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=334#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/nike0good.jp1.rpvhost.net\\\/wp-content\\\/uploads\\\/csdn\\\/other_site\\\/img_my_1360751373_4390.png\",\"keywords\":[\"Splay\"],\"articleSection\":[\"DefaultCategory\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/nike0good.com\\\/?p=334#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=334\",\"url\":\"https:\\\/\\\/nike0good.com\\\/?p=334\",\"name\":\"BZOJ 1500([NOI2005]\u7ef4\u4fee\u6570\u5217-Splay\u7684\u6570\u5217\u7ef4\u62a4) - nike0good\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nike0good.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=334#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=334#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/nike0good.jp1.rpvhost.net\\\/wp-content\\\/uploads\\\/csdn\\\/other_site\\\/img_my_1360751373_4390.png\",\"datePublished\":\"2013-02-13T10:55:00+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/nike0good.com\\\/#\\\/schema\\\/person\\\/4defa38da89de87e400861e73396baad\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=334#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/nike0good.com\\\/?p=334\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=334#primaryimage\",\"url\":\"http:\\\/\\\/nike0good.jp1.rpvhost.net\\\/wp-content\\\/uploads\\\/csdn\\\/other_site\\\/img_my_1360751373_4390.png\",\"contentUrl\":\"http:\\\/\\\/nike0good.jp1.rpvhost.net\\\/wp-content\\\/uploads\\\/csdn\\\/other_site\\\/img_my_1360751373_4390.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/nike0good.com\\\/?p=334#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/nike0good.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"BZOJ 1500([NOI2005]\u7ef4\u4fee\u6570\u5217-Splay\u7684\u6570\u5217\u7ef4\u62a4)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/nike0good.com\\\/#website\",\"url\":\"https:\\\/\\\/nike0good.com\\\/\",\"name\":\"nike0good\",\"description\":\"\u6709\u6240\u4f5c\u4e3a\u662f\u4eba\u751f\u7684\u6700\u9ad8\u5883\u754c\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/nike0good.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/nike0good.com\\\/#\\\/schema\\\/person\\\/4defa38da89de87e400861e73396baad\",\"name\":\"nike0good\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8e5fa08d5c367a1a6fb5ff13bb10ed5a331f981513256951290ae42322da6854?s=96&d=identicon&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8e5fa08d5c367a1a6fb5ff13bb10ed5a331f981513256951290ae42322da6854?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8e5fa08d5c367a1a6fb5ff13bb10ed5a331f981513256951290ae42322da6854?s=96&d=identicon&r=g\",\"caption\":\"nike0good\"},\"sameAs\":[\"https:\\\/\\\/nike0good.com\"],\"url\":\"https:\\\/\\\/nike0good.com\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"BZOJ 1500([NOI2005]\u7ef4\u4fee\u6570\u5217-Splay\u7684\u6570\u5217\u7ef4\u62a4) - nike0good","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/nike0good.com\/?p=334","og_locale":"zh_CN","og_type":"article","og_title":"BZOJ 1500([NOI2005]\u7ef4\u4fee\u6570\u5217-Splay\u7684\u6570\u5217\u7ef4\u62a4) - nike0good","og_description":"1500: [NOI2005]\u7ef4\u4fee\u6570\u5217 Time Limit:&nbsp;10 Sec&nbsp;&nbsp; [&hellip;]","og_url":"https:\/\/nike0good.com\/?p=334","og_site_name":"nike0good","article_published_time":"2013-02-13T10:55:00+00:00","og_image":[{"url":"http:\/\/nike0good.jp1.rpvhost.net\/wp-content\/uploads\/csdn\/other_site\/img_my_1360751373_4390.png","type":"","width":"","height":""}],"author":"nike0good","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"nike0good","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"8 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/nike0good.com\/?p=334#article","isPartOf":{"@id":"https:\/\/nike0good.com\/?p=334"},"author":{"name":"nike0good","@id":"https:\/\/nike0good.com\/#\/schema\/person\/4defa38da89de87e400861e73396baad"},"headline":"BZOJ 1500([NOI2005]\u7ef4\u4fee\u6570\u5217-Splay\u7684\u6570\u5217\u7ef4\u62a4)","datePublished":"2013-02-13T10:55:00+00:00","mainEntityOfPage":{"@id":"https:\/\/nike0good.com\/?p=334"},"wordCount":53,"commentCount":0,"image":{"@id":"https:\/\/nike0good.com\/?p=334#primaryimage"},"thumbnailUrl":"http:\/\/nike0good.jp1.rpvhost.net\/wp-content\/uploads\/csdn\/other_site\/img_my_1360751373_4390.png","keywords":["Splay"],"articleSection":["DefaultCategory"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/nike0good.com\/?p=334#respond"]}]},{"@type":"WebPage","@id":"https:\/\/nike0good.com\/?p=334","url":"https:\/\/nike0good.com\/?p=334","name":"BZOJ 1500([NOI2005]\u7ef4\u4fee\u6570\u5217-Splay\u7684\u6570\u5217\u7ef4\u62a4) - nike0good","isPartOf":{"@id":"https:\/\/nike0good.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/nike0good.com\/?p=334#primaryimage"},"image":{"@id":"https:\/\/nike0good.com\/?p=334#primaryimage"},"thumbnailUrl":"http:\/\/nike0good.jp1.rpvhost.net\/wp-content\/uploads\/csdn\/other_site\/img_my_1360751373_4390.png","datePublished":"2013-02-13T10:55:00+00:00","author":{"@id":"https:\/\/nike0good.com\/#\/schema\/person\/4defa38da89de87e400861e73396baad"},"breadcrumb":{"@id":"https:\/\/nike0good.com\/?p=334#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/nike0good.com\/?p=334"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/nike0good.com\/?p=334#primaryimage","url":"http:\/\/nike0good.jp1.rpvhost.net\/wp-content\/uploads\/csdn\/other_site\/img_my_1360751373_4390.png","contentUrl":"http:\/\/nike0good.jp1.rpvhost.net\/wp-content\/uploads\/csdn\/other_site\/img_my_1360751373_4390.png"},{"@type":"BreadcrumbList","@id":"https:\/\/nike0good.com\/?p=334#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/nike0good.com\/"},{"@type":"ListItem","position":2,"name":"BZOJ 1500([NOI2005]\u7ef4\u4fee\u6570\u5217-Splay\u7684\u6570\u5217\u7ef4\u62a4)"}]},{"@type":"WebSite","@id":"https:\/\/nike0good.com\/#website","url":"https:\/\/nike0good.com\/","name":"nike0good","description":"\u6709\u6240\u4f5c\u4e3a\u662f\u4eba\u751f\u7684\u6700\u9ad8\u5883\u754c","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/nike0good.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/nike0good.com\/#\/schema\/person\/4defa38da89de87e400861e73396baad","name":"nike0good","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/secure.gravatar.com\/avatar\/8e5fa08d5c367a1a6fb5ff13bb10ed5a331f981513256951290ae42322da6854?s=96&d=identicon&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8e5fa08d5c367a1a6fb5ff13bb10ed5a331f981513256951290ae42322da6854?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8e5fa08d5c367a1a6fb5ff13bb10ed5a331f981513256951290ae42322da6854?s=96&d=identicon&r=g","caption":"nike0good"},"sameAs":["https:\/\/nike0good.com"],"url":"https:\/\/nike0good.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/nike0good.com\/index.php?rest_route=\/wp\/v2\/posts\/334","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nike0good.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nike0good.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nike0good.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nike0good.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=334"}],"version-history":[{"count":0,"href":"https:\/\/nike0good.com\/index.php?rest_route=\/wp\/v2\/posts\/334\/revisions"}],"wp:attachment":[{"href":"https:\/\/nike0good.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=334"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nike0good.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=334"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nike0good.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=334"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}