{"id":1175,"date":"2017-01-14T11:49:00","date_gmt":"2017-01-14T03:49:00","guid":{"rendered":"http:\/\/www.bookcard.net\/wordpress\/?p=1175"},"modified":"2022-08-21T10:28:47","modified_gmt":"2022-08-21T02:28:47","slug":"algorithm_egg_c","status":"publish","type":"post","link":"https:\/\/www.bookcard.net\/wordpress\/algorithm_egg_c\/","title":{"rendered":"\u4e00\u7b50\u96de\u86cb"},"content":{"rendered":"<figure id=\"attachment_1179\" aria-describedby=\"caption-attachment-1179\" style=\"width: 994px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1179\" src=\"https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2017\/01\/algorithm_EGG_C.jpg\" alt=\"\u4e00\u7b50\u96de\u86cb\" width=\"994\" height=\"658\" srcset=\"https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2017\/01\/algorithm_EGG_C.jpg 994w, https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2017\/01\/algorithm_EGG_C-300x199.jpg 300w, https:\/\/www.bookcard.net\/wordpress\/wp-content\/uploads\/2017\/01\/algorithm_EGG_C-768x508.jpg 768w\" sizes=\"auto, (max-width: 994px) 100vw, 994px\" \/><figcaption id=\"caption-attachment-1179\" class=\"wp-caption-text\">\u4e00\u7b50\u96de\u86cb<\/figcaption><\/figure>\n<p>\u4eca\u65e5\u898b\u8001\u8c46\u5728\u770b\u5fae\u4fe1,\u800c\u4e14\u4e0d\u505c\u7684\u5728\u7d19\u4e0a\u5beb\u6578\u4f4d\u4e26\u6309\u8a08\u7b97\u6a5f,\u539f\u4f86\u662f\u4e09\u8205\u7236\u7fa4\u88cf\u767c\u4e86\u4e00\u689d\u6578\u5b78\u984c,\u9019\u662f\u689d\u6578\u5b78\u984c\u6c42\u7b50\u88cf\u96de\u86cb\u7684\u500b\u6578,\u6211\u4e00\u53e3\u7b54\u61c9\u7531\u6211\u4f86\u7b97,\u984c\u76ee\u6211\u5728\u4e0b\u9762\u7d66\u51fa,\u9019\u7a2e\u984c\u76ee\u975e\u5e38\u9069\u5408\u4f7f\u7528\u96fb\u8166\u9032\u884c\u78b0\u649e\u6c42\u7d50\u679c.\u5e38\u7d30\u7684C\u8a9e\u8a00\u6f14\u7b97\u6cd5\u6211\u5728\u4e0b\u9762\u7d66\u51fa,\u6f14\u7b97\u6cd5\u601d\u8def\u5c31\u662f\u96de\u86cb\u500b\u6578\u9010\u6b21\u52a0\u4e00,\u6240\u6709\u689d\u4ef6\u90fd\u9644\u5408\u5c31\u5f97\u51fa\u63a5\u679c,\u6211\u679c\u53f0\u8001\u723a\u6a5fIBM-T60P\u77ac\u9593\u5c31\u7d66\u6211\u7b54\u68481449,\u6211\u5c07\u7d50\u679c\u544a\u8a34\u6211\u8001\u8c46\u4ed6\u7acb\u99ac\u767c\u4e0a\u7fa4\u5a01\u4e00\u5a01.<\/p>\n<p>&nbsp;<\/p>\n<p>\u4e00\u7b50\u96de\u86cb:\u6c42\u7b50\u88cf\u96de\u86cb\u7684\u500b\u6578<br \/>\n\u4e00\u500b\u4e00\u500b\u62ff,\u6b63\u597d\u62ff\u5b8c.<br \/>\n\u4e8c\u500b\u4e8c\u500b\u62ff,\u9084\u5269\u4e00\u500b.<br \/>\n\u4e09\u500b\u4e09\u500b\u62ff,\u6b63\u597d\u62ff\u5b8c.<br \/>\n\u56db\u500b\u56db\u500b\u62ff,\u9084\u5269\u4e00\u500b.<br \/>\n\u4e94\u500b\u4e94\u500b\u62ff,\u9084\u5dee\u4e00\u500b.<br \/>\n\u516d\u500b\u516d\u500b\u62ff,\u9084\u5269\u4e09\u500b.<br \/>\n\u4e03\u500b\u4e03\u500b\u62ff,\u6b63\u597d\u62ff\u5b8c.<br \/>\n\u516b\u500b\u516b\u500b\u62ff,\u9084\u5269\u4e00\u500b.<br \/>\n\u4e5d\u500b\u4e5d\u500b\u62ff,\u6b63\u597d\u62ff\u5b8c.<\/p>\n<p>\/\/&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n\/\/\u4e00\u7b50\u96de\u86cb<br \/>\n\/\/&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\nint egg()<br \/>\n{<br \/>\nint x[9];<br \/>\nint _x;\/\/ \u96de\u86cb\u500b\u6578<br \/>\nint c;\/\/\u62ff\u86cb\u7684\u6b21\u6578<\/p>\n<p>_x = 0;\/\/ \u96de\u86cb\u500b\u6578<br \/>\nwhile(1)<br \/>\n{<br \/>\n++_x;\/\/ \u96de\u86cb\u500b\u6578\u52a0\u4e00<\/p>\n<p>for(c = 0; 1<em>c\u00a0\u00a0 &lt;= _x; ++c)<br \/>\nx[0] = 1<\/em>c;<\/p>\n<p>for(c = 0; 2<em>c+1 &lt;= _x; ++c)<br \/>\nx[1] = 2<\/em>c+1;<\/p>\n<p>for(c = 0; 3<em>c\u00a0\u00a0 &lt;= _x; ++c)<br \/>\nx[2] = 3<\/em>c;<\/p>\n<p>for(c = 0; 4<em>c+1 &lt;= _x; ++c)<br \/>\nx[3] = 4<\/em>c+1;<\/p>\n<p>for(c = 0; 5<em>c-1 &lt;= _x; ++c)<br \/>\nx[4] = 5<\/em>c-1;<\/p>\n<p>for(c = 0; 6<em>c+3 &lt;= _x; ++c)<br \/>\nx[5] = 6<\/em>c+3;<\/p>\n<p>for(c = 0; 7<em>c\u00a0\u00a0 &lt;= _x; ++c)<br \/>\nx[6] = 7<\/em>c;<\/p>\n<p>for(c = 0; 8<em>c+1 &lt;= _x; ++c)<br \/>\nx[7] = 8<\/em>c+1;<\/p>\n<p>for(c = 0; 9<em>c\u00a0\u00a0 &lt;= _x; ++c)<br \/>\nx[8] = 9<\/em>c;<\/p>\n<p>if(_x == x[0] &amp;&amp;<br \/>\n_x == x[1] &amp;&amp;<br \/>\n_x == x[2] &amp;&amp;<br \/>\n_x == x[3] &amp;&amp;<br \/>\n_x == x[4] &amp;&amp;<br \/>\n_x == x[5] &amp;&amp;<br \/>\n_x == x[6] &amp;&amp;<br \/>\n_x == x[7] &amp;&amp;<br \/>\n_x == x[8] )<br \/>\nbreak;<br \/>\n}<\/p>\n<p>return _x;<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u65e5\u898b\u8001\u8c46\u5728\u770b\u5fae\u4fe1,\u800c\u4e14\u4e0d\u505c\u7684\u5728\u7d19\u4e0a\u5beb\u6578\u4f4d\u4e26\u6309\u8a08\u7b97\u6a5f,\u539f\u4f86\u662f\u4e09\u8205\u7236\u7fa4\u88cf\u767c\u4e86\u4e00\u689d\u6578\u5b78\u984c,\u9019\u662f\u689d\u6578\u5b78\u984c\u6c42\u7b50\u88cf\u96de\u86cb\u7684 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.bookcard.net\/wordpress\/algorithm_egg_c\/\" class=\"more-link\">\u7e7c\u7e8c\u95b1\u8b80 <span class=\"screen-reader-text\">\u4e00\u7b50\u96de\u86cb<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,13],"tags":[],"class_list":["post-1175","post","type-post","status-publish","format-standard","hentry","category-algorithm","category-pc","entry"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/posts\/1175","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/comments?post=1175"}],"version-history":[{"count":9,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/posts\/1175\/revisions"}],"predecessor-version":[{"id":15180,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/posts\/1175\/revisions\/15180"}],"wp:attachment":[{"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/media?parent=1175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/categories?post=1175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bookcard.net\/wordpress\/wp-json\/wp\/v2\/tags?post=1175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}