文件名称:农夫过河
- 所属分类:
- Internet/网络编程
- 资源属性:
- 上传时间:
- 2018-04-22
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- 12***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
一个农夫带着一只狼、一只羊和一棵白菜,身处河的南岸,他要把这些东西 全部运到北岸。他面前只有一只小船,船只能容下他和一件物品,另外只有农夫 才能撑船。如果农夫在场,则狼不能吃羊,羊不能吃白菜;否则狼会吃羊,羊会 吃白菜。所以农夫不能留下羊和白菜自己离开,也不能留下狼和羊自己离开,但 是狼不吃白菜。要求给出农夫将所有东西运过河的方案。(A farmer with a wolf, a sheep and a cabbage is on the South Bank of the river. He wants to carry all these things to the north bank. There was only a small boat in front of him. The boat could only hold him and an object. Only the farmer could support the boat. If the farmer is present, the wolf can't eat the sheep, and the sheep can't eat cabbage. Otherwise, the wolf will eat the sheep and the sheep will eat the cabbage. So the farmer can not leave the sheep and cabbage himself to leave, nor can he leave the wolf and the sheep themselves to leave, but the wolf does not eat cabbage. It is required to give the farmer a plan to transport everything across the river.)
相关搜索: C数据结构农夫过河
(系统自动生成,下载前可以参看下载内容)
下载文件列表
文件名 | 大小 | 更新时间 |
---|---|---|
农夫过河.cpp | 4531 | 2017-04-12 |