criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
    long long N, ans = 0;;
    cin >> N;
    vector<string> S(N+1);
    set<stirng> s;
    for(int i = 1; i <= N; ++i) cin >> S[i];
    for(int i = 1; i <= N; ++i){
        sort(S[i].begin(), S[i].end());
        s.insert(S[i]);
    }
    cout << s.size() << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'stirng' was not declared in this scope
    8 |     set<stirng> s;
      |         ^~~~~~
a.cc:8:15: error: template argument 1 is invalid
    8 |     set<stirng> s;
      |               ^
a.cc:8:15: error: template argument 2 is invalid
a.cc:8:15: error: template argument 3 is invalid
a.cc:12:11: error: request for member 'insert' in 's', which is of non-class type 'int'
   12 |         s.insert(S[i]);
      |           ^~~~~~
a.cc:14:15: error: request for member 'size' in 's', which is of non-class type 'int'
   14 |     cout << s.size() << endl;
      |               ^~~~
Language: C++

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

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());
  map<string, int> mp;
  rep(i, n) ++mp[s[i]];
  ll ans = 0;
  for (auto itr = mp.begin(); itr != mp.end(); ++itr) {
    ans += (*itr).second * ((*itr).second - 1) / 2LL;
  }
  cout << ans << endl;
  return 0;
}④

Compiler output:
a.cc:22:2: error: '\U00002463' does not name a type
   22 | }④
      |  ^
Language: C++

//header{{{
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
 
#include <boost/sort/spreadsort/spreadsort.hpp>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/dijkstra_shortest_paths.hpp>
//#include <boost/graph/graph_utility.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/tag_and_trait.hpp>
#include <ext/pb_ds/trie_policy.hpp>
 
using namespace __gnu_pbds;
using namespace std;
//using namespace boost::multiprecision;
//using namespace boost::math;
 
typedef boost::adjacency_list<boost::listS, boost::vecS, boost::undirectedS,
        boost::no_property, boost::property<boost::edge_weight_t, int> > Graph;
 
#define rep(i,n) for(int i=0;i<(n);++i)
#define reps(i,n) for(int i=1;i<=(n);++i)
#define all(x) (x).begin(),(x).end()
#define Fixed fixed << setprecision(12)
#define bsort boost::sort::spreadsort::spreadsort
#define int int_fast64_t
using pii = pair<int,int>;
 
constexpr int INF  = 0x3f3f3f3f;
constexpr long long LINF = 0x3f3f3f3f3f3f3f3fLL;
constexpr int mod1 = 1e9+7; 
constexpr int mod2 = 998244353;
template <class Func>
 
class FixPoint : Func {
public:
    explicit constexpr FixPoint(Func&& f) noexcept : Func(forward<Func>(f)) {}
 
    template <class... Args>
    constexpr decltype(auto) operator()(Args&&... args) const {
        return Func::operator()(*this, std::forward<Args>(args)...);
    }
};
 
template <class Func>
static inline constexpr decltype(auto) makeFixPoint(Func&& f) noexcept {
    return FixPoint<Func>{forward<Func>(f)};
}
 
template <class A, class B> inline bool chmax(A &a, const B &b) { return b > a && (a = b, true); }
template <class A, class B> inline bool chmin(A &a, const B &b) { return b < a && (a = b, true); }
 
template <class T> using min_heap = priority_queue<T,vector<T>,greater<T> >;
template <class T> using max_heap = priority_queue<T>;
template <class A, class B> using umap = unordered_map<A,B>;
 
template <typename T> using Set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename K, typename V> using Umap = gp_hash_table<K, V>;
using Trie = trie<string, null_type, trie_string_access_traits<>, pat_trie_tag, trie_prefix_search_node_update>;
  
inline int square(int a){ return a * a;}
inline int updiv(int a,int b){ return (a + b - 1) / b; }
 
constexpr int dx[] = {1,0,-1,0,1,1,-1,-1};
constexpr int dy[] = {0,-1,0,1,1,-1,-1,1};
 
struct negrightshift {
    inline int operator() (const int &x, const unsigned offset) {
        return -(x >> offset);
    }
};
//}}}

signed main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n;
	cin >> n;
	Umap<string,int> mp;
    mp.resize(n);
	int sum = 0;
	rep(i,n){
		string s;
		cin >> s;
		bsort(all(s));
		++mp[s];
		sum += mp[s]-1;
	}
	cout << sum << '\n';
	return 0;
}


Compiler output:
a.cc:5:10: fatal error: boost/sort/spreadsort/spreadsort.hpp: No such file or directory
    5 | #include <boost/sort/spreadsort/spreadsort.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

//header{{{
#include<bits/stdc++.h>
  
using namespace std;
 
#define rep(i,n) for(int i=0;i<(n);++i)
#define reps(i,n) for(int i=1;i<=(n);++i)
#define all(x) (x).begin(),(x).end()
#define setout(n,x) setw(n) << setfill(x)
#define Fixed fixed << setprecision(10)
#define int long long
using pii = pair<int,int>;
constexpr int INF  = 0x3f3f3f3f;
constexpr long long LINF = 0x3f3f3f3f3f3f3f3fLL;
constexpr int mod = 1e9+7; 
 
