class Solution {
public:
vector<vector<int>> permutation(vector<int>& nums) {
sort(nums.begin(),nums.end());
vector<vector<int>> res;
do{
res.push_back(nums);
}while(next_permutation(nums.begin(),nums.end()));
return res;
}
};
//库函数:next_permutation(begin(),end()) 求排列大一点的排列
//如: 1 2 3 ----》调用一遍返回:1 3 2--->在调用一遍返回2 1 3