12820

#include <iostream>
#include <map>
#include <string>

using namespace std;
map<int,int> np;
map<char,int> mp;


int main()
{
	int n,kase=1;
	string s;

	while(cin>>n)
	{
		int cool=0;
		for(int i=0;i<n;i++)
		{
			cin>>s;

			if(s.size()==1)
			continue;

			mp.clear();
			np.clear();

			for(int i=0;i<s.size();i++)
			{
				mp[s[i]]++;

			}

			for(map<char,int>::iterator ii=mp.begin();ii!=mp.end();++ii)
			{
				np[ii->second]=1;
			}

			if(np.size()==mp.size())
			cool++;
		}

		cout<<"Case "<<kase++<<": "<<cool<<"\n";
	}
}

 

Leave a Reply

Your email address will not be published. Required fields are marked *