爱因斯坦谜题解答(三种算法比较).doc

上传人:飞****9 文档编号:133703897 上传时间:2020-05-29 格式:DOC 页数:45 大小:150.72KB
返回 下载 相关 举报
爱因斯坦谜题解答(三种算法比较).doc_第1页
第1页 / 共45页
爱因斯坦谜题解答(三种算法比较).doc_第2页
第2页 / 共45页
爱因斯坦谜题解答(三种算法比较).doc_第3页
第3页 / 共45页
爱因斯坦谜题解答(三种算法比较).doc_第4页
第4页 / 共45页
爱因斯坦谜题解答(三种算法比较).doc_第5页
第5页 / 共45页
点击查看更多>>
资源描述

《爱因斯坦谜题解答(三种算法比较).doc》由会员分享,可在线阅读,更多相关《爱因斯坦谜题解答(三种算法比较).doc(45页珍藏版)》请在金锄头文库上搜索。

1、爱因斯坦谜题: 在一条街上有颜色互不相同的五栋房子,不同国籍的人分别住在这五栋房子力,每人抽不同品牌的香烟,喝不同的饮料,养不同的宠物。已知如下情况:1. 英国人住红色房子里。2. 瑞典人养狗。3. 丹麦人喝茶。4. 绿色房子坐落在白色房子的左面。5. 绿色房子的主人喝咖啡。6. 抽Pall Mall香烟的人养鸟。7. 黄色房子的主人抽Dunhill香烟。8. 挪威人住第一间房子。9. 五座房子中间的那座的主人喝牛奶。10. 抽Blends香烟的住在养猫人的隔壁。11. 养马的人住在抽Dunhill香烟者的隔壁。12. 抽Blue Master香烟的喝啤酒。13. 德国人抽Prince香烟。1

2、4. 挪威人住的房子在蓝色房子的隔壁。15. 抽Blends香烟的人有一个喝水的邻居。问:谁养鱼?谜题的英文原文:Let us assume that there are five houses of different colors next to each other on the same road. In each house lives a man of a different nationality. Every man has his favorite drink, his favorite brand of cigarettes, and keeps pets of a par

3、ticular kind. 1.The Englishman lives in the red house. 2.The Swede keeps dogs. 3.The Dane drinks tea. 4.The green house is just to the left of the white one. 5.The owner of the green house drinks coffee. 6.The Pall Mall smoker keeps birds. 7.The owner of the yellow house smokes Dunhills. 8.The man i

4、n the center house drinks milk. 9.The Norwegian lives in the first house. 10.The Blend smoker has a neighbor who keeps cats. 11.The man who smokes Blue Masters drinks bier. 12.The man who keeps horses lives next to the Dunhill smoker. 13.The German smokes Prince. 14.The Norwegian lives next to the blue house. 15.The Blend smoker has a neighbor who drinks water. The question to be answered is: Who keeps fish?这道迷题出自1981年柏林的德国逻辑思考学院。据说世界上只有2%的人能出答案。就连大名鼎鼎的爱因斯坦也成为此题大伤脑筋,所以这道题也经常被国内外知名公司用做面试题目,相信许多朋友都只做出过一个答案,今天就用计算机来看看答案:C#代码(代码来源:http:/

展开阅读全文
相关资源
相关搜索

当前位置:首页 > IT计算机/网络 > 其它相关文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号