Cod sursa(job #2024062)
| Utilizator | Data | 19 septembrie 2017 21:27:25 | |
|---|---|---|---|
| Problema | Restante | Scor | 10 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.57 kb |
#include <bits/stdc++.h>
int n, l, c;
char cuv[36002][20];
bool ok;
int main()
{
std::ifstream fin("restante.in");
std::ofstream fout("restante.out");
fin >> n;
for (int i{1}; i <= n; i++)
{
fin >> cuv[i];
l = strlen(cuv[i]);
std::sort (cuv[i], cuv[i] + l);
}
for (int i{1}; i < n; i++)
{
ok = false;
for (int j{i + 1}; j <= n && ok == false; j++)
if (strcmp(cuv[i], cuv[j]) == 0)
ok = true;
if (ok == false)
c++;
}
fout << c;
}
