{"id":1539,"date":"2023-06-19T18:08:09","date_gmt":"2023-06-19T10:08:09","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=1539"},"modified":"2023-06-19T18:08:09","modified_gmt":"2023-06-19T10:08:09","slug":"%e3%80%90%e7%ae%97%e6%b3%95%e9%a2%98%e8%a7%a3%e3%80%919-%e9%82%bb%e5%80%bc%e6%9f%a5%e6%89%be","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/%e7%ae%97%e6%b3%95\/%e3%80%90%e7%ae%97%e6%b3%95%e9%a2%98%e8%a7%a3%e3%80%919-%e9%82%bb%e5%80%bc%e6%9f%a5%e6%89%be\/","title":{"rendered":"\u3010\u7b97\u6cd5\u9898\u89e3\u30119. \u90bb\u503c\u67e5\u627e"},"content":{"rendered":"<div class='wxsyncmain'>\n<section mpa-from-tpl=\"t\" data-mpa-powered-by=\"yiban.io\">\n<section>\n<section data-mpa-template=\"t\" mpa-from-tpl=\"t\">\n<section data-mpa-template-schema=\"body\" style=\"padding:10px;margin:10px;display:-webkit-box;display:-webkit-box-flex;display:flex;\" mpa-from-tpl=\"t\">\n<section data-mpa-template-section=\"\" style=\"border-left:2px solid #979797;padding:12px;line-height:22px;font-size:14px;color:#717171;text-align:justify;\" mpa-from-tpl=\"t\" itemtype=\"https:\/\/mp.weixin.qq.com\/voc\/Section\" itemscope=\"\">\n<section data-mpa-template-text=\"\" itemprop=\"text\" mpa-from-tpl=\"t\">\n<p style=\"margin: 0px;padding: 0px;text-align: left;\"><span style=\"font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u8fd9\u662f\u4e00\u9053\u4e2d\u7b49\u96be\u5ea6\u7684\u9898<\/span><\/p>\n<p style=\"margin-bottom: 0px;white-space: normal;text-align: left;\"><span style=\"color: rgb(113, 113, 113);font-size: 14px;\">\u9898\u76ee<\/span><span style=\"color: rgb(113, 113, 113);font-size: 14px;\">\u6765\u81ea<\/span><span style=\"color: rgb(113, 113, 113);font-size: 14px;\">\uff1a<\/span>https:\/\/www.acwing.com\/problem\/content\/description\/138\/<\/p>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p><br mpa-from-tpl=\"t\"  \/><\/p>\n<section data-mpa-template=\"t\" mpa-from-tpl=\"t\">\n<section data-mpa-template=\"t\" mpa-from-tpl=\"t\">\n<section data-mpa-template-schema=\"title\" itemtype=\"https:\/\/mp.weixin.qq.com\/voc\/Section\" itemscope=\"\" mpa-from-tpl=\"t\">\n<section data-mpa-template-title=\"\" itemprop=\"title\" mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\" style=\"margin-top: 10px;margin-bottom: 10px;text-align: center;transform: translate3d(2px, 0px, 0px);\">\n<section mpa-from-tpl=\"t\" style=\"display: inline-block;min-width: 10%;vertical-align: top;background-color: rgb(57, 160, 255);\">\n<section mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\" style=\"margin-top: 5px;margin-bottom: -5px;transform: translate3d(-5px, 0px, 0px);\">\n<section mpa-from-tpl=\"t\" style=\"padding-right: 8px;padding-left: 8px;display: inline-block;min-width: 10%;vertical-align: top;border-style: solid;border-width: 8px 1px 1px;border-radius: 0px;border-color: rgb(62, 62, 62);background-color: rgb(255, 255, 255);\">\n<section mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\" style=\"padding-right: 8px;padding-left: 8px;text-align: left;\">\n<p style=\"font-size: 16px;\"><span style=\"color:#000000;font-family:PingFangSC-Medium, PingFang SC;\"><strong><em>\u9898\u76ee<\/em><\/strong><\/span><\/p>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section mpa-from-tpl=\"t\">\n<section data-mpa-template-schema=\"title\" itemtype=\"https:\/\/mp.weixin.qq.com\/voc\/Section\" itemscope=\"\" mpa-from-tpl=\"t\">\n<section data-mpa-template-title=\"\" itemprop=\"title\" mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\">\n<section style=\"margin-bottom: 0px;\"><br  \/><\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<p style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-top: 0px;margin-bottom: 0px;\"><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\u7ed9\u5b9a\u4e00\u4e2a\u957f\u5ea6\u4e3a <\/span><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">n<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"> \u7684\u5e8f\u5217 <\/span><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">A<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\uff0c<\/span><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">A<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"> \u4e2d\u7684\u6570\u5404\u4e0d\u76f8\u540c\u3002<\/span><\/p>\n<p style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-top: 0px;margin-bottom: 0px;\"><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"><br  \/><\/span><\/p>\n<p style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-top: 0px;margin-bottom: 0px;\"><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\u5bf9\u4e8e<\/span> <span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">A<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"> \u4e2d\u7684\u6bcf\u4e00\u4e2a\u6570 <\/span><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">Ai<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\uff0c\u6c42\uff1a<\/span><\/p>\n<p style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-top: 0px;margin-bottom: 0px;\"><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">min|Ai\u2212Aj|<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\uff0c\u5176\u4e2d <\/span><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">1&nbsp;&lt;= j &lt; i<\/span>\u3002<\/p>\n<p style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-top: 0px;margin-bottom: 0px;\">\u4ee5\u53ca\u4ee4\u4e0a\u5f0f\u53d6\u5230\u6700\u5c0f\u503c\u7684 <span style=\"letter-spacing: 1px;outline: 0px;font-family: &quot;Source Code Pro&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Anonymous Pro&quot;, &quot;Droid Sans Mono&quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, sans-serif;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;\">j<\/span>\uff08\u8bb0\u4e3a <span style=\"letter-spacing: 1px;outline: 0px;font-family: &quot;Source Code Pro&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Anonymous Pro&quot;, &quot;Droid Sans Mono&quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, sans-serif;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;\">Pi<\/span>\uff09\u3002\u82e5\u6700\u5c0f\u503c\u70b9\u4e0d\u552f\u4e00\uff0c\u5219\u9009\u62e9\u4f7f <span style=\"letter-spacing: 1px;outline: 0px;font-family: &quot;Source Code Pro&quot;, &quot;DejaVu Sans Mono&quot;, &quot;Ubuntu Mono&quot;, &quot;Anonymous Pro&quot;, &quot;Droid Sans Mono&quot;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, sans-serif;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;\">Aj<\/span>\u8f83\u5c0f\u7684\u90a3\u4e2a\u3002<\/p>\n<p style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-top: 0px;margin-bottom: 0px;\"><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"><\/span><\/p>\n<p style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-top: 0px;margin-bottom: 0px;\"><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"><br  \/><\/span><\/p>\n<h4 style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-top: 0px;margin-bottom: 0px;\"><strong><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\u8f93\u5165\u683c\u5f0f<\/span><\/strong><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"><\/span><\/h4>\n<p style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-top: 0px;margin-bottom: 0px;\"><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\u7b2c\u4e00\u884c\u8f93\u5165\u6574\u6570 <\/span><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">n<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\uff0c\u4ee3\u8868<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\u5e8f\u5217\u957f\u5ea6\u3002<\/span><\/p>\n<p style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-top: 0px;margin-bottom: 0px;\"><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\u7b2c\u4e8c\u884c\u8f93\u5165 <\/span><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">n<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"> \u4e2a\u6574\u6570&nbsp;<\/span><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">A1 \u2026 An<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">, \u4ee3\u8868\u5e8f\u5217\u7684\u5177\u4f53\u6570\u503c\uff0c\u6570\u503c\u4e4b\u95f4\u7528\u7a7a\u683c\u9694\u5f00\u3002<\/span><\/p>\n<p style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-top: 0px;margin-bottom: 0px;\"><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"><br  \/><\/span><\/p>\n<h4 style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-top: 0px;margin-bottom: 0px;\"><strong><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\u8f93\u51fa\u683c\u5f0f<\/span><\/strong><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"><\/span><\/h4>\n<p style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-top: 0px;margin-bottom: 0px;\"><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\u8f93\u51fa\u5171 <\/span><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">n\u22121<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"> \u884c\uff0c\u6bcf\u884c\u8f93\u51fa\u4e24\u4e2a\u6574\u6570\uff0c\u6570\u503c\u4e4b\u95f4\u7528\u7a7a\u683c\u9694\u5f00\u3002<\/span><\/p>\n<p style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-top: 0px;margin-bottom: 0px;\"><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\u5206\u522b\u8868\u793a\u5f53 <\/span><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">i<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"> \u53d6 <\/span><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">2\u223cn<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"> \u65f6\uff0c\u5bf9\u5e94\u7684 <\/span><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">min|Ai\u2212Aj<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">| \u548c <\/span><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">Pi<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"> \u7684\u503c\u3002<\/span><\/p>\n<p style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-top: 0px;margin-bottom: 0px;\"><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"><br  \/><\/span><\/p>\n<h4 style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-top: 0px;margin-bottom: 0px;\"><strong><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\u6570\u636e\u8303\u56f4<\/span><\/strong><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"><\/span><\/h4>\n<p style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-top: 0px;margin-bottom: 0px;\"><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">n \u2264 10^5, |Ai| \u2264 10^9<\/span><\/p>\n<p style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-top: 0px;margin-bottom: 0px;\"><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"><br  \/><\/span><\/p>\n<h4 style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;\"><strong><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\u8f93\u5165\u6837\u4f8b\uff1a<\/span><\/strong><\/h4>\n<section data-mpa-preserve-tpl-color=\"t\" data-mpa-template=\"t\" mpa-preserve=\"t\" mpa-from-tpl=\"t\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 5.95px;overflow-x: auto;white-space: nowrap;\">3<br mpa-from-tpl=\"t\"  \/>1 5 3<\/code><\/pre>\n<\/section>\n<h4 style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;\"><strong><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\u8f93\u51fa\u6837\u4f8b\uff1a<\/span><\/strong><\/h4>\n<section data-mpa-preserve-tpl-color=\"t\" data-mpa-template=\"t\" mpa-preserve=\"t\" mpa-from-tpl=\"t\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 5.95px;overflow-x: auto;white-space: nowrap;\">4 1<br mpa-from-tpl=\"t\"  \/>2 1<\/code><\/pre>\n<\/section>\n<section data-mpa-template=\"t\" mpa-from-tpl=\"t\">\n<section style=\"display: flex;justify-content: center;align-items: center;width: 100%;\" data-mid=\"\" mpa-from-tpl=\"t\">\n<section style=\"width: 113px;height: 18px;display: flex;justify-content: center;\" data-mid=\"\" mpa-from-tpl=\"t\"><br  \/><\/section>\n<\/section>\n<section style=\"display: flex;justify-content: center;align-items: center;width: 100%;\" data-mid=\"\" mpa-from-tpl=\"t\">\n<section style=\"width: 113px;height: 18px;display: flex;justify-content: center;\" data-mid=\"\" mpa-from-tpl=\"t\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.1592920353982301\"  data-w=\"226\" style=\"display: block;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043551501.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.1592920353982301\"  data-w=\"226\" style=\"display: block;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043551501.png\"  \/><\/noscript><\/section>\n<\/section>\n<section style=\"display: flex;justify-content: center;align-items: center;width: 100%;\" data-mid=\"\" mpa-from-tpl=\"t\">\n<section style=\"width: 113px;height: 18px;display: flex;justify-content: center;text-align: center;\" data-mid=\"\" mpa-from-tpl=\"t\"><br  \/><\/section>\n<\/section>\n<\/section>\n<section data-mpa-template=\"t\" mpa-from-tpl=\"t\">\n<section data-mpa-template=\"t\" mpa-from-tpl=\"t\">\n<section data-mpa-template-schema=\"title\" itemtype=\"https:\/\/mp.weixin.qq.com\/voc\/Section\" itemscope=\"\" mpa-from-tpl=\"t\">\n<section data-mpa-template-title=\"\" itemprop=\"title\" mpa-from-tpl=\"t\">\n<section style=\"text-align: center;transform: translate3d(2px, 0px, 0px);margin: 10px 0%;\" mpa-from-tpl=\"t\">\n<section style=\"display: inline-block;min-width: 10%;vertical-align: top;background-color: rgb(57, 160, 255);\" mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\">\n<section style=\"margin: 5px 0% -5px;transform: translate3d(-5px, 0px, 0px);\" mpa-from-tpl=\"t\">\n<section style=\"display: inline-block;min-width: 10%;vertical-align: top;border-style: solid;border-width: 8px 1px 1px;border-radius: 0px;border-color: rgb(62, 62, 62);background-color: rgb(255, 255, 255);padding-right: 8px;padding-left: 8px;\" mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\">\n<section style=\"text-align: left;padding-right: 8px;padding-left: 8px;\" mpa-from-tpl=\"t\">\n<p><em style=\"font-size: 24px;text-indent: 0em;font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\"><strong><span style=\"color: rgb(0, 0, 0);font-size: 16px;text-decoration-style: solid;text-decoration-color: rgb(0, 0, 0);\">\u89e3\u9898\u601d\u8def<\/span><\/strong><\/em><\/p>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-bottom: 0px;\"><br  \/><\/section>\n<section style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: justify;margin-bottom: 0px;\">\u9996\u5148\u6392\u9664\u66b4\u529b\u89e3\u6cd5\uff0c\u6beb\u65e0\u7591\u95ee\u4f1a\u8d85\u65f6\u3002\u5982\u679c\u4e0d\u66b4\u529b\u5faa\u73af\uff0c\u90a3\u4e48\u600e\u4e48\u53ef\u4ee5\u83b7\u53d6\u5230\u4f4d\u7f6e\u5728 <span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">Ai<\/span> \u524d\u9762\u4e14\u4e0e <span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">Ai<\/span> \u5dee\u503c\u6700\u5c0f\u7684\u6570\u5462\uff1f<br  \/><\/section>\n<section style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: justify;margin-bottom: 0px;\"><br  \/><\/section>\n<section style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: justify;margin-bottom: 0px;\"><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\u65e2\u7136\u662f\u6c42\u5dee\u503c\u6700\u5c0f\uff0c\u90a3\u4e48\u6709\u4e00\u4e2a\u601d\u8def\u5c31\u662f\u53ef\u4ee5\u5c06\u5e8f\u5217\u4e2d\u7684\u6240\u6709\u6570\u6309\u7167\u4ece\u5c0f\u5230\u5927\u6392\u5e8f\uff0c\u90a3\u4e48\u4e0e<\/span><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">Ai<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\u5dee\u503c\u6700\u5c0f\u7684\u6570\u80af\u5b9a\u5c31\u662f\u6392\u5e8f\u540e<\/span><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">Ai<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\u7684\u524d\u4e00\u540e\u6570\u6216\u8005\u540e\u4e00\u4e2a\u6570\u3002\u4f46\u662f\u6309\u6b63\u5e38\u4ece\u524d\u5f80\u540e\u627e\u7684\u65f6\u5019\uff0c\u6211\u4eec\u65e0\u6cd5\u786e\u5b9a\u8fd9\u4e24\u4e2a\u6570\u6392\u5e8f\u524d\u662f\u5426\u662f\u5728 <\/span><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">Ai<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"> \u7684\u524d\u9762\u3002<\/span><\/section>\n<section style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: justify;margin-bottom: 0px;\"><br  \/><\/section>\n<section style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: justify;margin-bottom: 0px;\"><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\u8fd9\u65f6\u5019\u53ef\u4ee5\u8003\u8651\u5012\u5e8f\u53bb\u627e\uff0c\u5373\u5148\u627e\u6700\u540e\u4e00\u4e2a <\/span><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">An<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"> \u7684\u7b54\u6848\uff0c\u56e0\u4e3a\u5bf9\u4e8e\u6700\u540e\u4e00\u4e2a\u6570\u6765\u8bf4\uff0c\u5176\u4ed6\u6570\u80af\u5b9a\u90fd\u5728\u5b83\u7684\u524d\u9762\u3002\u5f53\u5f97\u5230\u6700\u540e\u4e00\u4e2a\u6570\u7684\u7b54\u6848\u540e\uff0c\u76f4\u63a5\u5c06 <\/span><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">An<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"> \u4ece\u6392\u5e8f\u540e\u7684\u5e8f\u5217\u4e2d\u5220\u9664\uff0c\u7136\u540e\u518d\u6c42 <\/span><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">A(n-1)<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"> \u7684\u7b54\u6848\uff0c\u8fd9\u4e2a\u65f6\u5019\u5e8f\u5217\u4e2d\u7684\u5176\u5b83\u6570\u6392\u5e8f\u524d\u80af\u5b9a\u90fd\u5728<\/span><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">A(n-1)<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\u524d\u9762\uff0c\u56e0\u4e3a\u5728\u5b83\u540e\u9762\u7684\u6570\u90fd\u5df2\u7ecf\u88ab\u5220\u6389\u4e86\uff0c\u4ee5\u6b64\u7c7b\u63a8\uff0c\u76f4\u5230\u5f97\u5230 <\/span><span style=\"font-size: 15px;font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;letter-spacing: 1px;outline: 0px;font-family: &#39;Source Code Pro&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Ubuntu Mono&#39;, &#39;Anonymous Pro&#39;, &#39;Droid Sans Mono&#39;, Menlo, Monaco, Consolas, Inconsolata, Courier, monospace, &#39;PingFang SC&#39;, &#39;Microsoft YaHei&#39;, sans-serif;font-size: 14px;line-height: 22px;color: rgb(199, 37, 78);background-color: rgb(249, 242, 244);font-variant-ligatures: no-common-ligatures;text-align: start;\">A2<\/span><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">&nbsp;\u7684\u7b54\u6848\u3002<\/span><\/section>\n<section style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: justify;margin-bottom: 0px;\"><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"><br  \/><\/span><\/section>\n<p style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-bottom: 8px;\"><strong><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff1a<\/span><\/strong><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\"><\/span><\/p>\n<ol class=\"list-paddingleft-1\" style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;\">\n<li style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;\">\n<p style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;\"><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\u89e3\u6cd5\u4e2d\u9700\u8981\u591a\u6b21\u5220\u9664\u5e8f\u5217\u4e2d\u7684\u6570\uff0c\u6240\u4ee5\u6211\u4eec\u5e94\u8be5\u4f7f\u7528\u94fe\u8868\u6765\u5b58\u50a8\u6392\u5e8f\u5e8f\u5217\u3002<\/span><\/p>\n<\/li>\n<li style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;\">\n<p style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;\"><span style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &#39;PingFang SC&#39;;font-size: 14px;text-align: left;\">\u9898\u76ee\u8981\u6c42\u8f93\u51fa\u5dee\u503c\u6700\u5c0f\u7684\u6570\u7684\u4f4d\u7f6e\uff0c\u6240\u4ee5\u6211\u4eec\u8fd8\u9700\u8981\u8bb0\u5f55\u6bcf\u4e2a\u6570\u7684\u521d\u59cb\u4f4d\u7f6e\u3002<\/span><\/p>\n<\/li>\n<\/ol>\n<section style=\"color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-bottom: 0px;\"><br  \/><\/section>\n<section style=\"min-height: 24px;line-height: 1.6em;text-align: left;margin: 0px 0px 24px;text-indent: 0em;\"><strong><span style=\"color: rgb(86, 86, 86);font-size: 14px;letter-spacing: normal;text-decoration: none solid rgb(86, 86, 86);\">\u4ee5\u8f93\u5165<\/span><\/strong><span style=\"color: rgb(86, 86, 86);font-size: 14px;letter-spacing: normal;text-decoration: none solid rgb(86, 86, 86);\"> <\/span><code style=\"font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, Menlo, Courier, monospace;background-color: rgba(0, 0, 0, 0.06);border-width: 1px;border-style: solid;border-color: rgba(0, 0, 0, 0.08);border-radius: 2px;padding-right: 2px;padding-left: 2px;\"><span style=\"color: rgb(86, 86, 86);font-size: 14px;letter-spacing: normal;text-decoration: none solid rgb(86, 86, 86);\">1 3 5 2 4<\/span><\/code><strong><span style=\"color: rgb(86, 86, 86);font-size: 14px;letter-spacing: normal;text-decoration: none solid rgb(86, 86, 86);\">\u4e3a\u4f8b\uff1a<\/span><\/strong><span style=\"color: rgb(86, 86, 86);font-size: 14px;letter-spacing: normal;text-decoration: none solid rgb(86, 86, 86);\"><\/span><\/section>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-galleryid=\"\" data-ratio=\"0.5625\"  data-type=\"gif\" data-w=\"720\" style=\"\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043552807.gif\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-galleryid=\"\" data-ratio=\"0.5625\"  data-type=\"gif\" data-w=\"720\" style=\"\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043552807.gif\"  \/><\/noscript><\/p>\n<section data-mid=\"\" mpa-from-tpl=\"t\" style=\"margin-bottom: 0px;display: flex;justify-content: center;align-items: center;width: 578px;\">\n<section data-mid=\"\" mpa-from-tpl=\"t\" style=\"width: 113px;height: 18px;display: flex;justify-content: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.1592920353982301\"  data-w=\"226\" style=\"display: block;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043553541.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.1592920353982301\"  data-w=\"226\" style=\"display: block;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043553541.png\"  \/><\/noscript><\/section>\n<\/section>\n<section data-mid=\"\" mpa-from-tpl=\"t\" style=\"margin-bottom: 0px;display: flex;justify-content: center;align-items: center;width: 578px;\">\n<section data-mid=\"\" mpa-from-tpl=\"t\" style=\"width: 113px;height: 18px;display: flex;justify-content: center;text-align: center;\"><br  \/><\/section>\n<\/section>\n<section data-mpa-template=\"t\" mpa-from-tpl=\"t\">\n<p><br  \/><\/p>\n<section data-mpa-template=\"t\" mpa-from-tpl=\"t\">\n<section data-mpa-template-schema=\"title\" itemtype=\"https:\/\/mp.weixin.qq.com\/voc\/Section\" itemscope=\"\" mpa-from-tpl=\"t\">\n<section data-mpa-template-title=\"\" itemprop=\"title\" mpa-from-tpl=\"t\">\n<section style=\"text-align: center;transform: translate3d(2px, 0px, 0px);margin: 10px 0%;\" mpa-from-tpl=\"t\">\n<section style=\"display: inline-block;min-width: 10%;vertical-align: top;background-color: rgb(57, 160, 255);\" mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\">\n<section style=\"margin: 5px 0% -5px;transform: translate3d(-5px, 0px, 0px);\" mpa-from-tpl=\"t\">\n<section style=\"display: inline-block;min-width: 10%;vertical-align: top;border-style: solid;border-width: 8px 1px 1px;border-radius: 0px;border-color: rgb(62, 62, 62);background-color: rgb(255, 255, 255);padding-right: 8px;padding-left: 8px;\" mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\">\n<section style=\"text-align: left;padding-right: 8px;padding-left: 8px;\" mpa-from-tpl=\"t\">\n<p style=\"font-size: 16px;\"><span style=\"color:#000000;font-family:PingFangSC-Medium, PingFang SC;\"><strong><em>\u4ee3\u7801\u5b9e\u73b0<\/em><\/strong><\/span><\/p>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section style=\"margin-bottom: 0px;\"><span style=\"font-size: 14px;\"><br mpa-from-tpl=\"t\"  \/><\/span><\/section>\n<section data-mpa-preserve-tpl-color=\"t\" data-mpa-template=\"t\" mpa-preserve=\"t\" mpa-from-tpl=\"t\">\n<pre style=\"margin:0;padding:0;border-radius:none;background:none;\"><code style=\"border-radius: 4px;font-size: 0.85em;margin: 0px 0.15em;background: rgb(40, 44, 52);color: rgb(171, 178, 191);display: block;padding: 5.95px;overflow-x: auto;white-space: nowrap;\"><span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 51px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">package<\/span>&nbsp;iyushu;<br mpa-from-tpl=\"t\"  \/><br mpa-from-tpl=\"t\"  \/><span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 43px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">import<\/span>&nbsp;java.util.Arrays;<br mpa-from-tpl=\"t\"  \/><span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 43px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">import<\/span>&nbsp;java.util.Comparator;<br mpa-from-tpl=\"t\"  \/><span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 43px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">import<\/span>&nbsp;java.util.Scanner;<br mpa-from-tpl=\"t\"  \/><br mpa-from-tpl=\"t\"  \/><span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 43px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">public<\/span>&nbsp;<span style=\"color: rgb(171, 178, 191);background: rgba(0, 0, 0, 0);display: inline;width: 79px;text-decoration: none solid rgb(171, 178, 191);font-weight: 400;font-style: normal;\"><span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 36px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">class<\/span>&nbsp;<span style=\"color: rgb(230, 192, 123);background: rgba(0, 0, 0, 0);display: inline;width: 29px;text-decoration: none solid rgb(230, 192, 123);font-weight: 400;font-style: normal;\">Main<\/span>&nbsp;<\/span>{<br mpa-from-tpl=\"t\"  \/><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(171, 178, 191);background: rgba(0, 0, 0, 0);display: inline;width: 282px;text-decoration: none solid rgb(171, 178, 191);font-weight: 400;font-style: normal;\"><span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 43px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">public<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 43px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">static<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 29px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">void<\/span>&nbsp;<span style=\"color: rgb(97, 174, 238);background: rgba(0, 0, 0, 0);display: inline;width: 29px;text-decoration: none solid rgb(97, 174, 238);font-weight: 400;font-style: normal;\">main<\/span><span style=\"color: rgb(171, 178, 191);background: rgba(0, 0, 0, 0);display: inline;width: 108px;text-decoration: none solid rgb(171, 178, 191);font-weight: 400;font-style: normal;\">(String[] args)<\/span>&nbsp;<\/span>{<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Scanner input = <span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">new<\/span>&nbsp;Scanner(System.in);<br mpa-from-tpl=\"t\"  \/><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">int<\/span>&nbsp;n = input.nextInt();<br mpa-from-tpl=\"t\"  \/><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">int<\/span>[] nums = <span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">new<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">int<\/span>[n + <span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">1<\/span>];<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(92, 99, 112);background: rgba(0, 0, 0, 0);display: inline;width: 74px;text-decoration: none solid rgb(92, 99, 112);font-weight: 400;font-style: italic;\">\/\/\u5b58\u653e\u4e0b\u6807\uff0c<\/span><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Integer[] rank = <span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">new<\/span>&nbsp;Integer[n + <span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">1<\/span>];<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">for<\/span>&nbsp;(<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">int<\/span>&nbsp;i = <span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">1<\/span>; i &lt;= n; i++) {<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nums[i] = input.nextInt();<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rank[i] = i;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br mpa-from-tpl=\"t\"  \/><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Arrays.sort(rank, <span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">1<\/span>, n + <span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">1<\/span>, Comparator.comparingInt(r -&gt; nums[r]));<br mpa-from-tpl=\"t\"  \/><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ListNode protect = <span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">new<\/span>&nbsp;ListNode(<span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">0<\/span>, <span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">0<\/span>);<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ListNode[] nodes = <span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">new<\/span>&nbsp;ListNode[n + <span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">1<\/span>];<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ListNode latestNode = protect;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">for<\/span>&nbsp;(<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">int<\/span>&nbsp;i = <span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">1<\/span>; i &lt;= n; i++) {<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">int<\/span>&nbsp;index = rank[i];<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">int<\/span>&nbsp;num = nums[index];<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ListNode node = <span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">new<\/span>&nbsp;ListNode(num, index);<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;node.pre = latestNode;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;latestNode.next = node;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nodes[index] = node;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;latestNode = node;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br mpa-from-tpl=\"t\"  \/><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(92, 99, 112);background: rgba(0, 0, 0, 0);display: inline;width: 94px;text-decoration: none solid rgb(92, 99, 112);font-weight: 400;font-style: italic;\">\/\/ \u5220\u9664\u4fdd\u62a4\u8282\u70b9<\/span><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;protect.next.pre = <span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 29px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">null<\/span>;<br mpa-from-tpl=\"t\"  \/><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">int<\/span>[][] ans = <span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">new<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">int<\/span>[n + <span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">1<\/span>][<span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">2<\/span>];<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(92, 99, 112);background: rgba(0, 0, 0, 0);display: inline;width: 86px;text-decoration: none solid rgb(92, 99, 112);font-weight: 400;font-style: italic;\">\/\/\u5012\u53d9\u8ba1\u7b97\u7ed3\u679c<\/span><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">for<\/span>(<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">int<\/span>&nbsp;i = n; i &gt;= <span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">2<\/span>; i--){<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ListNode node = nodes[i];<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ans[i] = calMin(node);<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(92, 99, 112);background: rgba(0, 0, 0, 0);display: inline;width: 86px;text-decoration: none solid rgb(92, 99, 112);font-weight: 400;font-style: italic;\">\/\/\u5220\u6389\u5f53\u524d\u8282\u70b9<\/span><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deleteCurNode(node);<br mpa-from-tpl=\"t\"  \/><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br mpa-from-tpl=\"t\"  \/><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">for<\/span>&nbsp;(<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">int<\/span>&nbsp;i = <span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">2<\/span>; i &lt;= n; i++) {<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(ans[i][<span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">0<\/span>] + <span style=\"color: rgb(152, 195, 121);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(152, 195, 121);font-weight: 400;font-style: normal;\">\" \"<\/span>&nbsp;+ ans[i][<span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">1<\/span>]);<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br mpa-from-tpl=\"t\"  \/><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br mpa-from-tpl=\"t\"  \/><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(171, 178, 191);background: rgba(0, 0, 0, 0);display: inline;width: 354px;text-decoration: none solid rgb(171, 178, 191);font-weight: 400;font-style: normal;\"><span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 51px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">private<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 43px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">static<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 29px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">void<\/span>&nbsp;<span style=\"color: rgb(97, 174, 238);background: rgba(0, 0, 0, 0);display: inline;width: 94px;text-decoration: none solid rgb(97, 174, 238);font-weight: 400;font-style: normal;\">deleteCurNode<\/span><span style=\"color: rgb(171, 178, 191);background: rgba(0, 0, 0, 0);display: inline;width: 108px;text-decoration: none solid rgb(171, 178, 191);font-weight: 400;font-style: normal;\">(ListNode node)<\/span>&nbsp;<\/span>{<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 14px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">if<\/span>(node.pre != <span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 29px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">null<\/span>){<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;node.pre.next = node.next;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 14px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">if<\/span>(node.next != <span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 29px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">null<\/span>){<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;node.next.pre = node.pre;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br mpa-from-tpl=\"t\"  \/><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(92, 99, 112);background: rgba(0, 0, 0, 0);display: inline;width: 320px;text-decoration: none solid rgb(92, 99, 112);font-weight: 400;font-style: italic;\">\/\/ \u8fd4\u56de\u4e00\u4e2a\u6570\u7ec4min\uff0cmin[0]=|Ai\u2212Aj|\uff0cmin[1] = Pi<\/span><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 43px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">static<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">int<\/span>[] calMin(ListNode node){<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">int<\/span>[] min = <span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">new<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">int<\/span>[<span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">2<\/span>];<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ListNode pre = node.pre;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 14px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">if<\/span>(pre != <span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 29px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">null<\/span>){<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;min[<span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">0<\/span>] = Math.abs(node.num - pre.num);<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;min[<span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">1<\/span>] = pre.index;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ListNode next = node.next;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 14px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">if<\/span>(next != <span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 29px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">null<\/span>){<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">int<\/span>&nbsp;diff = Math.abs(node.num - next.num);<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 14px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">if<\/span>(pre == <span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 29px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">null<\/span>&nbsp;|| diff &lt; min[<span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">0<\/span>] || diff == min[<span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">0<\/span>] &amp;&amp; next.num &lt; pre.num){<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;min[<span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">0<\/span>] = diff;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;min[<span style=\"color: rgb(209, 154, 102);background: rgba(0, 0, 0, 0);display: inline;width: 7px;text-decoration: none solid rgb(209, 154, 102);font-weight: 400;font-style: normal;\">1<\/span>] = next.index;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 43px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">return<\/span>&nbsp;min;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br mpa-from-tpl=\"t\"  \/><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 43px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">static<\/span>&nbsp;<span style=\"color: rgb(171, 178, 191);background: rgba(0, 0, 0, 0);display: inline;width: 101px;text-decoration: none solid rgb(171, 178, 191);font-weight: 400;font-style: normal;\"><span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 36px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">class<\/span>&nbsp;<span style=\"color: rgb(230, 192, 123);background: rgba(0, 0, 0, 0);display: inline;width: 58px;text-decoration: none solid rgb(230, 192, 123);font-weight: 400;font-style: normal;\">ListNode<\/span><\/span>{<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 51px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">private<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">int<\/span>&nbsp;num;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 51px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">private<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">int<\/span>&nbsp;index;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 51px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">private<\/span>&nbsp;ListNode next;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 51px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">private<\/span>&nbsp;ListNode pre;<br mpa-from-tpl=\"t\"  \/><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(171, 178, 191);background: rgba(0, 0, 0, 0);display: inline;width: 260px;text-decoration: none solid rgb(171, 178, 191);font-weight: 400;font-style: normal;\"><span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 43px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">public<\/span>&nbsp;<span style=\"color: rgb(97, 174, 238);background: rgba(0, 0, 0, 0);display: inline;width: 58px;text-decoration: none solid rgb(97, 174, 238);font-weight: 400;font-style: normal;\">ListNode<\/span><span style=\"color: rgb(171, 178, 191);background: rgba(0, 0, 0, 0);display: inline;width: 145px;text-decoration: none solid rgb(171, 178, 191);font-weight: 400;font-style: normal;\">(<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">int<\/span>&nbsp;num, <span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 22px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">int<\/span>&nbsp;index)<\/span>&nbsp;<\/span>{<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 29px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">this<\/span>.num = num;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 29px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">this<\/span>.index = index;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br mpa-from-tpl=\"t\"  \/><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(171, 178, 191);background: rgba(0, 0, 0, 0);display: inline;width: 188px;text-decoration: none solid rgb(171, 178, 191);font-weight: 400;font-style: normal;\"><span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 43px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">public<\/span>&nbsp;ListNode <span style=\"color: rgb(97, 174, 238);background: rgba(0, 0, 0, 0);display: inline;width: 51px;text-decoration: none solid rgb(97, 174, 238);font-weight: 400;font-style: normal;\">getNext<\/span><span style=\"color: rgb(171, 178, 191);background: rgba(0, 0, 0, 0);display: inline;width: 14px;text-decoration: none solid rgb(171, 178, 191);font-weight: 400;font-style: normal;\">()<\/span>&nbsp;<\/span>{<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 43px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">return<\/span>&nbsp;next;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br mpa-from-tpl=\"t\"  \/><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(171, 178, 191);background: rgba(0, 0, 0, 0);display: inline;width: 253px;text-decoration: none solid rgb(171, 178, 191);font-weight: 400;font-style: normal;\"><span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 43px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">public<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 29px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">void<\/span>&nbsp;<span style=\"color: rgb(97, 174, 238);background: rgba(0, 0, 0, 0);display: inline;width: 51px;text-decoration: none solid rgb(97, 174, 238);font-weight: 400;font-style: normal;\">setNext<\/span><span style=\"color: rgb(171, 178, 191);background: rgba(0, 0, 0, 0);display: inline;width: 108px;text-decoration: none solid rgb(171, 178, 191);font-weight: 400;font-style: normal;\">(ListNode next)<\/span>&nbsp;<\/span>{<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 29px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">this<\/span>.next = next;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br mpa-from-tpl=\"t\"  \/><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(171, 178, 191);background: rgba(0, 0, 0, 0);display: inline;width: 181px;text-decoration: none solid rgb(171, 178, 191);font-weight: 400;font-style: normal;\"><span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 43px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">public<\/span>&nbsp;ListNode <span style=\"color: rgb(97, 174, 238);background: rgba(0, 0, 0, 0);display: inline;width: 43px;text-decoration: none solid rgb(97, 174, 238);font-weight: 400;font-style: normal;\">getPre<\/span><span style=\"color: rgb(171, 178, 191);background: rgba(0, 0, 0, 0);display: inline;width: 14px;text-decoration: none solid rgb(171, 178, 191);font-weight: 400;font-style: normal;\">()<\/span>&nbsp;<\/span>{<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 43px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">return<\/span>&nbsp;pre;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br mpa-from-tpl=\"t\"  \/><br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(171, 178, 191);background: rgba(0, 0, 0, 0);display: inline;width: 238px;text-decoration: none solid rgb(171, 178, 191);font-weight: 400;font-style: normal;\"><span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 43px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">public<\/span>&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 29px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">void<\/span>&nbsp;<span style=\"color: rgb(97, 174, 238);background: rgba(0, 0, 0, 0);display: inline;width: 43px;text-decoration: none solid rgb(97, 174, 238);font-weight: 400;font-style: normal;\">setPre<\/span><span style=\"color: rgb(171, 178, 191);background: rgba(0, 0, 0, 0);display: inline;width: 101px;text-decoration: none solid rgb(171, 178, 191);font-weight: 400;font-style: normal;\">(ListNode pre)<\/span>&nbsp;<\/span>{<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: rgb(198, 120, 221);background: rgba(0, 0, 0, 0);display: inline;width: 29px;text-decoration: none solid rgb(198, 120, 221);font-weight: 400;font-style: normal;\">this<\/span>.pre = pre;<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br mpa-from-tpl=\"t\"  \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br mpa-from-tpl=\"t\"  \/><br mpa-from-tpl=\"t\"  \/>}<\/code><\/pre>\n<\/section>\n<section data-mpa-template=\"t\" mpa-from-tpl=\"t\" style=\"white-space: normal;\">\n<section data-mid=\"\" mpa-from-tpl=\"t\" style=\"display: flex;justify-content: center;align-items: center;width: 578px;\">\n<section data-mid=\"\" mpa-from-tpl=\"t\" style=\"width: 113px;height: 18px;display: flex;justify-content: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"0.1592920353982301\"  data-w=\"226\" style=\"display: block;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043554807.png\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"0.1592920353982301\"  data-w=\"226\" style=\"display: block;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043554807.png\"  \/><\/noscript><\/section>\n<\/section>\n<section data-mid=\"\" mpa-from-tpl=\"t\" style=\"display: flex;justify-content: center;align-items: center;width: 578px;\">\n<section data-mid=\"\" mpa-from-tpl=\"t\" style=\"width: 113px;height: 18px;display: flex;justify-content: center;text-align: center;\"><br  \/><\/section>\n<\/section>\n<\/section>\n<section data-mpa-template=\"t\" mpa-from-tpl=\"t\" style=\"white-space: normal;\">\n<section data-mpa-template=\"t\" mpa-from-tpl=\"t\">\n<section data-mpa-template-schema=\"title\" itemtype=\"https:\/\/mp.weixin.qq.com\/voc\/Section\" itemscope=\"\" mpa-from-tpl=\"t\">\n<section data-mpa-template-title=\"\" itemprop=\"title\" mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\" style=\"margin-top: 10px;margin-bottom: 10px;text-align: center;transform: translate3d(2px, 0px, 0px);\">\n<section mpa-from-tpl=\"t\" style=\"display: inline-block;min-width: 10%;vertical-align: top;background-color: rgb(57, 160, 255);\">\n<section mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\" style=\"margin-top: 5px;margin-bottom: -5px;transform: translate3d(-5px, 0px, 0px);\">\n<section mpa-from-tpl=\"t\" style=\"padding-right: 8px;padding-left: 8px;display: inline-block;min-width: 10%;vertical-align: top;border-style: solid;border-width: 8px 1px 1px;border-radius: 0px;border-color: rgb(62, 62, 62);background-color: rgb(255, 255, 255);\">\n<section mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\">\n<section mpa-from-tpl=\"t\" style=\"padding-right: 8px;padding-left: 8px;text-align: left;\">\n<p>\u590d\u6742\u5ea6\u5206\u6790<br  \/><\/p>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section style=\"white-space: normal;color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: left;margin-bottom: 0px;\"><br  \/><\/section>\n<p style=\"white-space: normal;color: rgb(86, 86, 86);font-family: PingFangSC-Regular, &quot;PingFang SC&quot;;font-size: 14px;text-align: justify;margin-bottom: 8px;\"><strong><span style=\"text-align: justify;text-indent: 0em;font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u65f6\u95f4\u590d\u6742\u5ea6 <em>O(N * logN)<\/em>\uff1a<\/span><\/strong><span style=\"text-align: justify;text-indent: 0em;font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\"><\/span><span style=\"text-align: justify;text-indent: 0em;font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u7b97\u6cd5\u4e2d\u6240\u6709\u7684\u5faa\u73af\u65f6\u95f4\u590d\u6742\u5ea6\u5747\u4e3a<em>O(N)<\/em>\uff0c\u800c\u6570\u7ec4\u6392\u5e8f\u7684\u65f6\u95f4\u590d\u6742\u5ea6\u662f<em>O(N * logN)<\/em>\uff0c\u6240\u4ee5\u603b\u7684\u6765\u8bf4\u65f6\u95f4\u590d\u6742\u5ea6\u4e3a<\/span><em><span style=\"text-align: justify;text-indent: 0em;font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">O(N * lo<\/span><span style=\"text-align: justify;text-indent: 0em;font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">gN)<\/span><\/em><span style=\"text-align: justify;text-indent: 0em;font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;\">\u3002<\/span><br  \/><\/p>\n<p style=\"min-height: 24px;line-height: 1.6em;text-align: justify;margin: 0px 0px 8px;text-indent: 0em;\"><strong><span style=\"color: rgb(86, 86, 86);font-size: 14px;letter-spacing: normal;text-decoration: none;\">\u7a7a\u95f4\u590d\u6742\u5ea6<em>O(N)<\/em>\uff1a<\/span><\/strong><span style=\"color: rgb(86, 86, 86);font-size: 14px;letter-spacing: normal;text-decoration: none;\">\u7b97\u6cd5\u4e2d\u6240\u6709\u5b58\u50a8\u53d8\u91cf\u7a7a\u95f4\u590d\u6742\u5ea6\u90fd\u662f<em>O(N)<\/em>\u3002<\/span><\/p>\n<p style=\"white-space: normal;\"><br  \/><\/p>\n<p style=\"display: none;\"><mp-style-type data-value=\"3\"><\/mp-style-type><\/p>\n<blockquote>\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7:                 i\u4f59\u6570              <\/p>\n<\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u662f\u4e00\u9053\u4e2d\u7b49\u96be\u5ea6\u7684\u9898 \u9898\u76ee\u6765\u81ea\uff1ahttps:\/\/www.acwing.com\/problem\/content\/descriptio &#8230;<\/p>\n","protected":false},"author":1,"featured_media":1534,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[22],"tags":[],"class_list":["post-1539","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-22"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043551260-150x150.jpeg","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043551501.png","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043551260-300x127.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043551260.jpeg","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043551501.png","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043551260-300x127.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043551260.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043551260.jpeg","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043551501.png","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043551501.png","id":"image1"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043552807.gif","id":"image2"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043552807.gif","id":"image3"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043553541.png","id":"image4"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043553541.png","id":"image5"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043554807.png","id":"image6"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528043554807.png","id":"image7"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"\u7b97\u6cd5","post_date":"2023-06-19","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":242,"next_post_id":1561,"next_post_title":"\u3010\u7b97\u6cd5\u9898\u89e3\u30116.\u5408\u5e76\u4e24\u4e2a\u6709\u5e8f\u6570\u7ec4","previous_post_id":1464,"previous_post_title":"\u3010\u7b97\u6cd5\u9898\u89e3\u301118. \u65e0\u91cd\u590d\u5b57\u7b26\u7684\u6700\u957f\u5b50\u4e32","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/1539","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1539"}],"version-history":[{"count":0,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/1539\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/1534"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}