diff options
| author | MZuenni <michi.zuendorf@gmail.com> | 2023-02-17 18:24:12 +0100 |
|---|---|---|
| committer | MZuenni <michi.zuendorf@gmail.com> | 2023-02-17 18:24:12 +0100 |
| commit | a65b751c69f77f01745f02cdb3ae2548fa86f3ed (patch) | |
| tree | eeea856fa771bb6aa22527e202082538bceaf543 /other/knuth.cpp | |
| parent | a413a20deed7bf2535b244c5e8d6acb13cdf36fc (diff) | |
improved linebreaks
Diffstat (limited to 'other/knuth.cpp')
| -rw-r--r-- | other/knuth.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/other/knuth.cpp b/other/knuth.cpp index f47dbe0..f619f82 100644 --- a/other/knuth.cpp +++ b/other/knuth.cpp @@ -6,7 +6,7 @@ ll calc(int n, int k, const vector<vector<ll>> &C) { for (int i = 1; i < k; i++) { for (int j = n - 1; j >= 0; --j) { opt[i][j] = i == 1 ? 0 : opt[i - 1][j]; - for (int k = opt[i][j]; k <= min(opt[i][j + 1], j - 1); ++k) { + for (int k = opt[i][j]; k <= min(opt[i][j+1], j-1); k++) { if (dp[i][j] <= dp[i - 1][k] + C[k + 1][j]) continue; dp[i][j] = dp[i - 1][k] + C[k + 1][j]; opt[i][j] = k; |
