✅C++ || EASY Binary Search
Code\n\nclass Solution {\n    #define ll long long\npublic:\n    vector<int> successfulPairs(vector<int>& s, vector<int>& p, long long c) {\n        sort(p.begi
# Code\n```\nclass Solution {\n    #define ll long long\npublic:\n    vector<int> successfulPairs(vector<int>& s, vector<int>& p, long long c) {\n        sort(p.begin(),p.end());\n        vector<int>an;\n        for(int i=0;i<s.size();i++){\n            int d=0;\n            ll g=c/s[i];\n            if(c%s[i])g++;\n            int f=lower_bound(p.begin(),p.end(),g)-p.begin();\n            d += p.size()-f;\n            an.push_back(d);\n        }\n        return an;\n    }\n};\n```\n![upvote (3).jpg](https://assets.leetcode.com/users/images/c97c664a-5d0e-4880-8c56-ee876fe9d057_1680426069.3153875.jpeg)\n
['Binary Search', 'C++']