vector<vector<int>> threeSum(vector<int>& nums) { if(nums.empty()||nums.size()<3) return {}; sort(nums.begin(),nums.end()); vector<vector<int>> ans; for(int i=0;i<=nums.size()-3;i++) { if(nums[i]>0) return ans; if(i>=1&&nums[i]==nums[i-1]) continue; int left=i+1,right=nums.size()-1; while(left<right) { long long x=static_cast<long long>(nums[i]); long long y=static_cast<long long>(nums[left]); long long z=static_cast<long long>(nums[right]);