回 帖 发 新 帖 刷新版面

主题:[讨论]狼羊白菜

狼羊白菜过河问题啊!!!!!求救了啦22!!!!!·
要求如下:最终输出结果格式:
east:farmer goat wolf cabbage west:none

The 1 time
-------->farmer and goat
east:wolf cabbage  west:farmer goat
<----------farmer
east:farmer wolf cabbage   west:goat
The 2 time
--------->farmer and wolf
east:cabbage west:farmer goat wolf
<--------farmer and goat
east:farmer goat cabbage  west:wolf
east:none   west:farmer goat wolf cabbage 

回复列表 (共2个回复)

沙发

什么什么啊
看不懂的

板凳

用回溯做,[参考]迷宫

我来回复

您尚未登录,请登录后再回复。点此登录或注册