There is a man who has a wolf, a goat, and a cabbage.
He rented a small boat to cross a river when a river appeared on his way.
This small boat can only carry one person and a wolf, a goat, or a cabbage.
If he leaves with the wolf and the goat together, the wolf will eat the goat.
If he leaves with the goat and the cabbage, the goat will eat the cabbage.
What should I do to get the whole thing to across the river without the wolf eating the goat and the goat eating the cabbage?
1. First, take the goat across the river. And come back alone with leave the goat on the other side.
Take the wolf across the river and come back with the goat.
Leave the goat and take the cabbage across the river and come back alone with the wolf and the cabbage.
Finally, take the goat across the river.
2. Take the goat across the river. And come back alone leaving the goat on the other side.
Take the cabbage across the river and come back with the goat.
Leave the goat and take the wolf across the river and come back alone with the wolf and the cabbage on the other side.
Finally, take the goat across the river.
'다른것' 카테고리의 다른 글
와일드카드 검색 (2) | 2024.11.28 |
---|---|
[Quiz] 3 switches and 3 bulbs (0) | 2024.03.22 |
[ETC] GMT UTC 차이 (0) | 2024.03.06 |