int gcd(int a,int b){ return b ? gcd(b,a % b) : a;}
int lcm(int a,int b){ return a / gcd(a,b) * b;}
//}}}

signed main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n;
	cin >> n;
	umap<string,int> mp;
	int sum = 0;
	rep(i,n){
		string s;
		cin >> s;
		sort(all(s));
		++mp[s];
		sum += mp[s]-1;
	}
	cout << sum << '\n';
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:9: error: 'umap' was not declared in this scope
   26 |         umap<string,int> mp;
      |         ^~~~
a.cc:26:20: error: expected primary-expression before ',' token
   26 |         umap<string,int> mp;
      |                    ^
a.cc:11:13: error: expected primary-expression before 'long'
   11 | #define int long long
      |             ^~~~
a.cc:26:21: note: in expansion of macro 'int'
   26 |         umap<string,int> mp;
      |                     ^~~
a.cc:32:19: error: 'mp' was not declared in this scope
   32 |                 ++mp[s];
      |                   ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef bool boool;
typedef long long ll;
#define vl vector<ll>
#define vb vector<boool>
#define vs vector<string>
#define vp vector<pair<ll, ll>>
#define vvl vector<vector<ll>>
#define vvp vector<vector<pair<ll, ll>>>
#define mod 1000000007
#define all(x) x.begin(), x.end()
#define rep1(i, n) for (long long i=0; i<(long long)(n); i++)
#define rep2(i, s, e) for (long long i=(s); i<(long long)(e); i++)
#define GET_MACRO(_1,_2,_3,NAME,...) NAME
#define rep(...) GET_MACRO(__VA_ARGS__, rep2, rep1)(__VA_ARGS__)

