aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-03-24 16:32:51 +0800
committercrupest <crupest@outlook.com>2021-03-24 16:32:51 +0800
commit686341a129eed94f96dc6da6c267591516f0af1f (patch)
treee271ea2507e0a68a01d68c1547e7c13a87fec66a
parentf6cdc4ffb43519ca57486be396d4694bba2f7e4c (diff)
downloadcrupest-686341a129eed94f96dc6da6c267591516f0af1f.tar.gz
crupest-686341a129eed94f96dc6da6c267591516f0af1f.tar.bz2
crupest-686341a129eed94f96dc6da6c267591516f0af1f.zip
import(solutions): Fix acwing 1247.
-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;
}