✅ Easy C++ Solution
Code\n\nclass Solution {\npublic:\n    vector<int> successfulPairs(vector<int>& spells, vector<int>& potions, long long success) {\n        int n = spells.size(
# Code\n```\nclass Solution {\npublic:\n    vector<int> successfulPairs(vector<int>& spells, vector<int>& potions, long long success) {\n        int n = spells.size();\n        int m = potions.size();\n\n        vector<int> v;\n\n        sort(potions.begin(),potions.end());\n\n        for(int i=0;i<n;i++)\n        {\n            long long spell = spells[i];\n\n            int start = 0;\n            int end = m;\n            while(start < end)\n            {\n                int mid = start + (end - start)/2;\n                if(spell * potions[mid] >= success)\n                {\n                    end = mid;\n                }\n                else\n                {\n                    start = mid + 1;\n                }\n            }\n            v.push_back(m - start);\n        }\n        return v;\n    }\n};\n```
['C++']