Cod sursa(job #340410)
| Utilizator | Data | 14 august 2009 16:27:44 | |
|---|---|---|---|
| Problema | Restante | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.5 kb |
#include <string>
#include <fstream>
#include <algorithm>
#include <map>
using namespace std;
int N,NR;
map<string,int> Cnt;
ifstream f("restante.in");
ofstream g("restante.out");
string S;
int main()
{
f>>N;
getline(f,S);
for (int i=1;i<=N;++i)
{
getline(f,S);
sort(S.begin(),S.end());
Cnt[S]++;
}
map<string,int>::iterator it;
for (it=Cnt.begin();it!=Cnt.end();++it)
if (it->second == 1) ++NR;
g<<NR;
return 0;
}
