🔥Simple and easy approach using lower_bound
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n$$O(nlog(n))$$\n\n- Space complexity:\n$$O(n)$$ \n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> successfulPairs(vector<int>& s, vector<int>& p, long long num) {\n        sort(p.begin(), p.end());\n        int n = s.size();\n        int m = p.size();\n        vector<int> ans;\n\n        for (int i = 0; i < n; i++) {\n            long long a = s[i];\n            long long requiredPotion = (num + a - 1) / a; \n            auto it = lower_bound(p.begin(), p.end(), requiredPotion);\n            ans.push_back(p.end() - it);\n        }\n\n        return ans;\n    }\n};\n\n```
['C++']