C++ Unordered set of string || Easy and Crisp
\nclass Solution {\npublic:\n    int countDistinct(vector<int>& nums, int k, int p) {\n        //as we cannot make an unordered set of vector I thought of makin
```\nclass Solution {\npublic:\n    int countDistinct(vector<int>& nums, int k, int p) {\n        //as we cannot make an unordered set of vector I thought of making unordered set of string\n        //as the constraints are very low so this gave the intuition that brute force is gonna work\n        \n        //we will generate substring containing numbers having at most k elements divisible by p\n        //we put those substrings into the set to eliminate the duplicates\n        unordered_set<string>us;\n\n        for(int i = 0; i<nums.size(); i++){\n            string curr = "";\n            int count = 0;\n            for(int j = i; j<nums.size(); j++){\n                curr+=(to_string(nums[j]));\n                curr+="_";\n                if(nums[j]%p == 0){\n                    count++;\n                }\n                \n                if(count<=k){\n                    us.insert(curr);\n                }\n                \n                else{\n                    break;\n                }\n            }\n        }\n        \n        return us.size();\n    }\n};\n```
['String', 'C', 'C++']