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