✔✔ C++ , easy ,map/set
\tclass Solution {\n\tpublic:\n\t\tint countDistinct(vector& nums, int k, int p) {\n\t\t\tmap,int>m;\n\t\t\tint n = nums.size();\n\t\t\tfor(int i=0;i<n;i++)\n\t
\tclass Solution {\n\tpublic:\n\t\tint countDistinct(vector<int>& nums, int k, int p) {\n\t\t\tmap<vector<int>,int>m;\n\t\t\tint n = nums.size();\n\t\t\tfor(int i=0;i<n;i++)\n\t\t\t{\n\t\t\t\tint count=0;\n\t\t\t\tvector<int>v;\n\t\t\t\tfor(int j=i;j<n;j++)\n\t\t\t\t{\n\t\t\t\t\tif(nums[j]%p == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t\tif(count <= k)\n\t\t\t\t\t{\n\t\t\t\t\t\tv.push_back(nums[j]);\n\t\t\t\t\t\tm[v]++;\n\t\t\t\t\t}\n\t\t\t\t\telse break;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn m.size();\n\t\t}\n\t};
['C', 'Ordered Set', 'C++']