Cod sursa(job #1688067)
| Utilizator | Data | 13 aprilie 2016 11:23:30 | |
|---|---|---|---|
| Problema | Restante | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.53 kb |
#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#endif
#include <fstream>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <map>
#include <string>
using namespace std;
ifstream fin("restante.in");
ofstream fout("restante.out");
string s;
int n, orig;
map<string, int> M;
int main()
{
int i;
fin >> n;
for (i = 1; i <= n; i++)
{
fin >> s;
sort(s.begin(), s.end());
M[s]++;
if (M[s] == 1)
orig++;
else if (M[s] == 2)
orig--;
}
fout << orig << '\n';
return 0;
}