Cod sursa(job #2345035)

Utilizator DawlauAndrei Blahovici Dawlau Data 15 februarie 2019 20:18:53
Problema Restante Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.44 kb
#include <fstream>
#include <iostream>
#include <string>
#include <algorithm>
#include <unordered_map>

using namespace std;

ifstream fin("restante.in");
ofstream fout("restante.out");

int main() {

	int N;
	fin >> N;

	unordered_map <string, int> HashMap;
	for (; N; --N) {

		string s;
		fin >> s;

		sort(s.begin(), s.end());
		++HashMap[s];
	}

	int cnt = 0;
	for (const auto &itm : HashMap)
		if (itm.second == 1)
			++cnt;
	fout << cnt;
}