//url:https://leetcode.com/problems/array-partition-i/description/
class Solution {
public:
int arrayPairSum(vector& nums) {
int sum=0;
sort(nums.begin(),nums.end());
int size=nums.size(); //因为size方法每次调用都需要重新计算,这样会更高效
for(int i=0;i