C++ Not Best, But Simple Approach. BS
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \nApproach is Similar to 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nApproach is Similar to others but code is quite simple. Focus on below points :\n#1. Multiplication with negative reverses the order, so apply B.S carefully.\n#2. Dry run on some example to see where to apply lower_bound and upper_bound. Its better to write your own version of these for more clarity. (See the last code without stl\'s lb and ub)\n#3. Binary search on answer is the approach, where you have to check how many numbers(multiplications) are less than mid(of binary search). From this count you can compare it with k.\n\n# Complexity\n- Time complexity: $$O(nlogm)$$, where n is size of first array and m is size of second array. \n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $$O(1)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n\n    typedef long long ll;\n\n    int counterFunc(const vector<int> &nums, ll mid, ll num){\n        int n = nums.size(), counter=0;\n        if(num == 0 && mid>=0)return n;\n        if(num == 0) return 0;\n        if(num > 0){\n            counter += upper_bound(nums.begin(), nums.end(), 1.0*mid/num)-nums.begin();\n        }\n        else{\n            counter += n - (lower_bound(nums.begin(), nums.end(), 1.0*mid/num) - nums.begin());\n        }\n        return counter;\n    }\n    \n    bool isValid(const vector<int>& nums1, const vector<int>& nums2, ll k, ll mid){\n        ll counter = 0;\n        for(int i = 0; i < nums1.size(); ++i){\n            counter += counterFunc(nums2, mid, nums1[i]);\n        }\n        return counter>=k;\n    }\n\n    ll kthSmallestProduct(vector<int>& nums1, vector<int>& nums2, ll k) {\n        ll l = -10000000001LL, r = 10000000001LL;\n        while(l < r){\n            ll mid = l+(r-l)/2;\n            if(isValid(nums1, nums2, k, mid)){\n                r = mid;\n            }else{\n                l = mid+1;\n            }\n        }\n        return l;      \n    }\n};\n```\nWithout using lower_bound and upper_bound, more practical and intutive(As we have more control over functions, which we write by our own).\n\n```\ntypedef long long ll;\n\n    int counterFunc(const vector<int> &nums, ll mid, ll num){\n        int n = nums.size(), counter=0, l = 0, r = n;\n        if(num == 0 && mid>=0)return n;\n        if(num == 0) return 0;\n        if(num > 0){\n            \n            while(l < r){\n                int _mid = l+(r-l)/2;\n                if((ll)nums[_mid]*num > mid){\n                    r = _mid;\n                }else{\n                    l = _mid+1;\n                }\n            }\n            counter+=l;\n            \n        }\n        else{\n            \n            while(l < r){\n                int _mid = l+(r-l)/2;\n                if((ll)nums[_mid]*num <= mid){\n                    r = _mid;\n                }else{\n                    l = _mid+1;\n                }\n            }\n            counter+=n-l;\n\n        }\n\n        return counter;\n    }\n    \n    bool isValid(const vector<int>& nums1, const vector<int>& nums2, ll k, ll mid){\n        ll counter = 0;\n        for(int i = 0; i < nums1.size(); ++i){\n            counter += counterFunc(nums2, mid, nums1[i]);\n        }\n        return counter>=k;\n    }\n\n    ll kthSmallestProduct(vector<int>& nums1, vector<int>& nums2, ll k) {\n        ll l = -10000000001LL, r = 10000000001LL;\n        while(l < r){\n            ll mid = l+(r-l)/2;\n            if(isValid(nums1, nums2, k, mid)){\n                r = mid;\n            }else{\n                l = mid+1;\n            }\n        }\n        return l;      \n    }\n```
['C++']