Cod sursa(job #1811394)
Utilizator | Data | 21 noiembrie 2016 10:34:53 | |
---|---|---|---|
Problema | Restante | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.25 kb |
#include <bits/stdc++.h>
using namespace std;map <string,int> M;int main(){ifstream f("restante.in");ofstream g("restante.out");int N,i,s=0;f>>N;string x;;for(i=1;i<=N;i++){f>>x;sort(x.begin(),x.end());if(!M[x])s++;else if(M[x]==1)s--;M[x]++;}g<<s;return 0;}