int main(){
  string str = "cba";
  sort(str);
  cout << str << endl;
  return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:7: error: no matching function for call to 'sort(std::string&)'
   20 |   sort(str);
      |   ~~~~^~~~~
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:   candidate expects 2 arguments, 1 provided
/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, 1 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, 1 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, 1 provided
Language: C++

program prob4
    implicit none
    integer(8) :: n
    integer(8), allocatable :: a(:)
    integer(8) :: p(10)
    integer(8) :: s(10)
    integer(8) :: i, j
    integer(8) :: ans
    integer(8) :: cnt
    character(10) :: tmp
    integer(8) :: inttmp

    read(*,*) n
    allocate(a(n))

    p(1) = 1
    do i = 2, 10
        p(i) = p(i-1) * 26
    end do
    do i = 1, n
        read(*,*) tmp
        do j = 1, 10
            s(j) = ichar(tmp(j:j)) - ichar('a')
        end do
        call msort(s)
        a(i) = 0
        do j = 1, 10
            a(i) = a(i) + s(j) * p(j)
        end do
    end do

    call msort(a)

    cnt = 1
    inttmp = a(1)
    ans = 0
    do i = 2, n
        if(a(i) == inttmp)then
            cnt = cnt + 1
        else
            ans = ans + cnt * (cnt - 1) / 2
            inttmp = a(i)
            cnt = 1
        end if
    end do
    ans = ans + cnt * (cnt - 1) / 2

    write(*,*) ans



    deallocate(a)

    stop
contains


  !
  ! swap two arguments
  !
subroutine swap(a, b)
    implicit none
    integer(8), intent(inout) :: a, b

    integer(8) :: c

    c = a
    a = b
    b = c

  end subroutine swap

  !
  ! merge sort
  !
  recursive subroutine msort(x)
    implicit none
    integer(8), intent(inout) :: x(:)

    integer(8) :: n, mid, i, j, k
    integer(8), allocatable :: tmp(:)
    
    n = size(x)
    
    if(n == 1) then
      return
    end if

    !
    ! 前半と後半に分けてソート
    ! 1~midとmid+1~nをそれぞれソート済みにする
    !
    mid = n / 2
    call msort(x(:mid))
    call msort(x(mid+1:))

    !
    ! tmpという配列にxを一時的に保管
    ! マージソートは外部ソート
    !
    allocate(tmp(n))
    tmp = x

    ! tmpの後半部分を左右反転
    do k = n, mid+1, -1
      tmp(k) = x(mid + n - k + 1)
    end do

    ! iは前半のリストのうちまだ見ていないものの最小値
    ! jは後半のリストのうちまだ見ていないものの最小値
    ! kは見た回数の合計
    i = 1
    j = n

    do k = 1, n
      !
      ! 一番左と一番右のうち小さい方をxに入れていく
      ! ここが等号つき不等号なので、安定ソートとなる
      !
      if(tmp(i) <= tmp(j)) then
        x(k) = tmp(i)
        i = i + 1
      else
        x(k) = tmp(j)
        j = j - 1
      end if
    end do
    
    deallocate(tmp)
    return
  end subroutine msort
end program prob4

Compiler output:
a.cc:118:9: error: extended character 、 is not valid in an identifier
  118 |       ! ここが等号つき不等号なので、安定ソートとなる
      |         ^
a.cc:1:1: error: 'program' does not name a type
    1 | program prob4
      | ^~~~~~~
Language: C++

// finding number of pairs such that s[i] is an angram of s[j]
#include<bits/stdc++.h>
#include<unordered_map>
using namespace std;

int N;
vector<string> A;

int main() {
    cin >> N;
    A.resize(N);
    for (int i=0; i<N; i++) cin >> A[i];
    unordered_map<string, int> map;
    for (int i=0; i<A.size(); i++) {
        sort(A[i].begin(), A[i].end());
        map[A[i]]++;
    }
    long long ans = 0;
    for (auto i : map) ans += i.second
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:39: error: expected ';' before 'cout'
   19 |     for (auto i : map) ans += i.second
      |                                       ^
      |                                       ;
   20 |     cout << ans << endl;
      |     ~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
const ll mod=1000000007;
const int MAX_N = 1000;         // n の最大値
 
// nCk を取得
double nCk(int n, int k) {
double res=1.0;
for(int i=0; i<n; i++){
res*=0.5;}
for(int i=0; i<k; i++){
res*=(double)(n-i);
res/=(double)(k-i);
}
return res;}
 
int main() {
ll n;
cin>>n;
string s[n]={};
rep(i,n) cin>>s[i];
map<string,ll> a;
rep(i,n){
sort(aii(s[i]));
a[s[i]]++;}
ll ca = 0;
for(auto p: a){
ll k = p.se;
ca+=k*(k-1)/2;}
cout << ca << endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:5: error: 'i' was not declared in this scope
   23 | rep(i,n) cin>>s[i];
      |     ^
a.cc:23:1: error: 'rep' was not declared in this scope
   23 | rep(i,n) cin>>s[i];
      | ^~~
a.cc:30:10: error: 'struct std::pair<const std::__cxx11::basic_string<char>, long long int>' has no member named 'se'
   30 | ll k = p.se;
      |          ^~
Language: C++

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

int main() {

    int n;
    cin >> n;
    vector<string> vs;
    string str;
    rep(i,n) {
        cin >> str;
        sort(str.begin(), str.end());
        vs.push_back(str);
    }

    sort(vs.begin(), vs.end());

    auto f = [&](ll c) {
        c--;
        if (c <= 0) {
            return 0;
        }
        ll ret = 0;
        while(c) {
            ret += c;
            c--;
        }
        return ret;
    };
    ll ans = 0;
    ll count = 0;
    rep(i,n-1) {
        if (vs[i] == vs[i+1]) {
            count++;
        }
        else {
            ans += f(count+1);
            count = 0;
        }
    }

    if (count != 0) {
        ans += f(count+1);
    }

    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In lambda function:
a.cc:30:16: error: inconsistent types 'int' and 'long long int' deduced for lambda return type
   30 |         return ret;
      |                ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
using P = pair<string,int>;
const double PI = acos(-1);
int main() {
int n;
cin >> n;
map<string,int> mp;
rep(i,n){
  string s;
  cin >> s;
  sort(s.begin(),s.end());
  mp[s]++;
}
ll ans = 0;
for(auto itr = mp.begin(); itr != mp.end(); itr++){
  int x = ;
 ans += x*(x-1)/2;
}
cout << ans << endl;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:11: error: expected primary-expression before ';' token
   19 |   int x = ;
      |           ^
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;
  map<string, int> mp;
  ll ans=0;
  rep(i,n){
    string s;
    cin >> s;
    sort(s.begin(),s.end());
    if(mp[s]>0) ans+=mp[s];
    mp[s]++;
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'll' was not declared in this scope
    9 |   ll ans=0;
      |   ^~
a.cc:14:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |     if(mp[s]>0) ans+=mp[s];
      |                 ^~~
      |                 abs
a.cc:17:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |   cout<<ans<<endl;
      |         ^~~
      |         abs
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  int n;cin>>n;
  vector<string>a(n);
  for(int i=0;i<n;i++)cin>>a[i];
  for(int i=0;i<n;i++)sort(a[i]);
  sort(a.begin(),a.end());
  int count=1;
  int ans=0;
  for(int i=0;i<n-1;i++){
    if(a[i]==a[i+1])count++;
    else ans+=(count)*(count-1)/2,count=0;
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:27: error: no matching function for call to 'sort(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&)'
   10 |   for(int i=0;i<n;i++)sort(a[i]);
      |                       ~~~~^~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:4:
/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:   candidate expects 2 arguments, 1 provided
/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, 1 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, 1 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, 1 provided
Language: C++

#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main(){
  int n;cin>>n;
  vector<string>a(n);
  for(int i=0;i<n;i++)cin>>a[i];
  for(int i=0;i<n;i++)sort(a[i].begin(),a[i].end());
  sort(a.begin(),a.end());
  int count=1;
  int ans=0;
  for(int i=0;i<n-1;i++){
    if(a[i]==a[i+1])count++;
    else ans+=(count)*(count-1)/2,count=0;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: 'sort' was not declared in this scope; did you mean 'short'?
    9 |   for(int i=0;i<n;i++)sort(a[i].begin(),a[i].end());
      |                       ^~~~
      |                       short
a.cc:10:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   10 |   sort(a.begin(),a.end());
      |   ^~~~
      |   short
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  int n;cin>>n;
  vector<string>a(n);
  for(int i=0;i<n;i++)cin>>a[i];
  for(int i=0;i<n;i++)sort(a[i].begin(),a[i].end());
  sort(a.begin(),a.end());
  int count=1;
  int ans=0;
  for(int i=0;i<n-1;i++){
    if(a[i]==a[i+1])count++;
    else ans+=(count)*(count-1)/2,count=0;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<string>a(n);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | #include<string>
a.cc:6:16: error: expected primary-expression before '>' token
    6 |   vector<string>a(n);
      |                ^
a.cc:6:17: error: 'a' was not declared in this scope
    6 |   vector<string>a(n);
      |                 ^
a.cc:8:23: error: 'sort' was not declared in this scope; did you mean 'short'?
    8 |   for(int i=0;i<n;i++)sort(a[i].begin(),a[i].end());
      |                       ^~~~
      |                       short
a.cc:9:3: error: 'sort' was not declared in this scope; did you mean 'short'?
    9 |   sort(a.begin(),a.end());
      |   ^~~~
      |   short
Language: C++

/* Note:
Check constants at the beginning of the code.
    N is set to 4e5 but be careful in problems with large constant factor.
    Setting N in every problem is more effective.
Check corner cases.
    N = 1
No def int long long for now.
Add something here.

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

int mod = 1000000007;
ll dp[100005];;

ll gcd(long long a,long long b){

  if(b == 0)
    return a;
  else return gcd(b,a%b);
}


bool sortByVal(const pair<string, int> &a,
               const pair<string, int> &b)
{
    return (a.second < b.second);
}


int main(){

 int n,cnt=0;
 cin>>n;

  map<string,long long>mp;

  for(int i=0;i<n;i++){

     string s;
     cin>>s;
     mp[s]++;
  }

    int cnt=0;
  for(map<string,long long>::iterator it = mp.begin();it!= mp.end();it++){
    long long y = it->second;
    cnt += (y)*(y-1)/2;
  }

 cout<<cnt<<endl;

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:48:9: error: redeclaration of 'int cnt'
   48 |     int cnt=0;
      |         ^~~
a.cc:36:8: note: 'int cnt' previously declared here
   36 |  int n,cnt=0;
      |        ^~~
Language: C++

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

const int INF = 2e9;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:21:12: error: 'a' was not declared in this scope
   21 |         if(a[i] == a[i+1]) cnt++;
      |            ^
Language: C++


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
const ll INF = 1LL << 60;

int main(){
    int n;
    cin >> n;
    map<string,int> mp;
    int ans=0;
    for(int i=0; i<n; i++){
        string s;
        cin >> s;
        sort(all(s));
        mp[s] ++;
    }
    ll ans=0;
    for(auto &x:mp){
        int a = x.second;
        ans +=(ll)a*(a-1)/2;
    }
    cout << ans << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:8: error: conflicting declaration 'll ans'
   20 |     ll ans=0;
      |        ^~~
a.cc:13:9: note: previous declaration as 'int ans'
   13 |     int ans=0;
      |         ^~~
Language: C++


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
const ll INF = 1LL << 60;

int main(){
    int n;
    cin >> n;
    map<string,int> mp;
    int ans=0;
    for(int i=0; i<n; i++){
        string s;
        cin >> s;
        sort(all(s));
        mp[s] ++;
    }
    int ans=0;
    for(auto &x:mp){
        ans += x.second-1;
    }
    cout << ans << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: redeclaration of 'int ans'
   20 |     int ans=0;
      |         ^~~
a.cc:13:9: note: 'int ans' previously declared here
   13 |     int ans=0;
      |         ^~~
Language: C++

#include <iostream>
#include <cmath>
#include <stdio.h>
#include <map>
#include <vector>
#include <string>

#define rep(i,n) for(int i=0;i!=n;++i)

using namespace std;

typedef long long ll;

const int MAX = 510000;
const int MOD = 1000000007;

long long fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

// 二項係数計算
long long COM(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}


int main(){
    int N;
    scanf("%d",&N);
    map<string,int> mp;
    string str;

    COMinit();

    int count=0;
    
    for(int i=0;i!=N;++i){
        cin>>str;
        sort(str.begin(),str.end());
        map<string,int>::iterator it=mp.find(str);
        if(it!=mp.end()){
            ++mp[str];
        }else{
            mp.insert(make_pair(str,1));
        }
    }
    
    for(map<string,int>::iterator it=mp.begin();it!=mp.end();++it){
        count+=COM(it->second,2);
    }

    cout<<count<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   51 |         sort(str.begin(),str.end());
      |         ^~~~
      |         sqrt
Language: C++

#include <bits/stdc++.h>
#define PI 3.1415926535897
using namespace std;
typedef long long ll;
const int INF = 1000000000;
const ll LINF = 1000000000000000000; //1e18
const double EPS = 1e-10;

int main(void)
{
    int N;
    cin >> N;

    vector<string> str(N);
    for (int i = 0; i < N; i++)
    {
        cin >> str[i];
    }

    unordered_map<string, ll> pattern;
    for (int i = 0; i < N; i++)
    {
        sort(str[i].begin(), str[i].end());
        if (pattern.count(str[i]))
        {
            pattern[str[i]] += 1;
        }
        else
        {
            pattern[str[i]] = 1;
        }
        // ans += pattern[str[i]] - 1;
    }

    ll ans = 0;
    for (auto itr = pattern.begin(); itr != pattern.end(); itr++)
    {
        if (itr->second > 1)
        {
            ll tmp = itr->second - 1;
            ans += (tmp * (tmp + 1)) / 2
        }
    }

    cout << ans << endl;
    return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:41: error: expected ';' before '}' token
   41 |             ans += (tmp * (tmp + 1)) / 2
      |                                         ^
      |                                         ;
   42 |         }
      |         ~
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
        long ans = 0;
		HashMap<String,long> m = new HashMap<>();

		for(int i=0;i<n;i++){
			char [] c = sc.next().toCharArray();
			Arrays.sort(c);
			m.merge(String.valueOf(c),1,long::sum);
	    }
        
        for(long i : m){ans+=i*(i-1)/2;}
		System.out.println(ans);
	}
}


Compiler output:
Main.java:7: error: unexpected type
		HashMap<String,long> m = new HashMap<>();
		               ^
  required: reference
  found:    long
Main.java:12: error: invalid method reference
			m.merge(String.valueOf(c),1,long::sum);
			                            ^
  cannot find symbol
    symbol:   method sum(V,V)
    location: class long
  where V is a type-variable:
    V extends Object declared in class HashMap
Main.java:15: error: for-each not applicable to expression type
        for(long i : m){ans+=i*(i-1)/2;}
                     ^
  required: array or java.lang.Iterable
  found:    HashMap<String,<any>>
3 errors
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
        long ans = 0;
		HashMap<String,Integer> m = new HashMap<>();

		for(int i=0;i<n;i++){
			char [] c = sc.next().toCharArray();
			Arrays.sort(c);
			m.merge(String.valueOf(c),1,Integer::sum);
	    }
        
        for(Integer i : m){ans+=i*(i-1)/2;}
		System.out.println(ans);
	}
}

Compiler output:
Main.java:15: error: for-each not applicable to expression type
        for(Integer i : m){ans+=i*(i-1)/2;}
                        ^
  required: array or java.lang.Iterable
  found:    HashMap<String,Integer>
1 error
Language: Java

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		String[] stringList = new String[n];
		for (int i = 0; i < n; i++) {
			stringList[i] = scan.next();
		}

		long count = 0;

		Map<String, Integer> map = new HashMap<>();
		for (int i = 0; i < n; i++) {

			char[] c = stringList[i].toCharArray();
			Arrays.sort(c);
			String str = String.valueOf(c);
			if (map.containsKey(str)) {
				long num = map.get(str);
				count += num;
				map.put(str, num + 1);
			} else {
				map.put(str, 1l);
			}


		}

		System.out.println(count);
	}
}

Compiler output:
Main.java:28: error: incompatible types: long cannot be converted to Integer
				map.put(str, num + 1);
				                 ^
Main.java:30: error: incompatible types: long cannot be converted to Integer
				map.put(str, 1l);
				             ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
2 errors
Language: C++

#include <string>
#include <iostream>
#include <set>
#include <map>

int main(){
 
  long long int n = 0;
  std::cin >> n;
  
  std::map<std::set<char>, long long int> mp;
  
  for(int i = 0; i < n ; ++i){
  	std::string t;
    std::cin >> t;
    
    std::set<char> cs;
    
    for(auto c: s){
      cs.insert(c);
    }
  
    mp[cs]++;
  }
  long long count = 0;
  for(auto m: mp){
   
    if(m.second >= 2){
    	count++;
    }
  }
  
  std::cout << count << std::endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:17: error: 's' was not declared in this scope
   19 |     for(auto c: s){
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define lvector vector<ll>
#define cvector vector<char>
#define svector vector<string>
#define lque queue<ll>
#define lpque priority_queue<ll>
#define dlpque priority_queue<ll,lvector,greater<ll>>
#define P pair<ll,ll>
#define ALL(a) a.begin(),a.end()
#define RALL(a) a.rbegin(),a.rend()
#define rep(i,n) for(ll i=0; i<n; ++i)
#define print(a) cout << (a) << endl

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll n,ans=0;cin>>n;
  string s;
  map<string,ll> mp;
  rep(i,n) {
    cin>>s;sort(ALL(s));
    mp[s]++;
  }
  for(auto p:mp) ans+=(p.second-1)*p.second/2;
  print(ans);
  return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:28:12: error: expected '}' at end of input
   28 |   return 0;
      |            ^
a.cc:16:12: note: to match this '{'
   16 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
typedef long long ll;
#define _GLIBCXX_DEBUG
typedef vector<int> vec;
typedef vector<ll> lvec;
typedef vector<char> cvec;
typedef vector<double> dvec;
typedef pair<ll, ll> LP;
typedef tuple<ll, ll, ll> LT;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
#define fs first
#define sc second
ll nc2(int x){
  return x*(x-1)/2;
int main()	{
  int n;
  cin>>n;
  vector<string> s(n);
  map<string,int>mp;
  rep(i,n){
    cin>>s[i];
    sort(rall(s[i]));
  }
  rep(i,n){
    mp[s[i]]++;
  }
  ll ans=0;
  for(auto x:mp){
    ans+=nc2(x.sc);
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'll nc2(int)':
a.cc:20:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   20 | int main()      {
      |         ^~
a.cc:20:9: note: remove parentheses to default-initialize a variable
   20 | int main()      {
      |         ^~
      |         --
a.cc:20:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:20:17: error: a function-definition is not allowed here before '{' token
   20 | int main()      {
      |                 ^
a.cc:37:2: error: expected '}' at end of input
   37 | }
      |  ^
a.cc:18:14: note: to match this '{'
   18 | ll nc2(int x){
      |              ^
Language: C++

#include <iostream>
#include <map>

using namespace std;
using ll = long long;

int main() {
  ll N, ans{};
  cin >> N;
  map<string,int> m;
  string S;
  while (cin >> S) {
    sort(begin(S),end(S));
    ans += m[S]++;
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |     sort(begin(S),end(S));
      |     ^~~~
      |     short
Language: Java

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Answer {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        Map<String, Integer> count = new HashMap<>();
        int n = in.nextInt();
        long res = 0;
        for (int i = 0; i < n; i++) {
            String s = sort(in.next());
            res += (count.containsKey(s) ? count.get(s) : 0);
            if (count.containsKey(s)) {
                count.replace(s, count.get(s) + 1);
            } else {
                count.put(s, 1);
            }
        }

        System.out.println(res);
    }

    private static String sort(String text) {
        char[]chars = text.toCharArray();
        Arrays.sort(chars);
        return new String(chars);
    }
}


Compiler output:
Main.java:6: error: class Answer is public, should be declared in a file named Answer.java
public class Answer {
       ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  int n;
  cin>>n;
  map<string,int>mp;
  for(int i=0;i<n;i++){
    string s;
    cin>>s;
    sort(s.begin(),s.end());
    mp[s]++;
  }
  long long ans=0;
  for(auto& p:mp){
    int u=p.second;
    if(p.second>=2){
      ans+=u;
    }
  }
  cout<<u<<endl;
}
    
 

Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'u' was not declared in this scope
   21 |   cout<<u<<endl;
      |         ^
Language: C++

#include <iostream>
#include <cstring>
#include <algorithm>
#include <list>
#include <map>
#include <cmath>
#include <string>
#include <iterator>
#include <vector>
 
using namespace std;

typedef long long ll;
typedef long double ld;
#define L(ID) ((ID*2)+1)
#define R(ID) ((ID*2)+2)
#define M(L,R) ((L+R)/2)
#define forr(start,end) for(int i = start; i < end; i++)
#define gap ' '
 
const int MAXN = 1e5 + 5;
int k[MAXN];

int largest(int a, int b){
	return (a<b)?b:a;
}

int main() {
	int n = 0;
	ll >> n;
	int ans = 0;
	string s;
	map<string,ll> mymap;
	for(int i = 0; i < n; ++i){
		cin >> s;
		sort(s.begin(), s.end());
		mymap[s]++;
		ans+=mymap[s]-1;
	}
	cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:12: error: expected unqualified-id before '>>' token
   30 |         ll >> n;
      |            ^~
Language: C++

//#include<bits/stdc++.h>
#include<iostream>
#include<cmath>
#include<cstdio>
#include<vector>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<utility>
#include<algorithm>
#include<cstring>
#include<sstream>
#include <iomanip>

using namespace std;

typedef long long ll ;
typedef double db;
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef vector< pair<int,int> > vii;
const double pi = 2*acos(0) ;

#define pf		  	printf
#define sf			  scanf
#define pb(a)         push_back(a)
#define mp			make_pair
#define fi			 first
#define se			 second
#define for0(i,n)        for(int i=0;i<n;i++)
#define for1(i,n)        for(int i=1;i<=n;i++)
#define forab(i,a,b)       for(int i=a;i<=b;i++)
#define lcm(a, b)     ((a)*((b)/gcd(a,b)))
#define sq(a)		   (a)*(a)
#define nw				"\n"
#define abs(x)		fabs(x)
#define pcase(z,x)    cout<<"Case "<<z<<": "<<x<<"\n"

int main()
{
	 i,j,n,x;
	cin>>n;
	map<string,ll>m;
	for0(i,n){
		string s;
		cin>>s;
		sort(s.begin(),s.end());
		m[s]++;
		}
	ll c=0;
	for(auto it:m){
		x = it.se;
		c += (x*(x-1))/2;
		}
	cout<<c<<nw;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:10: error: 'i' was not declared in this scope; did you mean 'vi'?
   42 |          i,j,n,x;
      |          ^
      |          vi
a.cc:42:12: error: 'j' was not declared in this scope; did you mean 'jn'?
   42 |          i,j,n,x;
      |            ^
      |            jn
a.cc:42:14: error: 'n' was not declared in this scope; did you mean 'yn'?
   42 |          i,j,n,x;
      |              ^
      |              yn
a.cc:42:16: error: 'x' was not declared in this scope
   42 |          i,j,n,x;
      |                ^
Language: C++

#include <bits/stdc++.h>

typedef long long int ll;

using namespace std;

int main()
{

    int n;
    cin >> n;

    map<map<string, int>, int> kasu;

    for (int i = 0; i < n; i++)
    {
        string s;
        cin >> s;
        for (int i = 0; i < 10; i++)
        {

            map<char, int> hero;

            hero[s[i]]++;
        }
        kasu[hero]++;
    }

    int count=0;
    for(auto m:kasu){
        count +=m.second;
    }

    cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:14: error: 'hero' was not declared in this scope
   26 |         kasu[hero]++;
      |              ^~~~
Language: C++

#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=(a);i<=(b);i++)
#define per(i,a,b) for(int i=(a);i>=(b);i--)
#define rush() int T;scanf("%d",&T);while(T--)
#define mm(a,b) memset(a,b,sizeof(a))
#define pii pair<int,int>
#define mp make_pair
#define pb push_back
#define sc(a) scanf("%d",&a)
#define sc2(a,b) scanf("%d%d",&a,&b)
#define pf(a) printf("%d\n",a)
#define pf2(a,b) printf("%d %d\n",a,b)
#define p_f(a) printf("%d ",a)
#define pyn(a) if(a)puts("Yes");else puts("No");
#define fi first
#define se second
#define db double
#define ll long long
using namespace std;
const int inf=0x3f3f3f3f;
const ll INF=0x3f3f3f3f3f3f3f3f;
const db eps=1e-9;
int n;
string s;
map<string,int>m;
int main()
{
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>s;
        sort(s.begin(),s.end());
        ans+=m[s];
    }
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   32 |         ans+=m[s];
      |         ^~~
      |         abs
a.cc:34:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   34 |     cout<<ans<<endl;
      |           ^~~
      |           abs
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
using ll = long long;
int main(){
　int n;
  cin>>n;
  ll ans=0;
  map<string,int> mp;
  rep(i,n){
   string s;
    cin>>s;
    sort(s.begin(),s.end());
    mp[s]++;
    ans += (mp[s]-1);
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc:6:1: error: extended character 　 is not valid in an identifier
    6 | 　int n;
      | ^
a.cc: In function 'int main()':
a.cc:6:1: error: '\U00003000int' was not declared in this scope
    6 | 　int n;
      | ^~~~~
a.cc:7:8: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |   cin>>n;
      |        ^
      |        yn
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
using ll = long long;
int main(){
　int n;
  cin>>n;
  ll ans=0;
  map<string,int> mp;
  rep(i,n){
   string s;
    cin>>s;
    sort(s.bigin(),s.end());
    mp[s]++;
    ans += (mp[s]-1);
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc:6:1: error: extended character 　 is not valid in an identifier
    6 | 　int n;
      | ^
a.cc: In function 'int main()':
a.cc:6:1: error: '\U00003000int' was not declared in this scope
    6 | 　int n;
      | ^~~~~
a.cc:7:8: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |   cin>>n;
      |        ^
      |        yn
a.cc:13:12: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'bigin'; did you mean 'begin'?
   13 |     sort(s.bigin(),s.end());
      |            ^~~~~
      |            begin
Language: C++

#include <algorithm>
#include <iostream>
#include <map>
#include <vector>

using ll = long long;
#define rep(inc, bgn, end) for (int inc = bgn; inc < end; ++inc)
#define repe(inc, bgn, end) for (int inc = bgn; inc <= end; ++inc)

using namespace std;

int main() {
    int n;
    cin >> n;
    // vector<string> strList(n, "");
    int base    = 97;  // (int)'a': 97
    int alpSize = 26;  // a--z: 26char
    // n*a--zが何回か
    vector<vector<int>> charCntList(n, vector<int>(alpSize, 0));
    rep(i, 0, n) {
        string impstr;
        cin >> impstr;
        for (char c : impstr) {
            charCntList[i][c - base]++;
        }
    }

    // int ans = 0;
    ll ans = 0 map<vector<int>, int> dic;
    for (vector<int> val : charCntList) {
        ans += dic[val];
        dic[val]++;
    }

    // std::cout << ans << endl;
    printf("%lld\n", ans);

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:16: error: expected ',' or ';' before 'map'
   29 |     ll ans = 0 map<vector<int>, int> dic;
      |                ^~~
a.cc:31:16: error: 'dic' was not declared in this scope; did you mean 'div'?
   31 |         ans += dic[val];
      |                ^~~
      |                div
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        sc.nextLine(); // 改行
        String[] strz = new String[N];
        for (int n = 0; n < N; n++){
            strz[n] = sc.nextLine();
        }

        for (int n = 0; n < N; n++){
            char[] charn = strz[n].toCharArray();
            Arrays.sort(charn);
            strz[n] = new String(charn);
        }

        Map<String, Integer> map = new HashMap<>();
        for (String s : strz) {
            Integer i = map.get(s);
            map.put(s, i == null ? 1 : i + 1);
        }
        long cnt = 0;
        for (String key : map.keySet()){
            long num = map.get(key);
            if (num > 1) {
                cnt+=conbi(num,2);
                // cnt+= (num*(num-1)/2);
            }
        }
        System.out.println(cnt);
        // System.out.println(f(10));
    }

    public static long f (long n){
        if (n=1){return 1;}
        return f(n-1)*n;
    }
    public static long conbi(long n,long r){
        if ((f(n-r) <= 0) || (f(r) == 0)){return 1;}
        return (f(n)/(f(n-r)*f(r)));
    }
}


Compiler output:
Main.java:37: error: incompatible types: long cannot be converted to boolean
        if (n=1){return 1;}
             ^
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
        long ans = 0;
		String [] in = new String [n];       
        for(int i=0;i<n;i++){in[i] = sc.next();
                            Arrays.sort(in[i]);
                            }
        Arrays.sort(in);                   
         int count = 0;
        for(int i=1;i<n;i++){if(in[i].equals(in[i-1])){count++;}
                                else{ans+=count;count=0;}
                            }
        ans+=count;                        
		System.out.println(ans);
}
}


Compiler output:
Main.java:9: error: no suitable method found for sort(String)
                            Arrays.sort(in[i]);
                                  ^
    method Arrays.sort(int[]) is not applicable
      (argument mismatch; String cannot be converted to int[])
    method Arrays.sort(long[]) is not applicable
      (argument mismatch; String cannot be converted to long[])
    method Arrays.sort(short[]) is not applicable
      (argument mismatch; String cannot be converted to short[])
    method Arrays.sort(char[]) is not applicable
      (argument mismatch; String cannot be converted to char[])
    method Arrays.sort(byte[]) is not applicable
      (argument mismatch; String cannot be converted to byte[])
    method Arrays.sort(float[]) is not applicable
      (argument mismatch; String cannot be converted to float[])
    method Arrays.sort(double[]) is not applicable
      (argument mismatch; String cannot be converted to double[])
    method Arrays.sort(Object[]) is not applicable
      (argument mismatch; String cannot be converted to Object[])
    method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
      (cannot infer type-variable(s) T#1
        (actual and formal argument lists differ in length))
    method Arrays.<T#2>sort(T#2[],int,int,Comparator<? super T#2>) is not applicable
      (cannot infer type-variable(s) T#2
        (actual and formal argument lists differ in length))
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>sort(T#1[],Comparator<? super T#1>)
    T#2 extends Object declared in method <T#2>sort(T#2[],int,int,Comparator<? super T#2>)
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
        long ans = 0;
		String in = new String [n];       
        for(int i=0;i<n;i++){in[i] = sc.next();
                            Arrays.sort(in[i]);
                            }
        Arrays.sort(in);                   
         int count = 0;
        for(int i=1;i<n;i++){if(in[i].equals(in[i-1])){count++;}
                                else{ans+=count;count=0;}
                            }
        ans+=count;                        
		System.out.println(ans);
}
}

Compiler output:
Main.java:7: error: incompatible types: String[] cannot be converted to String
		String in = new String [n];       
		            ^
Main.java:8: error: array required, but String found
        for(int i=0;i<n;i++){in[i] = sc.next();
                               ^
Main.java:9: error: array required, but String found
                            Arrays.sort(in[i]);
                                          ^
Main.java:11: error: no suitable method found for sort(String)
        Arrays.sort(in);                   
              ^
    method Arrays.sort(int[]) is not applicable
      (argument mismatch; String cannot be converted to int[])
    method Arrays.sort(long[]) is not applicable
      (argument mismatch; String cannot be converted to long[])
    method Arrays.sort(short[]) is not applicable
      (argument mismatch; String cannot be converted to short[])
    method Arrays.sort(char[]) is not applicable
      (argument mismatch; String cannot be converted to char[])
    method Arrays.sort(byte[]) is not applicable
      (argument mismatch; String cannot be converted to byte[])
    method Arrays.sort(float[]) is not applicable
      (argument mismatch; String cannot be converted to float[])
    method Arrays.sort(double[]) is not applicable
      (argument mismatch; String cannot be converted to double[])
    method Arrays.sort(Object[]) is not applicable
      (argument mismatch; String cannot be converted to Object[])
    method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
      (cannot infer type-variable(s) T#1
        (actual and formal argument lists differ in length))
    method Arrays.<T#2>sort(T#2[],int,int,Comparator<? super T#2>) is not applicable
      (cannot infer type-variable(s) T#2
        (actual and formal argument lists differ in length))
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>sort(T#1[],Comparator<? super T#1>)
    T#2 extends Object declared in method <T#2>sort(T#2[],int,int,Comparator<? super T#2>)
Main.java:13: error: array required, but String found
        for(int i=1;i<n;i++){if(in[i].equals(in[i-1])){count++;}
                                               ^
Main.java:13: error: array required, but String found
        for(int i=1;i<n;i++){if(in[i].equals(in[i-1])){count++;}
                                  ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
6 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
        long ans = 0;
		String in = new String [n];       
        for(int i=0;i<n;i++){in[i] = sc.next();
                            Arrays.sort(in[i]);
                            }
        Arrays.sort(in);                   
         int count = 0;
        for(int i=1;i<n;i++){if(in[i].equals(in[i-1]){count++;}
                                else{ans+=count;count=0;}
                            }
        ans+=count;                        
		System.out.println(ans);
}
}

Compiler output:
Main.java:13: error: ')' expected
        for(int i=1;i<n;i++){if(in[i].equals(in[i-1]){count++;}
                                                     ^
1 error