From f3610ba736a27f0c3373bf65b424d3cbba85d2df Mon Sep 17 00:00:00 2001 From: Andrew Shitov Date: Wed, 30 Sep 2020 14:43:40 +0200 Subject: Tiny optimization --- challenge-080/ash/cpp/ch-1.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'challenge-080/ash/cpp/ch-1.cpp') diff --git a/challenge-080/ash/cpp/ch-1.cpp b/challenge-080/ash/cpp/ch-1.cpp index e006218f32..278833993b 100644 --- a/challenge-080/ash/cpp/ch-1.cpp +++ b/challenge-080/ash/cpp/ch-1.cpp @@ -18,7 +18,7 @@ int missing_n(vector n) { if (x > max) max = x; } - for (auto c = 1; c <= max ; c++) { + for (auto c = 1; c < max; c++) { if (!v[c]) { return c; break; -- cgit