Cod sursa(job #2605021)

Utilizator victorzarzuZarzu Victor victorzarzu Data 24 aprilie 2020 11:43:37
Problema Restante Scor 100
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.41 kb
#include <bits/stdc++.h>

using namespace std;
ifstream f("restante.in");
ofstream g("restante.out");
unordered_map<string, int> um;
string s;
int n;

void Read()
{
  f>>n;
  while(n--)
    {
      f>>s;
      sort(s.begin(), s.end());
      um[s]++;
    }
  for(unordered_map<string, int>::iterator it =  um.begin();it != um.end();++it)
    n += ((*it).second == 1);
  g<<n + 1;
}

int main()
{
  Read();
  return 0;
}