From f3e0917a38ff86cf44102c9af3a42e50aeb14a91 Mon Sep 17 00:00:00 2001 From: David Vereb Date: Tue, 3 Dec 2024 09:45:29 -0500 Subject: [PATCH] Oops. .end() is one past the end, so get rid of the -1. --- 2024/2/main_pt2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2024/2/main_pt2.cpp b/2024/2/main_pt2.cpp index 879c660..f5c4ff6 100644 --- a/2024/2/main_pt2.cpp +++ b/2024/2/main_pt2.cpp @@ -77,7 +77,7 @@ int main() { std::vector check; if(i != 0) - check = { group.begin(), group.begin() + i - 1 }; + check = { group.begin(), group.begin() + i }; if(i < group.size() - 1) check.insert(check.end(), group.begin() + i + 1, group.end()); if(GroupSafe(check))