{"id":546,"date":"2011-08-06T01:03:48","date_gmt":"2011-08-05T17:03:48","guid":{"rendered":"http:\/\/www.yuewei.net\/546.html"},"modified":"2011-08-06T01:03:48","modified_gmt":"2011-08-05T17:03:48","slug":"%e4%b8%8d%e7%ae%a1%e4%bd%a0%e4%bb%ac%e4%bf%a1%e4%b8%8d%e4%bf%a1%ef%bc%8c%e5%8f%8d%e6%ad%a3%e6%88%91%e6%98%af%e4%bf%a1%e4%ba%86","status":"publish","type":"post","link":"http:\/\/feeng.com\/blog\/546.html","title":{"rendered":"\u4e0d\u7ba1\u4f60\u4eec\u4fe1\u4e0d\u4fe1\uff0c\u53cd\u6b63\u6211\u662f\u4fe1\u4e86"},"content":{"rendered":"<p>\u4e0b\u9762\u662f\u4e00\u4f4dCoder\u8c03\u620f\u94c1\u9053\u90e8\u65b0\u95fb\u53d1\u8a00\u4eba\u738b\u52c7\u5e73\u540d\u8a00\uff1a\u201c\u4e0d\u7ba1\u4f60\u4eec\u4fe1\u4e0d\u4fe1\uff0c\u53cd\u6b63\u6211\u4fe1\u4e86\u2026\u2026\u8fd9\u662f\u751f\u547d\u7684\u5947\u8ff9\u2026\u2026\u5b83\u5c31\u662f\u53d1\u751f\u4e86\u201d\u7684\u4e00\u6bb5\u4ee3\u7801\uff1a<\/p>\n<p><!--more--><\/p>\n<p>&nbsp;<\/p>\n<p>Java\u7248\uff1a<\/p>\n<div>\n<pre>try\n {\n     <span style=\"color: rgb(0, 0, 255);\">if<\/span> (you.believe(it) == true || you.believe(it) == false)\n  <span style=\"color: rgb(0, 128, 0);\">\/\/\u4e3a\u4ec0\u4e48\u4e0d\u662fif (you.believe(it) || !you.believe(it)),\u8fd9\u4e00\u53e5\u600e\u4e48\u5224\u65ad\uff1f\u65e0\u8bc1\u7a0b\u5e8f\u733f\u771f\u53ef\u6015<\/span>\n         I.believe(it);\n     }\n }\n catch (Exception ex)\n {\n     throw new Exception(\"<span style=\"color: rgb(139, 0, 0);\">It's a miracle!<\/span>\");\n }\n finally\n {\n     it.justHappened();\n }<\/pre>\n<\/div>\n<p>C\u7248\uff1a<\/p>\n<div>\n<pre>#include &lt;stdio.h&gt;\n #include &lt;stdlib.h&gt;\n #include &lt;string.h&gt;\n #include &lt;sys\/fcntl.h&gt;\n \n<span style=\"color: rgb(0, 0, 255);\">int<\/span> believe(<span style=\"color: rgb(0, 0, 255);\">int<\/span> it, <span style=\"color: rgb(0, 0, 255);\">char<\/span> * you)\n {\n     <span style=\"color: rgb(0, 0, 255);\">int<\/span> random;\n     <span style=\"color: rgb(0, 0, 255);\">int<\/span> c;\n \n    random = open(\"<span style=\"color: rgb(139, 0, 0);\">\/dev\/random<\/span>\", O_RDONLY);\n     read(random, &amp;amp;amp;c, sizeof(c));\n     close(random);\n \n    <span style=\"color: rgb(0, 0, 255);\">if<\/span>(!strcmp(you, \"<span style=\"color: rgb(139, 0, 0);\">people<\/span>\")) {\n         printf(\"<span style=\"color: rgb(139, 0, 0);\">It doesn\u2019t matter if you guys believe or not\\n<\/span>\");\n         <span style=\"color: rgb(0, 0, 255);\">return<\/span> c;\n     }\n \n    printf(\"<span style=\"color: rgb(139, 0, 0);\">I believe!\\n<\/span>\");\n     <span style=\"color: rgb(0, 0, 255);\">return<\/span> 1;\n }\n \n<span style=\"color: rgb(0, 0, 255);\">int<\/span> main()\n {\n     <span style=\"color: rgb(0, 0, 255);\">int<\/span> ret;\n     <span style=\"color: rgb(0, 0, 255);\">int<\/span> it;            <span style=\"color: rgb(0, 128, 0);\">\/* you know *\/<\/span>\n \n    <span style=\"color: rgb(0, 0, 255);\">char<\/span> * you = \"<span style=\"color: rgb(139, 0, 0);\">people<\/span>\";\n     <span style=\"color: rgb(0, 0, 255);\">char<\/span> * I;\n \n    <span style=\"color: rgb(0, 0, 255);\">switch<\/span>(believe(it, you)) {\n     <span style=\"color: rgb(0, 0, 255);\">default<\/span>:\n         ret = believe(it, I);\n     }\n \n    <span style=\"color: rgb(0, 0, 255);\">if<\/span>(ret)\n         printf(\"<span style=\"color: rgb(139, 0, 0);\">It's a miracle!\\n<\/span>\");\n \n    printf(\"<span style=\"color: rgb(139, 0, 0);\">It just happened!\\n<\/span>\");\n     <span style=\"color: rgb(0, 0, 255);\">return<\/span> 0;\n }<\/pre>\n<\/div>\n<p><\/p>\n<p>\u9879\u76ee\u7ec4\u957f\uff1a\u4f60\u786e\u5b9a\u4f60\u7684\u4ee3\u7801\u6ca1\u6709BUG\uff1fcoder\uff1a\u81f3\u4e8e\u4f60\u4fe1\u4e0d\u4fe1\uff0c\u53cd\u6b63\u6211\u4fe1\u4e86\u30025\u5206\u949f\u540e\uff0c\u7ec4\u957f\uff1a\u4f60\u7684\u7a0b\u5e8f\u6302\u4e86\u3002 coder\uff1a\u8fd9\u662f\u4e00\u4e2a\u5947\u8ff9\u3002\u7ec4\u957f\uff08\u6012\uff09\uff1a\u4f60\u7ed9\u4e2a\u89e3\u91ca\u3002coder\uff1a\u6211\u53ea\u80fd\u8bf4\uff0c\u5b83\u5c31\u662f\u53d1\u751f\u4e86\uff0c\u4e8b\u60c5\u5c31\u662f\u8fd9\u4e2a\u6837\u5b50\u3002 <\/p>\n<p>\u518d\u5206\u4eab\u4e00\u6bb5\uff08\u4f60\u7231\uff0c\u6216\u8005\u4e0d\u7231\u6211\uff0c\u7231\u5c31\u5728\u90a3\u91cc\uff0c\u4e0d\u589e\u4e0d\u51cf\uff09\uff1a<\/p>\n<p><\/p>\n<div>\n<pre><span style=\"color: rgb(0, 0, 255);\">if<\/span> (you.Love(me) || !you.Love(me))\n{\n    love++;\n    love--;\n}<\/pre>\n<\/div>\n<p>\u9605\u5fae\u535a\u5ba2\u4e4b\u524d\u8fd8\u5206\u4eab\u8fc7\u4e00\u6bb5\u4f18\u7f8e\u7684\u4ee3\u7801\uff1a\u300a<a title=\"\u4ee3\u7801\u5982\u8bd7\uff0c\u4f18\u7f8e\u5982\u65af\" href=\"http:\/\/www.feeng.com\/blog\/199.html\" target=\"_blank\" rel=\"noopener noreferrer\">\u4e00\u9996\u5c0f\u8bd7<\/a>\u300b\uff0c\u4f60\u53ef\u4ee5\u56de\u8fc7\u5934\u53bb\u770b\u770b\u54e6\u3002<br \/>\n\u6b22\u8fce\u8865\u5145\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0b\u9762\u662f\u4e00\u4f4dCoder\u8c03\u620f\u94c1\u9053\u90e8\u65b0\u95fb\u53d1\u8a00\u4eba\u738b\u52c7\u5e73\u540d\u8a00\uff1a\u201c\u4e0d\u7ba1\u4f60\u4eec\u4fe1\u4e0d\u4fe1\uff0c\u53cd\u6b63\u6211\u4fe1\u4e86\u2026\u2026\u8fd9\u662f\u751f\u547d\u7684\u5947\u8ff9\u2026\u2026\u5b83\u5c31\u662f\u53d1\u751f\u4e86\u201d\u7684\u4e00\u6bb5\u4ee3\u7801\uff1a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[17],"_links":{"self":[{"href":"http:\/\/feeng.com\/blog\/wp-json\/wp\/v2\/posts\/546"}],"collection":[{"href":"http:\/\/feeng.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/feeng.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/feeng.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/feeng.com\/blog\/wp-json\/wp\/v2\/comments?post=546"}],"version-history":[{"count":0,"href":"http:\/\/feeng.com\/blog\/wp-json\/wp\/v2\/posts\/546\/revisions"}],"wp:attachment":[{"href":"http:\/\/feeng.com\/blog\/wp-json\/wp\/v2\/media?parent=546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/feeng.com\/blog\/wp-json\/wp\/v2\/categories?post=546"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/feeng.com\/blog\/wp-json\/wp\/v2\/tags?post=546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}