# 开始

> ## Today
>
> ### &#x20;                                                                                      2018 10月中 寒露·重阳

## 每周一句&#x20;

> Si tu veux la paix, prépare la guerre.

## Weekly puzzle ***每周谜题***

&#x20;渡河問題（英语：river crossing problem）是著名的益智遊戲，是在一些限制下的組合問題求最短路徑的解。[網路](https://zh.wikipedia.org/wiki/%E7%B6%B2%E8%B7%AF)上有許多以動態遊戲的方式呈現這些渡河問題，常使用[圖論](https://zh.wikipedia.org/wiki/%E5%9C%96%E8%AB%96)(graph theory)來表示與解決渡河問題。以[圖](https://zh.wikipedia.org/wiki/%E5%9B%BE)(graph)表式解決渡河問題的過程，以節點(node)表示狀態，以邊(edge)表示流程。

### [人](https://zh.wikipedia.org/wiki/%E4%BA%BA)、[狼](https://zh.wikipedia.org/wiki/%E7%8B%BC)、[羊](https://zh.wikipedia.org/wiki/%E7%BE%8A)、[白菜](https://zh.wikipedia.org/wiki/%E7%99%BD%E8%8F%9C)渡[河](https://zh.wikipedia.org/wiki/%E6%B2%B3)問題：

([狐狸、鵝、豆子問題](https://zh.wikipedia.org/wiki/%E7%8B%90%E7%8B%B8%E3%80%81%E9%B9%85%E3%80%81%E8%B1%86%E5%AD%90%E9%97%AE%E9%A2%98)) 人、狼、羊、白菜要從河的此岸藉由一艘船渡河至另一岸，其中只有人會划[船](https://zh.wikipedia.org/wiki/%E8%88%B9)，每次人只能帶一件東西搭船渡河， 且狼和羊、羊和白菜不能在無人監視的情況下放在一起。 在這些條件下，在最小渡河次數下如何才能讓大家都渡河至另一河岸?

ANS:

```
 (1)人帶羊過河
 (2)人回來
 (3)人帶狼(或白菜)過河
 (4)人帶羊回来
 (5)人帶白菜(或狼)過河
 (6)人回來
 (7)人帶羊過河
```

### ***现在请你用C/C++或者Java或javascript、PHP分别描述一下该问题的算法和代码***

## Quote For Readers

> Knowledge is power.&#x20;
>
> \---- **Francis Bacon.**
>
> &#x20; Read not to contradict and confute; nor to believe and take for granted; nor to find talk and discourse; but to weigh and consider.
>
> \---- **Francis Bacon.**

![ Francis Bacon 1561年1月22日—1626年4月9日](https://2489003392-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LNjXtXTS8-SgfoirVqV%2F-LNp6IdYFb9xwexFMVCp%2F-LNp6ZaO9mg8bCcXtwF5%2Fimage.png?alt=media\&token=dca58cce-8fd8-4a7e-9cd5-294806f18147)

<br>

{% file src="<https://2489003392-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LNjXtXTS8-SgfoirVqV%2F-LNjpWt-0MK9qQPpf1Ab%2F-LNjq1tD3CvzwaGp2X1l%2FTIM%E5%9B%BE%E7%89%8720181001213620.jpg?alt=media&token=9df29922-c505-4ca9-a24b-1e94ee9a15f9>" %}
支持我们
{% endfile %}

## Looking for a good job&#x20;

<mark style="color:green;">`POST`</mark>&#x20;

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| lack | string |             |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

|   | [`Medium`](https://www.medium.com)[www.medium.com](https://www.medium.com) |   |
| - | -------------------------------------------------------------------------- | - |
|   |                                                                            |   |

### **This Page was created by Gitbook ©Liyuanlin 2018-2019 All rights reserved.** :wink:&#x20;

#### If any questions or suggestions please contact me via [liyuanlin314@gmail.com](https://liyuanlin314@gmail.com/)<br>

<br>
