#include <iostream>
#include <string>
#include <map>
#include <algorithm>
using namespace std;
int main(int argc, const char * argv[]) {
// insert code here...
map<string, int> mp;
int n;
char s[40];
scanf("%d", &n);
while (n--) {
scanf("%s", s);
int length = (int)strlen(s);
sort(s, s + length);
string str = s;
mp[s]++;
printf("%d\n", mp[s] - 1);
}
return 0;
}
2016百度之星资格赛
最新推荐文章于 2018-08-03 22:00:01 发布