{"id":54622,"date":"2025-08-13T08:40:00","date_gmt":"2025-08-13T00:40:00","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/54622.html"},"modified":"2025-08-13T08:40:00","modified_gmt":"2025-08-13T00:40:00","slug":"%e3%80%90c%e8%af%ad%e8%a8%80%e5%bc%ba%e5%8c%96%e8%ae%ad%e7%bb%8316%e5%a4%a9%e3%80%91-%e4%bb%8e%e5%9f%ba%e7%a1%80%e5%88%b0%e8%bf%9b%e9%98%b6%e7%9a%84%e8%9c%95%e5%8f%98%e4%b9%8b%e6%97%85day3","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/54622.html","title":{"rendered":"\u3010C\u8bed\u8a00\u5f3a\u5316\u8bad\u7ec316\u5929\u3011--\u4ece\u57fa\u7840\u5230\u8fdb\u9636\u7684\u8715\u53d8\u4e4b\u65c5:Day3"},"content":{"rendered":"<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"76\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250813003956-689bdedc1ca42.jpg\" width=\"76\" \/><\/p>\n<p class=\"img-center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250813003957-689bdedd39802.gif\" \/><\/p>\n<p>&#x1f525;\u4e2a\u4eba\u4e3b\u9875&#xff1a;&#064;\u8349\u8393\u718aLotso<\/p>\n<p>&#x1f3ac;\u4f5c\u8005\u7b80\u4ecb&#xff1a;<span style=\"color:#be191c\">C&#043;&#043;\u7814\u53d1\u65b9\u5411\u5b66\u4e60\u8005<\/span><\/p>\n<p>&#x1f4d6;\u4e2a\u4eba\u4e13\u680f&#xff1a;\u00a0\u300aC\u8bed\u8a00\u300b\u00a0\u300a\u6570\u636e\u7ed3\u6784\u4e0e\u7b97\u6cd5\u300b\u300aC\u8bed\u8a00\u5237\u9898\u96c6\u300b\u300aLeetcode\u5237\u9898\u6307\u5357\u300b<\/p>\n<p>\u2b50\ufe0f\u4eba\u751f\u683c\u8a00&#xff1a;<span style=\"color:#be191c\">\u751f\u6d3b\u662f\u9ed8\u9ed8\u7684\u575a\u6301&#xff0c;\u6bc5\u529b\u662f\u6c38\u4e45\u7684\u4eab\u53d7\u3002<\/span><\/p>\n<p><span style=\"color:#fe2c24\">\u524d\u8a00&#xff1a;\u6211\u4eec\u8ddd\u79bb\u5b66\u4e60\u5b8cC\u8bed\u8a00\u5df2\u7ecf\u5f88\u4e45\u4e86&#xff0c;\u5728\u6570\u636e\u7ed3\u6784\u5b66\u5b8c\u540e&#xff0c;\u535a\u4e3b\u51c6\u5907\u901a\u8fc7\u8fd916\u5929\u7684\u5f3a\u5316\u8bad\u7ec3\u548c\u5927\u5bb6\u4e00\u8d77\u56de\u987eC\u8bed\u8a00\u7684\u77e5\u8bc6&#xff0c;\u4eca\u5929\u4f9d\u65e7\u662f\u4e94\u9053\u9009\u62e9\u548c\u4e24\u9053\u7f16\u7a0b\u9898&#xff0c;\u5e0c\u671b\u5927\u5bb6\u80fd\u6709\u6240\u6536\u83b7\u3002<\/span><\/p>\n<hr \/>\n<p id=\"main-toc\">\u76ee\u5f55<\/p>\n<p id=\"%E9%80%89%E6%8B%A9%E9%A2%98%EF%BC%9A-toc\" style=\"margin-left:0px\">\u9009\u62e9\u9898&#xff1a;<\/p>\n<p id=\"%E7%BC%96%E7%A8%8B%E9%A2%98%EF%BC%9A-toc\" style=\"margin-left:0px\">\u7f16\u7a0b\u9898&#xff1a;<\/p>\n<p id=\"1.%E8%AE%B0%E8%B4%9F%E5%9D%87%E6%AD%A3-toc\" style=\"margin-left:0px\">1.\u8bb0\u8d1f\u5747\u6b63<\/p>\n<p id=\"2.%E6%97%8B%E8%BD%AC%E6%95%B0%E7%BB%84%E7%9A%84%E6%9C%80%E5%B0%8F%E6%95%B0%E5%AD%97-toc\" style=\"margin-left:0px\">2.\u65cb\u8f6c\u6570\u7ec4\u7684\u6700\u5c0f\u6570\u5b57<\/p>\n<hr id=\"hr-toc\" \/>\n<h2 id=\"%E9%80%89%E6%8B%A9%E9%A2%98%EF%BC%9A\">\u9009\u62e9\u9898&#xff1a;<\/h2>\n<p>1.\u5df2\u77e5\u51fd\u6570\u7684\u539f\u578b\u662f&#xff1a; int fun(char b[10], int *a); &#xff0c;\u8bbe\u5b9a\u4e49&#xff1a; char c[10];int d; &#xff0c;\u6b63\u786e\u7684\u8c03\u7528\u8bed\u53e5\u662f&#xff08; &#xff09;<\/p>\n<p>A: fun(c,&amp;d); B: fun(c,d); C: fun(&amp;c,&amp;d); D: fun(&amp;c,d);<\/p>\n<p>\u7b54\u6848\u89e3\u6790&#xff1a;<\/p>\n<p> \u6b63\u786e\u7b54\u6848&#xff1a;A <\/p>\n<p>\u53c2\u6570a\u662f\u6307\u9488&#xff0c;\u8981\u63a5\u6536\u5730\u5740&#xff0c;BD\u9519\u8bef\u3002\u53c2\u6570b\u53ef\u4ee5\u63a5\u6536\u7684\u662fchar*&#xff0c;\u800c&amp;c\u7684\u7c7b\u578b\u662fchar(*)[10]&#xff0c;C\u9519\u8bef<\/p>\n<p>2.\u8bf7\u95ee\u4e0b\u5217\u8868\u8fbe\u5f0f\u54ea\u4e9b\u4f1a\u88ab\u7f16\u8bd1\u5668\u7981\u6b62\u3010\u591a\u9009\u3011&#xff08; &#xff09; A: *c &#061; 32; B: *d &#061; 43 C: e&#061;&amp;a D: f&#061;0x321f<\/p>\n<p>int a &#061; 248, b &#061; 4;<br \/>\nint const *c &#061; 21;<br \/>\nconst int *d &#061; &amp;a;<br \/>\nint *const e &#061; &amp;b;<br \/>\nint const * const f &#061; &amp;a; <\/p>\n<p>\u7b54\u6848\u89e3\u6790&#xff1a;<\/p>\n<p> \u6b63\u786e\u7b54\u6848&#xff1a;ABCD <\/p>\n<p>\u5982\u679c const \u4f4d\u4e8e * \u7684\u5de6\u4fa7&#xff0c;\u5219 const \u5c31\u662f\u7528\u6765\u4fee\u9970\u6307\u9488\u6240\u6307\u5411\u7684\u53d8\u91cf&#xff0c;\u5373\u6307\u9488\u6307\u5411\u4e3a\u5e38\u91cf&#xff1b;*c\u548c*d\u4e0d\u80fd\u53d8\u3002\u5982\u679c const \u4f4d\u4e8e * \u7684\u53f3\u4fa7&#xff0c;\u5219 const \u5c31\u662f\u4fee\u9970\u6307\u9488\u672c\u8eab&#xff0c;\u5373\u6307\u9488\u672c\u8eab\u662f\u5e38\u91cf&#xff1b;e\u548cf\u4e0d\u80fd\u53d8\u3002<\/p>\n<p>3.\u4ee5\u4e0b\u7a0b\u5e8f\u7684\u8f93\u51fa\u7ed3\u679c\u4e3a&#xff08; &#xff09; A: *** B: *** *** *** *** C: *** *** D: * * *<\/p>\n<p>#include &lt;stdio.h&gt;<br \/>\nint i;<br \/>\nvoid prt()<br \/>\n{<br \/>\nfor (i &#061; 5; i &lt; 8; i&#043;&#043;)<br \/>\nprintf(&#034;%c&#034;, &#039;*&#039;);<br \/>\nprintf(&#034;\\\\t&#034;);<br \/>\n}<br \/>\nint main()<br \/>\n{<br \/>\nfor (i &#061; 5; i &lt;&#061; 8; i&#043;&#043;)<br \/>\nprt();<br \/>\nreturn 0;<br \/>\n} <\/p>\n<p>\u7b54\u6848\u89e3\u6790&#xff1a;<\/p>\n<p> \u6b63\u786e\u7b54\u6848&#xff1a;A <\/p>\n<p>\u5168\u5c40\u53d8\u91cfi&#xff0c;\u5728main()\u4e2d\u4fee\u6539\u4e3a5&#xff0c;\u7b2c\u4e00\u6b21\u5728prt()\u4e2d\u6267\u884c\u5faa\u73af\u8f93\u51fa\u4e09\u6b21&#039;*&#039;&#xff0c;i\u88ab\u4fee\u6539\u4e3a8&#xff0c;\u56de\u5230main()\u4e2d\u7b2c\u4e8c\u6b21\u8c03\u7528prt()\u65f6&#xff0c;i&lt;8\u4e3a\u5047&#xff0c;\u5faa\u73af\u7ed3\u675f\u6ca1\u8f93\u51fa&#xff0c;\u6267\u884c\u4e00\u6b21print(&#034;\\\\t&#034;)&#xff0c;\u518d\u6b21\u56de\u5230\u4e3b\u51fd\u6570\u540ei&#043;&#043;\u53d8\u4e3a9&#xff0c;i&lt;&#061;8\u4e3a\u5047&#xff0c;\u5faa\u73af\u7ed3\u675f;<\/p>\n<p>4.\u4e0b\u9762\u4ee3\u7801\u6bb5\u7684\u8f93\u51fa\u662f&#xff08; &#xff09;<\/p>\n<p>A.-6 B.12 C.0 D.-12<\/p>\n<p>\u7b54\u6848\u89e3\u6790&#xff1a;<\/p>\n<p> \u6b63\u786e\u7b54\u6848&#xff1a;D <\/p>\n<p>a&#043;&#061;a-&#061;a*a\u7b49\u4ef7\u4e8ea&#061;a&#043;(a&#061;a-a*a)&#xff0c;\u5373\u5148\u8ba1\u7b97a&#061;a-a*a&#xff0c;\u6240\u4ee5\u6b64\u65f6a\u7684\u503c\u4e3a3-3*3&#061;-6&#xff0c;\u518d\u8ba1\u7b97-6&#043;(-6)&#061;-12\u8d4b\u503c\u7ed9a&#xff0c;\u6240\u4ee5a\u7684\u503c\u4e3a-12&#xff0c;\u4e5f\u5c31\u662f\u6574\u4e2a\u8868\u8fbe\u5f0f\u7684\u503c&#xff0c;\u6240\u4ee5\u5e94\u9009\u62e9D<\/p>\n<p>5.\u4e0b\u5217\u4e0d\u80fd\u5b9e\u73b0\u6b7b\u5faa\u73af\u7684\u662f&#xff08;&#xff09;<\/p>\n<p>A.while(1){} B. for(;1;){}\u00a0 C.do{}while(1);\u00a0 D.for(;0;){}<\/p>\n<p>\u7b54\u6848\u89e3\u6790&#xff1a;<\/p>\n<p>\u6b63\u786e\u7b54\u6848&#xff1a;D<\/p>\n<p>\u53ea\u6709\u6761\u4ef6\u4e3a\u771f\u65f6\u624d\u8fdb\u884c\u5faa\u73af&#xff0c;ABC\u4e2d1\u4e3a\u771f&#xff0c;D\u4e2d0\u4e3a\u5047<\/p>\n<hr \/>\n<h2 id=\"%E7%BC%96%E7%A8%8B%E9%A2%98%EF%BC%9A\">\u7f16\u7a0b\u9898&#xff1a;<\/h2>\n<h2 id=\"1.%E8%AE%B0%E8%B4%9F%E5%9D%87%E6%AD%A3\">1.\u8bb0\u8d1f\u5747\u6b63<\/h2>\n<p>\u9898\u76ee\u94fe\u63a5&#xff1a;\u8bb0\u8d1f\u5747\u6b63_\u725b\u5ba2\u9898\u9738_\u725b\u5ba2\u7f51<\/p>\n<p>\u9898\u76ee\u63cf\u8ff0&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"671\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250813003957-689bdedd5cedd.png\" width=\"1314\" \/><\/p>\n<p>\u9898\u76ee\u793a\u4f8b:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"692\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250813003958-689bdede01556.png\" width=\"1294\" \/><\/p>\n<p>\u4ee3\u7801\u6f14\u793a&#xff1a;<\/p>\n<p>#include&lt;stdio.h&gt;<br \/>\n#include&lt;math.h&gt;<br \/>\nint main()<br \/>\n{<br \/>\n    int num;<br \/>\n    int a[1000];<br \/>\n    while(scanf(&#034;%d&#034;,&amp;num)!&#061;EOF)<br \/>\n    {<br \/>\n        int count &#061; 0;<br \/>\n        int countint &#061;0;<br \/>\n        float sum &#061; 0;<br \/>\n        for(int i &#061;0;i&lt;num;i&#043;&#043;)<br \/>\n        {<br \/>\n            scanf(&#034;%d&#034;,&amp;a[i]);<br \/>\n            if(a[i]&lt;0)<br \/>\n            {<br \/>\n                count&#043;&#043;;<br \/>\n            }<br \/>\n            if(a[i]&gt;0)<br \/>\n            {<br \/>\n                countint&#043;&#043;;<br \/>\n                sum&#043;&#061;a[i];<br \/>\n            }<br \/>\n        }<br \/>\n        printf(&#034;%d %0.1f\\\\n&#034;,count,sum\/countint);<br \/>\n    }<br \/>\n}<\/p>\n<p>\u9898\u76ee\u89e3\u6790&#xff1a;<\/p>\n<ul>\n<li>\u8fd9\u9053\u9898\u5176\u5b9e\u901a\u8fc7 scanf \u6355\u6349\u6570\u636e\u5373\u53ef&#xff0c;\u7edf\u8ba1\u8d1f\u6570\u4e2a\u6570&#xff0c;\u4ee5\u53ca\u6b63\u6570\u683c\u5f0f&#xff0c;\u5e76\u4e14\u5728\u7edf\u8ba1\u6b63\u6570\u4e2a\u6570\u7684\u8fc7\u7a0b\u4e2d\u6c42\u53d6\u6b63\u6570\u603b\u548c&#xff0c;\u6700\u540e\u8ba1\u7b97\u5f97\u51fa\u5e73\u5747\u6570\u5373\u53ef\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\u6240\u6709\u6570\u5b57\u4e2d0\u662f\u4e0d\u7edf\u8ba1\u5728\u5185\u7684\u3002<\/li>\n<\/ul>\n<h2 id=\"2.%E6%97%8B%E8%BD%AC%E6%95%B0%E7%BB%84%E7%9A%84%E6%9C%80%E5%B0%8F%E6%95%B0%E5%AD%97\" style=\"background-color:transparent\">2.\u65cb\u8f6c\u6570\u7ec4\u7684\u6700\u5c0f\u6570\u5b57<\/h2>\n<p>\u9898\u76ee\u94fe\u63a5&#xff1a;\u65cb\u8f6c\u6570\u7ec4\u7684\u6700\u5c0f\u6570\u5b57_\u725b\u5ba2\u9898\u9738_\u725b\u5ba2\u7f51<\/p>\n<p>\u9898\u76ee\u63cf\u8ff0&#xff1a;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"341\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250813003958-689bdede804f6.png\" width=\"1296\" \/><\/p>\n<p>\u9898\u76ee\u793a\u4f8b:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"462\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250813003958-689bdedef2224.png\" width=\"1284\" \/><\/p>\n<p>\u4ee3\u7801\u6f14\u793a&#xff1a;<\/p>\n<p>\/**<br \/>\n * \u4ee3\u7801\u4e2d\u7684\u7c7b\u540d\u3001\u65b9\u6cd5\u540d\u3001\u53c2\u6570\u540d\u5df2\u7ecf\u6307\u5b9a&#xff0c;\u8bf7\u52ff\u4fee\u6539&#xff0c;\u76f4\u63a5\u8fd4\u56de\u65b9\u6cd5\u89c4\u5b9a\u7684\u503c\u5373\u53ef<br \/>\n *<br \/>\n *<br \/>\n * &#064;param nums int\u6574\u578b\u4e00\u7ef4\u6570\u7ec4<br \/>\n * &#064;param numsLen int nums\u6570\u7ec4\u957f\u5ea6<br \/>\n * &#064;return int\u6574\u578b<br \/>\n *\/<br \/>\nint minNumberInRotateArray(int* nums, int numsLen ) {<br \/>\n    \/\/ write code here<br \/>\n     int min &#061; *nums;\/\/\u521d\u59cb\u5b58\u653e\u7b2c\u4e00\u4e2a\u6570<br \/>\n    for (int i &#061; 1; i &lt;numsLen; &#043;&#043;i)<br \/>\n    {<br \/>\n        if(*(nums&#043;i) &lt; min)<br \/>\n        {<br \/>\n            min &#061; *(nums&#043;i);<br \/>\n        }<br \/>\n    }<br \/>\n    return min;<br \/>\n} <\/p>\n<p>\u9898\u76ee\u89e3\u6790&#xff1a;<\/p>\n<p>\u4ee3\u7801\u7528\u904d\u5386\u6570\u7ec4\u7684\u65b9\u5f0f\u627e\u65cb\u8f6c\u6570\u7ec4\u6700\u5c0f\u503c&#xff0c;\u903b\u8f91\u662f\u5148\u8bbe\u7b2c\u4e00\u4e2a\u6570\u4e3a\u521d\u59cb\u6700\u5c0f\u503c&#xff0c;\u5faa\u73af\u6bd4\u8f83\u540e\u7eed\u5143\u7d20\u66f4\u65b0\u6700\u5c0f\u503c&#xff0c;\u65f6\u95f4\u590d\u6742\u5ea6\u4e3a\u00a0O(n)\u00a0&#xff0c;\u672a\u8fbe\u9898\u76ee\u00a0O(logn)\u00a0\u8981\u6c42&#xff0c;\u9700\u7528\u4e8c\u5206\u6cd5\u4f18\u5316 \u3002<\/p>\n<p>\u4f18\u5316&#xff1a;<\/p>\n<p>\/**<br \/>\n * \u4ee3\u7801\u4e2d\u7684\u7c7b\u540d\u3001\u65b9\u6cd5\u540d\u3001\u53c2\u6570\u540d\u5df2\u7ecf\u6307\u5b9a&#xff0c;\u8bf7\u52ff\u4fee\u6539&#xff0c;\u76f4\u63a5\u8fd4\u56de\u65b9\u6cd5\u89c4\u5b9a\u7684\u503c\u5373\u53ef<br \/>\n *<br \/>\n *<br \/>\n * &#064;param nums int\u6574\u578b\u4e00\u7ef4\u6570\u7ec4<br \/>\n * &#064;param numsLen int nums\u6570\u7ec4\u957f\u5ea6<br \/>\n * &#064;return int\u6574\u578b<br \/>\n *\/<br \/>\nint minNumberInRotateArray(int* nums, int numsLen ) {<br \/>\n    int left &#061; 0, right &#061; numsLen &#8211; 1;<br \/>\n    while (left &lt; right) {<br \/>\n        int mid &#061; left &#043; (right &#8211; left) \/ 2;<br \/>\n        if (nums[mid] &lt; nums[right]) {<br \/>\n            right &#061; mid;<br \/>\n        } else if (nums[mid] &gt; nums[right]) {<br \/>\n            left &#061; mid &#043; 1;<br \/>\n        } else {<br \/>\n            right&#8211;;<br \/>\n        }<br \/>\n    }<br \/>\n    return nums[left];<br \/>\n} <\/p>\n<hr \/>\n<p><span style=\"color:#4da8ee\">\u5f80\u671f\u56de\u987e&#xff1a;<\/span><\/p>\n<p>\u3010C\u8bed\u8a00\u5f3a\u5316\u8bad\u7ec316\u5929\u3011&#8211;\u4ece\u57fa\u7840\u5230\u8fdb\u9636\u7684\u8715\u53d8\u4e4b\u65c5:Day1<\/p>\n<p>\u3010C\u8bed\u8a00\u5f3a\u5316\u8bad\u7ec316\u5929\u3011&#8211;\u4ece\u57fa\u7840\u5230\u8fdb\u9636\u7684\u8715\u53d8\u4e4b\u65c5:Day2<\/p>\n<p><span style=\"color:#fe2c24\">\u7ed3\u8bed&#xff1a;\u672c\u7bc7\u535a\u5ba2\u5c31\u5230\u6b64\u7ed3\u675f\u4e86&#xff0c;C \u8bed\u8a00\u7684\u7cbe\u9ad3\u5728\u4e8e\u5bf9\u7ec6\u8282\u7684\u638c\u63a7\u548c\u5bf9\u5e95\u5c42\u7684\u7406\u89e3&#xff0c;\u8fd9\u9700\u8981\u6301\u7eed\u5b9e\u8df5\u3002\u613f\u4f60\u5e26\u7740\u8fd9\u4efd\u8bad\u7ec3\u4e2d\u83b7\u5f97\u7684\u601d\u7ef4\u4e0e\u4e60\u60ef&#xff0c;\u5728\u7f16\u7a0b\u8def\u4e0a\u8d70\u5f97\u66f4\u7a33\u3001\u66f4\u8fdc\u3002\u5982\u679c\u6587\u7ae0\u5bf9\u4f60\u6709\u5e2e\u52a9\u7684\u8bdd&#xff0c;\u6b22\u8fce\u8bc4\u8bba&#xff0c;\u70b9\u8d5e&#xff0c;\u6536\u85cf\u52a0\u5173\u6ce8&#xff0c;\u611f\u8c22\u5927\u5bb6\u7684\u652f\u6301\u3002<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb18\u6b21\u3002\ud83d\udcdd\u3010C\u8bed\u8a00\u5f3a\u5316\u8bad\u7ec3Day3\u3011\u672c\u6b21\u8bad\u7ec3\u5305\u542b5\u9053\u9009\u62e9\u9898\u548c2\u9053\u7f16\u7a0b\u9898\uff0c\u91cd\u70b9\u56de\u987e\u6307\u9488\u3001\u5faa\u73af\u3001\u8fd0\u7b97\u7b26\u7b49\u6838\u5fc3\u77e5\u8bc6\u70b9\u3002\u9009\u62e9\u9898\u89e3\u6790\u4e86\u51fd\u6570\u53c2\u6570\u4f20\u9012\u3001const\u4fee\u9970\u7b26\u3001\u5168\u5c40\u53d8\u91cf\u4f5c\u7528\u57df\u7b49\u95ee\u9898\u3002\u7f16\u7a0b\u98981\u5b9e\u73b0\u7edf\u8ba1\u8d1f\u6570\u548c\u8ba1\u7b97\u6b63\u6570\u5e73\u5747\u503c\uff0c\u7f16\u7a0b\u98982\u901a\u8fc7\u4e8c\u5206\u67e5\u627e\u4f18\u5316\u65cb\u8f6c\u6570\u7ec4\u6700\u5c0f\u503c\u67e5\u627e\uff08\u65f6\u95f4\u590d\u6742\u5ea6\u4eceO(n)\u4f18\u5316\u5230O(logn)\uff09\u3002\u5efa\u8bae\u91cd\u70b9\u5173\u6ce8\uff1a1.\u6307\u9488\u4e0econst\u7684\u7ec4\u5408\u4f7f\u7528\u89c4\u5219 2.\u8fd0\u7b97\u7b26\u4f18\u5148\u7ea7\u548c\u7ed3\u5408\u6027 3.\u5faa\u73af\u63a7\u5236\u903b\u8f91 4.\u4e8c\u5206\u67e5\u627e\u7684\u5e94\u7528\u573a\u666f\u3002\u8bad\u7ec3\u5f3a\u8c03\u7ec6\u8282\u628a\u63a7\u548c\u7b97\u6cd5\u4f18\u5316\uff0c\u9002\u5408\u5de9\u56faC\u8bed\u8a00\u57fa\u7840\u80fd\u529b\u3002\ud83d\udd25\u5b8c\u6574\u4ee3\u7801\u793a\u4f8b\u548c\u8be6\u7ec6\u89e3\u6790\u53ef\u67e5\u770b\u539f\u6587\u3002<\/p>\n","protected":false},"author":2,"featured_media":54616,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[5570,174,993,190,1813,427,124],"topic":[],"class_list":["post-54622","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-c-c","tag-c","tag-993","tag-190","tag-1813","tag-427","tag-124"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010C\u8bed\u8a00\u5f3a\u5316\u8bad\u7ec316\u5929\u3011-\u4ece\u57fa\u7840\u5230\u8fdb\u9636\u7684\u8715\u53d8\u4e4b\u65c5:Day3 - \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\/54622.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010C\u8bed\u8a00\u5f3a\u5316\u8bad\u7ec316\u5929\u3011-\u4ece\u57fa\u7840\u5230\u8fdb\u9636\u7684\u8715\u53d8\u4e4b\u65c5:Day3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb18\u6b21\u3002\ud83d\udcdd\u3010C\u8bed\u8a00\u5f3a\u5316\u8bad\u7ec3Day3\u3011\u672c\u6b21\u8bad\u7ec3\u5305\u542b5\u9053\u9009\u62e9\u9898\u548c2\u9053\u7f16\u7a0b\u9898\uff0c\u91cd\u70b9\u56de\u987e\u6307\u9488\u3001\u5faa\u73af\u3001\u8fd0\u7b97\u7b26\u7b49\u6838\u5fc3\u77e5\u8bc6\u70b9\u3002\u9009\u62e9\u9898\u89e3\u6790\u4e86\u51fd\u6570\u53c2\u6570\u4f20\u9012\u3001const\u4fee\u9970\u7b26\u3001\u5168\u5c40\u53d8\u91cf\u4f5c\u7528\u57df\u7b49\u95ee\u9898\u3002\u7f16\u7a0b\u98981\u5b9e\u73b0\u7edf\u8ba1\u8d1f\u6570\u548c\u8ba1\u7b97\u6b63\u6570\u5e73\u5747\u503c\uff0c\u7f16\u7a0b\u98982\u901a\u8fc7\u4e8c\u5206\u67e5\u627e\u4f18\u5316\u65cb\u8f6c\u6570\u7ec4\u6700\u5c0f\u503c\u67e5\u627e\uff08\u65f6\u95f4\u590d\u6742\u5ea6\u4eceO(n)\u4f18\u5316\u5230O(logn)\uff09\u3002\u5efa\u8bae\u91cd\u70b9\u5173\u6ce8\uff1a1.\u6307\u9488\u4e0econst\u7684\u7ec4\u5408\u4f7f\u7528\u89c4\u5219 2.\u8fd0\u7b97\u7b26\u4f18\u5148\u7ea7\u548c\u7ed3\u5408\u6027 3.\u5faa\u73af\u63a7\u5236\u903b\u8f91 4.\u4e8c\u5206\u67e5\u627e\u7684\u5e94\u7528\u573a\u666f\u3002\u8bad\u7ec3\u5f3a\u8c03\u7ec6\u8282\u628a\u63a7\u548c\u7b97\u6cd5\u4f18\u5316\uff0c\u9002\u5408\u5de9\u56faC\u8bed\u8a00\u57fa\u7840\u80fd\u529b\u3002\ud83d\udd25\u5b8c\u6574\u4ee3\u7801\u793a\u4f8b\u548c\u8be6\u7ec6\u89e3\u6790\u53ef\u67e5\u770b\u539f\u6587\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/54622.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-13T00:40:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250813003956-689bdedc1ca42.jpg\" \/>\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=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/54622.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/54622.html\",\"name\":\"\u3010C\u8bed\u8a00\u5f3a\u5316\u8bad\u7ec316\u5929\u3011-\u4ece\u57fa\u7840\u5230\u8fdb\u9636\u7684\u8715\u53d8\u4e4b\u65c5:Day3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-13T00:40:00+00:00\",\"dateModified\":\"2025-08-13T00:40:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/54622.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/54622.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/54622.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010C\u8bed\u8a00\u5f3a\u5316\u8bad\u7ec316\u5929\u3011--\u4ece\u57fa\u7840\u5230\u8fdb\u9636\u7684\u8715\u53d8\u4e4b\u65c5:Day3\"}]},{\"@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":"\u3010C\u8bed\u8a00\u5f3a\u5316\u8bad\u7ec316\u5929\u3011-\u4ece\u57fa\u7840\u5230\u8fdb\u9636\u7684\u8715\u53d8\u4e4b\u65c5:Day3 - \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\/54622.html","og_locale":"zh_CN","og_type":"article","og_title":"\u3010C\u8bed\u8a00\u5f3a\u5316\u8bad\u7ec316\u5929\u3011-\u4ece\u57fa\u7840\u5230\u8fdb\u9636\u7684\u8715\u53d8\u4e4b\u65c5:Day3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb18\u6b21\u3002\ud83d\udcdd\u3010C\u8bed\u8a00\u5f3a\u5316\u8bad\u7ec3Day3\u3011\u672c\u6b21\u8bad\u7ec3\u5305\u542b5\u9053\u9009\u62e9\u9898\u548c2\u9053\u7f16\u7a0b\u9898\uff0c\u91cd\u70b9\u56de\u987e\u6307\u9488\u3001\u5faa\u73af\u3001\u8fd0\u7b97\u7b26\u7b49\u6838\u5fc3\u77e5\u8bc6\u70b9\u3002\u9009\u62e9\u9898\u89e3\u6790\u4e86\u51fd\u6570\u53c2\u6570\u4f20\u9012\u3001const\u4fee\u9970\u7b26\u3001\u5168\u5c40\u53d8\u91cf\u4f5c\u7528\u57df\u7b49\u95ee\u9898\u3002\u7f16\u7a0b\u98981\u5b9e\u73b0\u7edf\u8ba1\u8d1f\u6570\u548c\u8ba1\u7b97\u6b63\u6570\u5e73\u5747\u503c\uff0c\u7f16\u7a0b\u98982\u901a\u8fc7\u4e8c\u5206\u67e5\u627e\u4f18\u5316\u65cb\u8f6c\u6570\u7ec4\u6700\u5c0f\u503c\u67e5\u627e\uff08\u65f6\u95f4\u590d\u6742\u5ea6\u4eceO(n)\u4f18\u5316\u5230O(logn)\uff09\u3002\u5efa\u8bae\u91cd\u70b9\u5173\u6ce8\uff1a1.\u6307\u9488\u4e0econst\u7684\u7ec4\u5408\u4f7f\u7528\u89c4\u5219 2.\u8fd0\u7b97\u7b26\u4f18\u5148\u7ea7\u548c\u7ed3\u5408\u6027 3.\u5faa\u73af\u63a7\u5236\u903b\u8f91 4.\u4e8c\u5206\u67e5\u627e\u7684\u5e94\u7528\u573a\u666f\u3002\u8bad\u7ec3\u5f3a\u8c03\u7ec6\u8282\u628a\u63a7\u548c\u7b97\u6cd5\u4f18\u5316\uff0c\u9002\u5408\u5de9\u56faC\u8bed\u8a00\u57fa\u7840\u80fd\u529b\u3002\ud83d\udd25\u5b8c\u6574\u4ee3\u7801\u793a\u4f8b\u548c\u8be6\u7ec6\u89e3\u6790\u53ef\u67e5\u770b\u539f\u6587\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/54622.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-13T00:40:00+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250813003956-689bdedc1ca42.jpg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/54622.html","url":"https:\/\/www.wsisp.com\/helps\/54622.html","name":"\u3010C\u8bed\u8a00\u5f3a\u5316\u8bad\u7ec316\u5929\u3011-\u4ece\u57fa\u7840\u5230\u8fdb\u9636\u7684\u8715\u53d8\u4e4b\u65c5:Day3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-13T00:40:00+00:00","dateModified":"2025-08-13T00:40:00+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/54622.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/54622.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/54622.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u3010C\u8bed\u8a00\u5f3a\u5316\u8bad\u7ec316\u5929\u3011--\u4ece\u57fa\u7840\u5230\u8fdb\u9636\u7684\u8715\u53d8\u4e4b\u65c5:Day3"}]},{"@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\/54622","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=54622"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/54622\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/54616"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=54622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=54622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=54622"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=54622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}