Cod sursa(job #630184)
| Utilizator | Data | 4 noiembrie 2011 20:51:55 | |
|---|---|---|---|
| Problema | Restante | Scor | 90 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.54 kb |
#include <string>
#include <cstdio>
#include <map>
#include <algorithm>
#include <iostream>
using namespace std;
#define maxn 36101
string t[maxn];
map <string, int> m;
int n, sol;
int main()
{
int i;
freopen ("restante.in", "r", stdin);
freopen ("restante.out", "w", stdout);
scanf("%d", &n);
for(i = 1; i <= n; ++i) {
cin >> t[i];
sort(t[i].begin(), t[i].end());
m[t[i]]++;
}
for(i = 1; i <= n; ++i) {
if(m[t[i]] == 1)
sol++;
}
printf("%d", sol);
return 0;
}
