#include<bits/stdc++.h>
using namespace std;
void solve()
{
    int n,cnt;
    cin >> n;
    string s,root="";
    vector<string>x;
    for(int i=0; i<n; i++)
    {
        cin >> s;
        sort(s.begin(),s.end());
        for(int i=0; i<s.size(); i++)
        {
            if(s[i] != s[i+1])
            {
                root+=s[i];
            }
        }
        x.push_back(root);
        root="";
    }
    cnt=0;
    for(int j=1; j<x.size(); j++)
    {
        if(x[j]!=(x[j-1]))
        {
           cnt++;
        }
        //cout << x[j] <<" ";
    }
     cout << cnt+1;
    
   
}
int main()
{
    solve();
}
`here i wanted to compare the strings as they were same or not. i wanted to print how many distinct strings there are
i tried to store the strings in a array of strings.help me solve this problem.`
 
    