Cod sursa(job #2540391)
Utilizator | Andrei Feodorov Nashik | Data | 7 februarie 2020 09:33:29 |
---|---|---|---|
Problema | Restante | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | irim_eralumis | Marime | 0.53 kb |
//#include <iostream>
#include <fstream>
#include <algorithm>
#include <map>
std::map <std::string,int> m;
int main()
{
std::ifstream cin("restante.in");
std::ofstream cout("restante.out");
int n;
std::string s;
cin>>n;
cin.get();
for(int i=1;i<=n;i++){
cin>>s;
long long x=s.length();
sort(s.begin(),s.end());
m[s]++;
}
long long cnt=0;
for(auto it:m){
if(it.second==1)
cnt++;
}
cout<<cnt;
return 0;
}