可可簡歷網

位置:首頁 > 面試 > 面試筆試

過河問題

過河問題
一家六口去遊玩,爸爸、媽媽、兩個兒子、兩個女兒,在路上遇到一個越獄的犯人,在危機萬分的時候來了一個警察,銬住了犯人。他們一塊往回走,遇到一條小河,河上有一個小竹筏。
1、一次只能過兩個人
2、只有爸爸媽媽和警察能操縱竹筏
3、如果警察和犯人分開了,犯人就會傷害這家人(犯人單獨在河的一邊不會跑)
4、兒子和爸爸分開了,就會被旁邊的媽媽罵;女兒和媽媽分開了,也會被爸爸罵。(瞧這一家人!)
如何讓他們六個人都過河?
1、police and prisoner ,police回來
2、police and a son, police and prisoner回來
3、father and the other son,father回來
4、mother and father ,mother回來
5、mother and a daughter ,mother and father回來
6、mother and the other daughter ,mother回來
7、mother and father come
end
: --
如需要8個人全部過河,增加以下步驟:
8、mother/father回來
9、police and mother/father 過河,police回來
10、police and prisoner過河
over
標籤:過河