Pagini recente » Cod sursa (job #2155081) | Cod sursa (job #2168861) | Cod sursa (job #318378) | Cod sursa (job #978610) | Cod sursa (job #2094101)
#include <iostream>
#include <algorithm>
#include <map>
#include <fstream>
using namespace std;
int main(void)
{
ifstream inp("restante.in");
ofstream out("restante.out");
if(inp.is_open() && out.is_open())
{
map<string, int> hashtable;
int n;
inp >> n;
for(int i = 0; i < n; i++)
{
string t;
inp >> t;
sort(t.begin(), t.end());
hashtable[t]++;
}
map<string, int>::iterator it;
int count = 0;
for(it = hashtable.begin(); it != hashtable.end(); it++)
{
if(it->second == 1)
{
count++;
}
}
out << count;
inp.close();
out.close();
}
else
{
cout << "error\n";
}
return 0;
}