aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--works/solutions/acwing/1247.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/works/solutions/acwing/1247.cpp b/works/solutions/acwing/1247.cpp
index 132c63c..1fd4412 100644
--- a/works/solutions/acwing/1247.cpp
+++ b/works/solutions/acwing/1247.cpp
@@ -29,7 +29,7 @@ int main() {
result += 2 * max;
}
- if (M == 1 && min > 0) {
+ if (M != 0 && min > 0) {
result -= 2 * min;
}