We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d90e72 commit c6a1db3Copy full SHA for c6a1db3
README.md
@@ -48,6 +48,7 @@
48
* [深圳原来有这么多互联网公司,你都知道么?](https://mp.weixin.qq.com/s/Yzrkim-5bY0Df66Ao-hoqA)
49
* [北京有这些互联网公司,你都知道么?](https://mp.weixin.qq.com/s/FQTzoZtqXQ2rlS1UthGrag)
50
* [上海有这些互联网公司,你都知道么?](https://mp.weixin.qq.com/s/msqbX6eR2-JBQOYFfec4sg)
51
+ * [成都有这些互联网公司,你都知道么?](https://mp.weixin.qq.com/s/Y9Qg22WEsBngs8B-K8acqQ)
52
53
* 数组
54
* [必须掌握的数组理论知识](https://mp.weixin.qq.com/s/X7R55wSENyY62le0Fiawsg)
problems/1005.K次取反后最大化的数组和.md
@@ -70,7 +70,7 @@ public:
70
K--;
71
}
72
73
- while (K--) A[A.size() - 1] *= -1; // 第三步
+ if (K % 2 == 1) A[A.size() - 1] *= -1; // 第三步
74
int result = 0;
75
for (int a : A) result += a; // 第四步
76
return result;
0 commit comments