{"id":1337,"date":"2020-02-23T20:01:01","date_gmt":"2020-02-23T12:01:01","guid":{"rendered":"http:\/\/149.129.74.185\/?p=1337"},"modified":"2020-02-23T20:01:01","modified_gmt":"2020-02-23T12:01:01","slug":"bilibili-1%e7%b2%be%e7%81%b5%e9%bc%a0%e4%bb%8e%e5%85%a5%e5%8f%a3%e5%88%b0%e5%87%ba%e5%8f%a3%e7%9a%84%e6%9c%80%e5%b0%91%e5%87%8f%e5%b0%91%e9%80%9f%e5%ba%a6","status":"publish","type":"post","link":"http:\/\/www.magicmipamipa.com\/?p=1337","title":{"rendered":"[Bilibili] (1)\u7cbe\u7075\u9f20\u4ece\u5165\u53e3\u5230\u51fa\u53e3\u7684\u6700\u5c11\u51cf\u5c11\u901f\u5ea6"},"content":{"rendered":"<h4 class=\"subject-item-title\" id=\"mcetoc_1e1oumadd0\">\u9898\u76ee\u63cf\u8ff0<\/h4>\n<div class=\"subject-describe\">\n<div class=\"js-question-content subject-question mb2\">\n<p><span>\u731b\u517d\u4fa0\u4e2d\u7cbe\u7075\u9f20\u5728\u5229\u5251\u98de\u8239\u7684\u8ffd\u9010\u4e0b\u9003\u5230\u4e00\u4e2a<\/span><span>n*n<\/span><span>\u7684\u5efa\u7b51\u7fa4\u4e2d\uff0c\u7cbe\u7075\u9f20\u4ece\uff08<\/span><span>0,0<\/span><span>\uff09\u7684\u4f4d\u7f6e\u8fdb\u5165\u5efa\u7b51\u7fa4\uff0c\u5efa\u7b51\u7fa4\u7684\u51fa\u53e3\u4f4d\u7f6e\u4e3a\uff08<\/span><span>n-1,n-1<\/span><span>\uff09\uff0c\u5efa\u7b51\u7fa4\u7684\u6bcf\u4e2a\u4f4d\u7f6e\u90fd\u6709\u963b\u788d\uff0c\u6bcf\u4e2a\u4f4d\u7f6e\u4e0a\u90fd\u4f1a\u76f8\u5f53\u4e8e\u7ed9\u4e86\u7cbe\u7075\u9f20\u4e00\u4e2a\u56fa\u5b9a\u503c\u51cf\u901f\uff0c\u56e0\u4e3a\u7cbe\u7075\u9f20\u6b63\u5728\u9003\u547d\u6240\u4ee5\u4e0d\u80fd\u56de\u5934\u53ea\u80fd\u5411\u524d\u6216\u8005\u5411\u4e0b\u9003\u8dd1\uff0c\u73b0\u5728\u95ee\u7cbe\u7075\u9f20\u6700\u5c11\u5728\u51cf\u901f\u591a\u5c11\u7684\u60c5\u51b5\u4e0b\u9003\u51fa\u8ff7\u5bab\uff1f<\/span><\/p>\n<\/div>\n<p>\u8f93\u5165\u63cf\u8ff0:<\/p>\n<pre>\u7b2c\u4e00\u884c\u8ff7\u5bab\u7684\u5927\u5c0f: n &gt;=2 &amp; n &lt;= 10000\uff1b\r\n\u7b2c2\u5230n+1\u884c\uff0c\u6bcf\u884c\u8f93\u5165\u4e3a\u4ee5','\u5206\u5272\u7684\u8be5\u4f4d\u7f6e\u7684\u51cf\u901f,\u51cf\u901ff &gt;=1 &amp; f &lt; 10\u3002<\/pre>\n<h4 id=\"mcetoc_1e1oumadd2\">\u8f93\u51fa\u63cf\u8ff0:<\/h4>\n<pre>\u7cbe\u7075\u9f20\u4ece\u5165\u53e3\u5230\u51fa\u53e3\u7684\u6700\u5c11\u51cf\u5c11\u901f\u5ea6\uff1f<\/pre>\n<div class=\"question-oi\">\n<div class=\"question-oi-hd\">\u793a\u4f8b1<\/div>\n<div class=\"question-oi-bd\">\n<div class=\"question-oi-mod\">\n<h4 id=\"mcetoc_1e1oumadd3\">\u8f93\u5165<\/h4>\n<div class=\"question-oi-cont\">\n<pre>3\r\n5,5,7\r\n6,7,8\r\n2,2,4<\/pre>\n<\/div>\n<\/div>\n<div class=\"question-oi-mod\">\n<h4 id=\"mcetoc_1e1oumadd4\">\u8f93\u51fa<\/h4>\n<div class=\"question-oi-cont\">\n<pre>19<\/pre>\n<hr \/>\n<p>\u52a8\u6001\u89c4\u5212\uff0c\u521d\u59cb\u5316\u95ee\u9898\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"cpp\">#include&lt;iostream&gt;\r\n#include&lt;vector&gt;\r\nusing namespace std;\r\n\r\nint main(){\r\n    int n;\r\n    scanf(\"%d\",&amp;n);\r\n    int map[n][n];\r\n    int dp[n][n];\r\n    for( int i = 0 ; i &lt; n ; i ++ ){\r\n        for( int j = 0 ; j &lt; n-1 ; j ++ )\r\n            scanf(\"%d,\",&amp;map[i][j]);\r\n        scanf(\"%d\",&amp;map[i][n-1]);\r\n    }\r\n    dp[0][0]=map[0][0];\r\n    for( int i = 1 ; i &lt; n ; i ++ )\r\n        dp[i][0] = map[i][0] + dp[i-1][0];\r\n    for( int j = 1 ; j &lt; n ; j ++ )\r\n        dp[0][j] = dp[0][j-1] + map[0][j];\r\n    for( int i = 1 ; i &lt; n ; i ++ )\r\n        for( int j = 1 ; j &lt; n ; j ++ )\r\n            dp[i][j] = min(dp[i-1][j],dp[i][j-1]) + map[i][j];\r\n    cout &lt;&lt; dp[n-1][n-1] &lt;&lt; endl;\r\n    return 0;\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u9898\u76ee\u63cf\u8ff0 \u731b\u517d\u4fa0\u4e2d\u7cbe\u7075\u9f20\u5728\u5229\u5251\u98de\u8239\u7684\u8ffd\u9010\u4e0b\u9003\u5230\u4e00\u4e2an*n\u7684\u5efa\u7b51\u7fa4\u4e2d\uff0c\u7cbe\u7075\u9f20\u4ece\uff080,0\uff09\u7684\u4f4d\u7f6e\u8fdb\u5165\u5efa\u7b51 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[16,35],"tags":[],"_links":{"self":[{"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=\/wp\/v2\/posts\/1337"}],"collection":[{"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1337"}],"version-history":[{"count":1,"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=\/wp\/v2\/posts\/1337\/revisions"}],"predecessor-version":[{"id":1338,"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=\/wp\/v2\/posts\/1337\/revisions\/1338"}],"wp:attachment":[{"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1337"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.magicmipamipa.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}