Cod sursa(job #3371751)
| Utilizator | Data | 31 octombrie 2026 14:07:13 | |
|---|---|---|---|
| Problema | Restante | Scor | 50 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.54 kb |
#include <iostream>
#include <fstream>
#include <cstring>
#include <algorithm>
using namespace std;
ifstream fin("restante.in");
ofstream fout("restante.out");
int main()
{
int n, nr = 0;
fin >> n;
char s[36001][17];
for(int i = 0; i < n; i++){
fin >> s[i];
sort(s[i], s[i] + strlen(s[i]));
}
for(int i = 0; i < n; i++){
int c = 0;
for(int j = 0; j < n; j++)
if(strcmp(s[i], s[j]) == 0) c++;
if(c == 1) nr++;
}
fout << nr;
return 0;
}