Pagini recente » Cod sursa (job #2345679) | Cod sursa (job #3271916) | Cod sursa (job #475694) | Cod sursa (job #599334) | Cod sursa (job #1810816)
#include <bits/stdc++.h>
using namespace std;
string s[36001];
int n;
int main()
{
int i, cnt;
ifstream fin("restante.in");
fin >> n;
for (i = 0; i < n; i++)
{
fin >> s[i];
sort(s[i].begin(), s[i].end());
}
sort(s, s + n);
s[n] = "";
cnt = 0;
for (i = 1; i < n; ++i)
if (s[i] != s[i - 1] && s[i] != s[i + 1]) cnt++;
ofstream fout("restante.out");
fout << cnt << "\n";
fout.close();
return 0;
}