Easy set 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```\nclass Solution {\npublic:\n    int countDistinct(vector<int>& nums, int k, int p) {\n        int ans=0;\n        set<vector<int>> st;\n        for(int i=0; i<nums.size(); i++){\n            int cnt=0;\n            vector<int> vec;\n            for(int j=i; j<nums.size(); j++){\n                vec.push_back(nums[j]);\n                \n                if(nums[j]%p==0){\n                    ++cnt;\n                }\n                if(cnt>k) break;\n                st.insert(vec);\n            }\n        }\n        return st.size();\n    }\n};\n```
['Array', 'Hash Table', 'Trie', 'Rolling Hash', 'Hash Function', 'Enumeration', 'Ordered Set', 'C++']