Cod sursa(job #1811370)
Utilizator | Data | 21 noiembrie 2016 10:18:51 | |
---|---|---|---|
Problema | Restante | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.53 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("restante.in");
ofstream fout("restante.out");
map < string, int> M;
int N,ans;
int main()
{
int i,len;
string x;
fin >> N;
for(i = 1; i <= N; i++)
{
fin >> x;
sort(x.begin(),x.end());
if(!M[x])
{
++ans;
M[x]++;
}
else
{
if(M[x] == 1)
--ans;
M[x]++;
}
}
fout << ans << "\n";
return 0;
}