{"id":377,"date":"2010-03-05T14:04:51","date_gmt":"2010-03-05T06:04:51","guid":{"rendered":"http:\/\/115.29.108.60\/?p=377"},"modified":"2010-03-09T22:16:25","modified_gmt":"2010-03-09T14:16:25","slug":"%e6%95%b0%e6%8d%ae%e7%bb%93%e6%9e%84%e8%af%be%e7%a8%8b%e8%ae%be%e8%ae%a1","status":"publish","type":"post","link":"http:\/\/115.29.108.60\/?p=377","title":{"rendered":"\u6570\u636e\u7ed3\u6784\u8bfe\u7a0b\u8bbe\u8ba1"},"content":{"rendered":"<p><a href=\"20071610124.rar\">\u4e0b\u8f7d<\/a><\/p>\n<p>\u5224\u65ad\u4e00\u4e2a\u94fe\u8868\u662f\u5426\u6709\u5faa\u73af\uff0c\u6253\u5370\u4e00\u4e2a\u53ef\u80fd\u5e26\u73af\u7684\u94fe\u8868\u4e2d\u6240\u6709\u5143\u7d20\u5404\u4e00\u6b21\u3002<\/p>\n<p>\u5bfb\u627e\u94fe\u8868\u4e2d\u5012\u6570\u7b2cm\u4e2a\u5143\u7d20\u3002<\/p>\n<p>\u5224\u65ad\u4e00\u4e2aASCII\u5b57\u7b26\u4e32\u4e2d\u662f\u5426\u6709\u91cd\u590d\u5b57\u7b26\u3002<\/p>\n<p>\u5224\u65ad\u4e24\u4e2a\u94fe\u8868\u662f\u5426\u76f8\u4ea4\uff0c\u5bfb\u627e\u76f8\u4ea4\u8282\u70b9\u3002<\/p>\n<p>\u5b9a\u4e49\u4e8c\u53c9\u6811\u4e24\u4e2a\u7ed3\u70b9\u7684\u6700\u5c0f\u8ddd\u79bb\u4e3a\u8fd9\u4e24\u4e2a\u7ed3\u70b9\u7684\u6700\u8fd1\u516c\u5171\u7956\u5148\u5206\u522b\u5230\u8fd9\u4e24\u4e2a\u7ed3\u70b9\u7684\u8def\u5f84\u957f\u5ea6\u4e4b\u548c\u3002\u8bf7\u8bbe\u8ba1\u4e00\u79cd\u65b9\u6cd5\uff0c\u627e\u51fa\u7ed9\u5b9a\u4e8c\u53c9\u6811\u4e2d\u4efb\u610f\u4e24\u4e2a\u7ed3\u70b9\u7684\u6700\u5c0f\u8ddd\u79bb\uff0c\u53ef\u4ee5\u8003\u8651\u4ee5\u56fe\u5f62\u663e\u793a\u4e4b\u3002<\/p>\n<p>\u8bbe\u8ba1\u4e00\u4e2a\u7a0b\u5e8f\u5b9e\u73b0\u4e8c\u53c9\u6811\u7684\u5c42\u6b21\u904d\u5386\uff0c\u8981\u6c42\u6bcf\u5c42\u4e4b\u95f4\u7684\u6570\u636e\u7528\u4e00\u4e2a\u7a7a\u683c\u5206\u5f00\u3002\u4e8c\u53c9\u6811\u91c7\u7528\u4e8c\u53c9\u94fe\u8868\u65b9\u5f0f\u8fdb\u884c\u5b58\u50a8\u3002<\/p>\n<p>\u5229\u7528\u5927\u9876\u5806\u5b9e\u73b0\u4e00\u4e2a\u4f18\u5148\u961f\u5217\u3002\u5bf9\u4e8e\u961f\u5217\u7684\u64cd\u4f5c\u5e94\u8be5\u81f3\u5c11\u652f\u6301\u4e0b\u5217\u51e0\u79cd\u6307\u4ee4\uff1a<\/p>\n<p>\u00a0\u00a0 Void enqueue(int ObjectID, int Priority);<\/p>\n<p>\u00a0\u00a0 Int dequeue();<\/p>\n<p>\u00a0\u00a0 Void changeweight(int ObjectID, int newPriority);<\/p>\n<p>\u51fd\u6570enqueue\u5411\u4f18\u5148\u961f\u5217\u4e2d\u63d2\u5165\u4e00\u4e2aID\u53f7\u4e3aObjectID\uff0c\u4f18\u5148\u7ea7\u4e3apriority\u7684\u65b0\u5bf9\u8c61\u3002\u51fd\u6570dequeue\u4ece\u4f18\u5148\u961f\u5217\u4e2d\u5220\u9664\u4f18\u5148\u7ea7\u6700\u9ad8\u7684\u5bf9\u8c61\uff0c\u5e76\u8fd4\u56de\u8be5\u5bf9\u8c61\u7684ID\u53f7\u3002\u51fd\u6570changeweight\u5c06ID\u53f7\u4e3aObjectID\u7684\u5bf9\u8c61\u7684\u4f18\u5148\u7ea7\u6539\u4e3anewPriority\u3002\u4f60\u9700\u8981\u4e00\u79cd\u673a\u5236\uff0c\u4ee5\u4fbf\u83b7\u53d6\u6240\u9700\u8981\u5bf9\u8c61\u5728\u5806\u4e2d\u7684\u4f4d\u7f6e\u3002\u4f60\u8fd8\u9700\u8981\u5bf9\u5806\u7684\u5b9e\u73b0\u8fdb\u884c\u4fee\u6539\uff0c\u4ee5\u5b58\u50a8\u5bf9\u8c61\u5728\u6570\u7ec4\u4e2d\u7684\u4f4d\u7f6e\uff0c\u4f7f\u5f97\u5806\u4e2d\u5bf9\u8c61\u7684\u4fee\u6539\u53ef\u4ee5\u5728\u8f85\u52a9\u6570\u7ec4\u7ed3\u6784\u4e2d\u8bb0\u5f55\u4e0b\u6765\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u5957\u6c47\u662f\u6307\u5229\u7528\u6c47\u7387\u5dee\u5f02\u5c06\u4e00\u5355\u4f4d\u7684\u8d27\u5e01\u8f6c\u6362\u4e3a\u5927\u4e8e\u4e00\u5355\u4f4d\u7684\u540c\u79cd\u8d27\u5e01\u3002\u4f8b\u5982\uff0c\u5047\u8bbe1\u7f8e\u5143\u5151\u63628.8\u4eba\u6c11\u5e01\uff0c1\u4eba\u6c11\u5e01\u5151\u63620.1\u82f1\u9551\uff0c1\u82f1\u9551\u5151\u63621.5\u7f8e\u5143\uff0c\u90a3\u4e48\uff0c\u5982\u679c\u4e00\u4e2a\u4eba\u62ff\u77401\u7f8e\u5143\u5148\u5151\u6362\u6210\u4eba\u6c11\u5e01\uff0c\u518d\u628a\u4eba\u6c11\u5e01\u5151\u6362\u6210\u82f1\u9551\uff0c\u6700\u540e\u5c06\u82f1\u9551\u5151\u6362\u6210\u7f8e\u5143\uff0c\u6700\u540e\u4ed6\u80fd\u5f97\u52301*8.8*0.1*1.5=1.32\u7f8e\u5143\uff0c\u4ece\u800c\u83b7\u5f97\u4e86\u5229\u6da6\uff0c\u8fd9\u5c31\u662f\u5957\u6c47\u3002\u5047\u8bbe\u6709n\u79cd\u8d27\u5e01v1,v2,\u2026,vn\u548c\u6709\u5173\u6c47\u7387\u7684n*n\u77e9\u9635\uff0c\u5176\u4e2dA[i,j]\u662f\u6307\u4e00\u5355\u4f4d\u8d27\u5e01vi\u5151\u6362\u6210\u8d27\u5e01vj\u7684\u5355\u4f4d\u6570\uff0c\u8981\u6c42\u8bbe\u8ba1\u4e00\u4e2a\u7a0b\u5e8f\u5224\u65ad\u662f\u5426\u5b58\u5728\u4e00\u4e2a\u8d27\u5e01\u5e8f\u5217vi1,vi2,\u2026,vik\u4f7f\u5f97A[i1,i2]*A[i2,i3]*\u2026*A[ik,i1]&gt;1\u3002\u5982\u679c\u5b58\u5728\uff0c\u5219\u8f93\u51fa\u6240\u6709\u8fd9\u6837\u7684\u8d27\u5e01\u5e8f\u5217\uff0c\u5982\u679c\u4e0d\u5b58\u5728\u5219\u8f93\u51fa\u7a7a\uff0c\u5e76\u786e\u5b9a\u7b97\u6cd5\u7684\u65f6\u95f4\u4ee3\u4ef7\u3002<\/p>\n<p>\u8d2a\u5a6a\u7b97\u6cd5\uff1a\u5047\u8bbe\u8981\u5728\u8db3\u591f\u591a\u7684\u4f1a\u573a\u91cc\u5b89\u6392\u4e00\u6279\u6d3b\u52a8\uff0c\u5e76\u5e0c\u671b\u4f7f\u7528\u5c3d\u53ef\u80fd\u5c11\u7684\u4f1a\u573a\uff0c\u8bbe\u8ba1\u4e00\u4e2a\u6709\u6548\u7684\u8d2a\u5fc3\u7b97\u6cd5\u8fdb\u884c\u5b89\u6392\u3002<\/p>\n<p>\u52a8\u6001\u89c4\u5212\uff1a\u8bbe\u6709n\u79cd\u4e0d\u540c\u9762\u503c\u7684\u786c\u5e01\uff0c\u5404\u786c\u5e01\u7684\u9762\u503c\u5b58\u4e8e\u6570\u7ec4T[n]\u4e2d\u3002\u73b0\u8981\u7528\u8fd9\u4e9b\u9762\u503c\u7684\u786c\u5e01\u6765\u627e\u94b1\u3002\u53ef\u4ee5\u4f7f\u7528\u7684\u5404\u79cd\u9762\u503c\u7684\u786c\u5e01\u4e2a\u6570\u5b58\u4e8e\u6570\u7ec4Coins[n]\u4e2d\u3002\u5bf9\u4efb\u610f\u94b1\u65700&lt;=m&lt;=20009\uff0c\u8bbe\u8ba1\u4e00\u4e2a\u7528\u6700\u5c11\u786c\u5e01\u627e\u94b1m\u7684\u65b9\u6cd5\u3002<\/p>\n<p>\u5206\u6cbb\u6cd5\uff1a\u5728\u4e00\u4e2a2<sup>k<\/sup>*2<sup>k<\/sup>\u4e2a\u65b9\u683c\u7ec4\u6210\u7684\u68cb\u76d8\u4e2d\uff0c\u82e5\u6070\u6709\u4e00\u4e2a\u65b9\u683c\u4e0e\u5176\u4ed6\u65b9\u683c\u4e0d\u540c\uff0c\u5219\u79f0\u8be5\u65b9\u683c\u4e3a\u4e00\u4e2a\u7279\u6b8a\u65b9\u683c\uff0c\u4e14\u79f0\u8be5\u68cb\u76d8\u4e3a\u4e00\u4e2a\u7279\u6b8a\u68cb\u76d8\uff0c\u5982\u56feA\u6240\u793a\u3002\u8bbe\u8ba1\u4e00\u4e2a\u7a0b\u5e8f\uff0c\u7528\u56feB\u6240\u793a\u76844\u79cd\u4e0d\u540c\u5f62\u6001\u7684L\u578b\u9aa8\u724c\u8986\u76d6\u4e00\u4e2a\u9664\u7279\u6b8a\u68cb\u76d8\u4e0a\u7279\u6b8a\u65b9\u683c\u4ee5\u5916\u7684\u6240\u6709\u65b9\u683c\uff0c\u4e14\u4efb\u4f552\u4e2aL\u578b\u9aa8\u724c\u4e0d\u5f97\u91cd\u53e0\u8986\u76d6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0b\u8f7d \u5224\u65ad\u4e00\u4e2a\u94fe\u8868\u662f\u5426\u6709\u5faa\u73af\uff0c\u6253\u5370\u4e00\u4e2a\u53ef\u80fd\u5e26\u73af\u7684\u94fe\u8868\u4e2d\u6240\u6709\u5143\u7d20\u5404\u4e00\u6b21\u3002 \u5bfb\u627e\u94fe\u8868\u4e2d\u5012\u6570\u7b2cm\u4e2a\u5143\u7d20\u3002 \u5224\u65ad\u4e00\u4e2aA [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-377","post","type-post","status-publish","format-standard","hentry","category-others"],"_links":{"self":[{"href":"http:\/\/115.29.108.60\/index.php?rest_route=\/wp\/v2\/posts\/377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/115.29.108.60\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/115.29.108.60\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/115.29.108.60\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/115.29.108.60\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=377"}],"version-history":[{"count":4,"href":"http:\/\/115.29.108.60\/index.php?rest_route=\/wp\/v2\/posts\/377\/revisions"}],"predecessor-version":[{"id":381,"href":"http:\/\/115.29.108.60\/index.php?rest_route=\/wp\/v2\/posts\/377\/revisions\/381"}],"wp:attachment":[{"href":"http:\/\/115.29.108.60\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/115.29.108.60\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=377"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/115.29.108.60\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}