{"id":1161,"date":"2019-05-25T19:41:31","date_gmt":"2019-05-25T11:41:31","guid":{"rendered":"https:\/\/0self.mnihyc.com\/blog\/?p=1161"},"modified":"2020-04-22T11:39:40","modified_gmt":"2020-04-22T03:39:40","slug":"yzoj-p3706-apio2018%e6%96%b0%e5%ae%b6","status":"publish","type":"post","link":"https:\/\/0self.mnihyc.com\/blog\/archives\/1161","title":{"rendered":"YZOJ P3706 [APIO2018]\u65b0\u5bb6"},"content":{"rendered":"<h1 style=\"text-align: center;\">YZOJ P3706 [APIO2018]\u65b0\u5bb6<\/h1>\n<p style=\"text-align: center;\">\u65f6\u95f4\u9650\u5236\uff1a5000MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a1048576KB<\/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>\u4e94\u798f\u8857\u662f\u4e00\u6761\u7b14\u76f4\u7684\u9053\u8def\uff0c\u8fd9\u6761\u9053\u8def\u53ef\u4ee5\u770b\u6210\u4e00\u4e2a\u6570\u8f74\uff0c\u8857\u4e0a\u6bcf\u4e2a\u5efa\u7b51\u7269\u7684\u5750\u6807\u90fd\u53ef\u4ee5\u7528\u4e00\u4e2a\u6574\u6570\u6765\u8868\u793a\u3002<\/p>\n<p>\u5c0f\u660e\u662f\u4e00\u4f4d\u65f6\u5149\u65c5\u884c\u8005\uff0c\u4ed6\u77e5\u9053\u5728\u8fd9\u6761\u8857\u4e0a\uff0c\u5728\u8fc7\u53bb\u73b0\u5728\u548c\u672a\u6765\u5171\u6709 \\(n\\) \u4e2a\u5546\u5e97\u51fa\u73b0\u3002\u7b2c \\(i\\) \u4e2a\u5546\u5e97\u53ef \u4ee5\u4f7f\u7528\u56db\u4e2a\u6574\u6570 \\(x_i , t_i , a_i , b_i\\) \u63cf\u8ff0\uff0c\u5b83\u4eec\u5206\u522b\u8868\u793a\uff1a\u5546\u5e97\u7684\u5750\u6807\u3001\u5546\u5e97\u7684\u7c7b\u578b\u3001\u5546\u5e97\u5f00\u4e1a\u7684\u5e74\u4efd\u3001\u5546\u5e97\u5173\u95ed\u7684\u5e74\u4efd\u3002<\/p>\n<p>\u5c0f\u660e\u5e0c\u671b\u901a\u8fc7\u65f6\u5149\u65c5\u884c\uff0c\u9009\u62e9\u4e00\u4e2a\u5408\u9002\u7684\u65f6\u95f4\uff0c\u4f4f\u5728\u4e94\u798f\u8857\u4e0a\u7684\u67d0\u4e2a\u5730\u65b9\u3002\u4ed6\u7ed9\u51fa\u4e86\u4e00\u4efd\u4ed6\u53ef\u80fd\u9009\u62e9\u7684\u5217\u8868\uff0c\u4e0a\u9762\u5305\u62ec\u4e86 \\(q\\) \u4e2a\u8be2\u95ee\uff0c\u6bcf\u4e2a\u8be2\u95ee\u7528\u4e8c\u5143\u7ec4 \uff08\u5750\u6807\uff0c\u65f6\u95f4\uff09\u8868\u793a\u3002\u7b2c \\(i\\) \u5bf9\u4e8c\u5143\u7ec4\u7528\u4e24\u4e2a\u6574\u6570 \\(l_i , y_i\\) \u63cf\u8ff0\uff0c\u5206\u522b\u8868\u793a\u9009\u62e9\u7684\u5730\u70b9 \\(l_i\\) \u548c\u5e74\u4efd \\(y_i\\) \u3002<\/p>\n<p>\u73b0\u5728\uff0c\u4ed6\u60f3\u8ba1\u7b97\u51fa\u5728\u8fd9\u4e9b\u65f6\u95f4\u548c\u5730\u70b9\u5c45\u4f4f\u7684\u751f\u6d3b\u8d28\u91cf\u3002\u4ed6\u5b9a\u4e49\u5c45\u4f4f\u7684\u4e0d\u65b9\u4fbf\u6307\u6570\u4e3a\uff1a\u5728\u5c45\u4f4f\u7684\u5e74\u4efd\uff0c\u79bb \u5c45\u4f4f\u70b9\u6700\u8fdc\u7684\u5546\u5e97\u7c7b\u578b\u5230\u5c45\u4f4f\u70b9\u7684\u8ddd\u79bb\u3002\u7c7b\u578b \\(t\\) \u7684\u5546\u5e97\u5230\u5c45\u4f4f\u70b9\u7684\u8ddd\u79bb\u5b9a\u4e49\u4e3a\uff1a\u5728\u6307\u5b9a\u7684\u5e74\u4efd\uff0c\u7c7b\u578b \\(t\\) \u7684\u6240\u6709\u8425\u4e1a\u7684\u5546\u5e97\u4e2d\uff0c\u5230\u5c45\u4f4f\u70b9\u8ddd\u79bb\u6700\u8fd1\u7684\u4e00\u5bb6\u5230\u5c45\u4f4f\u70b9\u7684\u8ddd\u79bb\u3002\u6211\u4eec\u8bf4\u7f16\u53f7\u4e3a \\(i\\) \u7684\u5546\u5e97\u5728\u7b2c \\(y\\) \u5e74\u5728\u8425\u4e1a\u5f53\u4e14\u4ec5\u5f53 \\(a_i \\leq y \\leq b_i\\) \u3002\u6ce8\u610f\uff0c\u5728\u67d0\u4e9b\u5e74\u4efd\u4e2d\uff0c\u53ef\u80fd\u5728\u4e94\u798f\u8857\u4e0a\u5e76\u975e\u6240\u6709 \\(k\\) \u79cd\u7c7b\u578b\u7684\u5546\u5e97\u90fd\u6709\u81f3\u5c11\u4e00\u5bb6\u5728\u8425\u4e1a\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u4e0d\u65b9\u4fbf\u6307\u6570\u5b9a\u4e49\u4e3a \\(-1\\)\u3002<\/p>\n<p>\u4f60\u7684\u4efb\u52a1\u662f\u5e2e\u52a9\u5c0f\u660e\u6c42\u51fa\u6bcf\u5bf9\uff08\u5750\u6807\uff0c\u65f6\u95f4\uff09\u4e8c\u5143\u7ec4\u5c45\u4f4f\u7684\u4e0d\u65b9\u4fbf\u6307\u6570\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\u6574\u6570 \\(n,k\\) \u548c \\(q\\) \uff0c\u5206\u522b\u8868\u793a\u5546\u5e97\u7684\u6570\u91cf\u3001\u5546\u5e97\u7c7b\u578b\u7684\u6570\u91cf\u548c\uff08\u5750\u6807\uff0c\u65f6\u95f4\uff09\u4e8c\u5143\u7ec4\u7684\u6570\u91cf\uff08\\(1 \\le n, q \\le 3 \\times 10^5 , 1 \\le k \\le n\\)\uff09<\/p>\n<p>\u63a5\u4e0b\u6765 \\(n\\) \u884c\uff0c\u6bcf\u884c\u5305\u542b\u56db\u4e2a\u6574\u6570 \\(x_i , t_i , a_i\\) \u548c \\(b_i\\) \u7528\u4e8e\u63cf\u8ff0\u4e00\u5bb6\u5546\u5e97\uff0c\u610f\u4e49\u5982\u9898\u9762\u6240\u8ff0 \uff08\\(1 \\le x_i , a_i , b_i \\le 10^8 , 1 \\le t_i \\le k, a_i \\le b_i\\)\uff09\u3002<\/p>\n<p>\u63a5\u4e0b\u6765 \\(q\\) \u884c\uff0c\u6bcf\u884c\u5305\u542b\u4e24\u4e2a\u6574\u6570 \\(l_i\\) \u548c \\(y_i\\) \uff0c\u8868\u793a\u4e00\u7ec4\uff08\u5750\u6807\uff0c\u65f6\u95f4\uff09\u67e5\u8be2 \uff08\\(1 \\le l_i , y_i \\leq 10^8 \\)\uff09\u3002<\/p>\n<ul>\n<li>\n<h3><strong>\u8f93\u51fa\u683c\u5f0f<\/strong><\/h3>\n<\/li>\n<\/ul>\n<p>\u8f93\u51fa\u4e00\u884c\uff0c\u5305\u542b \\(q\\) \u4e2a\u6574\u6570\uff0c\u4f9d\u6b21\u8868\u793a\u5bf9\u4e8e \\(q\\) \u7ec4\uff08\u5750\u6807\uff0c\u65f6\u95f4\uff09\u8be2\u95ee\u6c42\u51fa\u7684\u7ed3\u679c\u3002<\/p>\n<p><!--more--><\/p>\n<ul>\n<li>\n<h3><strong>\u6837\u4f8b 1 \u8f93\u5165<\/strong><\/h3>\n<\/li>\n<\/ul>\n<pre class=\"lang:default decode:true \">4 2 4\r\n3 1 1 10\r\n9 2 2 4\r\n7 2 5 7\r\n4 1 8 10\r\n5 3\r\n5 6\r\n5 9\r\n1 10\r\n<\/pre>\n<ul>\n<li>\n<h3><strong>\u6837\u4f8b 1 \u8f93\u51fa<\/strong><\/h3>\n<\/li>\n<\/ul>\n<pre class=\"lang:default decode:true \">4\r\n2\r\n-1\r\n-1\r\n<\/pre>\n<ul>\n<li>\n<h3><strong>\u6837\u4f8b 1 \u8bf4\u660e<\/strong><\/h3>\n<\/li>\n<\/ul>\n<p>\u5728\u7b2c\u4e00\u4e2a\u6837\u4f8b\u4e2d\uff0c\u6709 \\(4\\) \u5bb6\u5546\u5e97\uff0c\u5171 \\(2\\) \u79cd\u7c7b\u578b\uff0c\u8fd8\u6709 \\(4\\) \u4e2a\u8be2\u95ee\u3002<\/p>\n<p>\u2022 \u5bf9\u4e8e\u7b2c\u4e00\u4e2a\u8be2\u95ee\uff1a\u5c0f\u660e\u5728\u7b2c \\(3\\) \u5e74\u4f4f\u5728\u5750\u6807\u4e3a \\(5\\) \u7684\u5730\u65b9\u3002\u8fd9\u4e00\u5e74\u4e2d\uff0c\u7f16\u53f7\u4e3a \\(1\\) \u548c \\(2\\) \u7684\u5546\u5e97\u5728\u8425\u4e1a\uff0c \u5230\u7f16\u53f7\u4e3a \\(1\\) \u7684\u5546\u5e97\u7684\u8ddd\u79bb\u4e3a \\(2\\) \uff0c\u5230\u7f16\u53f7\u4e3a \\(2\\) \u7684\u5546\u5e97\u8ddd\u79bb\u4e3a \\(4\\) \uff0c\u6240\u4ee5\u6700\u5927\u8ddd\u79bb\u4e3a \\(4\\)\u3002<\/p>\n<p>\u2022 \u5bf9\u4e8e\u7b2c\u4e8c\u4e2a\u8be2\u95ee\uff1a\u5c0f\u660e\u5728\u7b2c \\(6\\) \u5e74\u4f4f\u5728\u5750\u6807\u4e3a \\(5\\) \u7684\u5730\u65b9\u3002\u8fd9\u4e00\u5e74\u4e2d\uff0c\u7f16\u53f7\u4e3a \\(1\\) \u548c \\(3\\) \u7684\u5546\u5e97\u5728\u8425\u4e1a\uff0c \u5230\u7f16\u53f7\u4e3a \\(1\\) \u7684\u5546\u5e97\u7684\u8ddd\u79bb\u4e3a \\(2\\) \uff0c\u5230\u7f16\u53f7\u4e3a \\(3\\) \u7684\u5546\u5e97\u8ddd\u79bb\u4e3a \\(2\\) \uff0c\u6240\u4ee5\u6700\u5927\u8ddd\u79bb\u4e3a \\(2\\)\u3002<\/p>\n<p>\u2022 \u5bf9\u4e8e\u7b2c\u4e09\u4e2a\u8be2\u95ee\uff1a\u5c0f\u660e\u5728\u7b2c \\(9\\) \u5e74\u4f4f\u5728\u5750\u6807\u4e3a \\(5\\) \u7684\u5730\u65b9\u3002\u8fd9\u4e00\u5e74\u4e2d\uff0c\u7f16\u53f7\u4e3a \\(1\\) \u548c \\(4\\) \u7684\u5546\u5e97\u5728\u8425\u4e1a\uff0c \u5b83\u4eec\u7684\u7c7b\u578b\u90fd\u4e3a \\(1\\)\uff0c\u6ca1\u6709\u7c7b\u578b\u4e3a \\(2\\) \u7684\u5546\u5e97\u5728\u8425\u4e1a\uff0c\u6240\u4ee5\u7b54\u6848\u4e3a \\(-1\\)\u3002<\/p>\n<p>\u2022 \u540c\u6837\u7684\u60c5\u51b5\u51fa\u73b0\u5728\u7b2c\u56db\u4e2a\u8be2\u95ee\u4e2d\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><!--more--><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u5176\u5b9e\u5f88\u7b80\u5355\uff0c\u5c31\u662fDataStructure\u5927\u529b\u7ef4\u62a4\u64cd\u4f5c\u3002<\/p>\n<p>\u9996\u5148\u6309\u7167\u65f6\u95f4\u79bb\u6563\u5316\uff0c\u5206\u6210\u4e09\u79cd\u7c7b\u578b\uff1a\u51fa\u73b0\uff0c\u6d88\u5931\uff0c\u8be2\u95ee\u3002<\/p>\n<p>\u5bf9\u4e8e\u4e00\u4e2a\u8be2\u95ee \\(x\\)\uff0c\u53ef\u4ee5\u60f3\u5230\u4e8c\u5206\u7b54\u6848 \\(mid\\) \u8868\u793a \\([x-mid, x+mid]\\) \u4e2d\u662f\u5426\u5b58\u5728\u6240\u6709\u7c7b\u578b\u7684\u5546\u5e97\u3002<\/p>\n<p>\u7531\u4e8e\u53ea\u8981\u5224\u65ad\u662f\u5426\u5b58\u5728\uff0c\u6240\u4ee5\u53ef\u4ee5\u8bb0\u5f55 \\(pre_x\\) \u8868\u793a\u4f4d\u4e8e \\(x\\) \u5750\u6807\u7684\u5546\u5e97 \u5f80\u5de6<strong>\u7b2c\u4e00\u4e2a<\/strong>\u51fa\u73b0\u7684<strong>\u540c\u79cd\u7c7b\u578b<\/strong>\u7684\u5546\u5e97\uff08\u4e0d\u5305\u62ec\u91cd\u590d\uff09\u3002<\/p>\n<p>\u5047\u8bbe \\(-\\infty\\) \u548c \\(+\\infty\\) \u5904\u6709\u6240\u6709\u7c7b\u578b\u7684\u5546\u5e97\uff0c\u90a3\u4e48\uff1a<\/p>\n<p>\\([l, r]\\) \u4e2d\u5b58\u5728\u6240\u6709\u7c7b\u578b\u7684\u5546\u5e97\uff0c\u5176\u5b9e\u7b49\u4ef7\u4e8e \\(\\min\\limits_{x=r+1}^{+\\infty}{pre_x} \\geq l\\) \uff0c\u56e0\u4e3a \\((pre_x, x)\\) \u4e2d\u4e0d\u5b58\u5728\u8fd9\u79cd\u7c7b\u578b\u7684\u5546\u5e97\u3002<\/p>\n<p>\\(pre\\) \u4f7f\u7528\u5168\u5c40\u7ebf\u6bb5\u6811\u7ef4\u62a4\uff08<strong>\u52a8\u6001\u5f00\u70b9<\/strong>\/\u79bb\u6563\u5316 \u5747\u53ef\uff09\uff0c\u7531\u4e8e\u6709<strong>\u5220\u9664\uff08\u4fee\u6539\uff09<\/strong>\u64cd\u4f5c\uff0c\u6240\u4ee5\u5bf9\u6bcf\u4e2a\u53f6\u5b50\u7ed3\u70b9\u7ef4\u62a4\u4e00\u4e2a\u53ef\u5220\u5806\uff08\u6216 multiset\uff09\u3002<\/p>\n<p>\u8fd8\u6709\uff0c\u7531\u4e8e\u589e\u52a0\u5220\u9664\u5546\u5e97\u7684\u65f6\u5019\uff0c\u4f1a\u5bf9\u67d0\u4e2a\u5750\u6807\u7684<strong>\u540e\u7ee7<\/strong>\u7684 \\(pre\\) \u4ea7\u751f\u5f71\u54cd\uff0c\u6240\u4ee5\u5bf9\u6bcf\u79cd\u7c7b\u578b\u7684\u5546\u5e97\u90fd\u7ef4\u62a4\u4e00\u4e2a multiset \u652f\u6301\u67e5\u627e\u524d\u9a71\u540e\u7ee7\u3002<\/p>\n<p>\u66b4\u529b\u4e8c\u5206\u7ebf\u6bb5\u6811\u5224\u65ad\u662f \\(O(nlog^2n)\\) \uff0c\u5957\u5728\u4e00\u8d77\u5c31\u53ef\u4ee5 \\(O(nlogn)\\) \u3002<\/p>\n<p>\u5177\u4f53\u6765\u8bf4\u5c31\u662f\u5bf9\u4e8e\u7ebf\u6bb5\u6811\u4e0a\u4e00\u6bb5\u533a\u95f4 \\([l, r]\\) \uff1a\u5982\u679c \\(pos &gt; mid\\) \u90a3\u4e48<strong>\u7b54\u6848\u533a\u95f4\u7684\u53f3\u7aef\u70b9<\/strong>\u80af\u5b9a\u5728\u53f3\u534a\u8fb9\uff0c\u5f80\u53f3\u8d70\uff1b\u5426\u5219\u8003\u8651 \\(mid\\) \u662f\u5426\u80fd\u4f5c\u4e3a<strong>\u7b54\u6848\u533a\u95f4\u7684\u53f3\u7aef\u70b9<\/strong>\uff0c\u82e5\u53ef\u4ee5\u5373 \\(\\min\\limits_{x=mid+1}^{+\\infty} {pre_x} \\geq pos-\\left(mid-pos\\right)\\) \u90a3\u4e48\u80af\u5b9a\u5f80\u5de6\u8d70\u66f4\u4f18\uff0c\u5426\u5219\u4e5f\u53ea\u80fd\u5411\u53f3\u8d70\u3002<\/p>\n<p>\u8fd9\u4e2a\u4e1c\u897f\uff08\u6307 \\(\\min\\limits_{x=mid+1}^{+\\infty} {pre_x}\\)\uff09\u5f88\u660e\u663e\u5411\u5de6\u8d70\u7684\u65f6\u5019 \\(mid\\) \u662f\u5355\u8c03\u9012\u51cf\u7684\uff0c\u53c8\u7531\u4e8e\u662f\u5728\u7ebf\u6bb5\u6811\u4e0a\uff0c\u6240\u4ee5\u53ea\u9700\u8981\u5728\u5f80\u5de6\u8d70\u7684\u65f6\u5019\u7ef4\u62a4\u5373\u53ef\u3002<\/p>\n<p>\u6700\u540e\u5728\u7ebf\u6bb5\u6811\u4e0a\u4e8c\u5206\u51fa\u6765\u7684 \\(ans\\) \u662f<strong>\u7b54\u6848\u533a\u95f4\u7684\u53f3\u7aef\u70b9<\/strong>\uff0c\u8981\u6c42\u7684\u7b54\u6848\u4e3a \\(mid=ans-pos\\) \u3002<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"minimize:true lang:default decode:true \">\/\/ std::multiset time test\r\n#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;algorithm&gt;\r\n#include &lt;set&gt;\r\n\r\n#define _min(_a_,_b_) ((_a_)&lt;(_b_)?(_a_):(_b_))\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\ninline void printnum(register int a)\r\n{\r\n\tif(a&lt;0)\r\n\t\tputchar('-'),a=-a;\r\n\tstatic char buf[64];buf[0]=0;\r\n\tregister int top=0;\r\n\twhile(a)\r\n\t\tbuf[top++]=a%10,a\/=10;\r\n\tfor(register int i=_max(top-1,0);i&gt;=0;i--)\r\n\t\tputchar(buf[i]+'0');\r\n}\r\n\r\nstruct _multiset : std::multiset&lt;int&gt;\r\n{\r\n\tinline void _erase(register int pos)\r\n\t{\r\n\t\titerator it=this-&gt;find(pos);\r\n\t\tif(it != this-&gt;end())\r\n\t\t\tthis-&gt;erase(it);\r\n\t}\r\n\tinline void _insert(register int pos)\r\n\t{\r\n\t\tthis-&gt;insert(pos);\r\n\t}\r\n}heap[305050],pre[305050];\r\n\r\n#define _TSIZE 10505050\r\nint cnt,lson[_TSIZE],rson[_TSIZE],mnv[_TSIZE],root;\r\nint icnt,idxmap[_TSIZE];\r\n#define _LMIN (0)\r\n#define _LMAX (2e8+1)\r\n\r\n#define PushUp(_o) \\\r\n{ \\\r\n\tmnv[_o]=_min(mnv[lson[_o]],mnv[rson[_o]]); \\\r\n}\r\n\r\nint MP,MD,MA;\r\nvoid ModifyTree(int&amp;o,register int l=_LMIN,register int r=_LMAX)\r\n{\r\n\tif(!o)\r\n\t\to=++cnt;\r\n\tif(l == r)\r\n\t{\r\n\t\tregister int x=idxmap[o];\r\n\t\tif(!x)\r\n\t\t\tx=idxmap[o]=++icnt;\r\n\t\tif(MA&gt;=0)\r\n\t\t\theap[x]._insert(MA);\r\n\t\tif(MD&gt;=0)\r\n\t\t\theap[x]._erase(MD);\r\n\t\t\t\r\n\t\tmnv[o]=(heap[x].size() ? *heap[x].begin() : _LMAX);\r\n\t\treturn;\r\n\t}\r\n\tregister int mid=(l+r)&gt;&gt;1;\r\n\tif(MP &lt;= mid)\r\n\t\tModifyTree(lson[o],l,mid);\r\n\telse\r\n\t\tModifyTree(rson[o],mid+1,r);\r\n\tPushUp(o);\r\n}\r\n\r\nint QueryTreeE(register int pos)\r\n{\r\n\tregister int o=root,l=_LMIN,r=_LMAX,mv=r;\r\n\twhile(l&lt;r)\r\n\t{\r\n\t\tregister int mid=(l+r)&gt;&gt;1,nmv=_min(mv,mnv[rson[o]]);\r\n\t\tif(pos&gt;mid || nmv&lt;1 || mid+nmv&lt;(pos&lt;&lt;1))\r\n\t\t\tl=mid+1,o=rson[o];\r\n\t\telse\r\n\t\t\tr=mid,o=lson[o],mv=nmv;\r\n\t}\r\n\treturn l-pos;\r\n}\r\n\r\nstruct _query\r\n{\r\n\tshort opt;\r\n\tint x,t,y;\r\n\tbool operator &lt; (const _query&amp;o)const\r\n\t{\r\n\t\tif(y != o.y)\r\n\t\t\treturn y&lt;o.y;\r\n\t\treturn opt&lt;o.opt;\r\n\t}\r\n}query[905050];\r\nint ans[305050];\r\n\r\nint main()\r\n{\r\n\tregister int N=getnum(),K=getnum(),Q=getnum();\r\n\tregister int lq=0;\r\n\tfor(register int i=1;i&lt;=N;i++)\r\n\t{\r\n\t\tquery[++lq]=(_query){1,getnum(),getnum(),getnum()};\r\n\t\t++lq,query[lq]=query[lq-1];\r\n\t\tquery[lq].opt=2,query[lq].y=getnum()+1;\r\n\t}\r\n\tfor(register int i=1;i&lt;=Q;i++)\r\n\t\tquery[++lq]=(_query){3,getnum(),i,getnum()};\r\n\tstd::sort(&amp;query[1],&amp;query[lq+1]);\r\n\t\r\n\tfor(register int i=1;i&lt;=K;i++)\r\n\t\tpre[i]._insert(_LMIN),pre[i]._insert(_LMAX);\r\n\tmnv[0]=INT_MAX;\r\n\tMP=_LMAX,MA=_LMIN,MD=-1,ModifyTree(root);\r\n\t\r\n\tregister int tcnt=0;\r\n\tfor(register int i=1;i&lt;=lq;i++)\r\n\t\t\/\/if(printf(\"%d: %d %d %d %d\\n\",i,query[i].opt,query[i].x,query[i].t,query[i].y)&lt;0);\r\n\t\tif(query[i].opt == 3)\r\n\t\t\tans[query[i].t]=(tcnt==K ? QueryTreeE(query[i].x) : -1);\r\n\t\telse if(query[i].opt == 1)\r\n\t\t{\r\n\t\t\tregister int x=query[i].x,t=query[i].t;\r\n\t\t\t_multiset::iterator dit=pre[t].lower_bound(x),it=dit--;\r\n\t\t\tMP=*it,MA=x,MD=*dit,ModifyTree(root);\r\n\t\t\t\/\/printf(\"modify %d %d %d\\n\",MP,MA,MD);\r\n\t\t\tMP=x,MA=*dit,MD=-1,ModifyTree(root);\r\n\t\t\t\/\/printf(\"modify %d %d %d\\n\",MP,MA,MD);\r\n\t\t\tif(pre[t].size() == 2)\r\n\t\t\t\ttcnt++;\r\n\t\t\tpre[t]._insert(x);\r\n\t\t}\r\n\t\telse if(query[i].opt == 2)\r\n\t\t{\r\n\t\t\tregister int x=query[i].x,t=query[i].t;\r\n\t\t\tpre[t]._erase(x);\r\n\t\t\tif(pre[t].size() == 2)\r\n\t\t\t\ttcnt--;\r\n\t\t\t_multiset::iterator dit=pre[t].lower_bound(x),it=dit--;\r\n\t\t\tMP=x,MA=-1,MD=*dit,ModifyTree(root);\r\n\t\t\t\/\/printf(\"modify %d %d %d\\n\",MP,MA,MD);\r\n\t\t\tMP=*it,MA=*dit,MD=x,ModifyTree(root);\r\n\t\t\t\/\/printf(\"modify %d %d %d\\n\",MP,MA,MD);\r\n\t\t\t\r\n\t\t}\r\n\tfor(register int i=1;i&lt;=Q;i++)\r\n\t\tprintnum(ans[i]),putchar('\\n');\r\n\t\r\n\treturn 0;\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\n\u8349\u8fd8\u6709\u4e3a\u4ec0\u4e48\u6211\u7684 <span class=\"lang:default decode:true  crayon-inline \">std::multiset<\/span> \u6bd4 <span class=\"lang:default decode:true  crayon-inline \">__gnu_pbds::tree<\/span>\u00a0 \u8fd8\u5feb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1163\" src=\"https:\/\/0self.mnihyc.com\/blog\/wp-content\/uploads\/2019\/05\/QQ\u622a\u56fe20190523192906.png\" alt=\"\" width=\"344\" height=\"227\" srcset=\"https:\/\/0self.mnihyc.com\/blog\/wp-content\/uploads\/2019\/05\/QQ\u622a\u56fe20190523192906.png 344w, https:\/\/0self.mnihyc.com\/blog\/wp-content\/uploads\/2019\/05\/QQ\u622a\u56fe20190523192906-300x198.png 300w\" sizes=\"auto, (max-width: 344px) 100vw, 344px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1162\" src=\"https:\/\/0self.mnihyc.com\/blog\/wp-content\/uploads\/2019\/05\/QQ\u622a\u56fe20190523192855.png\" alt=\"\" width=\"571\" height=\"362\" srcset=\"https:\/\/0self.mnihyc.com\/blog\/wp-content\/uploads\/2019\/05\/QQ\u622a\u56fe20190523192855.png 571w, https:\/\/0self.mnihyc.com\/blog\/wp-content\/uploads\/2019\/05\/QQ\u622a\u56fe20190523192855-300x190.png 300w\" sizes=\"auto, (max-width: 571px) 100vw, 571px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>YZOJ P3706 [APIO2018]\u65b0\u5bb6 \u65f6\u95f4\u9650\u5236\uff1a5000MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a1048576KB &hellip; <a href=\"https:\/\/0self.mnihyc.com\/blog\/archives\/1161\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">YZOJ P3706 [APIO2018]\u65b0\u5bb6<\/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,71,46,69],"tags":[],"class_list":["post-1161","post","type-post","status-publish","format-standard","hentry","category-crazya","category-balancedtree","category-segtree","category-segdivide"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>YZOJ P3706 [APIO2018]\u65b0\u5bb6 - mnihyc&#039;s Blog<\/title>\n<meta name=\"description\" content=\"YZOJ P3706 \u65b0\u5bb6 \u65f6\u95f4\u9650\u5236\uff1a5000MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a1048576KB \u96be\u5ea6\uff1a \u9898\u76ee\u63cf\u8ff0 \u4e94\u798f\u8857\u662f\u4e00\u6761\u7b14\u76f4\u7684\u9053\u8def\uff0c\u8fd9\u6761\u9053\u8def\u53ef\u4ee5\u770b\u6210\u4e00\u4e2a\u6570\u8f74\uff0c\u8857\u4e0a\u6bcf\u4e2a\u5efa\u7b51\u7269\u7684\u5750\u6807\u90fd\u53ef\u4ee5\u7528\u4e00\u4e2a\u6574\u6570\u6765\u8868\u793a\u3002 \u5c0f\u660e\u662f\u4e00\u4f4d\u65f6\u5149\u65c5\u884c\u8005\uff0c\u4ed6\u77e5\u9053\u5728\u8fd9\u6761\u8857\u4e0a\uff0c\u5728\u8fc7\u53bb\u73b0\u5728\u548c\u672a\u6765\u5171\u6709 (n) \u4e2a\u5546\u5e97\u51fa\u73b0\u3002\u7b2c (i)\" \/>\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\/1161\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"YZOJ P3706 [APIO2018]\u65b0\u5bb6 - mnihyc&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"YZOJ P3706 \u65b0\u5bb6 \u65f6\u95f4\u9650\u5236\uff1a5000MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a1048576KB \u96be\u5ea6\uff1a \u9898\u76ee\u63cf\u8ff0 \u4e94\u798f\u8857\u662f\u4e00\u6761\u7b14\u76f4\u7684\u9053\u8def\uff0c\u8fd9\u6761\u9053\u8def\u53ef\u4ee5\u770b\u6210\u4e00\u4e2a\u6570\u8f74\uff0c\u8857\u4e0a\u6bcf\u4e2a\u5efa\u7b51\u7269\u7684\u5750\u6807\u90fd\u53ef\u4ee5\u7528\u4e00\u4e2a\u6574\u6570\u6765\u8868\u793a\u3002 \u5c0f\u660e\u662f\u4e00\u4f4d\u65f6\u5149\u65c5\u884c\u8005\uff0c\u4ed6\u77e5\u9053\u5728\u8fd9\u6761\u8857\u4e0a\uff0c\u5728\u8fc7\u53bb\u73b0\u5728\u548c\u672a\u6765\u5171\u6709 (n) \u4e2a\u5546\u5e97\u51fa\u73b0\u3002\u7b2c (i)\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mnihyc.com\/blog\/archives\/1161\" \/>\n<meta property=\"og:site_name\" content=\"mnihyc&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-05-25T11:41:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-04-22T03:39:40+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=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/mnihyc.com\/blog\/archives\/1161#article\",\"isPartOf\":{\"@id\":\"https:\/\/mnihyc.com\/blog\/archives\/1161\"},\"author\":{\"name\":\"mnihyc\",\"@id\":\"https:\/\/mnihyc.com\/blog\/#\/schema\/person\/61e167d6d591fdd20dcfee2cf848a751\"},\"headline\":\"YZOJ P3706 [APIO2018]\u65b0\u5bb6\",\"datePublished\":\"2019-05-25T11:41:31+00:00\",\"dateModified\":\"2020-04-22T03:39:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/mnihyc.com\/blog\/archives\/1161\"},\"wordCount\":177,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/mnihyc.com\/blog\/#\/schema\/person\/61e167d6d591fdd20dcfee2cf848a751\"},\"articleSection\":[\"7.0 ~ 8.0\",\"\u5e73\u8861\u6811\",\"\u7ebf\u6bb5\u6811\",\"\u7ebf\u6bb5\u6811\u5206\u6cbb\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/mnihyc.com\/blog\/archives\/1161#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mnihyc.com\/blog\/archives\/1161\",\"url\":\"https:\/\/mnihyc.com\/blog\/archives\/1161\",\"name\":\"YZOJ P3706 [APIO2018]\u65b0\u5bb6 - mnihyc&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\/\/mnihyc.com\/blog\/#website\"},\"datePublished\":\"2019-05-25T11:41:31+00:00\",\"dateModified\":\"2020-04-22T03:39:40+00:00\",\"description\":\"YZOJ P3706 \u65b0\u5bb6 \u65f6\u95f4\u9650\u5236\uff1a5000MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a1048576KB \u96be\u5ea6\uff1a \u9898\u76ee\u63cf\u8ff0 \u4e94\u798f\u8857\u662f\u4e00\u6761\u7b14\u76f4\u7684\u9053\u8def\uff0c\u8fd9\u6761\u9053\u8def\u53ef\u4ee5\u770b\u6210\u4e00\u4e2a\u6570\u8f74\uff0c\u8857\u4e0a\u6bcf\u4e2a\u5efa\u7b51\u7269\u7684\u5750\u6807\u90fd\u53ef\u4ee5\u7528\u4e00\u4e2a\u6574\u6570\u6765\u8868\u793a\u3002 \u5c0f\u660e\u662f\u4e00\u4f4d\u65f6\u5149\u65c5\u884c\u8005\uff0c\u4ed6\u77e5\u9053\u5728\u8fd9\u6761\u8857\u4e0a\uff0c\u5728\u8fc7\u53bb\u73b0\u5728\u548c\u672a\u6765\u5171\u6709 \\\\(n\\\\) \u4e2a\u5546\u5e97\u51fa\u73b0\u3002\u7b2c \\\\(i\\\\)\",\"breadcrumb\":{\"@id\":\"https:\/\/mnihyc.com\/blog\/archives\/1161#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mnihyc.com\/blog\/archives\/1161\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/mnihyc.com\/blog\/archives\/1161#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/mnihyc.com\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"YZOJ P3706 [APIO2018]\u65b0\u5bb6\"}]},{\"@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 P3706 [APIO2018]\u65b0\u5bb6 - mnihyc&#039;s Blog","description":"YZOJ P3706 \u65b0\u5bb6 \u65f6\u95f4\u9650\u5236\uff1a5000MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a1048576KB \u96be\u5ea6\uff1a \u9898\u76ee\u63cf\u8ff0 \u4e94\u798f\u8857\u662f\u4e00\u6761\u7b14\u76f4\u7684\u9053\u8def\uff0c\u8fd9\u6761\u9053\u8def\u53ef\u4ee5\u770b\u6210\u4e00\u4e2a\u6570\u8f74\uff0c\u8857\u4e0a\u6bcf\u4e2a\u5efa\u7b51\u7269\u7684\u5750\u6807\u90fd\u53ef\u4ee5\u7528\u4e00\u4e2a\u6574\u6570\u6765\u8868\u793a\u3002 \u5c0f\u660e\u662f\u4e00\u4f4d\u65f6\u5149\u65c5\u884c\u8005\uff0c\u4ed6\u77e5\u9053\u5728\u8fd9\u6761\u8857\u4e0a\uff0c\u5728\u8fc7\u53bb\u73b0\u5728\u548c\u672a\u6765\u5171\u6709 (n) \u4e2a\u5546\u5e97\u51fa\u73b0\u3002\u7b2c (i)","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\/1161","og_locale":"zh_CN","og_type":"article","og_title":"YZOJ P3706 [APIO2018]\u65b0\u5bb6 - mnihyc&#039;s Blog","og_description":"YZOJ P3706 \u65b0\u5bb6 \u65f6\u95f4\u9650\u5236\uff1a5000MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a1048576KB \u96be\u5ea6\uff1a \u9898\u76ee\u63cf\u8ff0 \u4e94\u798f\u8857\u662f\u4e00\u6761\u7b14\u76f4\u7684\u9053\u8def\uff0c\u8fd9\u6761\u9053\u8def\u53ef\u4ee5\u770b\u6210\u4e00\u4e2a\u6570\u8f74\uff0c\u8857\u4e0a\u6bcf\u4e2a\u5efa\u7b51\u7269\u7684\u5750\u6807\u90fd\u53ef\u4ee5\u7528\u4e00\u4e2a\u6574\u6570\u6765\u8868\u793a\u3002 \u5c0f\u660e\u662f\u4e00\u4f4d\u65f6\u5149\u65c5\u884c\u8005\uff0c\u4ed6\u77e5\u9053\u5728\u8fd9\u6761\u8857\u4e0a\uff0c\u5728\u8fc7\u53bb\u73b0\u5728\u548c\u672a\u6765\u5171\u6709 (n) \u4e2a\u5546\u5e97\u51fa\u73b0\u3002\u7b2c (i)","og_url":"https:\/\/mnihyc.com\/blog\/archives\/1161","og_site_name":"mnihyc&#039;s Blog","article_published_time":"2019-05-25T11:41:31+00:00","article_modified_time":"2020-04-22T03:39:40+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":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mnihyc.com\/blog\/archives\/1161#article","isPartOf":{"@id":"https:\/\/mnihyc.com\/blog\/archives\/1161"},"author":{"name":"mnihyc","@id":"https:\/\/mnihyc.com\/blog\/#\/schema\/person\/61e167d6d591fdd20dcfee2cf848a751"},"headline":"YZOJ P3706 [APIO2018]\u65b0\u5bb6","datePublished":"2019-05-25T11:41:31+00:00","dateModified":"2020-04-22T03:39:40+00:00","mainEntityOfPage":{"@id":"https:\/\/mnihyc.com\/blog\/archives\/1161"},"wordCount":177,"commentCount":0,"publisher":{"@id":"https:\/\/mnihyc.com\/blog\/#\/schema\/person\/61e167d6d591fdd20dcfee2cf848a751"},"articleSection":["7.0 ~ 8.0","\u5e73\u8861\u6811","\u7ebf\u6bb5\u6811","\u7ebf\u6bb5\u6811\u5206\u6cbb"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/mnihyc.com\/blog\/archives\/1161#respond"]}]},{"@type":"WebPage","@id":"https:\/\/mnihyc.com\/blog\/archives\/1161","url":"https:\/\/mnihyc.com\/blog\/archives\/1161","name":"YZOJ P3706 [APIO2018]\u65b0\u5bb6 - mnihyc&#039;s Blog","isPartOf":{"@id":"https:\/\/mnihyc.com\/blog\/#website"},"datePublished":"2019-05-25T11:41:31+00:00","dateModified":"2020-04-22T03:39:40+00:00","description":"YZOJ P3706 \u65b0\u5bb6 \u65f6\u95f4\u9650\u5236\uff1a5000MS \u00a0\u00a0\u00a0\u00a0 \u5185\u5b58\u9650\u5236\uff1a1048576KB \u96be\u5ea6\uff1a \u9898\u76ee\u63cf\u8ff0 \u4e94\u798f\u8857\u662f\u4e00\u6761\u7b14\u76f4\u7684\u9053\u8def\uff0c\u8fd9\u6761\u9053\u8def\u53ef\u4ee5\u770b\u6210\u4e00\u4e2a\u6570\u8f74\uff0c\u8857\u4e0a\u6bcf\u4e2a\u5efa\u7b51\u7269\u7684\u5750\u6807\u90fd\u53ef\u4ee5\u7528\u4e00\u4e2a\u6574\u6570\u6765\u8868\u793a\u3002 \u5c0f\u660e\u662f\u4e00\u4f4d\u65f6\u5149\u65c5\u884c\u8005\uff0c\u4ed6\u77e5\u9053\u5728\u8fd9\u6761\u8857\u4e0a\uff0c\u5728\u8fc7\u53bb\u73b0\u5728\u548c\u672a\u6765\u5171\u6709 \\(n\\) \u4e2a\u5546\u5e97\u51fa\u73b0\u3002\u7b2c \\(i\\)","breadcrumb":{"@id":"https:\/\/mnihyc.com\/blog\/archives\/1161#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mnihyc.com\/blog\/archives\/1161"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/mnihyc.com\/blog\/archives\/1161#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/mnihyc.com\/blog"},{"@type":"ListItem","position":2,"name":"YZOJ P3706 [APIO2018]\u65b0\u5bb6"}]},{"@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:\/\/0self.mnihyc.com\/blog\/wp-json\/wp\/v2\/posts\/1161","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/0self.mnihyc.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/0self.mnihyc.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/0self.mnihyc.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/0self.mnihyc.com\/blog\/wp-json\/wp\/v2\/comments?post=1161"}],"version-history":[{"count":0,"href":"https:\/\/0self.mnihyc.com\/blog\/wp-json\/wp\/v2\/posts\/1161\/revisions"}],"wp:attachment":[{"href":"https:\/\/0self.mnihyc.com\/blog\/wp-json\/wp\/v2\/media?parent=1161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/0self.mnihyc.com\/blog\/wp-json\/wp\/v2\/categories?post=1161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/0self.mnihyc.com\/blog\/wp-json\/wp\/v2\/tags?post=1161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}