2007年07月09日 星期一 13:56
在一条街上,有5座房子,喷了5种颜色。每个房里住着不同国籍的人。每个人喝不同的饮料,抽不同品牌的香烟,养不同的宠物。 问题是:谁养鱼? 提示:1、英国人住红色房子 2、瑞典人养狗 3、丹麦人喝茶 4、绿色房子在白色房子左面 5、绿色房子主人喝咖啡 6、抽PallMall香烟的人养鸟 7、黄色房子主人抽Dunhill香烟 8、住在中间房子的人喝牛奶 9、挪威人住第一间房 10、抽Blends香烟的人住在养猫的人隔壁 11、养马的人住抽Dunhill香烟的人隔壁 12、抽BlueMaster的人喝啤酒 13、德国人抽Prince香烟 14、挪威人住蓝色房子隔壁 15、抽Blends香烟的人有一个喝水的邻居 谁有好的算法,我的算法P4 3.0G 1GRAM 250s左右,不满意 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20070709/96cc10af/attachment.html
2007年07月09日 星期一 14:06
On 7/9/07, 天天向上 <tiananlw在gmail.com> wrote: > 早有讨论的,欢迎深入优化: http://wiki.woodpecker.org.cn/moin/PyPorgramGames > > 在一条街上,有5座房子,喷了5种颜色。每个房里住着不同国籍的人。每个人喝不同的饮料,抽不同品牌的香烟,养不同的宠物。 > > 问题是:谁养鱼? > > 提示:1、英国人住红色房子 > > 2、瑞典人养狗 > > 3、丹麦人喝茶 > > 4、绿色房子在白色房子左面 > > 5、绿色房子主人喝咖啡 > > 6、抽PallMall香烟的人养鸟 > > 7、黄色房子主人抽Dunhill香烟 > > 8、住在中间房子的人喝牛奶 > > 9、挪威人住第一间房 > > 10、抽Blends香烟的人住在养猫的人隔壁 > > 11、养马的人住抽Dunhill香烟的人隔壁 > > 12、抽BlueMaster的人喝啤酒 > > 13、德国人抽Prince香烟 > > 14、挪威人住蓝色房子隔壁 > > 15、抽Blends香烟的人有一个喝水的邻居 > > > > > 谁有好的算法,我的算法P4 3.0G 1GRAM 250s左右,不满意 > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to > python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to > python-chinese-request在lists.python.cn > Detail Info: > http://python.cn/mailman/listinfo/python-chinese > -- '''Time is unimportant, only life important! http://zoomquiet.org blog在http://blog.zoomquiet.org/pyblosxom/ wiki在http://wiki.woodpecker.org.cn/moin/ZoomQuiet scrap在http://floss.zoomquiet.org douban在http://www.douban.com/people/zoomq/ ____________________________________ Pls. use OpenOffice.org to replace M$ Office. http://zh.openoffice.org Pls. use 7-zip to replace WinRAR/WinZip. http://7-zip.org/zh-cn/ You can get the truely Freedom 4 software. '''
2007年07月09日 星期一 14:15
好强啊 有学到了一手 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20070709/73ed747b/attachment.htm
2007年07月09日 星期一 14:28
ÖÜÀÏ´ó£¬ÊÇProgram²»ÊÇPorgram...... On 7/9/07, Zoom. Quiet <zoom.quiet在gmail.com> wrote: > > On 7/9/07, ÌìÌìÏòÉÏ <tiananlw在gmail.com> wrote: > > > ÔçÓÐÌÖÂÛµÄ,»¶ÓÉîÈëÓÅ»¯: > http://wiki.woodpecker.org.cn/moin/PyPorgramGames > > > > > ÔÚÒ»Ìõ½ÖÉÏ£¬ÓÐ5×ù·¿×Ó£¬ÅçÁË5ÖÖÑÕÉ«¡£Ã¿¸ö·¿Àïס×Ų»Í¬¹ú¼®µÄÈË¡£Ã¿¸öÈ˺Ȳ»Í¬µÄÒûÁÏ£¬³é²»Í¬Æ·ÅƵÄÏãÑÌ£¬Ñø²»Í¬µÄ³èÎï¡£ > > > > ÎÊÌâÊÇ£ºËÑøÓ㣿 > > > > Ìáʾ£º1¡¢Ó¢¹úÈËסºìÉ«·¿×Ó > > > > 2¡¢ÈðµäÈËÑø¹· > > > > 3¡¢µ¤ÂóÈ˺Ȳè > > > > 4¡¢ÂÌÉ«·¿×ÓÔÚ°×É«·¿×Ó×óÃæ > > > > 5¡¢ÂÌÉ«·¿×ÓÖ÷È˺ȿ§·È > > > > 6¡¢³éPallMallÏãÑ̵ÄÈËÑøÄñ > > > > 7¡¢»ÆÉ«·¿×ÓÖ÷È˳éDunhillÏãÑÌ > > > > 8¡¢×¡ÔÚÖм䷿×ÓµÄÈ˺ÈÅ£ÄÌ > > > > 9¡¢Å²ÍþÈËסµÚÒ»¼ä·¿ > > > > 10¡¢³éBlendsÏãÑ̵ÄÈËסÔÚÑøèµÄÈ˸ô±Ú > > > > 11¡¢ÑøÂíµÄÈËס³éDunhillÏãÑ̵ÄÈ˸ô±Ú > > > > 12¡¢³éBlueMasterµÄÈ˺ÈÆ¡¾Æ > > > > 13¡¢µÂ¹úÈ˳éPrinceÏãÑÌ > > > > 14¡¢Å²ÍþÈËסÀ¶É«·¿×Ó¸ô±Ú > > > > 15¡¢³éBlendsÏãÑ̵ÄÈËÓÐÒ»¸öºÈË®µÄÁÚ¾Ó > > > > > > > > > > ËÓкõÄËã·¨£¬ÎÒµÄËã·¨P4 3.0G 1GRAM 250s×óÓÒ£¬²»ÂúÒâ > > > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to > > python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to > > python-chinese-request在lists.python.cn > > Detail Info: > > http://python.cn/mailman/listinfo/python-chinese > > > > > -- > '''Time is unimportant, only life important! > http://zoomquiet.org > blog在http://blog.zoomquiet.org/pyblosxom/ > wiki在http://wiki.woodpecker.org.cn/moin/ZoomQuiet > scrap在http://floss.zoomquiet.org > douban在http://www.douban.com/people/zoomq/ > ____________________________________ > Pls. use OpenOffice.org to replace M$ Office. > http://zh.openoffice.org > Pls. use 7-zip to replace WinRAR/WinZip. > http://7-zip.org/zh-cn/ > You can get the truely Freedom 4 software. > ''' > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese -- Nicholas @ Nirvana Studio http://www.nirvanastudio.org -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070709/487504b7/attachment-0001.html
2007年07月09日 星期一 14:32
½â¾öÕâÖÖÎÊÌâÓÃprologÊÇ×îºÃ²»¹ýµÄÁË£¬ºÙºÙ¡£ »ù±¾ÉÏ°ÑËùÓеÄÌõ¼þÊäÈëµ½prologÖУ¬È»ºóÈÃËü×Ô¶¯ÍÆÀí¡£¡£¡£ :) ÔÚ07-7-9£¬Nicholas Ding <nicholasdsj在gmail.com> дµÀ£º > > ÖÜÀÏ´ó£¬ÊÇProgram²»ÊÇPorgram...... > > On 7/9/07, Zoom. Quiet <zoom.quiet在gmail.com> wrote: > > > > On 7/9/07, ÌìÌìÏòÉÏ <tiananlw在gmail.com> wrote: > > > > > ÔçÓÐÌÖÂÛµÄ,»¶ÓÉîÈëÓÅ»¯: > > http://wiki.woodpecker.org.cn/moin/PyPorgramGames > > > > > > > > ÔÚÒ»Ìõ½ÖÉÏ£¬ÓÐ5×ù·¿×Ó£¬ÅçÁË5ÖÖÑÕÉ«¡£Ã¿¸ö·¿Àïס×Ų»Í¬¹ú¼®µÄÈË¡£Ã¿¸öÈ˺Ȳ»Í¬µÄÒûÁÏ£¬³é²»Í¬Æ·ÅƵÄÏãÑÌ£¬Ñø²»Í¬µÄ³èÎï¡£ > > > > > > ÎÊÌâÊÇ£ºËÑøÓ㣿 > > > > > > Ìáʾ£º1¡¢Ó¢¹úÈËסºìÉ«·¿×Ó > > > > > > 2¡¢ÈðµäÈËÑø¹· > > > > > > 3¡¢µ¤ÂóÈ˺Ȳè > > > > > > 4¡¢ÂÌÉ«·¿×ÓÔÚ°×É«·¿×Ó×óÃæ > > > > > > 5¡¢ÂÌÉ«·¿×ÓÖ÷È˺ȿ§·È > > > > > > 6¡¢³éPallMallÏãÑ̵ÄÈËÑøÄñ > > > > > > 7¡¢»ÆÉ«·¿×ÓÖ÷È˳éDunhillÏãÑÌ > > > > > > 8¡¢×¡ÔÚÖм䷿×ÓµÄÈ˺ÈÅ£ÄÌ > > > > > > 9¡¢Å²ÍþÈËסµÚÒ»¼ä·¿ > > > > > > 10¡¢³éBlendsÏãÑ̵ÄÈËסÔÚÑøèµÄÈ˸ô±Ú > > > > > > 11¡¢ÑøÂíµÄÈËס³éDunhillÏãÑ̵ÄÈ˸ô±Ú > > > > > > 12¡¢³éBlueMasterµÄÈ˺ÈÆ¡¾Æ > > > > > > 13¡¢µÂ¹úÈ˳éPrinceÏãÑÌ > > > > > > 14¡¢Å²ÍþÈËסÀ¶É«·¿×Ó¸ô±Ú > > > > > > 15¡¢³éBlendsÏãÑ̵ÄÈËÓÐÒ»¸öºÈË®µÄÁÚ¾Ó > > > > > > > > > > > > > > > ËÓкõÄËã·¨£¬ÎÒµÄËã·¨P4 3.0G 1GRAM 250s×óÓÒ£¬²»ÂúÒâ > > > > > > _______________________________________________ > > > python-chinese > > > Post: send python-chinese在lists.python.cn > > > Subscribe: send subscribe to > > > python-chinese-request在lists.python.cn > > > Unsubscribe: send unsubscribe to > > > python-chinese-request在lists.python.cn > > > Detail Info: > > > http://python.cn/mailman/listinfo/python-chinese > > > > > > > > > -- > > '''Time is unimportant, only life important! > > http://zoomquiet.org > > blog在http://blog.zoomquiet.org/pyblosxom/ > > wiki在http://wiki.woodpecker.org.cn/moin/ZoomQuiet > > scrap在http://floss.zoomquiet.org > > douban在http://www.douban.com/people/zoomq/ > > ____________________________________ > > Pls. use OpenOffice.org to replace M$ Office. > > http://zh.openoffice.org > > Pls. use 7-zip to replace WinRAR/WinZip. > > http://7-zip.org/zh-cn/ > > You can get the truely Freedom 4 software. > > ''' > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > -- > Nicholas @ Nirvana Studio > http://www.nirvanastudio.org > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070709/7bb42bf5/attachment.htm
2007年07月09日 星期一 14:36
ÓÐËÄÜÓÃprolog¿ª¸öÍ·Âð£¬Ó¦¸ÃͦÓÐÒâ˼µÄ¡£ On 7/9/07, katkat lim <limkatkat在gmail.com> wrote: > > ½â¾öÕâÖÖÎÊÌâÓÃprologÊÇ×îºÃ²»¹ýµÄÁË£¬ºÙºÙ¡£ > »ù±¾ÉÏ°ÑËùÓеÄÌõ¼þÊäÈëµ½prologÖУ¬È»ºóÈÃËü×Ô¶¯ÍÆÀí¡£¡£¡£ > :) > > > ÔÚ07-7-9£¬Nicholas Ding <nicholasdsj在gmail.com> дµÀ£º > > > > ÖÜÀÏ´ó£¬ÊÇProgram²»ÊÇPorgram...... > > > > On 7/9/07, Zoom. Quiet <zoom.quiet在gmail.com > wrote: > > > > > > On 7/9/07, ÌìÌìÏòÉÏ < tiananlw在gmail.com> wrote: > > > > > > > ÔçÓÐÌÖÂÛµÄ,»¶ÓÉîÈëÓÅ»¯: > > > http://wiki.woodpecker.org.cn/moin/PyPorgramGames > > > > > > > > > > > ÔÚÒ»Ìõ½ÖÉÏ£¬ÓÐ5×ù·¿×Ó£¬ÅçÁË5ÖÖÑÕÉ«¡£Ã¿¸ö·¿Àïס×Ų»Í¬¹ú¼®µÄÈË¡£Ã¿¸öÈ˺Ȳ»Í¬µÄÒûÁÏ£¬³é²»Í¬Æ·ÅƵÄÏãÑÌ£¬Ñø²»Í¬µÄ³èÎï¡£ > > > > > > > > ÎÊÌâÊÇ£ºËÑøÓ㣿 > > > > > > > > Ìáʾ£º1¡¢Ó¢¹úÈËסºìÉ«·¿×Ó > > > > > > > > 2¡¢ÈðµäÈËÑø¹· > > > > > > > > 3¡¢µ¤ÂóÈ˺Ȳè > > > > > > > > 4¡¢ÂÌÉ«·¿×ÓÔÚ°×É«·¿×Ó×óÃæ > > > > > > > > 5¡¢ÂÌÉ«·¿×ÓÖ÷È˺ȿ§·È > > > > > > > > 6¡¢³éPallMallÏãÑ̵ÄÈËÑøÄñ > > > > > > > > 7¡¢»ÆÉ«·¿×ÓÖ÷È˳éDunhillÏãÑÌ > > > > > > > > 8¡¢×¡ÔÚÖм䷿×ÓµÄÈ˺ÈÅ£ÄÌ > > > > > > > > 9¡¢Å²ÍþÈËסµÚÒ»¼ä·¿ > > > > > > > > 10¡¢³éBlendsÏãÑ̵ÄÈËסÔÚÑøèµÄÈ˸ô±Ú > > > > > > > > 11¡¢ÑøÂíµÄÈËס³éDunhillÏãÑ̵ÄÈ˸ô±Ú > > > > > > > > 12¡¢³éBlueMasterµÄÈ˺ÈÆ¡¾Æ > > > > > > > > 13¡¢µÂ¹úÈ˳éPrinceÏãÑÌ > > > > > > > > 14¡¢Å²ÍþÈËסÀ¶É«·¿×Ó¸ô±Ú > > > > > > > > 15¡¢³éBlendsÏãÑ̵ÄÈËÓÐÒ»¸öºÈË®µÄÁÚ¾Ó > > > > > > > > > > > > > > > > > > > > ËÓкõÄËã·¨£¬ÎÒµÄËã·¨P4 3.0G 1GRAM 250s×óÓÒ£¬²»ÂúÒâ > > > > > > > > _______________________________________________ > > > > python-chinese > > > > Post: send python-chinese在lists.python.cn > > > > Subscribe: send subscribe to > > > > python-chinese-request在lists.python.cn > > > > Unsubscribe: send unsubscribe to > > > > python-chinese-request在lists.python.cn > > > > Detail Info: > > > > http://python.cn/mailman/listinfo/python-chinese > > > > > > > > > > > > > -- > > > '''Time is unimportant, only life important! > > > http://zoomquiet.org > > > blog@ http://blog.zoomquiet.org/pyblosxom/ > > > wiki在http://wiki.woodpecker.org.cn/moin/ZoomQuiet > > > scrap在http://floss.zoomquiet.org > > > douban@ http://www.douban.com/people/zoomq/ > > > ____________________________________ > > > Pls. use OpenOffice.org to replace M$ Office. > > > http://zh.openoffice.org > > > Pls. use 7-zip to replace WinRAR/WinZip. > > > http://7-zip.org/zh-cn/ > > > You can get the truely Freedom 4 software. > > > ''' > > > _______________________________________________ > > > python-chinese > > > Post: send python-chinese在lists.python.cn > > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > > > > > > -- > > Nicholas @ Nirvana Studio > > http://www.nirvanastudio.org > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to > > python-chinese-request在lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -- Nicholas @ Nirvana Studio http://www.nirvanastudio.org -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070709/25b5cb04/attachment-0001.html
2007年07月09日 星期一 14:37
挺好玩的,结果似乎不只一个。 可以暴力搜索,不过先把几个明显的剪枝条件用上可能更快。 在07-7-9,katkat lim <limkatkat在gmail.com> 写道: > > 解决这种问题用prolog是最好不过的了,嘿嘿。 > 基本上把所有的条件输入到prolog中,然后让它自动推理。。。 > :) > > > 在07-7-9,Nicholas Ding <nicholasdsj在gmail.com> 写道: > > > > 周老大,是Program不是Porgram...... > > > > On 7/9/07, Zoom. Quiet <zoom.quiet在gmail.com > wrote: > > > > > > On 7/9/07, 天天向上 < tiananlw在gmail.com> wrote: > > > > > > > 早有讨论的,欢迎深入优化: > > > http://wiki.woodpecker.org.cn/moin/PyPorgramGames > > > > > > > > > > > 在一条街上,有5座房子,喷了5种颜色。每个房里住着不同国籍的人。每个人喝不同的饮料,抽不同品牌的香烟,养不同的宠物。 > > > > > > > > 问题是:谁养鱼? > > > > > > > > 提示:1、英国人住红色房子 > > > > > > > > 2、瑞典人养狗 > > > > > > > > 3、丹麦人喝茶 > > > > > > > > 4、绿色房子在白色房子左面 > > > > > > > > 5、绿色房子主人喝咖啡 > > > > > > > > 6、抽PallMall香烟的人养鸟 > > > > > > > > 7、黄色房子主人抽Dunhill香烟 > > > > > > > > 8、住在中间房子的人喝牛奶 > > > > > > > > 9、挪威人住第一间房 > > > > > > > > 10、抽Blends香烟的人住在养猫的人隔壁 > > > > > > > > 11、养马的人住抽Dunhill香烟的人隔壁 > > > > > > > > 12、抽BlueMaster的人喝啤酒 > > > > > > > > 13、德国人抽Prince香烟 > > > > > > > > 14、挪威人住蓝色房子隔壁 > > > > > > > > 15、抽Blends香烟的人有一个喝水的邻居 > > > > > > > > > > > > > > > > > > > > 谁有好的算法,我的算法P4 3.0G 1GRAM 250s左右,不满意 > > > > > > > > _______________________________________________ > > > > python-chinese > > > > Post: send python-chinese在lists.python.cn > > > > Subscribe: send subscribe to > > > > python-chinese-request在lists.python.cn > > > > Unsubscribe: send unsubscribe to > > > > python-chinese-request在lists.python.cn > > > > Detail Info: > > > > http://python.cn/mailman/listinfo/python-chinese > > > > > > > > > > > > > -- > > > '''Time is unimportant, only life important! > > > http://zoomquiet.org > > > blog@ http://blog.zoomquiet.org/pyblosxom/ > > > wiki在http://wiki.woodpecker.org.cn/moin/ZoomQuiet > > > scrap在http://floss.zoomquiet.org > > > douban@ http://www.douban.com/people/zoomq/ > > > ____________________________________ > > > Pls. use OpenOffice.org to replace M$ Office. > > > http://zh.openoffice.org > > > Pls. use 7-zip to replace WinRAR/WinZip. > > > http://7-zip.org/zh-cn/ > > > You can get the truely Freedom 4 software. > > > ''' > > > _______________________________________________ > > > python-chinese > > > Post: send python-chinese在lists.python.cn > > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > > > > > > -- > > Nicholas @ Nirvana Studio > > http://www.nirvanastudio.org > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to > > python-chinese-request在lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- 下一部分 -------------- 一个HTML附件被移除... URL: http://python.cn/pipermail/python-chinese/attachments/20070709/5fad1ecb/attachment.htm
2007年07月09日 星期一 14:40
ºÜ¿ÉϧÎÒÒ²²»ÊǺܻáprolog¡£ÕâÀïÓÐÒ»¸öÏàËƵÄÀý×Ó¡£ http://blog.csdn.net/g9yuayon/archive/2007/05/15/1609845.aspx ÔÚ07-7-9£¬Nicholas Ding <nicholasdsj在gmail.com> дµÀ£º > > ÓÐËÄÜÓÃprolog¿ª¸öÍ·Âð£¬Ó¦¸ÃͦÓÐÒâ˼µÄ¡£ > > On 7/9/07, katkat lim <limkatkat在gmail.com> wrote: > > > > ½â¾öÕâÖÖÎÊÌâÓÃprologÊÇ×îºÃ²»¹ýµÄÁË£¬ºÙºÙ¡£ > > »ù±¾ÉÏ°ÑËùÓеÄÌõ¼þÊäÈëµ½prologÖУ¬È»ºóÈÃËü×Ô¶¯ÍÆÀí¡£¡£¡£ > > :) > > > > > > ÔÚ07-7-9£¬Nicholas Ding <nicholasdsj在gmail.com > дµÀ£º > > > > > > ÖÜÀÏ´ó£¬ÊÇProgram²»ÊÇPorgram...... > > > > > > On 7/9/07, Zoom. Quiet <zoom.quiet在gmail.com > wrote: > > > > > > > > On 7/9/07, ÌìÌìÏòÉÏ < tiananlw在gmail.com> wrote: > > > > > > > > > ÔçÓÐÌÖÂÛµÄ,»¶ÓÉîÈëÓÅ»¯: > > > > http://wiki.woodpecker.org.cn/moin/PyPorgramGames > > > > > > > > > > > > > > ÔÚÒ»Ìõ½ÖÉÏ£¬ÓÐ5×ù·¿×Ó£¬ÅçÁË5ÖÖÑÕÉ«¡£Ã¿¸ö·¿Àïס×Ų»Í¬¹ú¼®µÄÈË¡£Ã¿¸öÈ˺Ȳ»Í¬µÄÒûÁÏ£¬³é²»Í¬Æ·ÅƵÄÏãÑÌ£¬Ñø²»Í¬µÄ³èÎï¡£ > > > > > > > > > > ÎÊÌâÊÇ£ºËÑøÓ㣿 > > > > > > > > > > Ìáʾ£º1¡¢Ó¢¹úÈËסºìÉ«·¿×Ó > > > > > > > > > > 2¡¢ÈðµäÈËÑø¹· > > > > > > > > > > 3¡¢µ¤ÂóÈ˺Ȳè > > > > > > > > > > 4¡¢ÂÌÉ«·¿×ÓÔÚ°×É«·¿×Ó×óÃæ > > > > > > > > > > 5¡¢ÂÌÉ«·¿×ÓÖ÷È˺ȿ§·È > > > > > > > > > > 6¡¢³éPallMallÏãÑ̵ÄÈËÑøÄñ > > > > > > > > > > 7¡¢»ÆÉ«·¿×ÓÖ÷È˳éDunhillÏãÑÌ > > > > > > > > > > 8¡¢×¡ÔÚÖм䷿×ÓµÄÈ˺ÈÅ£ÄÌ > > > > > > > > > > 9¡¢Å²ÍþÈËסµÚÒ»¼ä·¿ > > > > > > > > > > 10¡¢³éBlendsÏãÑ̵ÄÈËסÔÚÑøèµÄÈ˸ô±Ú > > > > > > > > > > 11¡¢ÑøÂíµÄÈËס³éDunhillÏãÑ̵ÄÈ˸ô±Ú > > > > > > > > > > 12¡¢³éBlueMasterµÄÈ˺ÈÆ¡¾Æ > > > > > > > > > > 13¡¢µÂ¹úÈ˳éPrinceÏãÑÌ > > > > > > > > > > 14¡¢Å²ÍþÈËסÀ¶É«·¿×Ó¸ô±Ú > > > > > > > > > > 15¡¢³éBlendsÏãÑ̵ÄÈËÓÐÒ»¸öºÈË®µÄÁÚ¾Ó > > > > > > > > > > > > > > > > > > > > > > > > > ËÓкõÄËã·¨£¬ÎÒµÄËã·¨P4 3.0G 1GRAM 250s×óÓÒ£¬²»ÂúÒâ > > > > > > > > > > _______________________________________________ > > > > > python-chinese > > > > > Post: send python-chinese在lists.python.cn > > > > > Subscribe: send subscribe to > > > > > python-chinese-request在lists.python.cn > > > > > Unsubscribe: send unsubscribe to > > > > > python-chinese-request在lists.python.cn > > > > > Detail Info: > > > > > http://python.cn/mailman/listinfo/python-chinese > > > > > > > > > > > > > > > > > -- > > > > '''Time is unimportant, only life important! > > > > http://zoomquiet.org > > > > blog@ http://blog.zoomquiet.org/pyblosxom/ > > > > wiki在http://wiki.woodpecker.org.cn/moin/ZoomQuiet > > > > scrap在http://floss.zoomquiet.org > > > > douban@ http://www.douban.com/people/zoomq/ > > > > ____________________________________ > > > > Pls. use OpenOffice.org to replace M$ Office. > > > > http://zh.openoffice.org > > > > Pls. use 7-zip to replace WinRAR/WinZip. > > > > http://7-zip.org/zh-cn/ > > > > You can get the truely Freedom 4 software. > > > > ''' > > > > _______________________________________________ > > > > python-chinese > > > > Post: send python-chinese在lists.python.cn > > > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > > > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > > > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > > > > > > > > > > > -- > > > Nicholas @ Nirvana Studio > > > http://www.nirvanastudio.org > > > _______________________________________________ > > > python-chinese > > > Post: send python-chinese在lists.python.cn > > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > > Unsubscribe: send unsubscribe to > > > python-chinese-request在lists.python.cn > > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > > > > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to > > python-chinese-request在lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > > -- > Nicholas @ Nirvana Studio > http://www.nirvanastudio.org > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070709/609d7559/attachment-0001.html
2007年07月09日 星期一 14:47
On 7/9/07, Zoom. Quiet <zoom.quiet在gmail.com> wrote: > On 7/9/07, 天天向上 <tiananlw在gmail.com> wrote: > > > 早有讨论的,欢迎深入优化: > http://wiki.woodpecker.org.cn/moin/PyPorgramGames > 看到上面有句话: 这道题出自1981年柏林的德国逻辑思考学院。据说世界上只有2%的人能出答案,就连大名鼎鼎的爱因斯坦也曾为此题大伤脑筋。(我个人认为爱因斯坦是不会为这种问题投入太多精力的......) 爱因斯坦55年就隔P了。怎么可能为此题大伤脑筋?哗众取宠的话删了吧。 -- Best Regards, Leo Jay
2007年07月09日 星期一 14:48
On 7/9/07, Nicholas Ding <nicholasdsj在gmail.com> wrote: > 周老大,是Program不是Porgram...... > 晕的!文盲了一把,这么长时间居然没有人注意到?! 修订了! http://wiki.woodpecker.org.cn/moin/PyProgramGames > > On 7/9/07, Zoom. Quiet <zoom.quiet在gmail.com> wrote: > > On 7/9/07, 天天向上 <tiananlw在gmail.com> wrote: > > > > > 早有讨论的,欢迎深入优化: > > http://wiki.woodpecker.org.cn/moin/PyPorgramGames > > > > > > > > > 在一条街上,有5座房子,喷了5种颜色。每个房里住着不同国籍的人。每个人喝不同的饮料,抽不同品牌的香烟,养不同的宠物。 > > > > > > 问题是:谁养鱼? > > > > > > 提示:1、英国人住红色房子 > > > > > > 2、瑞典人养狗 > > > > > > 3、丹麦人喝茶 > > > > > > 4、绿色房子在白色房子左面 > > > > > > 5、绿色房子主人喝咖啡 > > > > > > 6、抽PallMall香烟的人养鸟 > > > > > > 7、黄色房子主人抽Dunhill香烟 > > > > > > 8、住在中间房子的人喝牛奶 > > > > > > 9、挪威人住第一间房 > > > > > > 10、抽Blends香烟的人住在养猫的人隔壁 > > > > > > 11、养马的人住抽Dunhill香烟的人隔壁 > > > > > > 12、抽BlueMaster的人喝啤酒 > > > > > > 13、德国人抽Prince香烟 > > > > > > 14、挪威人住蓝色房子隔壁 > > > > > > 15、抽Blends香烟的人有一个喝水的邻居 > > > > > > > > > > > > > > > 谁有好的算法,我的算法P4 3.0G 1GRAM 250s左右,不满意 > > > > > > _______________________________________________ > > > python-chinese > > > Post: send python-chinese在lists.python.cn > > > Subscribe: send subscribe to > > > python-chinese-request在lists.python.cn > > > Unsubscribe: send unsubscribe to > > > python-chinese-request在lists.python.cn > > > Detail Info: > > > http://python.cn/mailman/listinfo/python-chinese > > > > > > > > > -- > > '''Time is unimportant, only life important! > > http://zoomquiet.org > > blog在http://blog.zoomquiet.org/pyblosxom/ > > wiki在http://wiki.woodpecker.org.cn/moin/ZoomQuiet > > scrap在http://floss.zoomquiet.org > > douban在http://www.douban.com/people/zoomq/ > > ____________________________________ > > Pls. use OpenOffice.org to replace M$ Office. > > http://zh.openoffice.org > > Pls. use 7-zip to replace WinRAR/WinZip. > > http://7-zip.org/zh-cn/ > > You can get the truely Freedom 4 software. > > ''' > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to > python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to > python-chinese-request在lists.python.cn > > Detail Info: > http://python.cn/mailman/listinfo/python-chinese > > > > -- > Nicholas @ Nirvana Studio > http://www.nirvanastudio.org > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to > python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to > python-chinese-request在lists.python.cn > Detail Info: > http://python.cn/mailman/listinfo/python-chinese > -- '''Time is unimportant, only life important! http://zoomquiet.org blog在http://blog.zoomquiet.org/pyblosxom/ wiki在http://wiki.woodpecker.org.cn/moin/ZoomQuiet scrap在http://floss.zoomquiet.org douban在http://www.douban.com/people/zoomq/ ____________________________________ Pls. use OpenOffice.org to replace M$ Office. http://zh.openoffice.org Pls. use 7-zip to replace WinRAR/WinZip. http://7-zip.org/zh-cn/ You can get the truely Freedom 4 software. '''
2007年07月09日 星期一 14:50
Â¥Éϵı¬Ç¿¡£µ½µ×°®Òò˹̹ÊÇÄÄÄê×ߵġ£¡£¡£¡£¡£ ÔÚ07-7-9£¬Leo Jay <python.leojay在gmail.com> дµÀ£º > > On 7/9/07, Zoom. Quiet <zoom.quiet在gmail.com> wrote: > > On 7/9/07, ÌìÌìÏòÉÏ <tiananlw在gmail.com> wrote: > > > > > ÔçÓÐÌÖÂÛµÄ,»¶ÓÉîÈëÓÅ»¯: > > http://wiki.woodpecker.org.cn/moin/PyPorgramGames > > > > ¿´µ½ÉÏÃæÓо仰£º > > > ÕâµÀÌâ³ö×Ô1981Äê°ØÁֵĵ¹úÂ߼˼¿¼Ñ§Ôº¡£¾Ý˵ÊÀ½çÉÏÖ»ÓÐ2%µÄÈËÄܳö´ð°¸£¬¾ÍÁ¬´óÃû¶¦¶¦µÄ°®Òò˹̹ҲÔøΪ´ËÌâ´óÉËÄԽ(ÎÒ¸öÈËÈÏΪ°®Òò˹̹ÊDz»»áΪÕâÖÖÎÊÌâͶÈëÌ«¶à¾«Á¦µÄ......) > > °®Òò˹̹55Äê¾Í¸ôPÁË¡£Ôõô¿ÉÄÜΪ´ËÌâ´óÉËÄԽ»©ÖÚÈ¡³èµÄ»°É¾ÁË°É¡£ > > -- > Best Regards, > Leo Jay > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070709/d165a6ed/attachment.htm
2007年07月09日 星期一 14:54
这个问题少了个前提"5人中有1人养了鱼",所以严格来讲无解,呵呵 在07-7-9,天天向上 <tiananlw在gmail.com> 写道: > > 在一条街上,有5座房子,喷了5种颜色。每个房里住着不同国籍的人。每个人喝不同的饮料,抽不同品牌的香烟,养不同的宠物。 > > 问题是:谁养鱼? > > 提示:1、英国人住红色房子 > > 2、瑞典人养狗 > > 3、丹麦人喝茶 > > 4、绿色房子在白色房子左面 > > 5、绿色房子主人喝咖啡 > > 6、抽PallMall香烟的人养鸟 > > 7、黄色房子主人抽Dunhill香烟 > > 8、住在中间房子的人喝牛奶 > > 9、挪威人住第一间房 > > 10、抽Blends香烟的人住在养猫的人隔壁 > > 11、养马的人住抽Dunhill香烟的人隔壁 > > 12、抽BlueMaster的人喝啤酒 > > 13、德国人抽Prince香烟 > > 14、挪威人住蓝色房子隔壁 > > 15、抽Blends香烟的人有一个喝水的邻居 > > > 谁有好的算法,我的算法P4 3.0G 1GRAM 250s左右,不满意 > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -- 茫茫人海,你是我的最爱 -------------- 下一部分 -------------- 一个HTML附件被移除... URL: http://python.cn/pipermail/python-chinese/attachments/20070709/19ceede9/attachment.html
2007年07月09日 星期一 15:18
Ò»ÏÂÊÇPrologµÄ½â·¨¡£ °ÑÒÔÏÂÎÄ×Ö±£´æµ½ fish.pl£¬·Åµ½ÄãµÄ~/Ŀ¼Ï¡£ next_to(X, Y, List) :- iright(X, Y, List). next_to(X, Y, List) :- iright(Y, X, List). iright(L, R, [L | [R | _]]). iright(L, R, [_ | Rest]) :- iright(L, R, Rest). einstein(Houses, Fish_Owner) :- =(Houses, [[house, norwegian, _, _, _, _], _, [house, _, _, _, milk, _], _, _]), member([house, brit, _, _, _, red], Houses), member([house, swede, dog, _, _, _], Houses), member([house, dane, _, _, tea, _], Houses), iright([house, _, _, _, _, green], [house, _, _, _, _, white], Houses), member([house, _, _, _, coffee, green], Houses), member([house, _, bird, pallmall, _, _], Houses), member([house, _, _, dunhill, _, yellow], Houses), next_to([house, _, _, dunhill, _, _], [house, _, horse, _, _, _], Houses), member([house, _, _, _, milk, _], Houses), next_to([house, _, _, marlboro, _, _], [house, _, cat, _, _, _], Houses), next_to([house, _, _, marlboro, _, _], [house, _, _, _, water, _], Houses), member([house, _, _, winfield, beer, _], Houses), member([house, german, _, rothmans, _, _], Houses), next_to([house, norwegian, _, _, _, _], [house, _, _, _, _, blue], Houses), member([house, Fish_Owner, fish, _, _, _], Houses). ×°ÉÏSWI-Prolog ½øÈ¥Ö®ºóʹÓà ?- [fish]. ?- einstein(Houses, Fish_Owner). ¾Í¿´µ½´ð°¸ÁË¡£ On 7/9/07, ´óÐÜ <bearsprite在gmail.com> wrote: > > Õâ¸öÎÊÌâÉÙÁ˸öÇ°Ìá"5ÈËÖÐÓÐ1ÈËÑøÁËÓã"£¬ËùÒÔÑϸñÀ´½²Î޽⣬ºÇºÇ > > ÔÚ07-7-9£¬ÌìÌìÏòÉÏ <tiananlw在gmail.com> дµÀ£º > > > > ÔÚÒ»Ìõ½ÖÉÏ£¬ÓÐ5×ù·¿×Ó£¬ÅçÁË5ÖÖÑÕÉ«¡£Ã¿¸ö·¿Àïס×Ų»Í¬¹ú¼®µÄÈË¡£Ã¿¸öÈ˺Ȳ»Í¬µÄÒûÁÏ£¬³é²»Í¬Æ·ÅƵÄÏãÑÌ£¬Ñø²»Í¬µÄ³èÎï¡£ > > > > ÎÊÌâÊÇ£ºËÑøÓ㣿 > > > > Ìáʾ£º1¡¢Ó¢¹úÈËסºìÉ«·¿×Ó > > > > 2¡¢ÈðµäÈËÑø¹· > > > > 3¡¢µ¤ÂóÈ˺Ȳè > > > > 4¡¢ÂÌÉ«·¿×ÓÔÚ°×É«·¿×Ó×óÃæ > > > > 5¡¢ÂÌÉ«·¿×ÓÖ÷È˺ȿ§·È > > > > 6¡¢³éPallMallÏãÑ̵ÄÈËÑøÄñ > > > > 7¡¢»ÆÉ«·¿×ÓÖ÷È˳éDunhillÏãÑÌ > > > > 8¡¢×¡ÔÚÖм䷿×ÓµÄÈ˺ÈÅ£ÄÌ > > > > 9¡¢Å²ÍþÈËסµÚÒ»¼ä·¿ > > > > 10¡¢³éBlendsÏãÑ̵ÄÈËסÔÚÑøèµÄÈ˸ô±Ú > > > > 11¡¢ÑøÂíµÄÈËס³éDunhillÏãÑ̵ÄÈ˸ô±Ú > > > > 12¡¢³éBlueMasterµÄÈ˺ÈÆ¡¾Æ > > > > 13¡¢µÂ¹úÈ˳éPrinceÏãÑÌ > > > > 14¡¢Å²ÍþÈËסÀ¶É«·¿×Ó¸ô±Ú > > > > 15¡¢³éBlendsÏãÑ̵ÄÈËÓÐÒ»¸öºÈË®µÄÁÚ¾Ó > > > > > > ËÓкõÄËã·¨£¬ÎÒµÄËã·¨P4 3.0G 1GRAM 250s×óÓÒ£¬²»ÂúÒâ > > > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to > > python-chinese-request在lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > > -- > ããÈ˺££¬ÄãÊÇÎÒµÄ×î°® > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -- Nicholas @ Nirvana Studio http://www.nirvanastudio.org -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070709/dfb08431/attachment-0001.htm
2007年07月09日 星期一 15:22
Â¥ÉÏÅ£ÈË¡£ ²»¹ýÕâÀïÊÇpythonÁÐ±í£¬²»ÖªµÀÓÐÄÄλ´óÅ£¿ÉÒÔÓÃpythonʵÏÖÒ»¸öambÀ´½â¾öÕâ¸öÎÊÌâÄØ£¿ ÔÚ07-7-9£¬Nicholas Ding <nicholasdsj在gmail.com> дµÀ£º > > Ò»ÏÂÊÇPrologµÄ½â·¨¡£ > > °ÑÒÔÏÂÎÄ×Ö±£´æµ½ fish.pl£¬·Åµ½ÄãµÄ~/Ŀ¼Ï¡£ > > next_to(X, Y, List) :- iright(X, Y, List). > next_to(X, Y, List) :- iright(Y, X, List). > > iright(L, R, [L | [R | _]]). > iright(L, R, [_ | Rest]) :- iright(L, R, Rest). > > einstein(Houses, Fish_Owner) :- > =(Houses, [[house, norwegian, _, _, _, _], _, [house, _, _, _, milk, _], _, _]), > member([house, brit, _, _, _, red], Houses), > member([house, swede, dog, _, _, _], Houses), > member([house, dane, _, _, tea, _], Houses), > iright([house, _, _, _, _, green], [house, _, _, _, _, white], Houses), > member([house, _, _, _, coffee, green], Houses), > member([house, _, bird, pallmall, _, _], Houses), > member([house, _, _, dunhill, _, yellow], Houses), > next_to([house, _, _, dunhill, _, _], [house, _, horse, _, _, _], Houses), > member([house, _, _, _, milk, _], Houses), > next_to([house, _, _, marlboro, _, _], [house, _, cat, _, _, _], Houses), > next_to([house, _, _, marlboro, _, _], [house, _, _, _, water, _], Houses), > member([house, _, _, winfield, beer, _], Houses), > member([house, german, _, rothmans, _, _], Houses), > next_to([house, norwegian, _, _, _, _], [house, _, _, _, _, blue], Houses), > member([house, Fish_Owner, fish, _, _, _], Houses). > > ×°ÉÏSWI-Prolog > ½øÈ¥Ö®ºóʹÓà > ?- [fish]. > ?- einstein(Houses, Fish_Owner). > ¾Í¿´µ½´ð°¸ÁË¡£ > > > > On 7/9/07, ´óÐÜ <bearsprite在gmail.com> wrote: > > > > Õâ¸öÎÊÌâÉÙÁ˸öÇ°Ìá"5ÈËÖÐÓÐ1ÈËÑøÁËÓã"£¬ËùÒÔÑϸñÀ´½²Î޽⣬ºÇºÇ > > > > ÔÚ07-7-9£¬ÌìÌìÏòÉÏ < tiananlw在gmail.com> дµÀ£º > > > > > > ÔÚÒ»Ìõ½ÖÉÏ£¬ÓÐ5×ù·¿×Ó£¬ÅçÁË5ÖÖÑÕÉ«¡£Ã¿¸ö·¿Àïס×Ų»Í¬¹ú¼®µÄÈË¡£Ã¿¸öÈ˺Ȳ»Í¬µÄÒûÁÏ£¬³é²»Í¬Æ·ÅƵÄÏãÑÌ£¬Ñø²»Í¬µÄ³èÎï¡£ > > > > > > ÎÊÌâÊÇ£ºËÑøÓ㣿 > > > > > > Ìáʾ£º1¡¢Ó¢¹úÈËסºìÉ«·¿×Ó > > > > > > 2¡¢ÈðµäÈËÑø¹· > > > > > > 3¡¢µ¤ÂóÈ˺Ȳè > > > > > > 4¡¢ÂÌÉ«·¿×ÓÔÚ°×É«·¿×Ó×óÃæ > > > > > > 5¡¢ÂÌÉ«·¿×ÓÖ÷È˺ȿ§·È > > > > > > 6¡¢³éPallMallÏãÑ̵ÄÈËÑøÄñ > > > > > > 7¡¢»ÆÉ«·¿×ÓÖ÷È˳éDunhillÏãÑÌ > > > > > > 8¡¢×¡ÔÚÖм䷿×ÓµÄÈ˺ÈÅ£ÄÌ > > > > > > 9¡¢Å²ÍþÈËסµÚÒ»¼ä·¿ > > > > > > 10¡¢³éBlendsÏãÑ̵ÄÈËסÔÚÑøèµÄÈ˸ô±Ú > > > > > > 11¡¢ÑøÂíµÄÈËס³éDunhillÏãÑ̵ÄÈ˸ô±Ú > > > > > > 12¡¢³éBlueMasterµÄÈ˺ÈÆ¡¾Æ > > > > > > 13¡¢µÂ¹úÈ˳éPrinceÏãÑÌ > > > > > > 14¡¢Å²ÍþÈËסÀ¶É«·¿×Ó¸ô±Ú > > > > > > 15¡¢³éBlendsÏãÑ̵ÄÈËÓÐÒ»¸öºÈË®µÄÁÚ¾Ó > > > > > > > > > ËÓкõÄËã·¨£¬ÎÒµÄËã·¨P4 3.0G 1GRAM 250s×óÓÒ£¬²»ÂúÒâ > > > > > > _______________________________________________ > > > python-chinese > > > Post: send python-chinese在lists.python.cn > > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > > Unsubscribe: send unsubscribe to > > > python-chinese-request在lists.python.cn > > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > > > > > > > -- > > ããÈ˺££¬ÄãÊÇÎÒµÄ×î°® > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to > > python-chinese-request在lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > > -- > Nicholas @ Nirvana Studio > http://www.nirvanastudio.org > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -------------- 下一部分 -------------- Ò»¸öHTML¸½¼þ±»ÒƳý... URL: http://python.cn/pipermail/python-chinese/attachments/20070709/b8a64591/attachment.html
2007年07月09日 星期一 15:28
爱因斯坦(3/14/1879-4/18/1955)<http://episte.math.ntu.edu.tw/articles/mm/mm_16_4_18/index.html> 在07-7-9,徐鹏 <beck917在gmail.com> 写道: > > 楼上的爆强。到底爱因斯坦是哪年走的。。。。。 > > 在07-7-9,Leo Jay <python.leojay在gmail.com> 写道: > > > > On 7/9/07, Zoom. Quiet <zoom.quiet在gmail.com> wrote: > > > On 7/9/07, 天天向上 <tiananlw在gmail.com> wrote: > > > > > > > 早有讨论的,欢迎深入优化: > > > http://wiki.woodpecker.org.cn/moin/PyPorgramGames > > > > > > > 看到上面有句话: > > > > 这道题出自1981年柏林的德国逻辑思考学院。据说世界上只有2%的人能出答案,就连大名鼎鼎的爱因斯坦也曾为此题大伤脑筋。(我个人认为爱因斯坦是不会为这种问题投入太多精力的......) > > > > > > 爱因斯坦55年就隔P了。怎么可能为此题大伤脑筋?哗众取宠的话删了吧。 > > > > -------------- 下一部分 -------------- 一个HTML附件被移除... URL: http://python.cn/pipermail/python-chinese/attachments/20070709/23e016c5/attachment.htm
2007年07月09日 星期一 16:08
《程序员》六月……我画图推出一种答案,网上一般有两种答案 google一下:爱因斯坦 测试题,会找到一个C++做的推导,说是可能解有6个…… On 7/9/07, 天天向上 <tiananlw在gmail.com> wrote: > > 在一条街上,有5座房子,喷了5种颜色。每个房里住着不同国籍的人。每个人喝不同的饮料,抽不同品牌的香烟,养不同的宠物。 > > 问题是:谁养鱼? > > 提示:1、英国人住红色房子 > > 2、瑞典人养狗 > > 3、丹麦人喝茶 > > 4、绿色房子在白色房子左面 > > 5、绿色房子主人喝咖啡 > > 6、抽PallMall香烟的人养鸟 > > 7、黄色房子主人抽Dunhill香烟 > > 8、住在中间房子的人喝牛奶 > > 9、挪威人住第一间房 > > 10、抽Blends香烟的人住在养猫的人隔壁 > > 11、养马的人住抽Dunhill香烟的人隔壁 > > 12、抽BlueMaster的人喝啤酒 > > 13、德国人抽Prince香烟 > > 14、挪威人住蓝色房子隔壁 > > 15、抽Blends香烟的人有一个喝水的邻居 > > > 谁有好的算法,我的算法P4 3.0G 1GRAM 250s左右,不满意 > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > -- sleepy right brain~~犯困的右脑 -------------- 下一部分 -------------- 一个HTML附件被移除... URL: http://python.cn/pipermail/python-chinese/attachments/20070709/fd34d4ff/attachment-0001.htm
2007年07月09日 星期一 16:11
On 7/9/07, Nicholas Ding <nicholasdsj在gmail.com> wrote: > 一下是Prolog的解法。 > 好哪!! 收集,对比什么是脚本语言和范式语言的差异 http://wiki.woodpecker.org.cn/moin/PyProgramGames/Einstein > 把以下文字保存到 fish.pl,放到你的~/目录下。 > > next_to(X, Y, List) :- iright(X, Y, List). > next_to(X, Y, List) :- iright(Y, X, List). > > iright(L, R, [L | [R | _]]). > iright(L, R, [_ | Rest]) :- iright(L, R, Rest). > > > einstein(Houses, Fish_Owner) :- > =(Houses, [[house, norwegian, _, _, _, _], _, [house, _, _, _, milk, _], _, > _]), > member([house, brit, _, _, _, red], Houses), > member([house, swede, dog, _, _, _], Houses), > > member([house, dane, _, _, tea, _], Houses), > iright([house, _, _, _, _, green], [house, _, _, _, _, white], Houses), > member([house, _, _, _, coffee, green], Houses), > member([house, _, bird, pallmall, _, _], Houses), > > member([house, _, _, dunhill, _, yellow], Houses), > next_to([house, _, _, dunhill, _, _], [house, _, horse, _, _, _], Houses), > member([house, _, _, _, milk, _], Houses), > next_to([house, _, _, marlboro, _, _], [house, _, cat, _, _, _], Houses), > > next_to([house, _, _, marlboro, _, _], [house, _, _, _, water, _], Houses), > member([house, _, _, winfield, beer, _], Houses), > member([house, german, _, rothmans, _, _], Houses), > next_to([house, norwegian, _, _, _, _], [house, _, _, _, _, blue], Houses), > > member([house, Fish_Owner, fish, _, _, _], Houses). > 装上SWI-Prolog > 进去之后使用 > ?- [fish]. > ?- einstein(Houses, Fish_Owner). > 就看到答案了。 > > > > > On 7/9/07, 大熊 <bearsprite在gmail.com> wrote: > > 这个问题少了个前提"5人中有1人养了鱼",所以严格来讲无解,呵呵 > > > > > > 在07-7-9,天天向上 < tiananlw在gmail.com> 写道: > > > > > > > > > > > > > 在一条街上,有5座房子,喷了5种颜色。每个房里住着不同国籍的人。每个人喝不同的饮料,抽不同品牌的香烟,养不同的宠物。 > > > > > > 问题是:谁养鱼? > > > > > > 提示:1、英国人住红色房子 > > > > > > 2、瑞典人养狗 > > > > > > 3、丹麦人喝茶 > > > > > > 4、绿色房子在白色房子左面 > > > > > > 5、绿色房子主人喝咖啡 > > > > > > 6、抽PallMall香烟的人养鸟 > > > > > > 7、黄色房子主人抽Dunhill香烟 > > > > > > 8、住在中间房子的人喝牛奶 > > > > > > 9、挪威人住第一间房 > > > > > > 10、抽Blends香烟的人住在养猫的人隔壁 > > > > > > 11、养马的人住抽Dunhill香烟的人隔壁 > > > > > > 12、抽BlueMaster的人喝啤酒 > > > > > > 13、德国人抽Prince香烟 > > > > > > 14、挪威人住蓝色房子隔壁 > > > > > > 15、抽Blends香烟的人有一个喝水的邻居 > > > > > > > > > > > > > > > 谁有好的算法,我的算法P4 3.0G 1GRAM 250s左右,不满意 > > > > > > _______________________________________________ > > > python-chinese > > > Post: send python-chinese在lists.python.cn > > > Subscribe: send subscribe to > python-chinese-request在lists.python.cn > > > Unsubscribe: send unsubscribe to > python-chinese-request在lists.python.cn > > > Detail Info: > http://python.cn/mailman/listinfo/python-chinese > > > > > > > > > > > -- > > 茫茫人海,你是我的最爱 > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to > python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to > python-chinese-request在lists.python.cn > > Detail Info: > http://python.cn/mailman/listinfo/python-chinese > > > > > > -- > Nicholas @ Nirvana Studio > http://www.nirvanastudio.org > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to > python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to > python-chinese-request在lists.python.cn > Detail Info: > http://python.cn/mailman/listinfo/python-chinese > -- '''Time is unimportant, only life important! http://zoomquiet.org blog在http://blog.zoomquiet.org/pyblosxom/ wiki在http://wiki.woodpecker.org.cn/moin/ZoomQuiet scrap在http://floss.zoomquiet.org douban在http://www.douban.com/people/zoomq/ ____________________________________ Pls. use OpenOffice.org to replace M$ Office. http://zh.openoffice.org Pls. use 7-zip to replace WinRAR/WinZip. http://7-zip.org/zh-cn/ You can get the truely Freedom 4 software. '''
2007年07月09日 星期一 16:38
我的方法,也是穷举的本办法: # -*- coding: UTF-8 -*- from datetime import datetime print datetime.now() colors = ['red', 'green', 'white', 'yellow', 'blue'] pets = ['dog', 'bird', 'cat', 'horse', 'fish'] drinks = ['tea', 'coffee', 'milk', 'beer', 'water'] cigarettes = ['PallMall', 'Dunhill', 'Blends', 'BlueMaster', 'Prince'] people = ['ENG', 'SWE', 'DEN', 'GER', 'NOR'] owner_choices = [] color_choices = [] pet_choices = [] drink_choices = [] cigarette_choices = [] def makeChoices(choice, items, choices): if len(choice) == len(items): choices.append(choice[:]) return for item in items: if item not in choice: choice.append(item) makeChoices(choice[:], items, choices) choice.pop(len(choice)-1) print "Step 1: 获得所有排列的可能性……" makeChoices([], people, owner_choices) makeChoices([], colors, color_choices) makeChoices([], pets, pet_choices) makeChoices([], drinks, drink_choices) makeChoices([], cigarettes, cigarette_choices) print "Step 2: 排除明显不符合条件的选项……" # 4、绿色房子在白色房子左面 for choice in color_choices[:]: if choice.index("green") != choice.index("white") - 1: color_choices.remove(choice) # 8、住在中间房子的人喝牛奶 for choice in drink_choices[:]: if choice[2] != "milk": drink_choices.remove(choice) # 9. 挪威人住第一间房 for choice in owner_choices[:]: if choice[0] != "NOR": owner_choices.remove(choice) # 14、挪威人住蓝色房子隔壁 for choice in color_choices[:]: if choice[1] != "blue": color_choices.remove(choice) def verifyOwnersAndColors(owners, colors): # 1、英国人住红色房子 if colors[owners.index("ENG")] != "red": return False return True def verifyOwnersColorsAndPets(owners, colors, pets): # 2、瑞典人养狗 if pets[owners.index("SWE")] != "dog": return False return True def verifyOwnersColorsPetsAndDrinks(owners, colors, pets, drinks): # 3、丹麦人喝茶 if drinks[owners.index("DEN")] != "tea": return False # 5、绿色房子主人喝咖啡 if drinks[colors.index("green")] != "coffee": return False return True def verifyAll(owners, colors, pets, drinks, cigarettes): # 6、抽PallMall香烟的人养鸟 if pets[cigarettes.index("PallMall")] != "bird": return # 7、黄色房子主人抽Dunhill香烟 if cigarettes[colors.index("yellow")] != "Dunhill": return # 10、抽Blends香烟的人住在养猫的人隔壁 if abs(cigarettes.index("Blends") - pets.index("cat")) != 1: return # 11、养马的人住抽Dunhill香烟的人隔壁 if abs(pets.index("horse") - cigarettes.index("Dunhill")) != 1: return # 12、抽BlueMaster的人喝啤酒 if drinks[cigarettes.index("BlueMaster")] != "beer": return # 13、德国人抽Prince香烟 if cigarettes[owners.index("GER")] != "Prince": return # 15、抽Blends香烟的人有一个喝水的邻居 if abs(cigarettes.index("Blends") - drinks.index("water")) != 1: return print owners, colors, pets, drinks, cigarettes print "Step 3: 详细排除不符合条件的选择,并打印结果……" for owners in owner_choices: for colors in color_choices: if verifyOwnersAndColors(owners, colors): for pets in pet_choices: if verifyOwnersColorsAndPets(owners, colors, pets): for drinks in drink_choices: if verifyOwnersColorsPetsAndDrinks(owners, colors, pets, drinks): for cigarettes in cigarette_choices: verifyAll(owners, colors, pets, drinks, cigarettes) print datetime.now() 运行结果: 2007-07-09 16:35:16.306778 Step 1: 获得所有排列的可能性…… Step 2: 排除明显不符合条件的选项…… Step 3: 详细排除不符合条件的选择,并打印结果…… ['NOR', 'DEN', 'ENG', 'GER', 'SWE'] ['yellow', 'blue', 'red', 'green', 'white'] ['cat', 'horse', 'bird', 'fish', 'dog'] ['water', 'tea', 'milk', 'coffee', 'beer'] ['Dunhill', 'Blends', 'PallMall', 'Prince', 'BlueMaster'] 2007-07-09 16:35:16.442562 大约 0.14 秒 在 07-7-9,天天向上<tiananlw在gmail.com> 写道: > > > 在一条街上,有5座房子,喷了5种颜色。每个房里住着不同国籍的人。每个人喝不同的饮料,抽不同品牌的香烟,养不同的宠物。 > > 问题是:谁养鱼? > > 提示:1、英国人住红色房子 > > 2、瑞典人养狗 > > 3、丹麦人喝茶 > > 4、绿色房子在白色房子左面 > > 5、绿色房子主人喝咖啡 > > 6、抽PallMall香烟的人养鸟 > > 7、黄色房子主人抽Dunhill香烟 > > 8、住在中间房子的人喝牛奶 > > 9、挪威人住第一间房 > > 10、抽Blends香烟的人住在养猫的人隔壁 > > 11、养马的人住抽Dunhill香烟的人隔壁 > > 12、抽BlueMaster的人喝啤酒 > > 13、德国人抽Prince香烟 > > 14、挪威人住蓝色房子隔壁 > > 15、抽Blends香烟的人有一个喝水的邻居 > > > > > 谁有好的算法,我的算法P4 3.0G 1GRAM 250s左右,不满意 > > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to > python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to > python-chinese-request在lists.python.cn > Detail Info: > http://python.cn/mailman/listinfo/python-chinese >
2007年07月09日 星期一 16:47
题目中"# 4、绿色房子在白色房子左面"是有歧义的,不同的理解会造成求解的结果不同。
2007年07月09日 星期一 17:41
Can Xue wrote: > 题目中"# 4、绿色房子在白色房子左面"是有歧义的,不同的理解会造成求解的结果不同。 > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese 还是 Prolog 比较牛X。我本来想给出一个 Scheme 解的,想到 amb 还要自己抄一 遍,没心情了。
2007年07月09日 星期一 19:28
用了10来分钟手工推了一下,整个是单线程,不需要假设,所以很好推,细致一点就可以了。 (9)1号是挪威人,从颜色入手,(1)英国人是红色,(4)白色-绿色=1,(14)蓝色是2号,所以白色不能为2,所以绿色不能为1,得出挪威人是黄色。从而(7)抽Dunhill。所以由(11)2号蓝色的是马 接着看饮料,(3)丹麦人喝茶,(8)3号喝牛奶,(12)BlueMaster喝啤酒,(5)绿色喝咖啡,所以1号挪威人喝水。所以(15)2号抽Blend。所以(10)养猫的是1号或者3号。 因为挪威人的宠物不能确定,所以先看2号,已有2号蓝色,马,Blend,不喝3号的牛奶和1号的水,因为不抽BlueMaster,所以不喝啤酒,只能喝茶了,这样(3)2号就是喝茶的丹麦人。2号全了 接着看3号,只剩红色或者绿色可选,(5)绿色喝咖啡而3号喝牛奶,所以只能是(1)红色的英国人。因为BlueMaster喝啤酒,所以3号只能抽PallMall,从而(6)养鸟。3号全了。所以养猫的只能是1号。1号全了。 (2)瑞典人养狗,只剩德国人的宠物空着,所以他养鱼。剩下可以依次填完空白。 On 7/9/07, Ray Stinger <lichray在gmail.com> wrote: > Can Xue wrote: > > 题目中"# 4、绿色房子在白色房子左面"是有歧义的,不同的理解会造成求解的结果不同。 > > _______________________________________________ > > python-chinese > > Post: send python-chinese在lists.python.cn > > Subscribe: send subscribe to python-chinese-request在lists.python.cn > > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > 还是 Prolog 比较牛X。我本来想给出一个 Scheme 解的,想到 amb 还要自己抄一 > 遍,没心情了。 > _______________________________________________ > python-chinese > Post: send python-chinese在lists.python.cn > Subscribe: send subscribe to python-chinese-request在lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese
Zeuux © 2025
京ICP备05028076号