Easy Solution :)
Code\n\nclass Solution {\npublic:\n    long long f(vector<int>&v1,vector<int>&v2,long long k,long long t){\n        long long ct=0;\n        for(long long i=0;i
# Code\n```\nclass Solution {\npublic:\n    long long f(vector<int>&v1,vector<int>&v2,long long k,long long t){\n        long long ct=0;\n        for(long long i=0;i<v1.size();i++){\n            if(v1[i]==0){\n                if(t>=0)ct+=v2.size();\n            }\n            else if(v1[i]>0){\n                long long val = floor((double)t/v1[i]);\n                auto it = upper_bound(v2.begin(),v2.end(),val);\n                if(it==v2.end()||(*it)>val)it--;\n                ct+=(it-v2.begin()+1);\n            }else{\n                long long val = ceil((double)t/v1[i]);\n                auto it = lower_bound(v2.begin(),v2.end(),val);  \n                ct+=(v2.end()-it);\n            }\n            if(ct>k)return ct;\n        }\n        return ct;\n    }\n    long long kthSmallestProduct(vector<int>& nums1, vector<int>& nums2, long long k) {\n        long long low = min({nums1[0]*1LL*nums2.back(),nums1.back()*1LL*nums2[0],nums1[0]*1LL*nums2[0]}),high = max({nums1[0]*1LL*nums2[0],nums1.back()*1LL*nums2.back(),nums1[0]*1LL*nums2.back(),nums2[0]*1LL*nums1.back()}),ans = 0; \n        while(low<=high){\n            long long mid = low+(high-low)/2;\n            long long x = f(nums1,nums2,k,mid); \n            if(x<k){\n                low = mid+1;\n            }else{\n                ans = mid;\n                high =mid-1;\n            }\n        } \n        return ans;\n    }\n};\n```
['C++']