Python solution
observations: \n1. we will use at most n deletions\n2. each col will be deleted at most once. \n3. if one combination of deletions can make the sum less than x,
observations: \n1. we will use at most n deletions\n2. each col will be deleted at most once. \n3. if one combination of deletions can make the sum less than x, then we can adjust the order of the deletions, so that  those with larger nums2 are deleted later, which will create smaller total sum. \n\nSo, we sort nums2 from high to low and try all possible deletions with dp.\n\t  \n\t  \n\t    nums=sorted(zip(nums1,nums2),key=lambda x: -x[1])\n        n=len(nums)\n            \n        @lru_cache(2000)   \n        def t(i,j):\n            if i==n or j==0: return 0\n            return max(nums[i][0]+nums[i][1]*j+t(i+1,j-1), t(i+1,j)) \n        \n        t1=sum(nums1)\n        t2=sum(nums2)\n        for k in range(n+1):\n            if t1+t2*k-t(0,k)<=x:\n                return k            \n        return -1\n\n\n
[]