diff --git a/007.md b/007.md index 73d9437..a248f70 100644 --- a/007.md +++ b/007.md @@ -42,7 +42,7 @@ int main() const int c1 = std::max(0, pos - 1); // 候補のクラスのインデックス 2 - const int c2 = std::min(pos, static_cast(A.size() - 1)); + const int c2 = std::min(pos, N - 1); // 候補のクラス 1 のコスト const int c1Cost = std::abs(A[c1] - b); diff --git a/050.md b/050.md index 8e0da12..78790f9 100644 --- a/050.md +++ b/050.md @@ -12,7 +12,7 @@ int main() int N, L; std::cin >> N >> L; - // 0 段目から N 段目までの通り数を記録 + // 0 段目から N 段目までの通り数を記録していく配列 std::vector dp(N + 1); // 0 段目では 1 通り