{"id":41634,"date":"2023-09-28T11:40:18","date_gmt":"2023-09-28T03:40:18","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=41634"},"modified":"2023-09-28T11:40:18","modified_gmt":"2023-09-28T03:40:18","slug":"dhadqb","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/41634.html","title":{"rendered":"DP\u548cAP\u7684\u533a\u522b"},"content":{"rendered":"
DP\uff08Dynamic Programming\uff09\u548cAP\uff08Greedy Algorithm\uff09\u662f\u4e24\u79cd\u6709\u6548\u7684\u95ee\u9898\u6c42\u89e3\u7b97\u6cd5\uff0c\u5b83\u4eec\u90fd\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u89e3\u51b3\u4e00\u4e9b\u590d\u6742\u7684\u95ee\u9898\uff0c\u4f46\u662f\u5b83\u4eec\u4e4b\u95f4\u4e5f\u5b58\u5728\u7740\u4e00\u4e9b\u91cd\u8981\u7684\u533a\u522b\u3002\u672c\u6587\u5c06\u4ecb\u7ecdDP\u548cAP\u7684\u5b9a\u4e49\uff0c\u5e76\u4ecb\u7ecd\u5b83\u4eec\u4e4b\u95f4\u7684\u533a\u522b\u3002<\/p>\n
\u52a8\u6001\u89c4\u5212\uff08Dynamic Programming\uff09\u662f\u4e00\u79cd\u7b97\u6cd5\uff0c\u5b83\u901a\u8fc7\u628a\u539f\u95ee\u9898\u5206\u89e3\u4e3a\u76f8\u5bf9\u7b80\u5355\u7684\u5b50\u95ee\u9898\uff0c\u7136\u540e\u9010\u6b65\u89e3\u51b3\u5b50\u95ee\u9898\uff0c\u6700\u7ec8\u89e3\u51b3\u539f\u95ee\u9898\u7684\u65b9\u6cd5\u3002\u52a8\u6001\u89c4\u5212\u7684\u6838\u5fc3\u601d\u60f3\u662f\u201c\u91cd\u590d\u5229\u7528\u5b50\u95ee\u9898\u7684\u89e3\u51b3\u7ed3\u679c\u201d\uff0c\u5176\u57fa\u672c\u601d\u60f3\u662f\uff1a\u628a\u539f\u95ee\u9898\u5206\u89e3\u4e3a\u82e5\u5e72\u5b50\u95ee\u9898\uff0c\u6bcf\u4e2a\u5b50\u95ee\u9898\u53ea\u6c42\u89e3\u4e00\u6b21\uff0c\u5c06\u5176\u89e3\u5b58\u50a8\u8d77\u6765\uff0c\u4ece\u800c\u907f\u514d\u91cd\u590d\u8ba1\u7b97\u3002<\/p>\n
\u8d2a\u5a6a\u7b97\u6cd5\uff08Greedy Algorithm\uff09\u662f\u4e00\u79cd\u6c42\u89e3\u95ee\u9898\u7684\u7b97\u6cd5\uff0c\u5b83\u6bcf\u4e00\u6b65\u90fd\u9009\u62e9\u6700\u4f73\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u6700\u7ec8\u5f97\u5230\u7684\u7ed3\u679c\u53ef\u80fd\u4e0d\u662f\u6700\u4f18\u7684\uff0c\u4f46\u662f\u5b83\u53ef\u4ee5\u5728\u6709\u9650\u7684\u65f6\u95f4\u5185\u5f97\u5230\u4e00\u4e2a\u6bd4\u8f83\u597d\u7684\u89e3\u51b3\u65b9\u6848\u3002\u8d2a\u5a6a\u7b97\u6cd5\u7684\u6838\u5fc3\u601d\u60f3\u662f\u201c\u6bcf\u4e00\u6b65\u90fd\u9009\u62e9\u6700\u4f73\u7684\u89e3\u51b3\u65b9\u6848\u201d\uff0c\u5b83\u7684\u57fa\u672c\u601d\u60f3\u662f\uff1a\u5728\u6bcf\u4e00\u6b65\uff0c\u90fd\u9009\u62e9\u5f53\u524d\u6700\u4f18\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u6700\u7ec8\u5f97\u5230\u7684\u7ed3\u679c\u53ef\u80fd\u4e0d\u662f\u6700\u4f18\u7684\uff0c\u4f46\u662f\u5b83\u53ef\u4ee5\u5728\u6709\u9650\u7684\u65f6\u95f4\u5185\u5f97\u5230\u4e00\u4e2a\u6bd4\u8f83\u597d\u7684\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n
DP\u548cAP\u662f\u4e24\u79cd\u6709\u6548\u7684\u95ee\u9898\u6c42\u89e3\u7b97\u6cd5\uff0c\u5b83\u4eec\u90fd\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u89e3\u51b3\u4e00\u4e9b\u590d\u6742\u7684\u95ee\u9898\uff0c\u4f46\u662f\u5b83\u4eec\u4e4b\u95f4\u4e5f\u5b58\u5728\u7740\u4e00\u4e9b\u91cd\u8981\u7684\u533a\u522b\u3002<\/p>\n
\u603b\u4e4b\uff0cDP\u548cAP\u90fd\u662f\u6709\u6548\u7684\u95ee\u9898\u6c42\u89e3\u7b97\u6cd5\uff0c\u4f46\u5b83\u4eec\u4e4b\u95f4\u5b58\u5728\u7740\u4e00\u4e9b\u91cd\u8981\u7684\u533a\u522b\u3002<\/strong>\u6211\u4eec\u5e94\u8be5\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u9009\u62e9\u6700\u5408\u9002\u7684\u7b97\u6cd5\uff0c\u4ee5\u83b7\u5f97\u6700\u4f18\u7684\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" DP\uff08DynamicProgramming\uff09\u548cAP\uff08GreedyAlgorithm\uff09\u662f\u4e24\u79cd\u6709\u6548\u7684\u95ee\u9898\u6c42\u89e3\u7b97\u6cd5\uff0c\u5b83\u4eec\u90fd\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u89e3\u51b3\u4e00\u4e9b\u590d\u6742\u7684\u95ee\u9898\uff0c\u4f46\u662f\u5b83\u4eec\u4e4b\u95f4\u4e5f\u5b58\u5728<\/p>\n","protected":false},"author":1,"featured_media":4132,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[305],"class_list":["post-41634","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-dzjs"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/41634","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/comments?post=41634"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/41634\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/4132"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=41634"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=41634"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=41634"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}