summaryrefslogtreecommitdiff
path: root/content/other/knuth.cpp
diff options
context:
space:
mode:
authorGloria Mundi <gloria@gloria-mundi.eu>2026-11-25 20:52:01 +0100
committerGloria Mundi <gloria@gloria-mundi.eu>2026-11-25 20:52:01 +0100
commit6a8ced3e189cae272389718dfba7264dc752f663 (patch)
tree099c6de4cce2fcef8bc038a1e278121ccc591099 /content/other/knuth.cpp
parent5b85f8063460cfeec6b7a798b5dfeb06755354fd (diff)
parentd39aa7ca41379e81b0b873d26186f4ab128ffe04 (diff)
merge mzuenni changes
Diffstat (limited to 'content/other/knuth.cpp')
-rw-r--r--content/other/knuth.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/content/other/knuth.cpp b/content/other/knuth.cpp
index aa54924..0f34824 100644
--- a/content/other/knuth.cpp
+++ b/content/other/knuth.cpp
@@ -4,7 +4,7 @@ ll calc(int n, int m, const vector<vector<ll>>& C) {
for (int i = 0; i < n; i++) dp[0][i] = C[0][i];
for (int i = 1; i < m; i++) {
- for (int j = n - 1; j >= 0; --j) {
+ 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++) {
if (dp[i][j] <= dp[i - 1][k] + C[k + 1][j]) continue;