Cod sursa(job #3258869)
| Utilizator | Data | 23 noiembrie 2024 21:33:55 | |
|---|---|---|---|
| Problema | Restante | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.59 kb |
#include <fstream>
#include <algorithm>
#include <string>
#include <unordered_map>
std::ifstream fin("restante.in");
std::ofstream fout("restante.out");
std::unordered_map<std::string, int> mp;
int main()
{
int n;
int cate = 0;
fin >> n;
for (int i = 0; i < n; i++)
{
std::string word;
fin >> word;
std::sort(word.begin(), word.end());
auto total = mp[word]++;
}
for (std::pair<std::string, int> pair : mp)
{
if (pair.second == 1)
cate++;
}
fout << cate;
return 0;
}