summaryrefslogtreecommitdiff
path: root/content/other/divideAndConquer.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/divideAndConquer.cpp
parent5b85f8063460cfeec6b7a798b5dfeb06755354fd (diff)
parentd39aa7ca41379e81b0b873d26186f4ab128ffe04 (diff)
merge mzuenni changes
Diffstat (limited to 'content/other/divideAndConquer.cpp')
-rw-r--r--content/other/divideAndConquer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/content/other/divideAndConquer.cpp b/content/other/divideAndConquer.cpp
index 9bd5f0c..18a7b51 100644
--- a/content/other/divideAndConquer.cpp
+++ b/content/other/divideAndConquer.cpp
@@ -7,7 +7,7 @@ void rec(int i, int j0, int j1, int m0, int m1) {
dp[i][jmid] = INF;
int bestk = m0;
- for (int k = m0; k < min(jmid, m1 + 1); ++k) {
+ for (int k = m0; k < min(jmid, m1 + 1); k++) {
if (dp[i - 1][k] + C[k + 1][jmid] < dp[i][jmid]) {
dp[i][jmid] = dp[i - 1][k] + C[k + 1][jmid];
bestk = k;