summaryrefslogtreecommitdiff
path: root/content/other
diff options
context:
space:
mode:
authormzuenni <michi.zuendorf@gmail.com>2026-10-17 17:48:22 +0200
committermzuenni <michi.zuendorf@gmail.com>2026-10-17 17:48:22 +0200
commitd39aa7ca41379e81b0b873d26186f4ab128ffe04 (patch)
tree51e8655c0904667c57855d2162ad9ea012d23ecb /content/other
parentcf4b381136961c321eb0e2140a954a74341d5f2c (diff)
++i -> ++i
Diffstat (limited to 'content/other')
-rw-r--r--content/other/divideAndConquer.cpp2
-rw-r--r--content/other/knuth.cpp2
2 files changed, 2 insertions, 2 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;
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;