aboutsummaryrefslogtreecommitdiff
path: root/works
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
commit9be20acdbdb2fa72d60692def868c74ee026311b (patch)
treef6814928dbf1e478018a7eed8b6bd93d68ecabc2 /works
parent600953e56a639808eaa8e10f1e58d9c37a747d95 (diff)
downloadcrupest-9be20acdbdb2fa72d60692def868c74ee026311b.tar.gz
crupest-9be20acdbdb2fa72d60692def868c74ee026311b.tar.bz2
crupest-9be20acdbdb2fa72d60692def868c74ee026311b.zip
import(solutions): Fix acwing 1247.
Diffstat (limited to 'works')
-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;
}