✅Easy C++ Solution(Only 5 lines) || For Beginners 📌🔥🔥📌
\n\n\n# Please upvote of you found the solution helpful.\uD83D\uDE4F\uD83C\uDFFB\n\n# Code\n\nclass Solution {\npublic:\n    vector<int> successfulPairs(vector<
\n![image.png](https://assets.leetcode.com/users/images/6163e038-2582-4286-9d46-50bbffcc52b7_1714196100.6096969.png)\n\n# ***Please upvote of you found the solution helpful.\uD83D\uDE4F\uD83C\uDFFB***\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> successfulPairs(vector<int>& s, vector<int>& p, long long suc) {\n        sort(p.begin(),p.end()); int n=s.size();\n        vector<int>ans(n);\n        for(int i=0;i<n;i++)\n        ans[i]=p.end()-upper_bound(p.begin(),p.end(),(long long)ceil((suc*1.0)/s[i])-1);\n        return ans;\n    }\n};\n```
['Binary Search', 'C++']