aboutsummaryrefslogtreecommitdiff
path: root/challenge-080/ash/cpp/ch-1.cpp
diff options
context:
space:
mode:
authorAndrew Shitov <andy@shitov.ru>2020-09-30 14:43:40 +0200
committerAndrew Shitov <andy@shitov.ru>2020-09-30 14:43:40 +0200
commitf3610ba736a27f0c3373bf65b424d3cbba85d2df (patch)
tree3ee4b6918c0fa5de3cd206e5afbc48560a7c740d /challenge-080/ash/cpp/ch-1.cpp
parentb4dc318d75475dd533c9a16289ce8c0f698865a8 (diff)
downloadperlweeklychallenge-club-f3610ba736a27f0c3373bf65b424d3cbba85d2df.tar.gz
perlweeklychallenge-club-f3610ba736a27f0c3373bf65b424d3cbba85d2df.tar.bz2
perlweeklychallenge-club-f3610ba736a27f0c3373bf65b424d3cbba85d2df.zip
Tiny optimization
Diffstat (limited to 'challenge-080/ash/cpp/ch-1.cpp')
-rw-r--r--challenge-080/ash/cpp/ch-1.cpp2
1 files changed, 1 insertions, 1 deletions
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<int> 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;