{"id":1180,"date":"2019-06-15T17:25:12","date_gmt":"2019-06-15T09:25:12","guid":{"rendered":"https:\/\/cf.mnihyc.com\/blog\/?p=1180"},"modified":"2020-02-09T02:41:17","modified_gmt":"2020-02-08T18:41:17","slug":"yzoj-p3098-jloi2016%e6%88%90%e7%bb%a9%e6%af%94%e8%be%83","status":"publish","type":"post","link":"https:\/\/cf.mnihyc.com\/blog\/archives\/1180","title":{"rendered":"YZOJ P3098 [JLOI2016]\u6210\u7ee9\u6bd4\u8f83"},"content":{"rendered":"<h1 style=\"text-align: center;\">YZOJ P3098 [JLOI2016]\u6210\u7ee9\u6bd4\u8f83<\/h1>\n<p style=\"text-align: center;\">\u65f6\u95f4\u9650\u5236\uff1a100MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a131072KB<\/p>\n<p style=\"text-align: center;\">\u96be\u5ea6\uff1a<span style=\"color: #ff6600;\">\\(6.0\\)<\/span><\/p>\n<ul>\n<li>\n<h3><strong>\u9898\u76ee\u63cf\u8ff0<\/strong><\/h3>\n<\/li>\n<\/ul>\n<p>G\u7cfb\u5171\u6709 \\(n\\) \u4f4d\u540c\u5b66\uff0c\\(m\\) \u95e8\u5fc5\u4fee\u8bfe\u3002\u8fd9 \\(n\\) \u4f4d\u540c\u5b66\u7684\u7f16\u53f7\u4e3a \\(0\\) \u5230 \\(n-1\\) \u7684\u6574\u6570\uff0c\u5176\u4e2dB\u795e\u7684\u7f16\u53f7\u4e3a \\(0\\) \u53f7\u3002<\/p>\n<p>\u8fd9 \\(m\\) \u95e8\u5fc5\u4fee\u8bfe\u7f16\u53f7\u4e3a \\(0\\) \u5230 \\(m-1\\) \u7684\u6574\u6570\u3002\u4e00\u4f4d\u540c\u5b66\u5728\u5fc5\u4fee\u8bfe\u4e0a\u53ef\u4ee5\u83b7\u5f97\u7684\u5206\u6570\u662f \\(1\\) \u5230 \\(U_i\\) \u4e2d\u7684\u4e00\u4e2a\u6574\u6570\u3002\u5982\u679c\u5728<strong>\u6bcf<\/strong>\u95e8\u8bfe\u4e0a A \u83b7\u5f97\u7684\u6210\u7ee9\u5747<strong>\u5c0f\u4e8e\u7b49\u4e8e <\/strong>B \u83b7\u5f97\u7684\u6210\u7ee9\uff0c\u5219\u79f0 A \u88ab B \u78be\u538b\u3002<\/p>\n<p>\u5728B\u795e\u7684\u8bf4\u6cd5\u4e2d\uff0cG\u7cfb\u5171\u6709 \\(k\\) \u4f4d\u540c\u5b66\u88ab\u4ed6\u78be\u538b\uff08\u4e0d\u5305\u62ec\u4ed6\u81ea\u5df1\uff09\uff0c\u800c\u5176\u4ed6 \\(n-k-1\\) \u4f4d\u540c\u5b66\u5219\u6ca1\u6709\u88ab\u4ed6\u78be\u538b\u3002D\u795e\u67e5\u5230\u4e86B\u795e\u6bcf\u95e8\u5fc5\u4fee\u8bfe\u7684\u6392\u540d\u3002\u8fd9\u91cc\u7684\u6392\u540d\u662f\u6307\uff1a\u5982\u679cB\u795e\u67d0\u95e8\u8bfe\u7684\u6392\u540d\u4e3a \\(R\\)\uff0c\u5219\u8868\u793a\u6709\u4e14\u4ec5\u6709 \\(R-1\\) \u4f4d\u540c\u5b66\u8fd9\u95e8\u8bfe\u7684\u5206\u6570<strong>\u5927\u4e8e<\/strong>B\u795e\u7684\u5206\u6570\uff0c\u6709\u4e14\u4ec5\u6709 \\(n-R\\) \u4f4d\u540c\u5b66\u8fd9\u95e8\u8bfe\u7684\u5206\u6570\u5c0f\u4e8e\u7b49\u4e8eB\u795e\uff08\u4e0d\u5305\u62ec\u4ed6\u81ea\u5df1\uff09\u3002<\/p>\n<p>\u6211\u4eec\u9700\u8981\u6c42\u51fa\u5168\u7cfb\u6240\u6709\u540c\u5b66\u6bcf\u95e8\u5fc5\u4fee\u8bfe\u5f97\u5206\u7684\u60c5\u51b5\u6570\uff0c\u4f7f\u5176\u65e2\u80fd\u6ee1\u8db3B\u795e\u7684\u8bf4\u6cd5\uff0c\u4e5f\u80fd\u7b26\u5408D\u795e\u67e5\u5230\u7684\u6392\u540d\u3002\u8fd9\u91cc\u4e24\u79cd\u60c5\u51b5\u4e0d\u540c\u5f53\u4e14\u4ec5\u5f53\u6709\u4efb\u610f\u4e00\u4f4d\u540c\u5b66\u5728\u4efb\u610f\u4e00\u95e8\u8bfe\u4e0a\u83b7\u5f97\u7684\u5206\u6570\u4e0d\u540c\u3002<\/p>\n<p>\u4f60\u4e0d\u9700\u8981\u50cfD\u795e\u90a3\u4e48\u5389\u5bb3\uff0c\u4f60\u53ea\u9700\u8981\u8ba1\u7b97\u51fa\u60c5\u51b5\u6570\u6a21 \\(10^9+7\\) \u7684\u4f59\u6570\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<ul>\n<li>\n<h3><strong>\u8f93\u5165\u683c\u5f0f<\/strong><\/h3>\n<\/li>\n<\/ul>\n<p>\u7b2c\u4e00\u884c\u5305\u542b\u4e09\u4e2a\u6b63\u6574\u6570 \\(n, m, k\\)\uff0c\u5206\u522b\u8868\u793aG\u7cfb\u7684\u540c\u5b66\u6570\u91cf\uff08\u5305\u62ecB\u795e\uff09\uff0c\u5fc5\u4fee\u8bfe\u7684\u6570\u91cf\u548c\u88abB\u795e\u78be\u538b\u7684\u540c\u5b66\u6570\u91cf\u3002<\/p>\n<p>\u7b2c\u4e8c\u884c\u5305\u542b \\(m\\) \u4e2a\u6b63\u6574\u6570\uff0c\u4f9d\u6b21\u8868\u793a\u6bcf\u95e8\u8bfe\u7684\u6700\u9ad8\u5206 \\(U_i\\) \u3002<\/p>\n<p>\u7b2c\u4e09\u884c\u5305\u542b \\(m\\) \u4e2a\u6b63\u6574\u6570\uff0c\u4f9d\u6b21\u8868\u793aB\u795e\u5728\u6bcf\u95e8\u8bfe\u4e0a\u7684\u6392\u540d \\(R_i\\) \u3002\u4fdd\u8bc1 \\(1 \\leq R_i \\leq n\\)\u3002<\/p>\n<p>\u6570\u636e\u4fdd\u8bc1\u81f3\u5c11\u6709 \\(1\\) \u79cd\u60c5\u51b5\u4f7f\u5f97B\u795e\u8bf4\u7684\u8bdd\u6210\u7acb\u3002\\(n \\leq 100, m \\leq 100, U_i \\leq 10^9\\) \u3002<\/p>\n<ul>\n<li>\n<h3><strong>\u8f93\u51fa\u683c\u5f0f<\/strong><\/h3>\n<\/li>\n<\/ul>\n<p>\u8f93\u51fa\u4ec5\u5305\u62ec\u4e00\u884c\u4e00\u4e2a\u6574\u6570\uff0c\u8868\u793a\u6210\u7ee9\u60c5\u51b5\u6570\u5bf9 \\(10^9+7\\) \u53d6\u6a21\u7684\u7ed3\u679c\u3002<\/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 \">3 2 1\r\n2 2\r\n2 1<\/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 \">10<\/pre>\n<ul>\n<li>\n<h3><strong>\u6570\u636e\u89c4\u6a21\u4e0e\u7ea6\u5b9a<\/strong><\/h3>\n<\/li>\n<\/ul>\n<p>\u5bf9\u4e8e \\(30\\%\\) \u7684\u6570\u636e\uff0c\\(n, m \\leq 20\\)\uff0c\\(U_i \\leq 100\\)\uff1b<\/p>\n<p>\u5bf9\u4e8e \\(100\\%\\) \u7684\u6570\u636e\uff0c\\(n,m \\leq 100\\)\uff0c\\(U_i \\leq 10^9\\)\uff0c\\(1 \\leq R_i \\leq n\\)\uff0c\\(0 \\leq k &lt; n\\) \u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Source: BZOJ 4559<\/p>\n<p><!--more--><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><del>\u633a\u795e\u4ed9\u7684\u4e00\u9053\u9898\uff0c\u5f53\u573a\u5c31\u7206\u96f6\u4e86<\/del><\/p>\n<p>\u8003\u8651 DP \uff0c\u8bbe \\(f_{i, j}\\) \u8868\u793a\u524d \\(i\\) \u4e2a\u79d1\u76ee\u4e2d\u6070\u597d\u78be\u538b\u4e86 \\(j\\) \u4e2a\u4eba\u7684\u65b9\u6848\u6570\u3002<\/p>\n<p>\u90a3\u4e48\u6709<\/p>\n<p><span style=\"font-size: 20px;\">\\(f_{i, j} = \\sum\\limits_{k=j}^n f_{i-1, j} \\times C_k^j \\times C_{n-k-1}^{n-R_i-j} \\times P_i\\)<\/span><\/p>\n<p>\u9996\u5148\u679a\u4e3e \\(k\\) \u8868\u793a\u4ece\u4e0a\u4e00\u95e8\u8bfe \\(j\\) \u4e2a\u4eba\u4e2d\u7ee7\u7eed\u9009\u51fa \\(j\\) \u4e2a\u4eba\u88ab\u78be\u538b\uff0c\u6240\u4ee5\u6709\u4e00\u4e2a <span style=\"font-size: 20px;\">\\(C_k^j\\)<\/span> \uff1b\u7136\u540e\u518d\u9009\u4e00\u4e9b\u4eba\u7684\u6392\u540d\u7ee7\u7eed\u4e0d\u8d85\u8fc7\u81ea\u5df1\uff0c\u5373 <span style=\"font-size: 20px;\">\\(C_{n-k-1}^{n-R_i-j}\\)<\/span> \uff1b\u6700\u540e \\(P_i\\) \u8868\u793a\u5c06 \\(1\\) ~ \\(U_i\\) \u8fd9\u4e9b\u5206\u6570\u5206\u7ed9 \\(n\\) \u4e2a\u4eba\u7684\u5408\u6cd5\u65b9\u6848\u6570\u3002<\/p>\n<p>\u53ef\u4ee5\u53d1\u73b0 <span style=\"font-size: 20px;\">\\(P_i = \\sum\\limits_{j=1}^{U_i} {j^{n-R_i} \\times (U_i-j)^{R_i-1}}\\)<\/span><\/p>\n<p>\u5373\u679a\u4e3e\u81ea\u5df1\u7684\u5206\u6570 \\(j\\) \uff0c\u7136\u540e\u6709 \\(n-R_i\\) \u4e2a\u4eba\u5206\u6570\u4e0d\u5c11\u4e8e\u81ea\u5df1\uff0c\\(R_i-1\\) \u4e2a\u4eba\u5206\u6570\u5927\u4e8e\u81ea\u5df1\uff0c\u6b21\u65b9\u540e\u4e58\u8d77\u6765\u5373\u53ef\u3002<\/p>\n<p>\u8fd9\u6837\u662f \\(O\\left(m\\sum{U_i}+n^2m\\right)\\) \uff0c\u53ef\u4ee5\u62ff\u5230 \\(40pts\\) \u3002<\/p>\n<p>\u8003\u8651\u4f18\u5316\u8fd9\u4e2a\u8fc7\u7a0b\uff0c\u56e0\u4e3a \\(U_i\\) \u8fbe\u5230\u4e86 \\(10^9\\) \u7ea7\u522b\uff0c\u6240\u4ee5\u7528xxx\u7ef4\u62a4\u662f\u4e0d\u53ef\u80fd\u7684\u3002<\/p>\n<p><span style=\"font-size: 20px;\">\\(\\begin{array}{l}\\sum\\limits_{j = 1}^{{U_i}} {{j^{n &#8211; {R_i}}}} {({U_i} &#8211; j)^{{R_i} &#8211; 1}} = \\sum\\limits_{j = 1}^{{U_i}} {{j^{n &#8211; {R_i}}}} \\sum\\limits_{d = 0}^{{R_i} &#8211; 1} {C_{{R_i} &#8211; 1}^d} {j^d}U_i^{{R_i} &#8211; 1 &#8211; d}\\\\= \\sum\\limits_{d = 0}^{{R_i} &#8211; 1} {C_{{R_i} &#8211; 1}^d} U_i^{{R_i} &#8211; 1 &#8211; d}\\sum\\limits_{j = 1}^{{U_i}} {{j^{n &#8211; {R_i} + d}}}\\end{array}\\)<\/span><\/p>\n<p>\u53ef\u4ee5\u53d1\u73b0\u524d\u9762\u7684\u662f\u5e38\u6570\uff0c\u540e\u9762\u7684\u662f<strong>\u81ea\u7136\u6570\u5e42\u548c<\/strong>\u3002\u53ef\u4ee5\u77e5\u9053\u81ea\u7136\u6570\u5e42\u548c\uff08\u4e0a\u65b9\u7684\u5f0f\u5b50\uff09\u662f\u4e00\u4e2a\u6b21\u6570\u4e3a \\(n\\) \u7684\u591a\u9879\u5f0f\u3002<\/p>\n<p>\u6240\u4ee5 <span style=\"font-size: 20px;\">\\(\\sum\\limits_{j = 1}^{{U_i}} {{j^{n &#8211; {R_i}}}} {({U_i} &#8211; j)^{{R_i} &#8211; 1}}\\)<\/span> \u662f\u4e00\u4e2a\u6700\u9ad8\u6b21\u6570\u4e0d\u8d85\u8fc7 \\(n\\) \u7684\u591a\u9879\u5f0f\uff0c\u7136\u540e\u5c31\u53ef\u4ee5\u76f4\u63a5<strong>\u62c9\u683c\u6717\u65e5\u63d2\u503c<\/strong>\u63d2\u4e00\u4e0b\u5c31\u597d\u4e86\u3002<\/p>\n<p>\u65f6\u95f4\u590d\u6742\u5ea6 \\(O\\left(n^2m\\right)\\)<\/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\r\n#define MOD 1000000007\r\n\r\ninline int _pow(register int base,register int b)\r\n{\r\n\tregister int ans=1;\r\n\twhile(b)\r\n\t{\r\n\t\tif(b&amp;1)\r\n\t\t\tans=(long long)ans*base%MOD;\r\n\t\tbase=(long long)base*base%MOD;\r\n\t\tb&gt;&gt;=1;\r\n\t}\r\n\treturn ans;\r\n}\r\n\r\nint U[105],R[105],P[105];\r\nint comb[105][105],poly[105],inv[105];\r\nint f[105][105];\r\n\r\nint main()\r\n{\r\n\tint N,M,K;scanf(\"%d%d%d\",&amp;N,&amp;M,&amp;K);\r\n\tfor(register int i=1;i&lt;=M;i++)\r\n\t\tscanf(\"%d\",&amp;U[i]);\r\n\tfor(register int i=1;i&lt;=M;i++)\r\n\t\tscanf(\"%d\",&amp;R[i]);\r\n\t\r\n\tcomb[0][0]=1;\r\n\tfor(register int i=1;i&lt;=N;i++)\r\n\t{\r\n\t\tcomb[0][i]=1;\r\n\t\tfor(register int j=1;j&lt;=i;j++)\r\n\t\t\tcomb[j][i]=(comb[j][i-1]+comb[j-1][i-1])%MOD;\r\n\t}\r\n\tfor(register int i=1;i&lt;=N;i++)\r\n\t\tinv[i]=_pow(i,MOD-2);\r\n\t\r\n\tfor(register int i=1;i&lt;=M;i++)\r\n\t{\r\n\t\tregister int k=N;\r\n\t\tfor(register int j=1;j&lt;=k+1;j++)\r\n\t\t\tpoly[j]=(poly[j-1]+(long long)_pow(j,N-R[i])*_pow(U[i]-j,R[i]-1)%MOD)%MOD;\r\n\t\t\r\n\t\tif(U[i] &lt;= k+1)\r\n\t\t{\r\n\t\t\tP[i]=poly[U[i]];\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\t\r\n\t\tregister int ans=0;\r\n\t\tfor(register int j=1;j&lt;=k+1;j++)\r\n\t\t{\r\n\t\t\tregister int neg=0,tans=poly[j];\r\n\t\t\tfor(register int x=1;x&lt;=k+1;x++)\r\n\t\t\t\tif(x != j)\r\n\t\t\t\t{\r\n\t\t\t\t\ttans=(long long)tans*(U[i]-x)%MOD;\r\n\t\t\t\t\tregister int t=j-x;\r\n\t\t\t\t\tif(t&lt;0)\r\n\t\t\t\t\t\tt=-t,neg^=1;\r\n\t\t\t\t\ttans=(long long)tans*inv[t]%MOD;\r\n\t\t\t\t}\r\n\t\t\tans=(ans+(neg?-1:1)*tans)%MOD,(ans+=MOD)%=MOD;\r\n\t\t}\r\n\t\tP[i]=ans;\r\n\t}\r\n\t\r\n\tf[0][N-1]=1;\r\n\tfor(register int i=1;i&lt;=M;i++)\r\n\t\tfor(register int j=0;j&lt;=N-R[i];j++)\r\n\t\t\tfor(register int k=j;k&lt;=N-1;k++)\r\n\t\t\t\t(f[i][j]+=(long long)f[i-1][k]*comb[j][k]%MOD*comb[N-R[i]-j][N-k-1]%MOD*P[i]%MOD)%=MOD;\r\n\tprintf(\"%d\\n\",f[M][K]);\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 P3098 [JLOI2016]\u6210\u7ee9\u6bd4\u8f83 \u65f6\u95f4\u9650\u5236\uff1a100MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a131072KB &hellip; <a href=\"https:\/\/cf.mnihyc.com\/blog\/archives\/1180\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">YZOJ P3098 [JLOI2016]\u6210\u7ee9\u6bd4\u8f83<\/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":[41,30,102],"tags":[],"class_list":["post-1180","post","type-post","status-publish","format-standard","hentry","category-proa","category-otherdp","category-interpolation"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>YZOJ P3098 [JLOI2016]\u6210\u7ee9\u6bd4\u8f83 - mnihyc&#039;s Blog<\/title>\n<meta name=\"description\" content=\"YZOJ P3098 \u6210\u7ee9\u6bd4\u8f83 \u65f6\u95f4\u9650\u5236\uff1a100MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a131072KB \u96be\u5ea6\uff1a \u9898\u76ee\u63cf\u8ff0 G\u7cfb\u5171\u6709 (n) \u4f4d\u540c\u5b66\uff0c(m) \u95e8\u5fc5\u4fee\u8bfe\u3002\u8fd9 (n) \u4f4d\u540c\u5b66\u7684\u7f16\u53f7\u4e3a (0) \u5230 (n-1) \u7684\u6574\u6570\uff0c\u5176\u4e2dB\u795e\u7684\u7f16\u53f7\u4e3a (0) \u53f7\u3002 \u8fd9 (m) \u95e8\u5fc5\u4fee\u8bfe\u7f16\u53f7\u4e3a\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/0.mnihyc.com\/blog\/archives\/1180\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"YZOJ P3098 [JLOI2016]\u6210\u7ee9\u6bd4\u8f83 - mnihyc&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"YZOJ P3098 \u6210\u7ee9\u6bd4\u8f83 \u65f6\u95f4\u9650\u5236\uff1a100MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a131072KB \u96be\u5ea6\uff1a \u9898\u76ee\u63cf\u8ff0 G\u7cfb\u5171\u6709 (n) \u4f4d\u540c\u5b66\uff0c(m) \u95e8\u5fc5\u4fee\u8bfe\u3002\u8fd9 (n) \u4f4d\u540c\u5b66\u7684\u7f16\u53f7\u4e3a (0) \u5230 (n-1) \u7684\u6574\u6570\uff0c\u5176\u4e2dB\u795e\u7684\u7f16\u53f7\u4e3a (0) \u53f7\u3002 \u8fd9 (m) \u95e8\u5fc5\u4fee\u8bfe\u7f16\u53f7\u4e3a\" \/>\n<meta property=\"og:url\" content=\"https:\/\/0.mnihyc.com\/blog\/archives\/1180\" \/>\n<meta property=\"og:site_name\" content=\"mnihyc&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-06-15T09:25:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-02-08T18:41:17+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:\/\/0.mnihyc.com\/blog\/archives\/1180#article\",\"isPartOf\":{\"@id\":\"https:\/\/0.mnihyc.com\/blog\/archives\/1180\"},\"author\":{\"name\":\"mnihyc\",\"@id\":\"https:\/\/mnihyc.com\/blog\/#\/schema\/person\/61e167d6d591fdd20dcfee2cf848a751\"},\"headline\":\"YZOJ P3098 [JLOI2016]\u6210\u7ee9\u6bd4\u8f83\",\"datePublished\":\"2019-06-15T09:25:12+00:00\",\"dateModified\":\"2020-02-08T18:41:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/0.mnihyc.com\/blog\/archives\/1180\"},\"wordCount\":279,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/mnihyc.com\/blog\/#\/schema\/person\/61e167d6d591fdd20dcfee2cf848a751\"},\"articleSection\":[\"6.0 ~ 7.0\",\"\u5176\u4ed6\u7c7b\u578b\",\"\u63d2\u503c\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/0.mnihyc.com\/blog\/archives\/1180#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/0.mnihyc.com\/blog\/archives\/1180\",\"url\":\"https:\/\/0.mnihyc.com\/blog\/archives\/1180\",\"name\":\"YZOJ P3098 [JLOI2016]\u6210\u7ee9\u6bd4\u8f83 - mnihyc&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\/\/mnihyc.com\/blog\/#website\"},\"datePublished\":\"2019-06-15T09:25:12+00:00\",\"dateModified\":\"2020-02-08T18:41:17+00:00\",\"description\":\"YZOJ P3098 \u6210\u7ee9\u6bd4\u8f83 \u65f6\u95f4\u9650\u5236\uff1a100MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a131072KB \u96be\u5ea6\uff1a \u9898\u76ee\u63cf\u8ff0 G\u7cfb\u5171\u6709 \\\\(n\\\\) \u4f4d\u540c\u5b66\uff0c\\\\(m\\\\) \u95e8\u5fc5\u4fee\u8bfe\u3002\u8fd9 \\\\(n\\\\) \u4f4d\u540c\u5b66\u7684\u7f16\u53f7\u4e3a \\\\(0\\\\) \u5230 \\\\(n-1\\\\) \u7684\u6574\u6570\uff0c\u5176\u4e2dB\u795e\u7684\u7f16\u53f7\u4e3a \\\\(0\\\\) \u53f7\u3002 \u8fd9 \\\\(m\\\\) \u95e8\u5fc5\u4fee\u8bfe\u7f16\u53f7\u4e3a\",\"breadcrumb\":{\"@id\":\"https:\/\/0.mnihyc.com\/blog\/archives\/1180#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/0.mnihyc.com\/blog\/archives\/1180\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/0.mnihyc.com\/blog\/archives\/1180#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/mnihyc.com\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"YZOJ P3098 [JLOI2016]\u6210\u7ee9\u6bd4\u8f83\"}]},{\"@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 P3098 [JLOI2016]\u6210\u7ee9\u6bd4\u8f83 - mnihyc&#039;s Blog","description":"YZOJ P3098 \u6210\u7ee9\u6bd4\u8f83 \u65f6\u95f4\u9650\u5236\uff1a100MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a131072KB \u96be\u5ea6\uff1a \u9898\u76ee\u63cf\u8ff0 G\u7cfb\u5171\u6709 (n) \u4f4d\u540c\u5b66\uff0c(m) \u95e8\u5fc5\u4fee\u8bfe\u3002\u8fd9 (n) \u4f4d\u540c\u5b66\u7684\u7f16\u53f7\u4e3a (0) \u5230 (n-1) \u7684\u6574\u6570\uff0c\u5176\u4e2dB\u795e\u7684\u7f16\u53f7\u4e3a (0) \u53f7\u3002 \u8fd9 (m) \u95e8\u5fc5\u4fee\u8bfe\u7f16\u53f7\u4e3a","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:\/\/0.mnihyc.com\/blog\/archives\/1180","og_locale":"zh_CN","og_type":"article","og_title":"YZOJ P3098 [JLOI2016]\u6210\u7ee9\u6bd4\u8f83 - mnihyc&#039;s Blog","og_description":"YZOJ P3098 \u6210\u7ee9\u6bd4\u8f83 \u65f6\u95f4\u9650\u5236\uff1a100MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a131072KB \u96be\u5ea6\uff1a \u9898\u76ee\u63cf\u8ff0 G\u7cfb\u5171\u6709 (n) \u4f4d\u540c\u5b66\uff0c(m) \u95e8\u5fc5\u4fee\u8bfe\u3002\u8fd9 (n) \u4f4d\u540c\u5b66\u7684\u7f16\u53f7\u4e3a (0) \u5230 (n-1) \u7684\u6574\u6570\uff0c\u5176\u4e2dB\u795e\u7684\u7f16\u53f7\u4e3a (0) \u53f7\u3002 \u8fd9 (m) \u95e8\u5fc5\u4fee\u8bfe\u7f16\u53f7\u4e3a","og_url":"https:\/\/0.mnihyc.com\/blog\/archives\/1180","og_site_name":"mnihyc&#039;s Blog","article_published_time":"2019-06-15T09:25:12+00:00","article_modified_time":"2020-02-08T18:41:17+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:\/\/0.mnihyc.com\/blog\/archives\/1180#article","isPartOf":{"@id":"https:\/\/0.mnihyc.com\/blog\/archives\/1180"},"author":{"name":"mnihyc","@id":"https:\/\/mnihyc.com\/blog\/#\/schema\/person\/61e167d6d591fdd20dcfee2cf848a751"},"headline":"YZOJ P3098 [JLOI2016]\u6210\u7ee9\u6bd4\u8f83","datePublished":"2019-06-15T09:25:12+00:00","dateModified":"2020-02-08T18:41:17+00:00","mainEntityOfPage":{"@id":"https:\/\/0.mnihyc.com\/blog\/archives\/1180"},"wordCount":279,"commentCount":0,"publisher":{"@id":"https:\/\/mnihyc.com\/blog\/#\/schema\/person\/61e167d6d591fdd20dcfee2cf848a751"},"articleSection":["6.0 ~ 7.0","\u5176\u4ed6\u7c7b\u578b","\u63d2\u503c"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/0.mnihyc.com\/blog\/archives\/1180#respond"]}]},{"@type":"WebPage","@id":"https:\/\/0.mnihyc.com\/blog\/archives\/1180","url":"https:\/\/0.mnihyc.com\/blog\/archives\/1180","name":"YZOJ P3098 [JLOI2016]\u6210\u7ee9\u6bd4\u8f83 - mnihyc&#039;s Blog","isPartOf":{"@id":"https:\/\/mnihyc.com\/blog\/#website"},"datePublished":"2019-06-15T09:25:12+00:00","dateModified":"2020-02-08T18:41:17+00:00","description":"YZOJ P3098 \u6210\u7ee9\u6bd4\u8f83 \u65f6\u95f4\u9650\u5236\uff1a100MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a131072KB \u96be\u5ea6\uff1a \u9898\u76ee\u63cf\u8ff0 G\u7cfb\u5171\u6709 \\(n\\) \u4f4d\u540c\u5b66\uff0c\\(m\\) \u95e8\u5fc5\u4fee\u8bfe\u3002\u8fd9 \\(n\\) \u4f4d\u540c\u5b66\u7684\u7f16\u53f7\u4e3a \\(0\\) \u5230 \\(n-1\\) \u7684\u6574\u6570\uff0c\u5176\u4e2dB\u795e\u7684\u7f16\u53f7\u4e3a \\(0\\) \u53f7\u3002 \u8fd9 \\(m\\) \u95e8\u5fc5\u4fee\u8bfe\u7f16\u53f7\u4e3a","breadcrumb":{"@id":"https:\/\/0.mnihyc.com\/blog\/archives\/1180#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/0.mnihyc.com\/blog\/archives\/1180"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/0.mnihyc.com\/blog\/archives\/1180#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/mnihyc.com\/blog"},{"@type":"ListItem","position":2,"name":"YZOJ P3098 [JLOI2016]\u6210\u7ee9\u6bd4\u8f83"}]},{"@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:\/\/cf.mnihyc.com\/blog\/wp-json\/wp\/v2\/posts\/1180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cf.mnihyc.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cf.mnihyc.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cf.mnihyc.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cf.mnihyc.com\/blog\/wp-json\/wp\/v2\/comments?post=1180"}],"version-history":[{"count":0,"href":"https:\/\/cf.mnihyc.com\/blog\/wp-json\/wp\/v2\/posts\/1180\/revisions"}],"wp:attachment":[{"href":"https:\/\/cf.mnihyc.com\/blog\/wp-json\/wp\/v2\/media?parent=1180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cf.mnihyc.com\/blog\/wp-json\/wp\/v2\/categories?post=1180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cf.mnihyc.com\/blog\/wp-json\/wp\/v2\/tags?post=1180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}