Array Partition I[LeetCode 561]
来源:互联网 发布:ik hr人力资源软件 编辑:程序博客网 时间:2024/05/21 09:11
Ans
#include <iostream>#include <vector>#include <algorithm>using namespace std;class Solution {public: int arrayPairSum(vector<int>& nums) { sort(nums.begin(), nums.end()); int ans = 0; for (int i = 0; i < nums.size(); i += 2) { ans += nums[i]; } return ans; }};
阅读全文
0 0
- leetcode#561 Array Partition I
- leetcode-561-Array Partition I
- Leetcode 561: Array Partition I
- 【LeetCode】561 Array Partition I
- [leetcode 561]Array Partition I
- leetcode 561 Array Partition I
- leetcode.561 Array Partition I
- leetcode-561(Array Partition I)
- LeetCode-561 Array Partition I
- Leetcode 561 Array Partition I
- leetcode 561:Array Partition I
- LeetCode 561 Array Partition I
- Leetcode 561:Array Partition I
- Leetcode 561 Array Partition I
- LeetCode[561]Array Partition I
- leetcode 561 Array Partition I
- LeetCode.561 Array Partition I
- Array Partition I[LeetCode 561]
- 向数据库存储读取图片方法总结
- 每日练习
- STM32~FPU协处理器
- spring的module-context.xml文件报找不到dubbo.xsd文件错误
- 机器学习实用教程(译)-1
- Array Partition I[LeetCode 561]
- cvc-complex-type.2.4.a: Invalid content was found starting with element
- C#图解教程 学习笔记!!
- 机器学习_初识attention
- Spring 注解的作用
- SpringBoot初始教程之Servlet、Filter、Listener配置
- [翻译中]【Scikit-Learn 中文文档】二十八:交叉验证
- 1063. 计算谱半径(20)--Python
- 服务进程自启动脚本,实现每分钟检查服务运行状态