Cod sursa(job #2108764)
| Utilizator | Data | 18 ianuarie 2018 19:50:40 | |
|---|---|---|---|
| Problema | Restante | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.56 kb |
#include <bits/stdc++.h>
using namespace std;
int N, solution; string word; map<string, int> originals;
int main()
{
freopen("restante.in", "r", stdin);
freopen("restante.out", "w", stdout);
cin >> N;
for(int i = 1; i <= N; i++)
{
cin >> word;
sort(word.begin(), word.end());
auto ret = originals.insert({word, 1});
if(!ret.second) ret.first -> second++;
}
for(auto i : originals)
{
if(i.second == 1) solution++;
}
cout << solution;
return 0;
}
