This commit is contained in:
youngyangyang04
2020-12-06 23:13:01 +08:00
parent 3d90e7246f
commit c6a1db30d0
2 changed files with 2 additions and 1 deletions

View File

@ -48,6 +48,7 @@
* [深圳原来有这么多互联网公司,你都知道么?](https://mp.weixin.qq.com/s/Yzrkim-5bY0Df66Ao-hoqA)
* [北京有这些互联网公司,你都知道么?](https://mp.weixin.qq.com/s/FQTzoZtqXQ2rlS1UthGrag)
* [上海有这些互联网公司,你都知道么?](https://mp.weixin.qq.com/s/msqbX6eR2-JBQOYFfec4sg)
* [成都有这些互联网公司,你都知道么?](https://mp.weixin.qq.com/s/Y9Qg22WEsBngs8B-K8acqQ)
* 数组
* [必须掌握的数组理论知识](https://mp.weixin.qq.com/s/X7R55wSENyY62le0Fiawsg)

View File

@ -70,7 +70,7 @@ public:
K--;
}
}
while (K--) A[A.size() - 1] *= -1; // 第三步
if (K % 2 == 1) A[A.size() - 1] *= -1; // 第三步
int result = 0;
for (int a : A) result += a; // 第四步
return result;