Language: C++

# include<cstring>
using namespace std;

long long  cal(int i)
{
	 return (i)*(i-1)/2;
}
int main ()
{
	 map <string,int> mp;
	 int N; 
	 cin>>N;
	 string k[N];
	 int t=0;
	 for(int i=0;i<N;i++)
	 {
	 	 char s[10];
	 	 cin>>s;
	 	 int l = strlen(s);
	 	 sort(s,s+l);
	 	 string str;
	 	 for(int j=0;j<l;j++)
	 	 {
	 	 	str+=s[j];
		  }
		  if(mp[str]==0)
		  {
		  	 k[t++] = str;  
		  	 mp[str]=1;
		  }
		  else
		  {
		  	mp[str]++;
		  }
		  
	 }
	 long long  sum=0;
	 for(int i=0;i<t;i++)
	 {
	 	 sum+=cal(mp[k[i]]);
	 }
	 cout<<sum<<endl;
	 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: 'map' was not declared in this scope
   10 |          map <string,int> mp;
      |          ^~~
a.cc:2:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    1 | # include<cstring>
  +++ |+#include <map>
    2 | using namespace std;
a.cc:10:15: error: 'string' was not declared in this scope
   10 |          map <string,int> mp;
      |               ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    1 | # include<cstring>
  +++ |+#include <string>
    2 | using namespace std;
a.cc:10:22: error: expected primary-expression before 'int'
   10 |          map <string,int> mp;
      |                      ^~~
a.cc:12:10: error: 'cin' was not declared in this scope
   12 |          cin>>N;
      |          ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | # include<cstring>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:13:16: error: expected ';' before 'k'
   13 |          string k[N];
      |                ^~
      |                ;
a.cc:20:18: error: 'sort' was not declared in this scope; did you mean 'short'?
   20 |                  sort(s,s+l);
      |                  ^~~~
      |                  short
a.cc:21:24: error: expected ';' before 'str'
   21 |                  string str;
      |                        ^~~~
      |                        ;
a.cc:24:25: error: 'str' was not declared in this scope; did you mean 'std'?
   24 |                         str+=s[j];
      |                         ^~~
      |                         std
a.cc:26:22: error: 'mp' was not declared in this scope
   26 |                   if(mp[str]==0)
      |                      ^~
a.cc:26:25: error: 'str' was not declared in this scope; did you mean 'std'?
   26 |                   if(mp[str]==0)
      |                         ^~~
      |                         std
a.cc:28:26: error: 'k' was not declared in this scope
   28 |                          k[t++] = str;
      |                          ^
a.cc:40:27: error: 'mp' was not declared in this scope
   40 |                  sum+=cal(mp[k[i]]);
      |                           ^~
a.cc:40:30: error: 'k' was not declared in this scope
   40 |                  sum+=cal(mp[k[i]]);
      |                              ^
a.cc:42:10: error: 'cout' was not declared in this scope
   42 |          cout<<sum<<endl;
      |          ^~~~
a.cc:42:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:42:21: error: 'endl' was not declared in this scope
   42 |          cout<<sum<<endl;
      |                     ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | # include<cstring>
  +++ |+#include <ostream>
    2 | using namespace std;