Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int n,c=1,re;
- char str[100];
- bool arra[100];
- while(scanf("%d\n",&n)==1)
- {
- re=0;
- map<char,int>mp;
- while(n--)
- {
- gets(str);
- int len=strlen(str);
- for(int i=0; i<len; i++)
- mp[str[i]]++;
- int pre_len=mp.size();
- if(pre_len==1)continue;
- bool check=true;
- memset(arra,false,sizeof arra);
- for(map<char,int>::iterator it=mp.begin(); it!=mp.end(); it++)
- {
- int temp=it->second;
- if(arra[temp])
- {
- check=false;
- break;
- }
- else arra[temp]=true;
- }
- if(check)re++;
- }
- printf("Case %d: %d\n",c++,re);
- mp.clear();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement