[C++] Binary Search, clean and short, O((M+N)lgV)
c++\nclass Solution {\npublic:\n    long long kthSmallestProduct(vector<int>& a, vector<int>& b, long long k) {\n        int n = a.size(), m = b.size();\n      
```c++\nclass Solution {\npublic:\n    long long kthSmallestProduct(vector<int>& a, vector<int>& b, long long k) {\n        int n = a.size(), m = b.size();\n        int x = lower_bound(begin(a), end(a), 0) - begin(a);\n        int y = lower_bound(begin(b), end(b), 0) - begin(b);\n        auto lt = [&](int i, int j) { return 1LL * a[x - 1 - i] * b[y - 1 - j]; };\n        auto rt = [&](int i, int j) { return 1LL * a[i]         * b[m - 1 - j]; };\n        auto lb = [&](int i, int j) { return 1LL * a[n - 1 - i] * b[j]; };\n        auto rb = [&](int i, int j) { return 1LL * a[x + i]     * b[y + j]; };\n        auto count = [](auto& f, int n, int m, long long v) {\n            long long c = 0;\n            for(int i = n - 1, j = 0; j < m && i >= 0; ++j) {\n                while (i >= 0 && 1LL * f(i, j) > v) --i;\n                c += i + 1;\n            }\n            return c;\n        };\n        long long L = -1e10 - 1, R = 1e10;\n        while (L + 1 < R) {\n            auto M = (L + R) >> 1;\n            auto cnt =  count(lt,     x,     y, M) +\n                        count(rt,     x, m - y, M) +\n                        count(lb, n - x,     y, M) +\n                        count(rb, n - x, m - y, M);\n            if (cnt < k) L = M;\n            else R = M;\n        }\n        return R;\n    }\n};\n```
[]