Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;

int main(){
  int n;
  cin >> n;
  vector<string> s(n);
  rep(i,n) cin >> s[i];
  rep(i,n){
    sort(s[i].begin,s[i].end);
  }
  int ans = 0;
  
  rep(i+1,n){
    rep(j,i){
      if(s[i]==s[j]) ans++;
    }
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: no matching function for call to 'sort(<unresolved overloaded function type>, <unresolved overloaded function type>)'
   11 |     sort(s[i].begin,s[i].end);
      |     ~~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note:   template argument deduction/substitution failed:
a.cc:11:9: note:   couldn't deduce template parameter '_RAIter'
   11 |     sort(s[i].begin,s[i].end);
      |     ~~~~^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 2 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 2 provided
a.cc:15:8: error: expected ';' before '+' token
   15 |   rep(i+1,n){
      |        ^
a.cc:2:26: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i=0;i<n;i++)
      |                          ^
a.cc:15:8: error: lvalue required as left operand of assignment
   15 |   rep(i+1,n){
      |        ^~
a.cc:2:26: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i=0;i<n;i++)
      |                          ^
a.cc:2:33: error: expected ')' before ';' token
    2 | #define rep(i,n) for(int i=0;i<n;i++)
      |                     ~           ^
a.cc:15:3: note: in expansion of macro 'rep'
   15 |   rep(i+1,n){
      |   ^~~
a.cc:15:7: error: 'i' was not declared in this scope
   15 |   rep(i+1,n){
      |       ^
a.cc:2:34: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i=0;i<n;i++)
      |                                  ^
a.cc:15:9: error: lvalue required as increment operand
   15 |   rep(i+1,n){
      |         ^
a.cc:2:34: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i=0;i<n;i++)
      |                                  ^