mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-08 00:43:04 +08:00
Update
This commit is contained in:
@ -48,6 +48,7 @@
|
|||||||
* [深圳原来有这么多互联网公司,你都知道么?](https://mp.weixin.qq.com/s/Yzrkim-5bY0Df66Ao-hoqA)
|
* [深圳原来有这么多互联网公司,你都知道么?](https://mp.weixin.qq.com/s/Yzrkim-5bY0Df66Ao-hoqA)
|
||||||
* [北京有这些互联网公司,你都知道么?](https://mp.weixin.qq.com/s/FQTzoZtqXQ2rlS1UthGrag)
|
* [北京有这些互联网公司,你都知道么?](https://mp.weixin.qq.com/s/FQTzoZtqXQ2rlS1UthGrag)
|
||||||
* [上海有这些互联网公司,你都知道么?](https://mp.weixin.qq.com/s/msqbX6eR2-JBQOYFfec4sg)
|
* [上海有这些互联网公司,你都知道么?](https://mp.weixin.qq.com/s/msqbX6eR2-JBQOYFfec4sg)
|
||||||
|
* [成都有这些互联网公司,你都知道么?](https://mp.weixin.qq.com/s/Y9Qg22WEsBngs8B-K8acqQ)
|
||||||
|
|
||||||
* 数组
|
* 数组
|
||||||
* [必须掌握的数组理论知识](https://mp.weixin.qq.com/s/X7R55wSENyY62le0Fiawsg)
|
* [必须掌握的数组理论知识](https://mp.weixin.qq.com/s/X7R55wSENyY62le0Fiawsg)
|
||||||
|
@ -70,7 +70,7 @@ public:
|
|||||||
K--;
|
K--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (K--) A[A.size() - 1] *= -1; // 第三步
|
if (K % 2 == 1) A[A.size() - 1] *= -1; // 第三步
|
||||||
int result = 0;
|
int result = 0;
|
||||||
for (int a : A) result += a; // 第四步
|
for (int a : A) result += a; // 第四步
|
||||||
return result;
|
return result;
|
||||||
|
Reference in New Issue
Block a user