easy implementation
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```cpp []\n#define ll long long\nconst int mod = 1e9 + 7;\n\nclass Solution {\npublic:\n    \n    int countSubMultisets(vector<int>& a, int l, int r) {\n        vector<ll> dp(r + 1 , 0);\n       \n        unordered_map<int,int> mp;\n        for(auto i : a) mp[i]++;\n        dp[0] = ++mp[0];\n        for(auto i : mp){\n            if(i.first == 0) continue;\n            for(int j = r; j >= 0; j--){\n                if(dp[j]){\n                    for(int k = 1; k<= i.second; k++){\n                        if(j + k * i.first <= r) dp[j + k * i.first] = (dp[j] + dp[j + k * i.first]) % mod;\n                    }\n                }\n            }\n        }\n        ll ans = 0;\n        for(int i = l; i<=r; i++) ans = (ans + dp[i]) % mod;\n        return ans;\n    }\n};\n```
['Dynamic Programming', 'C++']