class Solution {
public:
vector<vector<int>> permutation(vector<int>& nums) {
vector<vector<int>> res;
sort(nums.begin(), nums.end());
do res.push_back(nums);
while (next_permutation(nums.begin(), nums.end()));
return res;
}
};