Pagini recente » Cod sursa (job #2873038) | Cod sursa (job #2098828) | Cod sursa (job #2549581) | Cod sursa (job #452367) | Cod sursa (job #2731004)
#include <fstream>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;
ifstream fin("restante.in");
ofstream fout("restante.out");
string s;
vector<int> fr(26);
map<vector<int>, int> m;
int main()
{ ios::sync_with_stdio(false);
fin.tie(nullptr), fout.tie(nullptr);
int n, ans, i, j;
fin>>n;
ans=0;
for (i=0;i<n;++i)
{ fin>>s;
fill(fr.begin(), fr.end(), 0);
for (j=0;j<s.size();++j)
++fr[s[j]-'a'];
if (!m[fr])
++ans;
else if (m[fr]==1)
--ans;
++m[fr];
}
fin.close();
fout<<ans;
fout.close();
return 0;
}