{"id":1043,"date":"2024-02-01T23:11:07","date_gmt":"2024-02-01T15:11:07","guid":{"rendered":"http:\/\/ggapa.net:81\/?p=1043"},"modified":"2024-02-06T16:01:07","modified_gmt":"2024-02-06T08:01:07","slug":"%e5%81%9a%e9%a2%98%e7%ac%94%e8%ae%b01","status":"publish","type":"post","link":"http:\/\/ggapa.net:81\/2024\/02\/01\/%e5%81%9a%e9%a2%98%e7%ac%94%e8%ae%b01\/","title":{"rendered":"\u505a\u9898\u7b14\u8bb0(\u6d1b\u8c37\u9898\u5355)"},"content":{"rendered":"

\u6570\u636e\u7ed3\u6784\uff08\u7ebf\u6bb5\u6811\u4e3a\u4e3b\uff09<\/h1>\n

\u9898\u5355<\/a><\/p>\n

P6569 [NOI Online #3 \u63d0\u9ad8\u7ec4] \u9b54\u6cd5\u503c<\/a><\/h3>\n

\u9996\u5148\u770b\u9898\u76ee\u6570\u636e\u8303\u56f4\uff0c$n \\leq 100$ \uff0c\u8fd9\u79cd\u60c5\u51b5\u8981\u4e48\u8bf4\u660e\u8fd9\u9053\u9898\u7684\u65f6\u95f4\u590d\u6742\u5ea6\u662f\u6bd4\u8f83\u9ad8\u7684\uff0c\u8981\u4e48\u5c31\u548c\u77e9\u9635\u4e58\u6cd5\u8131\u4e0d\u5f00\u5173\u7cfb\u3002<\/p>\n

\u9605\u8bfb\u9898\u76ee\u4e4b\u540e\uff0c\u6211\u4eec\u53d1\u73b0\u53ef\u4ee5\u5e94\u7528 Floyd \u6700\u77ed\u8def\uff0c\u4e5f\u5c31\u662f\u77e9\u9635\u4e58\u6cd5\u7684\u601d\u60f3\u53bb\u63cf\u8ff0\u6bcf\u4e00\u8f6e\u6bcf\u4e00\u4e2a\u57ce\u5e02\u7684\u9b54\u6cd5\u503c\u3002<\/p>\n

\u6545\u8fd9\u9053\u9898\u5e94\u8be5\u5148\u7528\u90bb\u63a5\u77e9\u9635\u5efa\u56fe\uff0c\u77e9\u9635\u5feb\u901f\u5e42\u6c42\u89e3\u3002<\/p>\n

\u7ed3\u679c\u5c31\u8d85\u65f6\u4e86\uff0c\u8003\u8651\u901a\u8fc7\u500d\u589e\uff0c\u4e8c\u8fdb\u5236\u5206\u89e3\u4f18\u5316\u3002<\/p>\n

\u9884\u5904\u7406\u65f6\u95f4\u590d\u6742\u5ea6 $O(n^3\\log n)$ \uff0c\u5355\u6b21\u8be2\u95ee\u65f6\u95f4\u590d\u6742\u5ea6 $O(n^2\\log n)$ \u3002<\/p>\n

\u603b\u7ed3\uff1a\u5bf9\u4e8e\u6570\u636e\u8303\u56f4\u6bd4\u8f83\u5c0f\u7684\u56fe\u8bba\u9898\u8981\u8054\u60f3\u5230\u90bb\u63a5\u77e9\u9635\uff0c\u5bf9\u4e8e\u7ecf\u5e38\u4f1a\u7528\u5230\u7684\u6570\u636e\u4e0d\u5fc5\u91cd\u590d\u8ba1\u7b97\uff0c\u8003\u8651\u8bb0\u5f55\u4e0b\u6765\u4f18\u5316\u7a0b\u5e8f\u7684\u8fd0\u884c\u6548\u7387\u3002<\/p>\n

P8820 [CSP-S 2022] \u6570\u636e\u4f20\u8f93<\/a><\/h3>\n

\u8bd5\u7740\u7531\u6613\u5230\u96be\uff0c\u4e00\u6b65\u4e00\u6b65\u5206\u6790\u3002<\/p>\n

\u5bf9\u4e8e $k = 1$ \u7684\u60c5\u51b5\uff0c\u7b54\u6848\u5c31\u662f\u4e24\u70b9\u4e4b\u95f4\u7684\u7b80\u5355\u8def\u5f84\uff0c\u8003\u8651\u901a\u8fc7\u6811\u94fe\u5256\u5206\u5b9e\u73b0\u3002\u65f6\u95f4\u590d\u6742\u5ea6 $O(n \\log n)$<\/p>\n

\u5bf9\u4e8e $n \\leq 200 $\u65f6\uff0c\u53ef\u4ee5\u8003\u8651\u5bf9\u4e8e\u6bcf\u4e00\u4e2a\u8282\u70b9\uff0c\u8ddd\u79bb\u4e0d\u8d85\u8fc7 $k$ \u7684\u70b9\u8fde\u65e0\u5411\u8fb9\uff0c\u5bf9\u4e8e\u6bcf\u4e00\u6b21\u8be2\u95ee\u8dd1\u6700\u77ed\u8def\uff0c\u65f6\u95f4\u590d\u6742\u5ea6 $O(q\\cdot n^2\\log n)$\u3002<\/p>\n

\u8fd9\u4e2a\u7279\u6b8a\u6027\u8d28\u975e\u5e38\u7684\u7384\u5b66\uff0c\u4e0d\u77e5\u9053\u662f\u7ed9\u4ec0\u4e48\u7b97\u6cd5\u7684\uff0c\u8fd9\u90fd\u4e0d\u77e5\u9053\uff0c\u6211\u592a\u83dc\u4e86<\/del>\u3002<\/p>\n

\u63a5\u7740\u5206\u6790 $k = 2$ \u7684\u60c5\u51b5\uff0c\u989d\u3002<\/p>\n

P4159 [SCOI2009] \u8ff7\u8def<\/a><\/h3>\n

\u770b\u5230\u9898\u76ee\u548c\u6570\u636e\u8303\u56f4\u540e\uff0c\u4e0d\u96be\u60f3\u5230\u77e9\u9635\u5feb\u901f\u5e42\u6c42\u89e3 $k$ \u6b65\u5185\u5230\u8fbe\u67d0\u4e00\u7ed3\u70b9\u7684\u65b9\u6848\u6570\u8fd9\u4e00\u7c7b\u95ee\u9898\u3002<\/p>\n

\u4f46\u662f\u95ee\u9898\u51fa\u73b0\u4e86\uff0c\u56e0\u4e3a\u4e0a\u8ff0\u505a\u6cd5\u53ea\u80fd\u6ee1\u8db3 "01\u77e9\u9635"\u3002<\/p>\n

\u90a3\u6211\u4eec\u5c31\u8003\u8651\u5c06\u8fd9\u4e2a\u77e9\u9635\u8f6c\u5316\u4e3a 01\u77e9\u9635\u4e0d\u4e45\u5b8c\u4e8b\u4e86\u5417\uff1f<\/p>\n

\u8003\u8651\u7ed9\u6bcf\u4e2a\u8282\u70b9\u5efa\u7acb 8 \u4e2a\u865a\u70b9\uff0c\u6211\u4eec\u4ee4 $(i,j)$ \u8868\u793a\u8ddd\u79bb\u8282\u70b9 $i$\uff0c$j$ \u4e2a\u8ddd\u79bb\u7684\u70b9\uff0c$(i,0)$ \u5c31\u4ee3\u8868\u8282\u70b9 $i$\uff0c\u6211\u4eec\u9700\u8981\u5c06 $(i, j)$ \u548c $(i, j-1 )$ \u901a\u8fc7\u4e00\u6761\u6709\u5411\u8fb9\u8fde\u63a5\u8d77\u6765\u3002<\/p>\n

\u82e5\u6b64\u65f6\u6709\u8fb9\u8fde\u5411\u8fd9\u4e2a\u8282\u70b9\uff0c\u4e14\u8ddd\u79bb\u4e3a $d$\uff0c\u90a3\u4e48\u6211\u4eec\u5c31\u5c06\u5b83\u8fde\u63a5\u5230 $(i, d - 1)$ \u7684\u8282\u70b9\u5904\u5c31\u53ef\u4ee5\u4e86\uff0c\u6b64\u65f6\u8fd9\u4e2a\u90bb\u63a5\u77e9\u9635\u5c31\u8f6c\u5316\u4e3a\u4e86 01 \u77e9\u9635\u3002<\/p>\n

\u65f6\u95f4\u590d\u6742\u5ea6\uff1a$O((9n)^3 \\log T)$<\/p>\n

\u603b\u7ed3\uff1a\u5982\u679c\u4e00\u9053\u9898\u76ee\u662f\u67d0\u7c7b\u9898\u578b\u7684\u53d8\u79cd\uff0c\u90a3\u6211\u4eec\u53ef\u4ee5\u5c06\u8fd9\u9053\u9898\u60f3\u529e\u6cd5\u8f6c\u5316\u4e3a\u6211\u4eec\u719f\u6089\u7684\u9898\u578b\uff1b<\/p>\n

P2894 [USACO08FEB] Hotel G<\/a><\/h3>\n

\u7b80\u5355\u9898\u3002<\/p>\n

\u4e00\u773c\u53ef\u4ee5\u770b\u51fa\u8fd9\u662f\u4e00\u4e2a\u8fde\u7eed\u6bb5\u95ee\u9898\uff0c\u8003\u8651\u901a\u8fc7\u7ebf\u6bb5\u6811\u89e3\u51b3\u3002<\/p>\n

\u6211\u4eec\u9700\u8981\u7ef4\u62a4\u4ee5\u4e0b\u4fe1\u606f\uff1a<\/p>\n