Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

typedef vector<str> vs;

//出力後改行を
#define fin(ans) cout << (ans) << endl;

//配列を昇順
template <typename T>
void Sort(T &n, ll a = 0, ll b = 0)
{
  if (b == 0)
  {
    return (sort(n.begin() + a, n.end()));
  }
  else
  {
    return (sort(n.begin() + a, n.begin() + b));
  }
}

//配列入力
template <typename T>
void V(T &n)
{
  for (ll i = 0; i < n.size(); i++)
  {
    cin >> n[i];
  }
}

//n ~ mの和
ll sigma(ll n, ll m)
{
  return ((n + m) * (m - n + 1) * 0.5);
}

void Main()
{
  ll n; cin >> n;
  vs s(n); V(s);
  map <str, ll> a;
  ll flag = 0;
  for(ll i = 0;i < n;i++)
  {
    Sort(s[i]);
    if(a.count(s[i])) a[s[i]]++;
    else a[s[i]] = 0;
  }
  for(ll i = 0;i < n;i++)
  {
    if(a.count(s[i]))
    {
      flag += sigma(1, a[s[i]]);
      a.erase(s[i]);
    }
  }
  fin(flag);
  return;
}

int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(20);
  Main();
  return 0;
}

Compiler output:
a.cc:7:16: error: 'str' was not declared in this scope; did you mean 'std'?
    7 | typedef vector<str> vs;
      |                ^~~
      |                std
a.cc:7:19: error: template argument 1 is invalid
    7 | typedef vector<str> vs;
      |                   ^
a.cc:7:19: error: template argument 2 is invalid
a.cc: In function 'void Main()':
a.cc:46:8: error: 'str' was not declared in this scope; did you mean 'std'?
   46 |   map <str, ll> a;
      |        ^~~
      |        std
a.cc:46:15: error: template argument 1 is invalid
   46 |   map <str, ll> a;
      |               ^
a.cc:46:15: error: template argument 3 is invalid
a.cc:46:15: error: template argument 4 is invalid
a.cc:50:11: error: invalid types 'vs {aka int}[ll {aka long long int}]' for array subscript
   50 |     Sort(s[i]);
      |           ^
a.cc:51:10: error: request for member 'count' in 'a', which is of non-class type 'int'
   51 |     if(a.count(s[i])) a[s[i]]++;
      |          ^~~~~
a.cc:51:17: error: invalid types 'vs {aka int}[ll {aka long long int}]' for array subscript
   51 |     if(a.count(s[i])) a[s[i]]++;
      |                 ^
a.cc:51:26: error: invalid types 'vs {aka int}[ll {aka long long int}]' for array subscript
   51 |     if(a.count(s[i])) a[s[i]]++;
      |                          ^
a.cc:52:13: error: invalid types 'vs {aka int}[ll {aka long long int}]' for array subscript
   52 |     else a[s[i]] = 0;
      |             ^
a.cc:56:10: error: request for member 'count' in 'a', which is of non-class type 'int'
   56 |     if(a.count(s[i]))
      |          ^~~~~
a.cc:56:17: error: invalid types 'vs {aka int}[ll {aka long long int}]' for array subscript
   56 |     if(a.count(s[i]))
      |                 ^
a.cc:58:27: error: invalid types 'vs {aka int}[ll {aka long long int}]' for array subscript
   58 |       flag += sigma(1, a[s[i]]);
      |                           ^
a.cc:59:9: error: request for member 'erase' in 'a', which is of non-class type 'int'
   59 |       a.erase(s[i]);
      |         ^~~~~
a.cc:59:16: error: invalid types 'vs {aka int}[ll {aka long long int}]' for array subscript
   59 |       a.erase(s[i]);
      |                ^
a.cc: In instantiation of 'void V(T&) [with T = int]':
a.cc:45:13:   required from here
   45 |   vs s(n); V(s);
      |            ~^~~
a.cc:30:24: error: request for member 'size' in 'n', which is of non-class type 'int'
   30 |   for (ll i = 0; i < n.size(); i++)
      |                      ~~^~~~
a.cc:32:13: error: subscripted value is neither array nor pointer
   32 |     cin >> n[i];
      |            ~^