c++ solution using binary search
\nclass Solution {\npublic:\n    int find(vector<int>&nums,long long val,long long max_val)\n    {\n        int l=0;\n        int r=nums.size()-1;\n        int 
```\nclass Solution {\npublic:\n    int find(vector<int>&nums,long long val,long long max_val)\n    {\n        int l=0;\n        int r=nums.size()-1;\n        int ans=0;\n        int n=nums.size();\n        while(l<=r)\n        {\n            int mid=(l+r)/2;\n            if((1ll)*nums[mid]*val>=max_val)\n            {\n                ans=n-mid;\n                r=mid-1;\n            }\n            else\n            {\n                l=mid+1;\n            }\n        }\n        return ans;\n    }\n    vector<int> successfulPairs(vector<int>& s, vector<int>& nums, long long success) \n    {\n        int n=s.size();\n        vector<int>ans;\n        sort(nums.begin(),nums.end());\n        for(int i=0;i<n;i++)\n        {\n            int val=find(nums,s[i],success);\n            ans.push_back(val);\n        }\n        return ans;\n    }\n};\n```
['C', 'Binary Tree', 'C++']