{"id":34225,"date":"2025-04-29T09:14:04","date_gmt":"2025-04-29T01:14:04","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/34225.html"},"modified":"2025-04-29T09:14:04","modified_gmt":"2025-04-29T01:14:04","slug":"%e3%80%90%e4%bc%98%e9%80%89%e7%ae%97%e6%b3%95-%e4%ba%8c%e5%88%86%e6%9f%a5%e6%89%be%e3%80%91%e4%ba%8c%e5%88%86%e6%9f%a5%e6%89%be%e7%ae%97%e6%b3%95%e8%a7%a3%e6%9e%90%ef%bc%9a%e5%a6%82%e4%bd%95","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/34225.html","title":{"rendered":"\u3010\u4f18\u9009\u7b97\u6cd5 | \u4e8c\u5206\u67e5\u627e\u3011\u4e8c\u5206\u67e5\u627e\u7b97\u6cd5\u89e3\u6790\uff1a\u5982\u4f55\u901a\u8fc7\u4e8c\u6bb5\u6027\u4f18\u5316\u641c\u7d22\u6548\u7387"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011357-681027d5d9831.gif\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<table>\n<tr>\u7b97\u6cd5\u76f8\u5173\u77e5\u8bc6\u70b9\u53ef\u4ee5\u901a\u8fc7\u70b9\u51fb\u4ee5\u4e0b\u94fe\u63a5\u8fdb\u884c\u5b66\u4e60\u4e00\u8d77\u52a0\u6cb9&#xff01;<\/tr>\n<tbody>\n<tr>\n<td align=\"center\">\u53cc\u6307\u9488<\/td>\n<td align=\"center\">\u6ed1\u52a8\u7a97\u53e3<\/td>\n<td align=\"center\"><\/td>\n<td align=\"center\"><\/td>\n<td align=\"center\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5728\u672c\u7bc7\u6587\u7ae0\u4e2d&#xff0c;\u6211\u4eec\u5c06\u6df1\u5165\u89e3\u6790\u4e8c\u5206\u67e5\u627e\u7b97\u6cd5\u7684\u6838\u5fc3\u539f\u7406\u3002\u4ece\u57fa\u672c\u6982\u5ff5\u5230\u5b9e\u9645\u5e94\u7528&#xff0c;\u5e26\u4f60\u4e86\u89e3\u5982\u4f55\u5229\u7528\u4e8c\u5206\u67e5\u627e\u9ad8\u6548\u5b9a\u4f4d\u5143\u7d20&#xff0c;\u63d0\u5347\u641c\u7d22\u6548\u7387\u3002\u65e0\u8bba\u4f60\u662f\u521a\u63a5\u89e6\u7b97\u6cd5\u7684\u65b0\u624b&#xff0c;\u8fd8\u662f\u60f3\u4f18\u5316\u4ee3\u7801\u6027\u80fd\u7684\u8001\u624b&#xff0c;\u4e8c\u5206\u67e5\u627e\u90fd\u662f\u4f60\u4e0d\u53ef\u5ffd\u89c6\u7684\u5f3a\u5927\u5de5\u5177&#xff01;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011358-681027d65e59f.gif\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" width=\"600\" height=\"60\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011358-681027d687044.png\" alt=\"Alt\" width=\"200\" height=\"200\" \/><\/p>\n<p>&#x1f308;\u4e2a\u4eba\u4e3b\u9875&#xff1a;\u662f\u5e97\u5c0f\u4e8c\u5440 &#x1f308;C\/C&#043;&#043;\u4e13\u680f&#xff1a;C\u8bed\u8a00\\\\ C&#043;&#043; &#x1f308;\u521d\/\u9ad8\u9636\u6570\u636e\u7ed3\u6784\u4e13\u680f&#xff1a; \u521d\u9636\u6570\u636e\u7ed3\u6784\\\\ \u9ad8\u9636\u6570\u636e\u7ed3\u6784 &#x1f308;Linux\u4e13\u680f&#xff1a; Linux &#x1f308;\u7b97\u6cd5\u4e13\u680f&#xff1a;\u7b97\u6cd5 &#x1f308;Mysql\u4e13\u680f:Mysql<\/p>\n<p>&#x1f308;\u4f60\u53ef\u77e5:\u65e0\u4eba\u6276\u6211\u9752\u4e91\u5fd7 \u6211\u81ea\u8e0f\u96ea\u81f3\u5c71\u5dc5 <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011358-681027d65e59f.gif\" alt=\"\u8bf7\u6dfb\u52a0\u56fe\u7247\u63cf\u8ff0\" width=\"600\" height=\"60\" \/><\/p>\n<\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>\n<ul>\n<li><font color=\"cornflowerblue\">34. \u5728\u6392\u5e8f\u6570\u7ec4\u4e2d\u67e5\u627e\u5143\u7d20\u7684\u7b2c\u4e00\u4e2a\u548c\u6700\u540e\u4e00\u4e2a\u4f4d\u7f6e(\u91cd\u8981)<\/font><\/li>\n<li><font color=\"cornflowerblue\">\u4e8c\u6bb5\u6027(\u91cd\u8981\/\u5fc5\u5907\u77e5\u8bc6)<\/font><\/li>\n<li>\n<ul>\n<li><font color=\"cornflowerblue\">1.\u67e5\u627e\u5de6\u7aef\u70b9<\/font><\/li>\n<li><font color=\"cornflowerblue\">2.\u5faa\u73af\u5224\u65ad\u6761\u4ef6<\/font><\/li>\n<li><font color=\"cornflowerblue\">3. left\u548cright\u79fb\u52a8\u65b9\u5f0f<\/font><\/li>\n<li><font color=\"cornflowerblue\">3.\u6c42\u4e2d\u70b9\u64cd\u4f5c<\/font><\/li>\n<li><font color=\"cornflowerblue\">4.\u603b\u7ed3\u4e8c\u5206\u6a21\u677f<\/font><\/li>\n<\/ul>\n<\/li>\n<li><font color=\"cornflowerblue\">69.x \u7684\u5e73\u65b9\u6839 <\/font><\/li>\n<li><font color=\"cornflowerblue\">35.\u641c\u7d22\u63d2\u5165\u4f4d\u7f6e<\/font><\/li>\n<li><font color=\"cornflowerblue\">69.\u5c71\u8109\u6570\u7ec4\u7684\u5cf0\u9876\u7d22\u5f15<\/font><\/li>\n<li><font color=\"cornflowerblue\">162. \u5bfb\u627e\u5cf0\u503c<\/font><\/li>\n<li><font color=\"cornflowerblue\">153. \u5bfb\u627e\u65cb\u8f6c\u6392\u5e8f\u6570\u7ec4\u4e2d\u7684\u6700\u5c0f\u503c<\/font><\/li>\n<li><font color=\"cornflowerblue\">LCR 173. \u70b9\u540d<\/font><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><font color=\"cornflowerblue\">34. \u5728\u6392\u5e8f\u6570\u7ec4\u4e2d\u67e5\u627e\u5143\u7d20\u7684\u7b2c\u4e00\u4e2a\u548c\u6700\u540e\u4e00\u4e2a\u4f4d\u7f6e(\u91cd\u8981)<\/font><\/h3>\n<p>\u3010\u9898\u76ee\u3011&#xff1a;34. \u5728\u6392\u5e8f\u6570\u7ec4\u4e2d\u67e5\u627e\u5143\u7d20\u7684\u7b2c\u4e00\u4e2a\u548c\u6700\u540e\u4e00\u4e2a\u4f4d\u7f6e<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011358-681027d6c1899.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u5982\u679c\u9898\u76ee\u4e3a&#034;\u5728\u6392\u5e8f\u6570\u7ec4\u4e2d\u67e5\u627e\u5143\u7d20&#034;&#xff0c;\u5f88\u81ea\u7136\u53ef\u4ee5\u60f3\u5230\u6734\u7d20\u4e8c\u5206\u67e5\u627e&#xff0c;\u6839\u636e\u4e2d\u95f4\u6570\u503c\u8ba8\u8bba&#xff0c;\u4f46\u662f&#034;\u6734\u7d20\u4e8c\u5206&#034;\u4e0d\u9002\u5408\u66f4\u6709\u5c42\u5ea6\u9898\u76ee&#xff0c;\u6bd4\u5982\u8bf4\u8fd9\u9053\u9898\u76ee\u3002<\/p>\n<p>\u9996\u5148\u5982\u679c\u4f7f\u7528\u6734\u7d20\u4e8c\u5206\u5355\u51ed\u4e00\u4e2a\u4e2d\u95f4\u503c&#xff0c;\u5f88\u96be\u5f97\u77e5\u7b2c\u4e00\u4e2a\u548c\u6700\u540e\u4e00\u4e2a\u4f4d\u7f6e\u3002\u5982\u679c\u51fa\u73b0\u5168\u90e8\u662f\u76f8\u540c\u5143\u7d20\u7684\u60c5\u51b5&#xff0c;\u4f1a\u5bfc\u81f4\u65f6\u95f4\u590d\u6742\u5ea6\u964d\u6210\u540c\u66b4\u529b\u89e3\u6cd5\u822c&#xff0c;\u5bf9\u6b64\u6211\u4eec\u5e94\u8be5\u501f\u52a9&#034;\u4e8c\u6bb5\u6027&#034;\u4f18\u5316\u4e8c\u5206\u67e5\u627e\u7b56\u7565<\/p>\n<p>\u3010<font color=\"cornflowerblue\">\u7b97\u6cd5\u601d\u8def<\/font>\u3011<\/p>\n<h3><font color=\"cornflowerblue\">\u4e8c\u6bb5\u6027(\u91cd\u8981\/\u5fc5\u5907\u77e5\u8bc6)<\/font><\/h3>\n<p>\u5728\u4e8c\u5206\u67e5\u627e\u7b97\u6cd5\u4e2d&#xff0c;\u201c\u4e8c\u6bb5\u6027\u201d\u901a\u5e38\u6307\u7684\u662f\u6570\u7ec4\u88ab\u5206\u6210\u4e24\u4e2a\u90e8\u5206\u8fdb\u884c\u67e5\u627e&#xff0c;\u6bcf\u6b21\u90fd<font color=\"cornflowerblue\">\u6839\u636e\u67d0\u79cd\u6761\u4ef6\u8fdb\u884c\u5224\u65ad\u3001\u51b3\u5b9a<\/font>\u5728\u54ea\u4e00\u90e8\u5206\u7ee7\u7eed\u641c\u7d22\u3002\u7b80\u5355\u6765\u8bf4&#xff0c;\u4e8c\u5206\u67e5\u627e\u901a\u8fc7\u5c06\u95ee\u9898\u9010\u6b65\u7f29\u5c0f\u5230\u4e24\u4e2a\u5b50\u95ee\u9898\u4e2d\u7684\u4e00\u4e2a&#xff0c;\u4ece\u800c\u9ad8\u6548\u5730\u627e\u5230\u76ee\u6807\u5143\u7d20\u3002<\/p>\n<h4><font color=\"cornflowerblue\">1.\u67e5\u627e\u5de6\u7aef\u70b9<\/font><\/h4>\n<p><font color=\"cornflowerblue\">\u901a\u8fc7\u7ed8\u56fe\u5206\u6790\u6570\u7ec4\u4e2d\u7684\u5143\u7d20\u4e0e\u76ee\u6807\u503c&#xff08;target&#xff09;\u4e4b\u95f4\u7684\u5173\u7cfb&#xff0c;\u6211\u4eec\u53ef\u4ee5\u5c06\u6570\u7ec4\u5212\u5206\u4e3a\u4e24\u90e8\u5206&#xff1a;\u5de6\u4fa7\u90e8\u5206\u5305\u542b\u6240\u6709\u5c0f\u4e8e\u76ee\u6807\u503c\u7684\u5143\u7d20&#xff0c;\u53f3\u4fa7\u90e8\u5206\u5219\u5305\u542b\u6240\u6709\u5927\u4e8e\u6216\u7b49\u4e8e\u76ee\u6807\u503c\u7684\u5143\u7d20<\/font>\u3002\u8fd9\u4e00\u5212\u5206\u662f\u57fa\u4e8e\u4e8c\u5206\u6027\u8d28\u8fdb\u884c\u7684\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011359-681027d717568.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u3010\u7ec6\u8282\u5904\u7406\u3011<\/p>\n<p>\u5173\u4e8e\u8fd9\u90e8\u5206\u7ec6\u8282&#xff0c;\u5c5e\u4e8e\u4e8c\u5206\u67e5\u627e\u5bb9\u6613\u5bfc\u81f4\u6b7b\u5faa\u73af\u7684\u95ee\u9898\u6240\u5728\u3002<\/p>\n<h4><font color=\"cornflowerblue\">2.\u5faa\u73af\u5224\u65ad\u6761\u4ef6<\/font><\/h4>\n<p>\u8fd9\u91cc\u6709\u4e24\u79cd\u5faa\u73af\u5224\u65ad\u6761\u4ef6&#xff0c;\u5fc5\u987b\u8981\u9009\u62e9\u7b2c\u4e00\u79cd&#xff0c;\u800c\u4e0d\u662f\u7b2c\u4e8c\u79cd\u3002\u5982\u679c\u9009\u62e9\u7b2c\u4e8c\u79cd\u4f1a\u5bfc\u81f4\u6b7b\u5faa\u73af\u3002<\/p>\n<p>\u7b2c\u4e00\u79cd&#xff1a;while(left &lt; right)<\/p>\n<p>\u7b2c\u4e8c\u79cd&#xff1a;while(left &lt;&#061; right)<\/p>\n<p><font color=\"cornflowerblue\">\u9009\u62e9\u7b2c\u4e00\u79cd\u7406\u7531<\/font><\/p>\n<p>\u3010\u7406\u7531\u4e00\u3011&#xff1a;<\/p>\n<p>\u8fd9\u91cc\u53ea\u80fd\u9009\u62e9\u7b2c\u4e00\u79cdwhile(left &lt; right)&#xff0c;\u5426\u5219\u5c31\u4f1a\u6b7b\u5faa\u73af\u3002\u6bd4\u5982left &#061; mid \u6216\u8005 right &#061; mid&#xff0c;\u5f53\u4f60\u5224\u65ad\u6761\u4ef6\u4e3aleft &lt;&#061; right&#xff0c;left &#061;&#061; right \u4e00\u76f4\u4e3a\u771f&#xff0c;\u5bfc\u81f4\u6b7b\u5faa\u73af<\/p>\n<p>\u3010\u7406\u7531\u4e8c\u3011&#xff1a;<\/p>\n<p>left &#061;&#061;right\u7684\u65f6\u5019&#xff0c;\u5c31\u662f\u6700\u7ec8\u7ed3\u6784&#xff0c;\u65e0\u9700\u5224\u65ad\u3002\u56fe\u4e2d\u6709\u4e09\u79cd\u60c5\u51b5\u4f50\u8bc1&#xff1a;\u6709\u7ed3\u679c&#xff0c;\u5168\u5927\u4e8et&#xff0c;\u5168\u5c0f\u4e8et<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011359-681027d75e91f.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h4><font color=\"cornflowerblue\">3. left\u548cright\u79fb\u52a8\u65b9\u5f0f<\/font><\/h4>\n<p>\u901a\u8fc7\u4e8c\u5206\u6cd5\u5c06\u6570\u7ec4\u5212\u5206\u4e3a\u4e24\u90e8\u5206\u3002\u5728\u6b64\u8fc7\u7a0b\u4e2d&#xff0c;\u9700\u8981\u6839\u636e\u76ee\u6807\u503c\u4e0e\u5f53\u524d\u5212\u5206\u533a\u57df\u7684\u5173\u7cfb\u6765\u5224\u65adleft\u548cright\u7684\u79fb\u52a8\u65b9\u5f0f\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011359-681027d78cbe4.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u901a\u8fc7\u7ed8\u56fe\u5206\u6790&#xff0c;\u5982\u679c\u76ee\u6807\u503c\u4f4d\u4e8e\u5de6\u4fa7\u4e14mid\u843d\u5728\u5de6\u4fa7&#xff0c;\u5219left\u5e94\u8bbe\u7f6e\u4e3amid&#xff0c;\u800c\u4e0d\u662fmid &#043; 1&#xff0c;\u4ee5\u907f\u514d\u9519\u8fc7\u76ee\u6807\u503c&#xff1b;\u5982\u679cmid\u843d\u5728\u53f3\u4fa7&#xff0c;\u5219\u7531\u4e8e\u76ee\u6807\u503c\u4e0d\u5728\u53f3\u4fa7&#xff0c;right\u5e94\u8bbe\u7f6e\u4e3amid &#8211; 1<\/p>\n<p>\u540c\u7406\u53ef\u5f97&#xff0c;\u5f53\u76ee\u6807\u4f4d\u4e8e\u53f3\u4fa7&#xff0c;\u5982\u679cmid\u843d\u5728\u53f3\u4fa7&#xff0c;\u5219right\u5e94\u8bbe\u7f6e\u4e3amid&#xff0c;\u800c\u4e0d\u662fmid &#8211; 1&#xff0c;\u4ee5\u907f\u514d\u9519\u8fc7\u76ee\u6807\u503c&#xff1b;\u5982\u679cmid\u843d\u5728\u5de6\u4fa7&#xff0c;\u5219left\u5e94\u8bbe\u7f6e\u4e3amid &#043; 1&#xff0c;\u56e0\u4e3a\u76ee\u6807\u503c\u4e0d\u5728\u5de6\u4fa7\u3002<\/p>\n<h4><font color=\"cornflowerblue\">3.\u6c42\u4e2d\u70b9\u64cd\u4f5c<\/font><\/h4>\n<p>\u9996\u5148\u8003\u8651\u5230 right \u53ef\u80fd\u4f1a\u8d85\u8fc7Max\u503c&#xff0c;\u6240\u4ee5\u4f1a\u5148\u91c7\u7528 left &#043; (right &#8211; left) \/ 2\u3002\u5728\u4e8c\u5206\u67e5\u627e\u4e2d&#xff0c;\u6c42\u4e2d\u70b9\u64cd\u4f5c\u6709\u4e24\u4e2a\u65b9\u5f0f&#xff0c;\u5728\u4e0d\u540c\u573a\u666f\u9009\u62e9\u9002\u5408\u7684\u65b9\u5f0f&#xff0c;\u5426\u5219\u5bb9\u6613\u5bfc\u81f4\u6b7b\u5faa\u73af<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011359-681027d7c92d4.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u3010\u7b2c\u4e00\u79cd\u65b9\u5f0f\u3011: mid &#061; left &#043; (right &#8211; left) \/ 2&#xff0c;\u4f1a\u5bfc\u81f4mid\u843d\u5728\u5de6\u4fa7<\/p>\n<p>\u3010\u7b2c\u4e8c\u79cd\u65b9\u5f0f\u3011:mid &#061; left &#043; (right &#8211; left &#043; 1) \/ 2&#xff0c;\u4f1a\u5bfc\u81f4mid\u843d\u5728\u53f3\u4fa7<\/p>\n<p>\u4f8b\u5982&#xff0c;\u6c42\u5de6\u7aef\u70b9\u65f6&#xff0c;\u5982\u679cleft &#061; mid&#xff0c;right &#061; mid &#8211; 1&#xff0c;\u6839\u636e\u8fd9\u4e24\u4e2a\u53d8\u91cf\u7684\u79fb\u52a8\u89c4\u5f8b&#xff0c;\u82e5\u4f7f\u7528\u7b2c\u4e00\u79cd\u65b9\u5f0f&#xff08;left &#061; mid &#043; 1&#xff09;&#xff0c;\u4f1a\u5bfc\u81f4\u6b7b\u5faa\u73af&#xff0c;\u56e0\u6b64\u5e94\u4f7f\u7528\u7b2c\u4e8c\u79cd\u65b9\u5f0f&#xff08;left &#061; mid&#xff09;\u3002\u540c\u7406&#xff0c;\u6c42\u53f3\u7aef\u70b9\u65f6&#xff0c;\u82e5left &#061; mid &#043; 1&#xff0c;right &#061; mid&#xff0c;\u5e94\u6839\u636e\u76f8\u5e94\u7684\u89c4\u5219\u8c03\u6574\u8fb9\u754c&#xff0c;\u907f\u514d\u6b7b\u5faa\u73af\u5e76\u786e\u4fdd\u6b63\u786e\u627e\u5230\u53f3\u7aef\u70b9&#xff0c;\u9009\u62e9\u7b2c\u4e00\u79cd\u65b9\u5f0f\u3002<\/p>\n<p>\u3010\u4ee3\u7801\u5b9e\u73b0\u3011<\/p>\n<p><span class=\"token keyword\">class<\/span> <span class=\"token class-name\">Solution<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token keyword\">public<\/span><span class=\"token operator\">:<\/span><br \/>\n    vector<span class=\"token operator\">&lt;<\/span><span class=\"token keyword\">int<\/span><span class=\"token operator\">&gt;<\/span> <span class=\"token function\">searchRange<\/span><span class=\"token punctuation\">(<\/span>vector<span class=\"token operator\">&lt;<\/span><span class=\"token keyword\">int<\/span><span class=\"token operator\">&gt;<\/span><span class=\"token operator\">&amp;<\/span> nums<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">int<\/span> target<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n       <span class=\"token keyword\">int<\/span> left <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> right <span class=\"token operator\">&#061;<\/span> nums<span class=\"token punctuation\">.<\/span><span class=\"token function\">size<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#8211;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n       <span class=\"token keyword\">int<\/span> begin <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span><br \/>\n       <span class=\"token keyword\">if<\/span><span class=\"token punctuation\">(<\/span>nums<span class=\"token punctuation\">.<\/span><span class=\"token function\">size<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#061;&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">return<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><br \/>\n       <span class=\"token comment\">\/\/\u6c42\u89e3\u5de6\u7aef\u70b9<\/span><br \/>\n       <span class=\"token keyword\">while<\/span><span class=\"token punctuation\">(<\/span>left <span class=\"token operator\">&lt;<\/span> right<span class=\"token punctuation\">)<\/span><br \/>\n       <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">int<\/span> mid <span class=\"token operator\">&#061;<\/span> left <span class=\"token operator\">&#043;<\/span> <span class=\"token punctuation\">(<\/span>right <span class=\"token operator\">&#8211;<\/span> left<span class=\"token punctuation\">)<\/span><span class=\"token operator\">\/<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">if<\/span><span class=\"token punctuation\">(<\/span>nums<span class=\"token punctuation\">[<\/span>mid<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&lt;<\/span> target<span class=\"token punctuation\">)<\/span> left <span class=\"token operator\">&#061;<\/span> mid <span class=\"token operator\">&#043;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">else<\/span> right <span class=\"token operator\">&#061;<\/span> mid<span class=\"token punctuation\">;<\/span><br \/>\n       <span class=\"token punctuation\">}<\/span><br \/>\n       <span class=\"token keyword\">if<\/span><span class=\"token punctuation\">(<\/span>target <span class=\"token operator\">!&#061;<\/span> nums<span class=\"token punctuation\">[<\/span>left<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">return<\/span> <span class=\"token punctuation\">{<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><br \/>\n       <span class=\"token keyword\">else<\/span> begin <span class=\"token operator\">&#061;<\/span> left<span class=\"token punctuation\">;<\/span><\/p>\n<p>       left <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span>right <span class=\"token operator\">&#061;<\/span> nums<span class=\"token punctuation\">.<\/span><span class=\"token function\">size<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#8211;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n       <span class=\"token comment\">\/\/\u6c42\u89e3\u53f3\u7aef\u70b9<\/span><br \/>\n       <span class=\"token keyword\">while<\/span><span class=\"token punctuation\">(<\/span>left <span class=\"token operator\">&lt;<\/span> right<span class=\"token punctuation\">)<\/span><br \/>\n       <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">int<\/span> mid <span class=\"token operator\">&#061;<\/span> left <span class=\"token operator\">&#043;<\/span> <span class=\"token punctuation\">(<\/span>right <span class=\"token operator\">&#8211;<\/span> left <span class=\"token operator\">&#043;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><span class=\"token operator\">\/<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">if<\/span><span class=\"token punctuation\">(<\/span>nums<span class=\"token punctuation\">[<\/span>mid<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&gt;<\/span> target<span class=\"token punctuation\">)<\/span> right <span class=\"token operator\">&#061;<\/span> mid <span class=\"token operator\">&#8211;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">else<\/span> left <span class=\"token operator\">&#061;<\/span> mid<span class=\"token punctuation\">;<\/span><br \/>\n       <span class=\"token punctuation\">}<\/span><br \/>\n       <span class=\"token keyword\">return<\/span> <span class=\"token punctuation\">{<\/span>begin<span class=\"token punctuation\">,<\/span>left<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<h4><font color=\"cornflowerblue\">4.\u603b\u7ed3\u4e8c\u5206\u6a21\u677f<\/font><\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011400-681027d803335.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u901a\u8fc7\u4e0d\u65ad\u5237\u9898&#xff0c;\u6211\u4eec\u4f1a\u53d1\u73b0\u5f88\u591a\u9898\u76ee\u90fd\u662f\u76f8\u4f3c\u7684\u3002\u5982\u679c\u5fd8\u8bb0\u4e86\u67d0\u4e9b\u5e38\u7528\u6a21\u677f&#xff0c;\u4e5f\u53ef\u4ee5\u901a\u8fc7\u4e0a\u8ff0\u65b9\u5f0f\u91cd\u65b0\u63a8\u5bfc\u3002\u5173\u952e\u5728\u4e8e\u5982\u4f55\u8bc6\u522b\u9898\u76ee\u4e2d\u7684\u4e8c\u5206\u6027\u8d28&#xff0c;\u4ece\u800c\u5c06\u95ee\u9898\u5212\u5206\u4e3a\u4e24\u4e2a\u533a\u95f4\u3002<\/p>\n<hr \/>\n<h3><font color=\"cornflowerblue\">69.x \u7684\u5e73\u65b9\u6839 <\/font><\/h3>\n<p>\u3010\u9898\u76ee\u3011&#xff1a;69. x \u7684\u5e73\u65b9\u6839 <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011400-681027d841389.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u3010<font color=\"cornflowerblue\">\u7b97\u6cd5\u601d\u8def<\/font>\u3011<\/p>\n<p>1.\u66b4\u529b\u67e5\u627e<\/p>\n<p>\u901a\u8fc7\u679a\u4e3e\u4ece 0 \u5230 x \u4e4b\u95f4\u7684\u6bcf\u4e2a\u6574\u6570 i&#xff0c;\u5224\u65ad\u662f\u5426\u6ee1\u8db3\u6761\u4ef6&#xff1a;<\/p>\n<p>\u8fd9\u91cc\u4e0d\u9700\u8981\u8003\u8651\u662f\u5426\u679a\u4e3e\u5230 x \/ 2 \u6216 x \/ 2 &#043; 1&#xff0c;\u56e0\u4e3a\u4e00\u65e6\u627e\u5230\u7ed3\u679c\u5c31\u76f4\u63a5\u8fd4\u56de&#xff0c;\u540e\u7eed\u7684\u60c5\u51b5\u4e0d\u518d\u8fdb\u884c\u5224\u65ad\u3002\u8fc7\u591a\u7684\u533a\u95f4\u7814\u7a76\u4e0d\u4ec5\u6d6a\u8d39\u65f6\u95f4&#xff0c;\u8fd8\u5bb9\u6613\u51fa\u9519\u3002<\/p>\n<ul>\n<li>\u5982\u679c i * i &#061;&#061; x&#xff0c;\u76f4\u63a5\u8fd4\u56de i&#xff1b;<\/li>\n<li>\u5982\u679c i * i &gt; x&#xff0c;\u8bf4\u660e\u524d\u4e00\u4e2a\u6570 i-1 \u7684\u5e73\u65b9\u5df2\u7ecf\u8d85\u8fc7\u4e86 x&#xff0c;\u56e0\u6b64\u8fd4\u56de i &#8211; 1\u3002<\/li>\n<\/ul>\n<p>\u7531\u4e8e i * i \u53ef\u80fd\u4f1a\u8d85\u8fc7 int \u7684\u6700\u5927\u503c&#xff0c;\u6240\u4ee5\u5e94\u4f7f\u7528 long long \u7c7b\u578b\u6765\u5b58\u50a8\u53d8\u91cf\u3002<\/p>\n<p><span class=\"token keyword\">class<\/span> <span class=\"token class-name\">Solution<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token keyword\">public<\/span><span class=\"token operator\">:<\/span><br \/>\n    <span class=\"token keyword\">int<\/span> <span class=\"token function\">mySqrt<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">int<\/span> x<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token comment\">\/\/ \u4f7f\u7528 long long \u6765\u907f\u514d\u6ea2\u51fa<\/span><br \/>\n        <span class=\"token keyword\">long<\/span> <span class=\"token keyword\">long<\/span> i <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">for<\/span> <span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span> i <span class=\"token operator\">&lt;&#061;<\/span> x<span class=\"token punctuation\">;<\/span> i<span class=\"token operator\">&#043;&#043;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n            <span class=\"token comment\">\/\/ \u5982\u679c\u5e73\u65b9\u7b49\u4e8e x&#xff0c;\u8fd4\u56de i<\/span><br \/>\n            <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">*<\/span> i <span class=\"token operator\">&#061;&#061;<\/span> x<span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">return<\/span> i<span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token comment\">\/\/ \u5982\u679c\u5e73\u65b9\u5927\u4e8e x&#xff0c;\u8fd4\u56de i &#8211; 1<\/span><br \/>\n            <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span>i <span class=\"token operator\">*<\/span> i <span class=\"token operator\">&gt;<\/span> x<span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">return<\/span> i <span class=\"token operator\">&#8211;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n        <span class=\"token comment\">\/\/ \u4e3a\u4e86\u786e\u4fdd\u6240\u6709\u8def\u5f84\u6709\u8fd4\u56de\u503c<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> <span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>2.\u4e8c\u5206\u67e5\u627e<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011400-681027d88bab5.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u8bbex\u7684\u5e73\u5206\u6839\u7684\u6700\u7ec8\u7ed3\u679c\u4e3aret\u3002\u5206\u6790ret\u5de6\u53f3\u4e24\u4fa7\u6570\u636e\u7684\u7279\u70b9&#xff0c;\u4ece\u800c\u53d1\u73b0\u4e8c\u6bb5\u6027\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011400-681027d8d02b5.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u3010\u4ee3\u7801\u5b9e\u73b0\u3011<\/p>\n<p><span class=\"token keyword\">class<\/span> <span class=\"token class-name\">Solution<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token keyword\">public<\/span><span class=\"token operator\">:<\/span><br \/>\n    <span class=\"token keyword\">int<\/span> <span class=\"token function\">mySqrt<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">int<\/span> x<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">int<\/span> left <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span> right <span class=\"token operator\">&#061;<\/span> x<span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">if<\/span><span class=\"token punctuation\">(<\/span>x <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">return<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span><span class=\"token comment\">\/\/\u5904\u7406\u4e0b\u8fb9\u754c\u60c5\u51b5<\/span><br \/>\n        <span class=\"token keyword\">while<\/span><span class=\"token punctuation\">(<\/span>left <span class=\"token operator\">&lt;<\/span> right<span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><br \/>\n            <span class=\"token keyword\">long<\/span> <span class=\"token keyword\">long<\/span> mid <span class=\"token operator\">&#061;<\/span> left <span class=\"token operator\">&#043;<\/span> <span class=\"token punctuation\">(<\/span>right <span class=\"token operator\">&#8211;<\/span> left <span class=\"token operator\">&#043;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><span class=\"token operator\">\/<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token keyword\">if<\/span><span class=\"token punctuation\">(<\/span>mid <span class=\"token operator\">*<\/span> mid <span class=\"token operator\">&lt;&#061;<\/span> x<span class=\"token punctuation\">)<\/span> left <span class=\"token operator\">&#061;<\/span> mid<span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token keyword\">else<\/span> right <span class=\"token operator\">&#061;<\/span> mid <span class=\"token operator\">&#8211;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> left<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<hr \/>\n<h3><font color=\"cornflowerblue\">35.\u641c\u7d22\u63d2\u5165\u4f4d\u7f6e<\/font><\/h3>\n<p>\u3010\u9898\u76ee\u3011&#xff1a;35. \u641c\u7d22\u63d2\u5165\u4f4d\u7f6e <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011401-681027d90f0bc.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011401-681027d95c129.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u63d2\u5165\u4f4d\u7f6e\u662f\u7b2c\u4e00\u4e2a\u5927\u4e8e\u76ee\u6807\u503c\u7684\u6570&#xff0c;\u6216\u8005\u662f\u6700\u540e\u4e00\u4e2a\u6570\u636e\u3002\u5982\u679c\u5f53\u524d\u7684\u6570\u5927\u4e8e\u6216\u7b49\u4e8e\u76ee\u6807\u503c&#xff0c;\u90a3\u4e48\u8fd9\u91cc\u5c31\u662f\u6211\u4eec\u6240\u9700\u7684\u4e8c\u5206\u533a\u95f4\u3002\u5982\u679c\u6ca1\u6709\u5143\u7d20&#xff0c;\u5728\u6700\u540e\u4e00\u4e2a\u4f4d\u7f6e&#xff0c;\u7279\u6b8a\u60c5\u51b5\u7279\u6b8a\u5904\u7406\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011401-681027d98d623.png\" alt=\"\u5916\u94fe\u56fe\u7247\u8f6c\u5b58\u5931\u8d25,\u6e90\u7ad9\u53ef\u80fd\u6709\u9632\u76d7\u94fe\u673a\u5236,\u5efa\u8bae\u5c06\u56fe\u7247\u4fdd\u5b58\u4e0b\u6765\u76f4\u63a5\u4e0a\u4f20\" \/><\/p>\n<p>\u3010\u4ee3\u7801\u5b9e\u73b0\u3011<\/p>\n<p><span class=\"token keyword\">class<\/span> <span class=\"token class-name\">Solution<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token keyword\">public<\/span><span class=\"token operator\">:<\/span><br \/>\n    <span class=\"token keyword\">int<\/span> <span class=\"token function\">searchInsert<\/span><span class=\"token punctuation\">(<\/span>vector<span class=\"token operator\">&lt;<\/span><span class=\"token keyword\">int<\/span><span class=\"token operator\">&gt;<\/span><span class=\"token operator\">&amp;<\/span> nums<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">int<\/span> target<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">int<\/span> left <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> right <span class=\"token operator\">&#061;<\/span> nums<span class=\"token punctuation\">.<\/span><span class=\"token function\">size<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#8211;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">while<\/span><span class=\"token punctuation\">(<\/span>left <span class=\"token operator\">&lt;<\/span> right<span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><br \/>\n            <span class=\"token keyword\">int<\/span> mid <span class=\"token operator\">&#061;<\/span> left <span class=\"token operator\">&#043;<\/span> <span class=\"token punctuation\">(<\/span>right <span class=\"token operator\">&#8211;<\/span> left<span class=\"token punctuation\">)<\/span><span class=\"token operator\">\/<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token keyword\">if<\/span><span class=\"token punctuation\">(<\/span>nums<span class=\"token punctuation\">[<\/span>mid<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&lt;<\/span> target<span class=\"token punctuation\">)<\/span> left <span class=\"token operator\">&#061;<\/span> mid <span class=\"token operator\">&#043;<\/span><span class=\"token number\">1<\/span> <span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token keyword\">else<\/span> right <span class=\"token operator\">&#061;<\/span> mid<span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n        <span class=\"token keyword\">if<\/span><span class=\"token punctuation\">(<\/span>nums<span class=\"token punctuation\">[<\/span>left<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&lt;<\/span> target<span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">return<\/span> right <span class=\"token operator\">&#043;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">else<\/span> <span class=\"token keyword\">return<\/span> right<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u8fd9\u91cc\u9700\u8981\u5224\u65ad\u4e0b&#xff0c;\u5982\u679c\u8fbe\u5230\u6700\u540e\u4e00\u4e2a\u4f4d\u7f6e\u60c5\u51b5(nums[left] &lt; target\u3002<\/p>\n<hr \/>\n<h3><font color=\"cornflowerblue\">69.\u5c71\u8109\u6570\u7ec4\u7684\u5cf0\u9876\u7d22\u5f15<\/font><\/h3>\n<p>\u3010\u9898\u76ee\u3011&#xff1a;69. \u5c71\u8109\u6570\u7ec4\u7684\u5cf0\u9876\u7d22\u5f15<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011401-681027d9c15e4.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u3010<font color=\"cornflowerblue\">\u7b97\u6cd5\u601d\u8def<\/font>\u3011<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011402-681027da16a7e.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u901a\u8fc7\u7ed8\u56fe\u5206\u6790\u5143\u7d20\u4e4b\u95f4\u7684\u5927\u5c0f\u5173\u7cfb&#xff0c;\u4ece\u800c\u786e\u5b9a\u4e8c\u5206\u6cd5\u7684\u5212\u5206\u533a\u95f4\u3002<\/p>\n<p>\u3010\u4ee3\u7801\u5b9e\u73b0\u3011<\/p>\n<p><span class=\"token keyword\">class<\/span> <span class=\"token class-name\">Solution<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token keyword\">public<\/span><span class=\"token operator\">:<\/span><br \/>\n    <span class=\"token keyword\">int<\/span> <span class=\"token function\">peakIndexInMountainArray<\/span><span class=\"token punctuation\">(<\/span>vector<span class=\"token operator\">&lt;<\/span><span class=\"token keyword\">int<\/span><span class=\"token operator\">&gt;<\/span><span class=\"token operator\">&amp;<\/span> arr<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">int<\/span> left <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span> right <span class=\"token operator\">&#061;<\/span> arr<span class=\"token punctuation\">.<\/span><span class=\"token function\">size<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token operator\">&#8211;<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">while<\/span><span class=\"token punctuation\">(<\/span>left <span class=\"token operator\">&lt;<\/span> right<span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><br \/>\n            <span class=\"token keyword\">int<\/span> mid <span class=\"token operator\">&#061;<\/span> left <span class=\"token operator\">&#043;<\/span> <span class=\"token punctuation\">(<\/span>right <span class=\"token operator\">&#8211;<\/span> left <span class=\"token operator\">&#043;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">\/<\/span> <span class=\"token number\">2<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token keyword\">if<\/span><span class=\"token punctuation\">(<\/span>arr<span class=\"token punctuation\">[<\/span>mid <span class=\"token operator\">&#8211;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&lt;&#061;<\/span> arr<span class=\"token punctuation\">[<\/span>mid<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span> left <span class=\"token operator\">&#061;<\/span> mid<span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token keyword\">else<\/span> right <span class=\"token operator\">&#061;<\/span> mid <span class=\"token operator\">&#8211;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> left<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u3010\u7ec6\u8282\u5206\u6790\u3011<\/p>\n<p>1.arr[mid &#8211; 1] &lt;&#061; arr[mid] \u662f\u5426\u4f1a\u8d8a\u754c&#xff1f;<\/p>\n<p>\u5728 arr[mid &#8211; 1] \u4e2d&#xff0c;mid \u7684\u6700\u5c0f\u503c\u662f 1&#xff0c;\u56e0\u4e3a mid &#061; left &#043; (right &#8211; left &#043; 1) \/ 2&#xff0c;\u800c left \u4ece 0 \u5f00\u59cb&#xff0c;mid \u6c38\u8fdc\u4e0d\u4f1a\u662f 0\u3002arr[mid &#8211; 1] \u8bbf\u95ee\u7684\u662f mid \u5de6\u8fb9\u7684\u5143\u7d20&#xff0c;\u56e0\u6b64\u4e0d\u4f1a\u8d8a\u754c\u3002<\/p>\n<p>2.\u5982\u679c\u91c7\u7528arr[mid &#043; 1]\u540e\u679c<\/p>\n<p>\u5982\u679c\u662f arr[mid &#043; 1]&#xff0c;\u90a3\u4f1a\u5bfc\u81f4\u5728 mid \u8fbe\u5230\u6570\u7ec4\u6700\u540e\u4e00\u4e2a\u5143\u7d20\u65f6\u8d8a\u754c&#xff0c;\u4f46\u662f\u8fd9\u79cd\u60c5\u51b5\u5728\u8fd9\u4e2a\u7b97\u6cd5\u4e2d\u5e76\u6ca1\u6709\u53d1\u751f&#xff0c;\u56e0\u4e3a\u6211\u4eec\u59cb\u7ec8\u662f\u5728 left \u5230 right \u7684\u8303\u56f4\u5185\u8fdb\u884c\u67e5\u627e&#xff0c;\u786e\u4fdd mid &#043; 1 \u4e0d\u4f1a\u8d85\u51fa\u754c\u9650\u3002<\/p>\n<hr \/>\n<h3><font color=\"cornflowerblue\">162. \u5bfb\u627e\u5cf0\u503c<\/font><\/h3>\n<p>\u3010\u9898\u76ee\u3011&#xff1a;162. \u5bfb\u627e\u5cf0\u503c<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011402-681027da5cec1.png\" alt=\"\u5916\u94fe\u56fe\u7247\u8f6c\u5b58\u5931\u8d25,\u6e90\u7ad9\u53ef\u80fd\u6709\u9632\u76d7\u94fe\u673a\u5236,\u5efa\u8bae\u5c06\u56fe\u7247\u4fdd\u5b58\u4e0b\u6765\u76f4\u63a5\u4e0a\u4f20\" \/><\/p>\n<p>\u89e3\u6cd5\u4e00&#xff1a;\u66b4\u529b\u89e3\u6cd5<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011402-681027daa6665.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u89e3\u6cd5\u4e8c&#xff1a;\u6ed1\u52a8\u7a97\u53e3<\/p>\n<p>\u901a\u8fc7\u4e24\u4e2a\u70b9\u7684\u5206\u6790&#xff0c;\u5982\u679carr[i]&gt;arr[i&#043;1]&#xff0c;\u5448\u73b0\u4e0b\u964d\u8d8b\u52bf&#xff0c;\u53ef\u4ee5\u5224\u65ad\u5de6\u8fb9\u4e00\u5b9a\u6709\u5cf0\u503c&#xff0c;\u4f46\u662f\u53f3\u8fb9\u4e0d\u4e00\u5b9a\u6709\u5cf0\u503c&#xff0c;\u53ef\u80fd\u662f\u76f4\u63a5\u5230\u8d1f\u65e0\u7a77\u6216\u8005\u53e6\u8d77\u4e00\u5cf0\u3002\u540c\u7406arr[i]&lt;arr[i&#043;1]&#xff0c;\u5448\u73b0\u4e0a\u5347\u8d8b\u52bf&#xff0c;\u53ef\u4ee5\u5224\u65ad\u53f3\u8fb9\u4e00\u5b9a\u6709\u5cf0\u503c&#xff0c;\u4f46\u662f\u5de6\u8fb9\u4e0d\u4e00\u5b9a\u6709\u5cf0\u503c\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011402-681027dae346c.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u6211\u4eec\u53ef\u4ee5\u6839\u636e1&#xff0c;2\u79cd\u60c5\u51b5\u53bb\u5206\u51fa\u4e8c\u6bb5\u6027&#xff0c;\u5c31\u53ef\u4ee5\u4f7f\u7528\u4e8c\u5206\u67e5\u627e\u3002<\/p>\n<p><img decoding=\"async\" src=\"2025-04-29h5rgiylaegj.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u5982\u679carr[mid] &gt; arr[mid&#043;1]&#xff0c;\u5219\u5de6\u4fa7\u4e00\u5b9a\u6709\u6211\u4eec\u7684\u7ed3\u679c&#xff0c;\u53ea\u9700right\u7b49\u4e8emid&#xff0c;\u800carr[mid] &lt; arr[mid&#043;1]&#xff0c;\u5219\u53f3\u4fa7\u4e00\u5b9a\u6709\u6211\u4eec\u7684\u7ed3\u679c&#xff0c;left\u7b49\u4e8emid &#043;1\u53bb\u67e5\u627e\u3002<\/p>\n<p>\u3010\u4ee3\u7801\u5b9e\u73b0\u3011<\/p>\n<p><span class=\"token keyword\">class<\/span> <span class=\"token class-name\">Solution<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token keyword\">public<\/span><span class=\"token operator\">:<\/span><br \/>\n    <span class=\"token keyword\">int<\/span> <span class=\"token function\">findPeakElement<\/span><span class=\"token punctuation\">(<\/span>vector<span class=\"token operator\">&lt;<\/span><span class=\"token keyword\">int<\/span><span class=\"token operator\">&gt;<\/span><span class=\"token operator\">&amp;<\/span> nums<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">int<\/span> left <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span>rigth <span class=\"token operator\">&#061;<\/span> nums<span class=\"token punctuation\">.<\/span><span class=\"token function\">size<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#8211;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">while<\/span><span class=\"token punctuation\">(<\/span>left <span class=\"token operator\">&lt;<\/span> rigth<span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><br \/>\n            <span class=\"token keyword\">int<\/span> mid <span class=\"token operator\">&#061;<\/span> left <span class=\"token operator\">&#043;<\/span> <span class=\"token punctuation\">(<\/span>rigth <span class=\"token operator\">&#8211;<\/span> left <span class=\"token operator\">&#043;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">)<\/span><span class=\"token operator\">\/<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token keyword\">if<\/span><span class=\"token punctuation\">(<\/span>nums<span class=\"token punctuation\">[<\/span>mid <span class=\"token operator\">&#8211;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&lt;<\/span> nums<span class=\"token punctuation\">[<\/span>mid<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span> left <span class=\"token operator\">&#061;<\/span> mid<span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token keyword\">else<\/span> rigth <span class=\"token operator\">&#061;<\/span> mid <span class=\"token operator\">&#8211;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> left<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u3010<font color=\"cornflowerblue\">\u4e2a\u4eba\u601d\u8003<\/font>\u3011<\/p>\n<p>\u5173\u4e8eleft\u548cright\u79fb\u52a8\u89c4\u5f8b&#xff0c;\u9700\u8981\u901a\u8fc7\u7ed8\u56fe\u53bb\u5206\u6790\u8d70\u5411\u3002\u8fd9\u91cc\u5f88\u597d\u901a\u8fc7\u8868\u793a\u4e86\u76ee\u6807\u503c\u662f\u5426\u5b58\u5728\u4f5c\u4e3a\u7a81\u7834\u53e3&#xff0c;\u53d1\u73b0\u4e8c\u6bb5\u6027\u3002\u6240\u4ee5\u5177\u4f53\u60c5\u51b5\u8fd8\u662f\u9700\u8981\u5177\u4f53\u5206\u6790\u7684\u3002<\/p>\n<hr \/>\n<h3><font color=\"cornflowerblue\">153. \u5bfb\u627e\u65cb\u8f6c\u6392\u5e8f\u6570\u7ec4\u4e2d\u7684\u6700\u5c0f\u503c<\/font><\/h3>\n<p>\u3010\u9898\u76ee\u3011&#xff1a;153. \u5bfb\u627e\u65cb\u8f6c\u6392\u5e8f\u6570\u7ec4\u4e2d\u7684\u6700\u5c0f\u503c<\/p>\n<p><img decoding=\"async\" src=\"2025-04-29sxux3k200wm.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u793a\u4f8b 1&#xff1a;<\/p>\n<p> \u8f93\u5165&#xff1a;nums <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token number\">3<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">4<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">5<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">]<\/span><br \/>\n\u8f93\u51fa&#xff1a;<span class=\"token number\">1<\/span><br \/>\n\u89e3\u91ca&#xff1a;\u539f\u6570\u7ec4\u4e3a <span class=\"token punctuation\">[<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">3<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">4<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">5<\/span><span class=\"token punctuation\">]<\/span> &#xff0c;\u65cb\u8f6c <span class=\"token number\">3<\/span> \u6b21\u5f97\u5230\u8f93\u5165\u6570\u7ec4\u3002<\/p>\n<p>\u793a\u4f8b 2&#xff1a;<\/p>\n<p> \u8f93\u5165&#xff1a;nums <span class=\"token operator\">&#061;<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token number\">4<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">5<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">6<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">7<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">]<\/span><br \/>\n\u8f93\u51fa&#xff1a;<span class=\"token number\">0<\/span><br \/>\n\u89e3\u91ca&#xff1a;\u539f\u6570\u7ec4\u4e3a <span class=\"token punctuation\">[<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">1<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">4<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">5<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">6<\/span><span class=\"token punctuation\">,<\/span><span class=\"token number\">7<\/span><span class=\"token punctuation\">]<\/span> &#xff0c;\u65cb\u8f6c <span class=\"token number\">4<\/span> \u6b21\u5f97\u5230\u8f93\u5165\u6570\u7ec4\u3002<\/p>\n<p>\u89e3\u6cd5\u4e00&#xff1a;\u66b4\u529b\u89e3\u6cd5<\/p>\n<p>\u66b4\u529b\u67e5\u627e\u6700\u5c0f\u503c&#xff0c;\u65f6\u95f4\u590d\u6742\u5ea6O(N)\u3002\u66b4\u529b\u89e3\u6cd5\u6162&#xff0c;\u662f\u6ca1\u6709\u5229\u7528\u8fd9\u4e2a\u6570\u7ec4\u7684\u7279\u6027&#xff0c;\u7ecf\u8fc7\u65cb\u8f6c\u7684\u6709\u5e8f\u6570\u7ec4\u3002<\/p>\n<p>\u89e3\u6cd5\u4e8c&#xff1a;\u4e8c\u5206\u67e5\u770b<\/p>\n<p>\u753b\u5f20\u66f2\u7ebf\u56fe&#xff0c;\u5bfb\u627e\u4e8c\u6bb5\u6027&#xff0c;\u4ee5D\u70b9nums[n-1]\u4e3a\u53c2\u7167\u7269&#xff0c;AB\u533a\u57df\u662f\u4e25\u683c\u5927\u4e8eD\u70b9&#xff0c;CD\u533a\u57df\u662f\u5c0f\u4e8e\u7b49\u4e8eD\u70b9\u7684\u3002<\/p>\n<p><img decoding=\"async\" src=\"2025-04-29k2j1vwbqrot.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u901a\u8fc7mid\u5728\u67d0\u4e2a\u533a\u95f4\u5982\u4f55\u79fb\u52a8&#xff0c;\u53bb\u63a8\u5230\u4e24\u4e2a\u53d8\u91cf\u7684\u79fb\u52a8\u65b9\u5f0f\u3002<\/p>\n<p>\u3010\u4ee3\u7801\u5b9e\u73b0\u3011<\/p>\n<p><span class=\"token keyword\">class<\/span> <span class=\"token class-name\">Solution<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token keyword\">public<\/span><span class=\"token operator\">:<\/span><br \/>\n    <span class=\"token keyword\">int<\/span> <span class=\"token function\">findMin<\/span><span class=\"token punctuation\">(<\/span>vector<span class=\"token operator\">&lt;<\/span><span class=\"token keyword\">int<\/span><span class=\"token operator\">&gt;<\/span><span class=\"token operator\">&amp;<\/span> nums<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">int<\/span> left <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span>right <span class=\"token operator\">&#061;<\/span> nums<span class=\"token punctuation\">.<\/span><span class=\"token function\">size<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#8211;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">int<\/span> x <span class=\"token operator\">&#061;<\/span>nums<span class=\"token punctuation\">[<\/span>right<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">while<\/span><span class=\"token punctuation\">(<\/span>left <span class=\"token operator\">&lt;<\/span> right<span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><br \/>\n            <span class=\"token keyword\">int<\/span> mid <span class=\"token operator\">&#061;<\/span> left <span class=\"token operator\">&#043;<\/span> <span class=\"token punctuation\">(<\/span>right <span class=\"token operator\">&#8211;<\/span> left<span class=\"token punctuation\">)<\/span><span class=\"token operator\">\/<\/span><span class=\"token number\">2<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token keyword\">if<\/span><span class=\"token punctuation\">(<\/span>nums<span class=\"token punctuation\">[<\/span>mid<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&gt;<\/span> x<span class=\"token punctuation\">)<\/span> left <span class=\"token operator\">&#061;<\/span> mid <span class=\"token operator\">&#043;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token keyword\">else<\/span> right <span class=\"token operator\">&#061;<\/span> mid<span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> nums<span class=\"token punctuation\">[<\/span>left<span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>\u3010\u7591\u95ee:\u9009\u62e9A\u70b9\u7684\u503c\u4f5c\u4e3a\u53c2\u7167\u7269\u3011<\/p>\n<p>\u90a3\u4e48x &#061; nums[0]&#xff0c;\u901a\u8fc7\u7ed8\u56fe\u548cmid\u843d\u70b9\u53bb\u63a8\u5bfcleft\u548cright\u79fb\u52a8\u65b9\u5f0f\u5373\u53ef\u3002<\/p>\n<hr \/>\n<h3><font color=\"cornflowerblue\">LCR 173. \u70b9\u540d<\/font><\/h3>\n<p>\u3010\u9898\u76ee\u3011&#xff1a;LCR 173. \u70b9\u540d<\/p>\n<p><img decoding=\"async\" src=\"2025-04-29luh1jpxfi3i.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>1.\u5e38\u89c1\u89e3\u6cd5<\/p>\n<li>\u54c8\u5e0c\u8868\u6cd5 \u521b\u5efa\u4e00\u4e2a\u5927\u5c0f\u4e3a n&#043;1 \u7684\u54c8\u5e0c\u8868&#xff0c;\u904d\u5386\u539f\u59cb\u6570\u7ec4\u5e76\u5c06\u5143\u7d20\u586b\u5165\u54c8\u5e0c\u8868&#xff0c;\u7136\u540e\u68c0\u67e5\u54ea\u4e2a\u4f4d\u7f6e\u6ca1\u6709\u88ab\u586b\u5145&#xff0c;\u8fd9\u5c31\u662f\u7f3a\u5931\u7684\u6570\u5b57\u3002<\/li>\n<li>\u76f4\u63a5\u904d\u5386\u6cd5 \u76f4\u63a5\u904d\u5386\u539f\u6570\u7ec4&#xff0c;\u627e\u5230\u7f3a\u5931\u7684\u5143\u7d20\u3002<\/li>\n<li>\u4f4d\u8fd0\u7b97\u6cd5 (XOR) \u4f7f\u7528\u4f4d\u8fd0\u7b97&#xff08;XOR&#xff09;\u6765\u62b5\u6d88\u91cd\u590d\u51fa\u73b0\u7684\u6570\u5b57&#xff0c;\u6700\u7ec8\u5269\u4e0b\u7684\u5c31\u662f\u7f3a\u5931\u7684\u6570\u5b57\u3002<\/li>\n<li>\u6570\u5b66\u6cd5 (\u9ad8\u65af\u6c42\u548c\u516c\u5f0f) \u5229\u7528\u7b49\u5dee\u6570\u5217\u7684\u6c42\u548c\u516c\u5f0f&#xff0c;\u8ba1\u7b97\u4ece 0 \u5230 n \u7684\u603b\u548c\u4e0e\u6570\u7ec4\u4e2d\u6240\u6709\u5143\u7d20\u7684\u548c\u4e4b\u95f4\u7684\u5dee\u503c&#xff0c;\u5f97\u51fa\u7f3a\u5931\u7684\u6570\u5b57\u3002<\/li>\n<p>\u8fd9\u4e9b\u65b9\u6cd5\u7684\u65f6\u95f4\u590d\u6742\u5ea6\u90fd\u662f O(n)&#xff0c;\u56e0\u6b64\u9002\u5408\u5904\u7406\u5927\u89c4\u6a21\u6570\u636e\u3002<\/p>\n<p>2.\u4e8c\u5206\u67e5\u627e<\/p>\n<p>\u3010\u601d\u8003&#xff1a;0 \u5230 n-1&#xff0c;\u4e3a\u4ec0\u4e48\u957f\u5ea6\u662f n-1&#xff1f;\u8fd9\u4e2a\u95ee\u9898\u5e38\u89c1\u4e8e\u9762\u8bd5\u4e2d&#xff0c;\u9762\u8bd5\u5b98\u53ef\u80fd\u4f1a\u4e0e\u4f60\u63a2\u8ba8\u662f\u5426\u8fd8\u6709\u5176\u4ed6\u89e3\u6cd5\u3002\u3011<\/p>\n<p>\u8fd9\u91cc\u53ef\u4ee5\u6839\u636e\u56fe\u4e0b&#xff0c;\u53d1\u73b0\u4e8c\u6bb5\u6027\u4f7f\u7528\u4e8c\u5206\u67e5\u627e\u3002<\/p>\n<p><img decoding=\"async\" src=\"2025-04-29rpoyh5bpegn.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u901a\u8fc7\u6bd4\u8f83\u6570\u503c\u4e0e\u5bf9\u5e94\u4e0b\u6807\u7684\u5173\u7cfb&#xff0c;\u4f5c\u4e3a\u4e8c\u5206\u6cd5\u7684\u5224\u5b9a\u6807\u51c6&#xff0c;\u4ece\u800c\u5212\u5206\u641c\u7d22\u533a\u95f4\u3002<\/p>\n<p><span class=\"token keyword\">class<\/span> <span class=\"token class-name\">Solution<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token keyword\">public<\/span><span class=\"token operator\">:<\/span><br \/>\n    <span class=\"token keyword\">int<\/span> <span class=\"token function\">takeAttendance<\/span><span class=\"token punctuation\">(<\/span>vector<span class=\"token operator\">&lt;<\/span><span class=\"token keyword\">int<\/span><span class=\"token operator\">&gt;<\/span><span class=\"token operator\">&amp;<\/span> records<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n      <span class=\"token keyword\">int<\/span> left <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">,<\/span>rigth <span class=\"token operator\">&#061;<\/span> records<span class=\"token punctuation\">.<\/span><span class=\"token function\">size<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#8211;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n      <span class=\"token keyword\">while<\/span><span class=\"token punctuation\">(<\/span>left <span class=\"token operator\">&lt;<\/span> rigth<span class=\"token punctuation\">)<\/span><br \/>\n      <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">int<\/span> mid <span class=\"token operator\">&#061;<\/span> left <span class=\"token operator\">&#043;<\/span> <span class=\"token punctuation\">(<\/span>rigth <span class=\"token operator\">&#8211;<\/span> left<span class=\"token punctuation\">)<\/span> <span class=\"token operator\">\/<\/span> <span class=\"token number\">2<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">if<\/span><span class=\"token punctuation\">(<\/span>records<span class=\"token punctuation\">[<\/span>mid<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#061;&#061;<\/span> mid<span class=\"token punctuation\">)<\/span> left <span class=\"token operator\">&#061;<\/span> mid <span class=\"token operator\">&#043;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">else<\/span> rigth <span class=\"token operator\">&#061;<\/span> mid<span class=\"token punctuation\">;<\/span><br \/>\n      <span class=\"token punctuation\">}<\/span><br \/>\n      <span class=\"token keyword\">if<\/span><span class=\"token punctuation\">(<\/span>records<span class=\"token punctuation\">[<\/span>left<span class=\"token punctuation\">]<\/span> <span class=\"token operator\">&#061;&#061;<\/span> left<span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">return<\/span> left <span class=\"token operator\">&#043;<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">;<\/span><br \/>\n      <span class=\"token keyword\">else<\/span> <span class=\"token keyword\">return<\/span> left<span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><img decoding=\"async\" src=\"2025-04-29ywhyi0oegeb.gif\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> <font color=\"cornflowerblue\">\u5feb\u548c\u5c0f\u4e8c\u4e00\u8d77\u8e0f\u4e0a\u7cbe\u5f69\u7684\u7b97\u6cd5\u4e4b\u65c5&#xff01;\u5173\u6ce8\u6211&#xff0c;\u6211\u4eec\u5c06\u4e00\u8d77\u7834\u89e3\u7b97\u6cd5\u5965\u79d8&#xff0c;\u63a2\u7d22\u66f4\u591a\u5b9e\u7528\u4e14\u6709\u8da3\u7684\u77e5\u8bc6&#xff0c;\u5f00\u542f\u5c5e\u4e8e\u4f60\u7684\u7f16\u7a0b\u5192\u9669&#xff01;<\/font><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb997\u6b21\uff0c\u70b9\u8d5e48\u6b21\uff0c\u6536\u85cf47\u6b21\u3002\u5728\u672c\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u6df1\u5165\u89e3\u6790\u4e8c\u5206\u67e5\u627e\u7b97\u6cd5\u7684\u6838\u5fc3\u539f\u7406\u3002\u4ece\u57fa\u672c\u6982\u5ff5\u5230\u5b9e\u9645\u5e94\u7528\uff0c\u5e26\u4f60\u4e86\u89e3\u5982\u4f55\u5229\u7528\u4e8c\u5206\u67e5\u627e\u9ad8\u6548\u5b9a\u4f4d\u5143\u7d20\uff0c\u63d0\u5347\u641c\u7d22\u6548\u7387\u3002\u65e0\u8bba\u4f60\u662f\u521a\u63a5\u89e6\u7b97\u6cd5\u7684\u65b0\u624b\uff0c\u8fd8\u662f\u60f3\u4f18\u5316\u4ee3\u7801\u6027\u80fd\u7684\u8001\u624b\uff0c\u4e8c\u5206\u67e5\u627e\u90fd\u662f\u4f60\u4e0d\u53ef\u5ffd\u89c6\u7684\u5f3a\u5927\u5de5\u5177\uff01<\/p>\n","protected":false},"author":2,"featured_media":34205,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[2889,55,427,2888],"topic":[],"class_list":["post-34225","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-2889","tag-c","tag-427","tag-2888"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010\u4f18\u9009\u7b97\u6cd5 | \u4e8c\u5206\u67e5\u627e\u3011\u4e8c\u5206\u67e5\u627e\u7b97\u6cd5\u89e3\u6790\uff1a\u5982\u4f55\u901a\u8fc7\u4e8c\u6bb5\u6027\u4f18\u5316\u641c\u7d22\u6548\u7387 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/34225.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010\u4f18\u9009\u7b97\u6cd5 | \u4e8c\u5206\u67e5\u627e\u3011\u4e8c\u5206\u67e5\u627e\u7b97\u6cd5\u89e3\u6790\uff1a\u5982\u4f55\u901a\u8fc7\u4e8c\u6bb5\u6027\u4f18\u5316\u641c\u7d22\u6548\u7387 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb997\u6b21\uff0c\u70b9\u8d5e48\u6b21\uff0c\u6536\u85cf47\u6b21\u3002\u5728\u672c\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u6df1\u5165\u89e3\u6790\u4e8c\u5206\u67e5\u627e\u7b97\u6cd5\u7684\u6838\u5fc3\u539f\u7406\u3002\u4ece\u57fa\u672c\u6982\u5ff5\u5230\u5b9e\u9645\u5e94\u7528\uff0c\u5e26\u4f60\u4e86\u89e3\u5982\u4f55\u5229\u7528\u4e8c\u5206\u67e5\u627e\u9ad8\u6548\u5b9a\u4f4d\u5143\u7d20\uff0c\u63d0\u5347\u641c\u7d22\u6548\u7387\u3002\u65e0\u8bba\u4f60\u662f\u521a\u63a5\u89e6\u7b97\u6cd5\u7684\u65b0\u624b\uff0c\u8fd8\u662f\u60f3\u4f18\u5316\u4ee3\u7801\u6027\u80fd\u7684\u8001\u624b\uff0c\u4e8c\u5206\u67e5\u627e\u90fd\u662f\u4f60\u4e0d\u53ef\u5ffd\u89c6\u7684\u5f3a\u5927\u5de5\u5177\uff01\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/34225.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-29T01:14:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011357-681027d5d9831.gif\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/34225.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/34225.html\",\"name\":\"\u3010\u4f18\u9009\u7b97\u6cd5 | \u4e8c\u5206\u67e5\u627e\u3011\u4e8c\u5206\u67e5\u627e\u7b97\u6cd5\u89e3\u6790\uff1a\u5982\u4f55\u901a\u8fc7\u4e8c\u6bb5\u6027\u4f18\u5316\u641c\u7d22\u6548\u7387 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-29T01:14:04+00:00\",\"dateModified\":\"2025-04-29T01:14:04+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/34225.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/34225.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/34225.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010\u4f18\u9009\u7b97\u6cd5 | \u4e8c\u5206\u67e5\u627e\u3011\u4e8c\u5206\u67e5\u627e\u7b97\u6cd5\u89e3\u6790\uff1a\u5982\u4f55\u901a\u8fc7\u4e8c\u6bb5\u6027\u4f18\u5316\u641c\u7d22\u6548\u7387\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010\u4f18\u9009\u7b97\u6cd5 | \u4e8c\u5206\u67e5\u627e\u3011\u4e8c\u5206\u67e5\u627e\u7b97\u6cd5\u89e3\u6790\uff1a\u5982\u4f55\u901a\u8fc7\u4e8c\u6bb5\u6027\u4f18\u5316\u641c\u7d22\u6548\u7387 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/34225.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010\u4f18\u9009\u7b97\u6cd5 | \u4e8c\u5206\u67e5\u627e\u3011\u4e8c\u5206\u67e5\u627e\u7b97\u6cd5\u89e3\u6790\uff1a\u5982\u4f55\u901a\u8fc7\u4e8c\u6bb5\u6027\u4f18\u5316\u641c\u7d22\u6548\u7387 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb997\u6b21\uff0c\u70b9\u8d5e48\u6b21\uff0c\u6536\u85cf47\u6b21\u3002\u5728\u672c\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u6df1\u5165\u89e3\u6790\u4e8c\u5206\u67e5\u627e\u7b97\u6cd5\u7684\u6838\u5fc3\u539f\u7406\u3002\u4ece\u57fa\u672c\u6982\u5ff5\u5230\u5b9e\u9645\u5e94\u7528\uff0c\u5e26\u4f60\u4e86\u89e3\u5982\u4f55\u5229\u7528\u4e8c\u5206\u67e5\u627e\u9ad8\u6548\u5b9a\u4f4d\u5143\u7d20\uff0c\u63d0\u5347\u641c\u7d22\u6548\u7387\u3002\u65e0\u8bba\u4f60\u662f\u521a\u63a5\u89e6\u7b97\u6cd5\u7684\u65b0\u624b\uff0c\u8fd8\u662f\u60f3\u4f18\u5316\u4ee3\u7801\u6027\u80fd\u7684\u8001\u624b\uff0c\u4e8c\u5206\u67e5\u627e\u90fd\u662f\u4f60\u4e0d\u53ef\u5ffd\u89c6\u7684\u5f3a\u5927\u5de5\u5177\uff01","og_url":"https:\/\/www.wsisp.com\/helps\/34225.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-29T01:14:04+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250429011357-681027d5d9831.gif"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/34225.html","url":"https:\/\/www.wsisp.com\/helps\/34225.html","name":"\u3010\u4f18\u9009\u7b97\u6cd5 | \u4e8c\u5206\u67e5\u627e\u3011\u4e8c\u5206\u67e5\u627e\u7b97\u6cd5\u89e3\u6790\uff1a\u5982\u4f55\u901a\u8fc7\u4e8c\u6bb5\u6027\u4f18\u5316\u641c\u7d22\u6548\u7387 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-29T01:14:04+00:00","dateModified":"2025-04-29T01:14:04+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/34225.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/34225.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/34225.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010\u4f18\u9009\u7b97\u6cd5 | \u4e8c\u5206\u67e5\u627e\u3011\u4e8c\u5206\u67e5\u627e\u7b97\u6cd5\u89e3\u6790\uff1a\u5982\u4f55\u901a\u8fc7\u4e8c\u6bb5\u6027\u4f18\u5316\u641c\u7d22\u6548\u7387"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/34225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=34225"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/34225\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/34205"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=34225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=34225"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=34225"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=34225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}