Skip to content

Commit

Permalink
修正一点错误
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhixyz committed Feb 24, 2021
1 parent 92c8f1d commit 78239fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/post/HDU1421-搬寝室.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ draft: false

原题链接:[HDU1421](http://acm.hdu.edu.cn/showproblem.php?pid=1421)

**题目大意**:共有 $n$ 件物品,需要将其中的 $2*k$ 件物品搬走,每搬一次的疲劳度为左右手的物品的重量差的平方,求搬完 $2*k$ 件物品的最小疲劳度。
**题目大意**:共有 $n$ 件物品,需要将其中的 $2k$ 件物品搬走,每搬一次的疲劳度为左右手的物品的重量差的平方,求搬完 $2$ 件物品的最小疲劳度。

<!--more-->

Expand All @@ -31,7 +31,7 @@ draft: false
2. 选择 $i$ 与 $i-1$ 这一组,则由 $f[i-2][j-1]$ 转移而来,加上与 $i-1$ 这一组即可。

$$
f[i][j] = min(f[i - 1][j], f[i - 2][j - 1] + get(w[i], w[i - 1]));
f[i][j] = \min(f[i - 1][j], f[i - 2][j - 1] + \mathrm{get}(w[i], w[i - 1]));
$$

```cpp
Expand Down

0 comments on commit 78239fb

Please sign in to comment.