Pagini recente » Cod sursa (job #96585) | Cod sursa (job #2052583) | Cod sursa (job #2562989) | Cod sursa (job #409946) | Cod sursa (job #1782343)
#include <cstdio>
#include <vector>
#include <cstring>
#include <algorithm>
using namespace std;
const int kMaxN = 36005;
const int kLength = 20;
int n;
char b[kLength];
vector <int> c[kMaxN];
int main() {
freopen("restante.in", "r", stdin);
freopen("restante.out", "w", stdout);
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
c[i] = vector <int>(26, 0);
gets(b);
for (int j = 0; j < strlen(b); j++)
c[i][b[i] - 'a']++;
}
sort(c + 1, c + n + 1);
int goodCount = 0;
for (int i = 1; i <= n; i++) {
if (c[i] != c[i - 1] && c[i] != c[i + 1]) {
goodCount++;
}
}
printf("%d\n", goodCount);
return 0;
}