代码:
#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;
}
886

被折叠的 条评论
为什么被折叠?



