Cod sursa(job #2731130)
| Utilizator | Data | 27 martie 2021 12:57:43 | |
|---|---|---|---|
| Problema | Restante | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | simulare_oni_hlo_mediu | Marime | 0.53 kb |
#include <iostream>
#include <fstream>
#include <map>
#include <algorithm>
using namespace std;
ifstream fin("restante.in");
ofstream fout("restante.out");
int n, cont = 0;
string s;
map<string, int> M;
int main()
{
fin >> n;
for(int i = 1; i <= n; i++)
{
fin >> s;
sort(s.begin(), s.end());
M[s]++;
if(M[s] == 1)
{
cont++;
}
else if(M[s] == 2)
{
cont--;
}
}
fout << cont;
return 0;
}
