農夫過河問題 簡單的搜索

// 用一個二進制串表示狀態0,表示東西或者人在河的這邊 // 1表示東西或者人在河的另外一邊 // 好比0000表示都在起始的位置,1111表示都到了對岸 // 經過狀態的轉移,來找到路徑 #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; cons
相關文章
相關標籤/搜索