文件名称:famercrossriver
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:9.01kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
农夫过河问题描述的是一个农夫带着一只狼、一只羊和一棵白菜,处于河的南岸,而他要将这些东西带到北岸。但是他面前只有一条小船,而每次他只能带一件东西过河,由于食物链的关系,他不能将狼和羊同时留下,也不能将羊和白菜同时留下,但可以将狼和白菜同时留下。编写一段代码,描述农夫所采用的过河方法。
-Problem descr iption farmer across the river is a farmer with a wolf, a sheep and a cabbage, in the south bank of the river, and he brought these things to north. However, only a small boat in front of him, but he could only bring one thing each river, as the relationship between food chain, he can not leave the wolf and the sheep at the same time, nor can the sheep and cabbage leaves at the same time, but it can be the wolf and Chinese cabbage leaves at the same time. Write a code to describe the farmer across the river used method.
-Problem descr iption farmer across the river is a farmer with a wolf, a sheep and a cabbage, in the south bank of the river, and he brought these things to north. However, only a small boat in front of him, but he could only bring one thing each river, as the relationship between food chain, he can not leave the wolf and the sheep at the same time, nor can the sheep and cabbage leaves at the same time, but it can be the wolf and Chinese cabbage leaves at the same time. Write a code to describe the farmer across the river used method.
相关搜索: 农夫过河问题
(系统自动生成,下载前可以参看下载内容)
下载文件列表
famercrossriver.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.