(sorting-->mlogm) and (traverse+binary serach-->  nlogm) solution
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<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> successfulPairs(vector<int>& spells, vector<int>& potions, long long success) {\n        sort(potions.begin(),potions.end());\n        int n=spells.size();\n        vector<int>pairs(n,0);\n        int m=potions.size();\n        for(int i=0;i<n;i++){\n            int l=0,r=m-1;\n            while(l<=r){\n                int mid=l+(r-l)/2;\n                if(1LL*potions[mid]*spells[i]>=success){\n                     r=mid-1;\n\n                }\n                else{\n                    l=mid+1;\n                }\n            }\n            pairs[i]=m-l;\n\n        }\n        return pairs;\n    }\n};\n```
['C++']