summaryrefslogtreecommitdiff
path: root/content/other
diff options
context:
space:
mode:
authormzuenni <michi.zuendorf@gmail.com>2024-08-06 16:54:13 +0200
committermzuenni <michi.zuendorf@gmail.com>2024-08-06 16:54:13 +0200
commit19436370fb48bc0a5e356d1ba713dc39b1a35d3a (patch)
tree42124647e993b50bc2b8af36090a0b0245a63992 /content/other
parentd88debc398f18d4e3d1c53d221dffe3981f35e41 (diff)
upper case INF
Diffstat (limited to 'content/other')
-rw-r--r--content/other/divideAndConquer.cpp4
-rw-r--r--content/other/knuth.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/content/other/divideAndConquer.cpp b/content/other/divideAndConquer.cpp
index 830dc7f..9bd5f0c 100644
--- a/content/other/divideAndConquer.cpp
+++ b/content/other/divideAndConquer.cpp
@@ -5,7 +5,7 @@ void rec(int i, int j0, int j1, int m0, int m1) {
if (j1 < j0) return;
int jmid = (j0 + j1) / 2;
- dp[i][jmid] = inf;
+ dp[i][jmid] = INF;
int bestk = m0;
for (int k = m0; k < min(jmid, m1 + 1); ++k) {
if (dp[i - 1][k] + C[k + 1][jmid] < dp[i][jmid]) {
@@ -18,7 +18,7 @@ void rec(int i, int j0, int j1, int m0, int m1) {
}
ll calc(int n, int m) {
- dp = vector<vector<ll>>(m, vector<ll>(n, inf));
+ dp = vector<vector<ll>>(m, vector<ll>(n, INF));
for (int i = 0; i < n; i++) dp[0][i] = C[0][i];
for (int i = 1; i < m; i++) {
rec(i, 0, n - 1, 0, n - 1);
diff --git a/content/other/knuth.cpp b/content/other/knuth.cpp
index 1d513c8..aa54924 100644
--- a/content/other/knuth.cpp
+++ b/content/other/knuth.cpp
@@ -1,5 +1,5 @@
ll calc(int n, int m, const vector<vector<ll>>& C) {
- vector<vector<ll>> dp(m, vector<ll>(n, inf));
+ vector<vector<ll>> dp(m, vector<ll>(n, INF));
vector<vector<int>> opt(m, vector<int>(n + 1, n - 1));
for (int i = 0; i < n; i++) dp[0][i] = C[0][i];