{"id":1258,"date":"2019-09-26T20:25:27","date_gmt":"2019-09-26T12:25:27","guid":{"rendered":"https:\/\/mnihyc.com\/blog\/?p=1258"},"modified":"2020-04-22T11:43:13","modified_gmt":"2020-04-22T03:43:13","slug":"csp-s-2019-%e5%9b%9b%e6%a0%a1%e8%81%94%e8%ae%ad-round-1%e6%a0%91%e4%b8%8a%e6%8e%92%e5%88%97","status":"publish","type":"post","link":"https:\/\/mnihyc.com\/blog\/archives\/1258","title":{"rendered":"YZOJ P4578 [CSP-S 2019 \u56db\u6821\u8054\u8bad Round 1]\u6811\u4e0a\u6392\u5217"},"content":{"rendered":"<h1 style=\"text-align: center;\">YZOJ P4578 [CSP-S 2019 \u56db\u6821\u8054\u8bad Round 1]\u6811\u4e0a\u6392\u5217<\/h1>\n<p style=\"text-align: center;\">\u65f6\u95f4\u9650\u5236\uff1a4000MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a524288KB<\/p>\n<p style=\"text-align: center;\">\u96be\u5ea6\uff1a<span style=\"color: #ff6600;\">\\(7.0\\)<\/span><\/p>\n<ul>\n<li>\n<h3><strong>\u9898\u76ee\u63cf\u8ff0<\/strong><\/h3>\n<\/li>\n<\/ul>\n<p>\u7ed9\u5b9a\u4e00\u9897 \\(n\\) \u4e2a\u70b9\u7684\u6811\u3002\u6bcf\u4e2a\u70b9\u90fd\u4e00\u4e2a\u6b63\u6574\u6570\u70b9\u6743 \\(A_i\\)\uff0c\u4f60\u9700\u8981\u652f\u6301\u4ee5\u4e0b\u4e24\u79cd\u64cd\u4f5c\uff1a<\/p>\n<p>1\u3001\u8be2\u95ee\u70b9 \\(x\\) \u548c\u70b9 \\(y\\) \u4e4b\u95f4\u7684\u8def\u5f84\u4e0a\u7684\u6240\u6709\u70b9\uff08\u5305\u62ec\u70b9 \\(x\\) \u548c\u70b9 \\(y\\) \uff09\u7684\u70b9\u6743\u662f\u5426\u6784\u6210\u4e00\u4e2a\u4ece \\(1\\) \u5f00\u59cb\u7684\u6392\u5217\u3002<\/p>\n<p>2\u3001\u5c06 \\(A_x\\) \u4fee\u6539\u4e3a \\(y\\)\u3002<\/p>\n<ul>\n<li>\n<h3><strong>\u8f93\u5165\u683c\u5f0f<\/strong><\/h3>\n<\/li>\n<\/ul>\n<p>\u7b2c\u4e00\u884c\u4e00\u4e2a\u6b63\u6574\u6570 \\(T\\) \u8868\u793a\u6570\u636e\u7ec4\u6570\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\u4e00\u884c\u8f93\u5165\u4e24\u4e2a\u6b63\u6574\u6570 \\(n,q\\) \u8868\u793a\u6570\u7684\u70b9\u6570\u548c\u8be2\u95ee\u4e2a\u6570\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\u4e00\u884c \\(n\\) \u4e2a\u6b63\u6574\u6570\uff0c\u7b2c \\(i\\) \u4e2a\u6b63\u6574\u6570\u8868\u793a \\(A_i\\) \u7684\u521d\u503c\u3002<\/p>\n<p>\u63a5\u4e0b\u6765 \\(n-1\\) \u884c\u6bcf\u884c\u4e24\u4e2a\u6b63\u6574\u6570 \\(u,v\\) \u8868\u793a\u6811\u4e0a\u7684\u4e00\u6761\u8fb9 \\((u,v)\\) \u3002<\/p>\n<p>\u63a5\u4e0b\u6765 \\(n\\) \u884c\u6bcf\u884c\u4e09\u4e2a\u6b63\u6574\u6570 \\(tp,x,y\\) \u8868\u793a\u4e00\u4e2a\u64cd\u4f5c\uff0c\u5176\u4e2d \\(tp\\) \u8868\u793a\u64cd\u4f5c\u79cd\u7c7b\u3002<\/p>\n<ul>\n<li>\n<h3><strong>\u8f93\u51fa\u683c\u5f0f<\/strong><\/h3>\n<\/li>\n<\/ul>\n<p>\u5bf9\u4e8e\u6bcf\u4e00\u4e2a\u64cd\u4f5c \\(1\\) \u5982\u679c\u7b26\u5408\u6761\u4ef6\uff0c\u8f93\u51fa <code>Yes<\/code> \uff0c\u5426\u5219\u8f93\u51fa <code>No<\/code> \u3002<\/p>\n<p><!--more--><\/p>\n<ul>\n<li>\n<h3><strong>\u6837\u4f8b\u8f93\u5165<\/strong><\/h3>\n<\/li>\n<\/ul>\n<pre class=\"lang:default decode:true \">1\r\n10 5\r\n1 2 3 4 5 6 7 8 9 10\r\n1 2\r\n1 3\r\n2 4\r\n2 5\r\n3 9\r\n4 10\r\n5 6\r\n5 7\r\n5 8\r\n1 4 3\r\n1 10 3\r\n2 10 5\r\n1 10 3\r\n1 5 3<\/pre>\n<ul>\n<li>\n<h3><strong>\u6837\u4f8b\u8f93\u51fa<\/strong><\/h3>\n<\/li>\n<\/ul>\n<pre class=\"lang:default decode:true \">Yes\r\nNo\r\nYes\r\nNo<\/pre>\n<ul>\n<li>\n<h3><strong>\u6570\u636e\u89c4\u6a21\u4e0e\u7ea6\u5b9a<\/strong><\/h3>\n<\/li>\n<\/ul>\n<p>\u4fdd\u8bc1 \\(1 \\leq T \\leq 10\\)\uff0c\\(1 \\leq n,q \\leq 2.5 \\times 10^5\\)\uff0c\\(1 \\leq \\sum n,\\sum q \\leq 5 \\times 10^5\\)\uff0c\\(1 \\leq u,v,x,y,A_i \\leq n\\)\uff0c\\(1 \\leq tp \\leq 2\\)\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Source\uff1a<a href=\"https:\/\/www.codechef.com\/LTIME73A\/problems\/QRYLAND\">Codechef LTIME73A QRYLAND<\/a><\/p>\n<p><!--more--><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u5176\u5b9e\u662f\u6c34\u9898\u3002<\/p>\n<p>\u6ce8\u610f\u5230 \\(1\\) \u5230 \\(len\\) \u7684\u6392\u5217\u662f\u59cb\u7ec8\u4e0d\u53d8\u7684\uff0c\u6240\u4ee5\u53ef\u4ee5\u76f4\u63a5\u9884\u5904\u7406\uff0c\u73b0\u5728\u53ea\u9700\u8981\u5224\u65ad\u4e24\u4e2a\u70b9\u6743\u7684\u96c6\u5408\u662f\u5426\u76f8\u7b49\u3002<\/p>\n<p>\u5bb9\u6613\u60f3\u5230<strong>\u5f02\u6216 hash<\/strong>\uff0c\u5bf9\u4e8e\u6bcf\u4e2a \\(a_i\\) \u90fd\u968f\u4e00\u4e2a\u6743\u503c\uff0c\u8bb0 \\(f_i\\) \u4e3a \\(i\\) \u5230\u6839\u8def\u5f84\u4e0a\u6743\u503c\u7684\u5f02\u6216\u548c\uff0c\u6811\u72b6\u6570\u7ec4\u7ef4\u62a4 dfn \u5373\u53ef\u3002<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"lang:default decode:true \">#include &lt;cstdio&gt;\r\n#include &lt;cstdlib&gt;\r\n#include &lt;cstring&gt;\r\n#include &lt;climits&gt;\r\n#include &lt;ctime&gt;\r\n\r\n#define _max(_a_,_b_) ((_a_)&gt;(_b_)?(_a_):(_b_))\r\n\r\n#ifdef ONLINE_JUDGE\r\n\tchar __B[1&lt;&lt;15],*__S=__B,*__T=__B;\r\n\t#define getchar() (__S==__T&amp;&amp;(__T=(__S=__B)+fread(__B,1,1&lt;&lt;15,stdin),__S==__T)?EOF:*__S++)\r\n#endif\r\ninline int getnum()\r\n{\r\n\tregister char c=0;\r\n\twhile(!(c&gt;='0' &amp;&amp; c&lt;='9'))\r\n\t\tc=getchar();\r\n\tregister int a=0;\r\n\twhile(c&gt;='0' &amp;&amp; c&lt;='9')\r\n\t\ta=a*10+c-'0',c=getchar();\r\n\treturn a;\r\n}\r\n\r\nint a[255050],wN,w[250505];\r\n\r\n#define _lowbit(_x) ((_x)&amp;-(_x))\r\nint N,f[250505];\r\ninline void updatef(register int pos,const int&amp;val)\r\n{\r\n\twhile(pos&lt;=N)\r\n\t\tf[pos]^=val,pos+=_lowbit(pos);\r\n}\r\n\r\ninline int queryf(register int pos)\r\n{\r\n\tregister int ans=0;\r\n\twhile(pos)\r\n\t\tans^=f[pos],pos-=_lowbit(pos);\r\n\treturn ans;\r\n}\r\n\r\nint gcnt,ghead[250505],gnext[505050],gnode[505050];\r\ninline void InsertLine(register int s,register int t)\r\n{\r\n\tgnext[++gcnt]=ghead[s],ghead[s]=gcnt,gnode[gcnt]=t;\r\n\tgnext[++gcnt]=ghead[t],ghead[t]=gcnt,gnode[gcnt]=s;\r\n}\r\n\r\nint depth[250505],father[250505],size[250505],son[250505],top[250505];\r\nvoid DFS0(register int o)\r\n{\r\n\tsize[o]=1;\r\n\tfor(register int j=ghead[o],t;j;j=gnext[j])\r\n\t\tif((t=gnode[j]) != father[o])\r\n\t\t{\r\n\t\t\tdepth[t]=depth[o]+1,father[t]=o;\r\n\t\t\tDFS0(t);\r\n\t\t\tsize[o]+=size[t];\r\n\t\t\t(size[t]&gt;size[son[o]] ? son[o]=t : 0);\r\n\t\t}\r\n}\r\n\r\nint dfcnt,dfn[250505];\r\nvoid DFS1(register int o)\r\n{\r\n\tdfn[o]=++dfcnt;\r\n\tif(o==son[father[o]])\r\n\t\ttop[o]=top[father[o]];\r\n\telse\r\n\t\ttop[o]=o;\r\n\tfor(register int j=ghead[o],t;j;j=gnext[j])\r\n\t\tif((t=gnode[j]) != father[o])\r\n\t\t\tDFS1(t);\r\n\tupdatef(dfn[o],w[a[o]]),updatef(dfn[o]+size[o],w[a[o]]);\r\n}\r\n\r\ninline int GetLCA(register int x,register int y)\r\n{\r\n\twhile(top[x] != top[y])\r\n\t\tif(depth[top[x]] &gt; depth[top[y]])\r\n\t\t\tx=father[top[x]];\r\n\t\telse\r\n\t\t\ty=father[top[y]];\r\n\treturn (depth[x]&lt;depth[y] ? x : y);\r\n}\r\n\r\nint pxw[250505];\r\n\r\nint main()\r\n{\r\n\tsrand(time(NULL));\r\n\tregister int _T=getnum(),mxa=0;\r\n\twhile(_T--)\r\n\t{\r\n\t\tregister int N=getnum(),Q=getnum();\r\n\t\t::N=N;\r\n\t\tfor(register int i=1;i&lt;=N;i++)\r\n\t\t\ta[i]=getnum(),mxa=_max(mxa,a[i]);\r\n\t\tfor(register int i=wN+1;i&lt;=mxa;i++)\r\n\t\t\tw[i]=rand(),pxw[i]=pxw[i-1]^w[i];\r\n\t\twN=_max(wN,mxa);\r\n\t\tgcnt=0,memset(ghead,0,sizeof(ghead));\r\n\t\tfor(register int i=1;i&lt;=N-1;i++)\r\n\t\t\tInsertLine(getnum(),getnum());\r\n\t\t\r\n\t\tdfcnt=0,memset(son,0,sizeof(son));\r\n\t\tmemset(f,0,sizeof(f));\r\n\t\tDFS0(1),DFS1(1);\r\n\t\t\r\n\t\tfor(register int lp=1;lp&lt;=Q;lp++)\r\n\t\t{\r\n\t\t\tregister int tp=getnum(),x=getnum(),y=getnum();\r\n\t\t\tif(tp==1)\r\n\t\t\t{\r\n\t\t\t\tregister int lca=GetLCA(x,y);\r\n\t\t\t\tregister int ans=queryf(dfn[x])^queryf(dfn[y])^w[a[lca]];\r\n\t\t\t\tif(ans==pxw[depth[x]+depth[y]-(depth[lca]&lt;&lt;1)+1])\r\n\t\t\t\t\tputchar('Y'),putchar('e'),putchar('s');\r\n\t\t\t\telse\r\n\t\t\t\t\tputchar('N'),putchar('o');\r\n\t\t\t\tputchar('\\n');\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tupdatef(dfn[x],w[a[x]]),updatef(dfn[x]+size[x],w[a[x]]);\r\n\t\t\t\ta[x]=y;\r\n\t\t\t\tupdatef(dfn[x],w[a[x]]),updatef(dfn[x]+size[x],w[a[x]]);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn 0;\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>YZOJ P4578 [CSP-S 2019 \u56db\u6821\u8054\u8bad Round 1]\u6811\u4e0a\u6392\u5217 \u65f6\u95f4\u9650\u5236\uff1a4000MS \u00a0\u00a0 &hellip; <a href=\"https:\/\/mnihyc.com\/blog\/archives\/1258\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">YZOJ P4578 [CSP-S 2019 \u56db\u6821\u8054\u8bad Round 1]\u6811\u4e0a\u6392\u5217<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37,19,47],"tags":[],"class_list":["post-1258","post","type-post","status-publish","format-standard","hentry","category-crazya","category-hash","category-fenwicktree"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>YZOJ P4578 [CSP-S 2019 \u56db\u6821\u8054\u8bad Round 1]\u6811\u4e0a\u6392\u5217 - mnihyc&#039;s Blog<\/title>\n<meta name=\"description\" content=\"YZOJ P4578 \u6811\u4e0a\u6392\u5217 \u65f6\u95f4\u9650\u5236\uff1a4000MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a524288KB \u96be\u5ea6\uff1a \u9898\u76ee\u63cf\u8ff0 \u7ed9\u5b9a\u4e00\u9897 (n) \u4e2a\u70b9\u7684\u6811\u3002\u6bcf\u4e2a\u70b9\u90fd\u4e00\u4e2a\u6b63\u6574\u6570\u70b9\u6743 (A_i)\uff0c\u4f60\u9700\u8981\u652f\u6301\u4ee5\u4e0b\u4e24\u79cd\u64cd\u4f5c\uff1a 1\u3001\u8be2\u95ee\u70b9 (x) \u548c\u70b9 (y) \u4e4b\u95f4\u7684\u8def\u5f84\u4e0a\u7684\u6240\u6709\u70b9\uff08\u5305\u62ec\u70b9 (x) \u548c\u70b9\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mnihyc.com\/blog\/archives\/1258\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"YZOJ P4578 [CSP-S 2019 \u56db\u6821\u8054\u8bad Round 1]\u6811\u4e0a\u6392\u5217 - mnihyc&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"YZOJ P4578 \u6811\u4e0a\u6392\u5217 \u65f6\u95f4\u9650\u5236\uff1a4000MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a524288KB \u96be\u5ea6\uff1a \u9898\u76ee\u63cf\u8ff0 \u7ed9\u5b9a\u4e00\u9897 (n) \u4e2a\u70b9\u7684\u6811\u3002\u6bcf\u4e2a\u70b9\u90fd\u4e00\u4e2a\u6b63\u6574\u6570\u70b9\u6743 (A_i)\uff0c\u4f60\u9700\u8981\u652f\u6301\u4ee5\u4e0b\u4e24\u79cd\u64cd\u4f5c\uff1a 1\u3001\u8be2\u95ee\u70b9 (x) \u548c\u70b9 (y) \u4e4b\u95f4\u7684\u8def\u5f84\u4e0a\u7684\u6240\u6709\u70b9\uff08\u5305\u62ec\u70b9 (x) \u548c\u70b9\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mnihyc.com\/blog\/archives\/1258\" \/>\n<meta property=\"og:site_name\" content=\"mnihyc&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-09-26T12:25:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-04-22T03:43:13+00:00\" \/>\n<meta name=\"author\" content=\"mnihyc\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@mnihyc\" \/>\n<meta name=\"twitter:site\" content=\"@mnihyc\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"mnihyc\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/mnihyc.com\/blog\/archives\/1258#article\",\"isPartOf\":{\"@id\":\"https:\/\/mnihyc.com\/blog\/archives\/1258\"},\"author\":{\"name\":\"mnihyc\",\"@id\":\"https:\/\/mnihyc.com\/blog\/#\/schema\/person\/61e167d6d591fdd20dcfee2cf848a751\"},\"headline\":\"YZOJ P4578 [CSP-S 2019 \u56db\u6821\u8054\u8bad Round 1]\u6811\u4e0a\u6392\u5217\",\"datePublished\":\"2019-09-26T12:25:27+00:00\",\"dateModified\":\"2020-04-22T03:43:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/mnihyc.com\/blog\/archives\/1258\"},\"wordCount\":87,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/mnihyc.com\/blog\/#\/schema\/person\/61e167d6d591fdd20dcfee2cf848a751\"},\"articleSection\":[\"7.0 ~ 8.0\",\"\u54c8\u5e0c\uff08Hash\uff09\",\"\u6811\u72b6\u6570\u7ec4\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/mnihyc.com\/blog\/archives\/1258#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mnihyc.com\/blog\/archives\/1258\",\"url\":\"https:\/\/mnihyc.com\/blog\/archives\/1258\",\"name\":\"YZOJ P4578 [CSP-S 2019 \u56db\u6821\u8054\u8bad Round 1]\u6811\u4e0a\u6392\u5217 - mnihyc&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\/\/mnihyc.com\/blog\/#website\"},\"datePublished\":\"2019-09-26T12:25:27+00:00\",\"dateModified\":\"2020-04-22T03:43:13+00:00\",\"description\":\"YZOJ P4578 \u6811\u4e0a\u6392\u5217 \u65f6\u95f4\u9650\u5236\uff1a4000MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a524288KB \u96be\u5ea6\uff1a \u9898\u76ee\u63cf\u8ff0 \u7ed9\u5b9a\u4e00\u9897 \\\\(n\\\\) \u4e2a\u70b9\u7684\u6811\u3002\u6bcf\u4e2a\u70b9\u90fd\u4e00\u4e2a\u6b63\u6574\u6570\u70b9\u6743 \\\\(A_i\\\\)\uff0c\u4f60\u9700\u8981\u652f\u6301\u4ee5\u4e0b\u4e24\u79cd\u64cd\u4f5c\uff1a 1\u3001\u8be2\u95ee\u70b9 \\\\(x\\\\) \u548c\u70b9 \\\\(y\\\\) \u4e4b\u95f4\u7684\u8def\u5f84\u4e0a\u7684\u6240\u6709\u70b9\uff08\u5305\u62ec\u70b9 \\\\(x\\\\) \u548c\u70b9\",\"breadcrumb\":{\"@id\":\"https:\/\/mnihyc.com\/blog\/archives\/1258#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mnihyc.com\/blog\/archives\/1258\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/mnihyc.com\/blog\/archives\/1258#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/mnihyc.com\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"YZOJ P4578 [CSP-S 2019 \u56db\u6821\u8054\u8bad Round 1]\u6811\u4e0a\u6392\u5217\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mnihyc.com\/blog\/#website\",\"url\":\"https:\/\/mnihyc.com\/blog\/\",\"name\":\"mnihyc&#039;s Blog\",\"description\":\"Welcome!\",\"publisher\":{\"@id\":\"https:\/\/mnihyc.com\/blog\/#\/schema\/person\/61e167d6d591fdd20dcfee2cf848a751\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mnihyc.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/mnihyc.com\/blog\/#\/schema\/person\/61e167d6d591fdd20dcfee2cf848a751\",\"name\":\"mnihyc\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/mnihyc.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8d111f863afc3f98816bc96220f97077d470a96f41088de9f19530fc480f8e72?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8d111f863afc3f98816bc96220f97077d470a96f41088de9f19530fc480f8e72?s=96&d=mm&r=g\",\"caption\":\"mnihyc\"},\"logo\":{\"@id\":\"https:\/\/mnihyc.com\/blog\/#\/schema\/person\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"YZOJ P4578 [CSP-S 2019 \u56db\u6821\u8054\u8bad Round 1]\u6811\u4e0a\u6392\u5217 - mnihyc&#039;s Blog","description":"YZOJ P4578 \u6811\u4e0a\u6392\u5217 \u65f6\u95f4\u9650\u5236\uff1a4000MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a524288KB \u96be\u5ea6\uff1a \u9898\u76ee\u63cf\u8ff0 \u7ed9\u5b9a\u4e00\u9897 (n) \u4e2a\u70b9\u7684\u6811\u3002\u6bcf\u4e2a\u70b9\u90fd\u4e00\u4e2a\u6b63\u6574\u6570\u70b9\u6743 (A_i)\uff0c\u4f60\u9700\u8981\u652f\u6301\u4ee5\u4e0b\u4e24\u79cd\u64cd\u4f5c\uff1a 1\u3001\u8be2\u95ee\u70b9 (x) \u548c\u70b9 (y) \u4e4b\u95f4\u7684\u8def\u5f84\u4e0a\u7684\u6240\u6709\u70b9\uff08\u5305\u62ec\u70b9 (x) \u548c\u70b9","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:\/\/mnihyc.com\/blog\/archives\/1258","og_locale":"zh_CN","og_type":"article","og_title":"YZOJ P4578 [CSP-S 2019 \u56db\u6821\u8054\u8bad Round 1]\u6811\u4e0a\u6392\u5217 - mnihyc&#039;s Blog","og_description":"YZOJ P4578 \u6811\u4e0a\u6392\u5217 \u65f6\u95f4\u9650\u5236\uff1a4000MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a524288KB \u96be\u5ea6\uff1a \u9898\u76ee\u63cf\u8ff0 \u7ed9\u5b9a\u4e00\u9897 (n) \u4e2a\u70b9\u7684\u6811\u3002\u6bcf\u4e2a\u70b9\u90fd\u4e00\u4e2a\u6b63\u6574\u6570\u70b9\u6743 (A_i)\uff0c\u4f60\u9700\u8981\u652f\u6301\u4ee5\u4e0b\u4e24\u79cd\u64cd\u4f5c\uff1a 1\u3001\u8be2\u95ee\u70b9 (x) \u548c\u70b9 (y) \u4e4b\u95f4\u7684\u8def\u5f84\u4e0a\u7684\u6240\u6709\u70b9\uff08\u5305\u62ec\u70b9 (x) \u548c\u70b9","og_url":"https:\/\/mnihyc.com\/blog\/archives\/1258","og_site_name":"mnihyc&#039;s Blog","article_published_time":"2019-09-26T12:25:27+00:00","article_modified_time":"2020-04-22T03:43:13+00:00","author":"mnihyc","twitter_card":"summary_large_image","twitter_creator":"@mnihyc","twitter_site":"@mnihyc","twitter_misc":{"\u4f5c\u8005":"mnihyc","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mnihyc.com\/blog\/archives\/1258#article","isPartOf":{"@id":"https:\/\/mnihyc.com\/blog\/archives\/1258"},"author":{"name":"mnihyc","@id":"https:\/\/mnihyc.com\/blog\/#\/schema\/person\/61e167d6d591fdd20dcfee2cf848a751"},"headline":"YZOJ P4578 [CSP-S 2019 \u56db\u6821\u8054\u8bad Round 1]\u6811\u4e0a\u6392\u5217","datePublished":"2019-09-26T12:25:27+00:00","dateModified":"2020-04-22T03:43:13+00:00","mainEntityOfPage":{"@id":"https:\/\/mnihyc.com\/blog\/archives\/1258"},"wordCount":87,"commentCount":0,"publisher":{"@id":"https:\/\/mnihyc.com\/blog\/#\/schema\/person\/61e167d6d591fdd20dcfee2cf848a751"},"articleSection":["7.0 ~ 8.0","\u54c8\u5e0c\uff08Hash\uff09","\u6811\u72b6\u6570\u7ec4"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/mnihyc.com\/blog\/archives\/1258#respond"]}]},{"@type":"WebPage","@id":"https:\/\/mnihyc.com\/blog\/archives\/1258","url":"https:\/\/mnihyc.com\/blog\/archives\/1258","name":"YZOJ P4578 [CSP-S 2019 \u56db\u6821\u8054\u8bad Round 1]\u6811\u4e0a\u6392\u5217 - mnihyc&#039;s Blog","isPartOf":{"@id":"https:\/\/mnihyc.com\/blog\/#website"},"datePublished":"2019-09-26T12:25:27+00:00","dateModified":"2020-04-22T03:43:13+00:00","description":"YZOJ P4578 \u6811\u4e0a\u6392\u5217 \u65f6\u95f4\u9650\u5236\uff1a4000MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a524288KB \u96be\u5ea6\uff1a \u9898\u76ee\u63cf\u8ff0 \u7ed9\u5b9a\u4e00\u9897 \\(n\\) \u4e2a\u70b9\u7684\u6811\u3002\u6bcf\u4e2a\u70b9\u90fd\u4e00\u4e2a\u6b63\u6574\u6570\u70b9\u6743 \\(A_i\\)\uff0c\u4f60\u9700\u8981\u652f\u6301\u4ee5\u4e0b\u4e24\u79cd\u64cd\u4f5c\uff1a 1\u3001\u8be2\u95ee\u70b9 \\(x\\) \u548c\u70b9 \\(y\\) \u4e4b\u95f4\u7684\u8def\u5f84\u4e0a\u7684\u6240\u6709\u70b9\uff08\u5305\u62ec\u70b9 \\(x\\) \u548c\u70b9","breadcrumb":{"@id":"https:\/\/mnihyc.com\/blog\/archives\/1258#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mnihyc.com\/blog\/archives\/1258"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/mnihyc.com\/blog\/archives\/1258#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/mnihyc.com\/blog"},{"@type":"ListItem","position":2,"name":"YZOJ P4578 [CSP-S 2019 \u56db\u6821\u8054\u8bad Round 1]\u6811\u4e0a\u6392\u5217"}]},{"@type":"WebSite","@id":"https:\/\/mnihyc.com\/blog\/#website","url":"https:\/\/mnihyc.com\/blog\/","name":"mnihyc&#039;s Blog","description":"Welcome!","publisher":{"@id":"https:\/\/mnihyc.com\/blog\/#\/schema\/person\/61e167d6d591fdd20dcfee2cf848a751"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mnihyc.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/mnihyc.com\/blog\/#\/schema\/person\/61e167d6d591fdd20dcfee2cf848a751","name":"mnihyc","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/mnihyc.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8d111f863afc3f98816bc96220f97077d470a96f41088de9f19530fc480f8e72?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8d111f863afc3f98816bc96220f97077d470a96f41088de9f19530fc480f8e72?s=96&d=mm&r=g","caption":"mnihyc"},"logo":{"@id":"https:\/\/mnihyc.com\/blog\/#\/schema\/person\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/mnihyc.com\/blog\/wp-json\/wp\/v2\/posts\/1258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mnihyc.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mnihyc.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mnihyc.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mnihyc.com\/blog\/wp-json\/wp\/v2\/comments?post=1258"}],"version-history":[{"count":0,"href":"https:\/\/mnihyc.com\/blog\/wp-json\/wp\/v2\/posts\/1258\/revisions"}],"wp:attachment":[{"href":"https:\/\/mnihyc.com\/blog\/wp-json\/wp\/v2\/media?parent=1258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mnihyc.com\/blog\/wp-json\/wp\/v2\/categories?post=1258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mnihyc.com\/blog\/wp-json\/wp\/v2\/tags?post=1258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}