Skip to content

Commit

Permalink
Merge pull request youngyangyang04#2343 from han854/master
Browse files Browse the repository at this point in the history
修正0070.爬楼梯完全背包版本代码注释错误
  • Loading branch information
youngyangyang04 authored Nov 24, 2023
2 parents 6f262cc + 14906d7 commit 12582fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions problems/0070.爬楼梯完全背包版本.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ int main() {
while (cin >> n >> m) {
vector<int> dp(n + 1, 0);
dp[0] = 1;
for (int i = 1; i <= n; i++) { // 遍历物品
for (int j = 1; j <= m; j++) { // 遍历背包
for (int i = 1; i <= n; i++) { // 遍历背包
for (int j = 1; j <= m; j++) { // 遍历物品
if (i - j >= 0) dp[i] += dp[i - j];
}
}
Expand Down

0 comments on commit 12582fd

Please sign in to comment.