criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
import java.util.Vector;
import java.util.stream.Stream;
import java.util.stream.Collectors;
class Test {
  public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int n = sc.nextInt();
   String[] moji = new String[n];
   for(int i = 0; i < n; i++){
     moji[i] = sc.next();
   }
   int[][] koike = new int[n][26];
   for(int i = 0; i < n; i++){
     for(char c1 : moji[i].toCharArray()){
      koike[i][c1-97]++;
     }
   } 
   int a = 0;
  HashMap<int[],Set<Integer>> map = new HashMap<>(); 
  for(int i = 0; i < n; i++){
    if(map.containsKey(koike[i])){
      a += map.get(koike[i]).size();
      map.get(koike[i]).add(i);      
    }else{
      map.put(koike[i], new Stream.of(i).collect(Collectors.toSet()));
    }
    }
  
   System.out.println(a);
  }
}


Compiler output:
Main.java:30: error: cannot find symbol
      map.put(koike[i], new Stream.of(i).collect(Collectors.toSet()));
                                  ^
  symbol:   class of
  location: interface Stream
1 error
Language: Java

import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
import java.util.Vector;
class Main {
  public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
   int n = sc.nextInt();
   String[] moji = new String[n];
   for(int i = 0; i < n; i++){
     moji[i] = sc.next();
   }
   int[][] koike = new int[n][26];
   for(int i = 0; i < n; i++){
     for(char c1 : moji[i].toCharArray()){
      koike[i][c1-97]++;
     }
   } 
   int a = 0;
  HashMap<int[],Set<Integer>> map = new HashMap<>(); 
  for(int i = 0; i < n; i++){
    if(map.containsKey(koike[i])){
      a += map.get(koike[i]).size();
      map.get(koike[i]).add(i);      
    }else{
      map.put(koike[i], new Stream.of(i).collect(Collectors.toSet()));
    }
    }
  
   System.out.println(a);
  }
}

Compiler output:
Main.java:28: error: package Stream does not exist
      map.put(koike[i], new Stream.of(i).collect(Collectors.toSet()));
                                  ^
Main.java:28: error: cannot find symbol
      map.put(koike[i], new Stream.of(i).collect(Collectors.toSet()));
                                                 ^
  symbol:   variable Collectors
  location: class Main
2 errors
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<bits/stdc++.h>
#include<iomanip>
using namespace std;

typedef long long ll;

int MOD=1000000007;


int main(){
    ll N,ans=0,sum=0;
    cin >> N;
    map<string, ll> ans;
    vector<string> s(N);
    for(ll i=0; i<N; i++){
    cin >> s[i];
    sort(s[i].begin(), s[i].end());
    ans[s[i]]++;
    }
  for(auto e : ans) {
    ll tmp = e.second * (e.second - 1) / 2;
    sum += tmp;
  }
  cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: conflicting declaration 'std::map<std::__cxx11::basic_string<char>, long long int> ans'
   16 |     map<string, ll> ans;
      |                     ^~~
a.cc:14:10: note: previous declaration as 'll ans'
   14 |     ll N,ans=0,sum=0;
      |          ^~~
a.cc:21:8: error: no match for 'operator[]' (operand types are 'll' {aka 'long long int'} and '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'})
   21 |     ans[s[i]]++;
      |        ^
a.cc:23:16: error: 'begin' was not declared in this scope
   23 |   for(auto e : ans) {
      |                ^~~
a.cc:23:16: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
                 from a.cc:4:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/14/filesystem:53,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:23:16: error: 'end' was not declared in this scope
   23 |   for(auto e : ans) {
      |                ^~~
a.cc:23:16: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~
Language: Java

import java.util.Map;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		Map<String, Integer> S = new HashMap<>();
		int r = 0;
		for(int i = 0; i < N; i++) {
			char[] s = sc.next().toCharArray();
			Arrays.sort(s);
			String ss = String.valueOf(s);
			int cnt = 0;
			if(S.containsKey(ss)) {
				cnt = S.get(ss);
				r += cnt;
			}
			S.put(ss, ++cnt);
		}
		sc.close();
		System.out.println(r);
	}
}


Compiler output:
Main.java:8: error: cannot find symbol
		Map<String, Integer> S = new HashMap<>();
		                             ^
  symbol:   class HashMap
  location: class Main
Main.java:12: error: cannot find symbol
			Arrays.sort(s);
			^
  symbol:   variable Arrays
  location: class Main
2 errors
Language: C++

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

#define int long long int

int main()
{
   int n;
  cin>>n;
  multiset<char> set[n];
  for(int i=0;i<n;i++)
  {
    for(int j=0;j<10;j++)
    {
       char ch;
      cin>>ch;
       set[i].insert(ch);    
    }
  } 
  sort(set,set+n);
  int ans=0;int c=1;
  for(int i=0;i<n-1;i++)
  {
    if(set[i]==set[i+1])
    {  c++;
     }
    else
    {
       ans+=(c*(c-1))/2;c=1;  
    }
  }
  ans+=(c*(c-1))/2;  
  cout<<ans<<endl;
}

Compiler output:
a.cc:4:23: error: '::main' must return 'int'
    4 | #define int long long int
      |                       ^~~
a.cc:6:1: note: in expansion of macro 'int'
    6 | int main()
      | ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
string s[100005];
int n,ans,t=1;
int main(){
    cin>>n;
    for(i=0;i<=n-1;i++)
    {
        cin>>s[i];
        sort(s[i].begin(),s[i].end());
    }
    sort(s,s+n);
    for(i=0;i<=n-2;i++)
    {
        if(s[i]==s[i+1])t++;
        else ans+=t*(t-1)/2,t=1;
    }
    ans+=t*(t-1)/2;
    cout<<ans;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'i' was not declared in this scope
    7 |     for(i=0;i<=n-1;i++)
      |         ^
a.cc:13:9: error: 'i' was not declared in this scope
   13 |     for(i=0;i<=n-2;i++)
      |         ^
Language: C++

#include <iostream>
#include <iomanip>
#include <bits/stdc++.h>
#include <vector>
#include <iterator>
#include <string>
#define pan(i,n) for(int i=0;i<n;i++)
#define ll long long int
#define vi vector<int>
#define pb push_back
#define INF 1e9+7
#define PI 3.141592653
using namespace std;
 


int main() 
{ 
    int n;
    cin>>n;
    unordered_map<string,int> umap;
    ll ans=0;
    string s;
    pan(i,n){
        cin>>s;
        sort(s.begin(),s.end());
        umap[s]++;
    }
    for(auto x=umap.begin();x!=umap.end();x++){
        ll k=x->second;
        ll ans+=((k)*(k-1))/2;
    }
    cout<<ans;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:31:15: error: expected initializer before '+=' token
   31 |         ll ans+=((k)*(k-1))/2;
      |               ^~
Language: C++

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

int main(){
    int N;
    cin >> N;
    string s[N] = {};
    for (int i = 0;i < N;i++){
        cin >> s[i];
        sort(s[i].begin(),s[i].end());
    }
    sort(s,s + N);;
    long long count = 1;
    long long ans = 0;
    for (int i = 0;i < N - 1;i++) {
        if (s[i] != s[i + 1]) {
            ans += count * (count - 1) / 2;
            count = 1;
        }
        else count += 1;
    }
    if (count > 1) ans += count * (count - 1) / 2
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:50: error: expected ';' before 'cout'
   22 |     if (count > 1) ans += count * (count - 1) / 2
      |                                                  ^
      |                                                  ;
   23 |     cout << ans << endl;
      |     ~~~~
Language: C++

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

using namespace std;

int main() {
	cin.tie(0);
   	ios::sync_with_stdio(false);
	

	int N;
    cin >> N;
	map<string, bool> m;
  	int64_t ans = 0;	
  	for (int i = 0; i < N; i++)
	  {
		  string s;
		  cin >> s;
		  sort(s.begin, s.end);
		  if(m.count(s)==0)m[s]=1;
		  else ans++;
	  }
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:23: error: no matching function for call to 'sort(<unresolved overloaded function type>, <unresolved overloaded function type>)'
   19 |                   sort(s.begin, s.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:19:23: note:   couldn't deduce template parameter '_RAIter'
   19 |                   sort(s.begin, s.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
Language: C

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

int main(){
  int n;
  long ans=0;
  cin>>n;
  vector<string> s(n);
  REP(i,n){
    cin>>s.at(i);
    sort(s.at(i).begin(),s.at(i).end());
  }
  
  REP(i,n-1){
    for(int j=i+1;j<n;j++){
      if(s.at(i)==s.at(j))ans++;
    }
  }
  cout<<ans<<"\n";
  return 0;
}


Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long; 
using vpii = vector<pair<int, int>>;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define rep1(i, n) for (int i = 1; i < (int)n; i++)
ll mod = 1e9+7;
ll inf = 1e10;

ll gcd(ll a, ll b){
  return (b != 0) ? gcd(b, a%b) : a;
}

ll lcm(ll a, ll b){
  return (a/gcd(a,b))*b;
}

template<class T>
bool contain(const string& s, const T& v){
  return s.find(v) != std::string::npos;
}

bool f(string si, string sj){
  sort(si.begin(), si.end());
  sort(sj.begin(), sj.end());
  return si == sj;
}

int main(){
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<string> s(n);
  rep(i, n) cin >> s.at(i);
  ll ans = 0;
  for(int i = 0; i < n; ++i){
    for(int j = i+1; j < n; ++j)
      if(f(s[i], s[j])) ++ans;
  }
  cout << ans << "\n";
  return 0;

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

#include <bits/stdc++.h>
using namespace std;
int main()
{

    long long int num,val=0;
    map<string,int>mp;
    vector<int>vec;
    string word;
    cin>>num;
    for(int i=0;i<num;i++)
    {
           cin>>word;
           mp_1[word]++;
           sort(word.begin(),word.end());
           mp[word]++;
    }
    for(auto it:mp)
        vec.push_back(it.second);
    for(int y=0;y<vec.size();y++)
        val+=vec[y]*(vec[y]-1)*0.5;
    cout<<val<<endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: 'mp_1' was not declared in this scope; did you mean 'mp'?
   14 |            mp_1[word]++;
      |            ^~~~
      |            mp
Language: C++

#include<bits/stdc++.h>
using namespace std;
bool sorted(string s1,string s2)
{
  sort(s1.begin(),s1.end());
   sort(s2.begin(),s2.end());
   for (int i = 0; i < s1.length(); i++) 
        if (s1[i] != s2[i]) 
            return false; 
  
    return true;
}
int main()
{
int n,i=-1,c=0;
  cin>>n;
  string arr[n];
  while(n--)
  {
    string s;
    cin>>s;
    arr[++i]=s;
  }
  for(i=0;i<n;i++)
  {
    for(j=i+1;j<n;j++)
    {
      if(sorted(arr[i],arr[j]))
        c++;
    }
  }
  cout<<c;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:9: error: 'j' was not declared in this scope
   26 |     for(j=i+1;j<n;j++)
      |         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
bool sorted(strings s1,string s2)
{
  sort(s1.begin(),s1.end());
   sort(s2.begin(),s2.end());
   for (int i = 0; i < s1.length(); i++) 
        if (s1[i] != s2[i]) 
            return false; 
  
    return true;
}
int main()
{
int n,i=-1,c=0;
  cin>>n;
  string arr[n];
  while(n--)
  {
    string s;
    cin>>s;
    arr[++i]=s;
  }
  for(i=0;i<n;i++)
  {
    for(j=i+1;j<n;j++)
    {
      if(sorted(arr[i],arr[j]))
        c++;
    }
  }
  cout<<c;
}

Compiler output:
a.cc:3:13: error: 'strings' was not declared in this scope; did you mean 'stdin'?
    3 | bool sorted(strings s1,string s2)
      |             ^~~~~~~
      |             stdin
a.cc:3:31: error: expected primary-expression before 's2'
    3 | bool sorted(strings s1,string s2)
      |                               ^~
a.cc:3:33: error: expression list treated as compound expression in initializer [-fpermissive]
    3 | bool sorted(strings s1,string s2)
      |                                 ^
a.cc: In function 'int main()':
a.cc:26:9: error: 'j' was not declared in this scope
   26 |     for(j=i+1;j<n;j++)
      |         ^
a.cc:28:30: error: 'sorted' cannot be used as a function
   28 |       if(sorted(arr[i],arr[j]))
      |                              ^
Language: C++

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





vector<string>finall;

int n;
cin>>n;
for(int i=0;i<n;i++){
    string str;
    cin>>str;
    sort(str.begin(),str.end());
    finall.push_back(str);

}



long long int counter=1;
long long int res=0;
sort(finall.begin(),finall.end());
//for(auto x: finall)cout<<x<< " ";
string str2="";
for(int i=0;i<n;i++){

    if(str2==finall[i])counter++;
    else {
            res+=((counter*(counter-1))/2);
              counter=1 ;}

    str2=finall[i];

}
res+=((counter*(counter-1))/2);
cout<<res<<endl;






}


Compiler output:
a.cc:12:1: error: 'cin' does not name a type
   12 | cin>>n;
      | ^~~
a.cc:13:1: error: expected unqualified-id before 'for'
   13 | for(int i=0;i<n;i++){
      | ^~~
a.cc:13:13: error: 'i' does not name a type
   13 | for(int i=0;i<n;i++){
      |             ^
a.cc:13:17: error: 'i' does not name a type
   13 | for(int i=0;i<n;i++){
      |                 ^
a.cc:25:5: error: expected constructor, destructor, or type conversion before '(' token
   25 | sort(finall.begin(),finall.end());
      |     ^
a.cc:28:1: error: expected unqualified-id before 'for'
   28 | for(int i=0;i<n;i++){
      | ^~~
a.cc:28:13: error: 'i' does not name a type
   28 | for(int i=0;i<n;i++){
      |             ^
a.cc:28:17: error: 'i' does not name a type
   28 | for(int i=0;i<n;i++){
      |                 ^
a.cc:38:1: error: 'res' does not name a type
   38 | res+=((counter*(counter-1))/2);
      | ^~~
a.cc:39:1: error: 'cout' does not name a type
   39 | cout<<res<<endl;
      | ^~~~
a.cc:46:1: error: expected declaration before '}' token
   46 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i=0; i<(n); ++i)
#define chmin(x,y) x = min(x,y)
#define chmax(x,y) x = max(x,y)
using namespace std;
using Graph = vector<vector<int>>;
typedef long long ll;
typedef pair<int, int> P;
const int inf = 1 << 21;
const ll INF = 1LL << 60;
const ll mod = 1e9+7;
const int dx[4] = {-1, 0, 1, 0};
const int dy[4] = {0, -1, 0, 1};

// fac: 階乗, finv: 階乗の逆元, inv: 逆元
ll fac[MAX], finv[MAX], inv[MAX];

void cominit(){
    fac[0] = fac[1] = 1LL;
    finv[0] = finv[1] = 1LL;
    inv[1] = 1LL;

    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;
    }
}

ll com(ll n, ll k){
    if (n<k) return 0LL;
    if (n<0 or k<0) return 0LL;
    return fac[n] * (finv[k]*finv[n-k]%mod)%mod;
}

// abc137c
int main(){
    int n;
    cin >> n;
    map<string, ll> mp;
    rep(i, n){
        string s;
        cin >> s;
        sort(s.begin(), s.end());
        mp[s]++;
    }
    ll ans = 0LL;
    cominit();
    for(auto tmp: mp){
        ans += (ll)com(tmp.second, 2LL);
    }
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc:16:8: error: 'MAX' was not declared in this scope
   16 | ll fac[MAX], finv[MAX], inv[MAX];
      |        ^~~
a.cc:16:19: error: 'MAX' was not declared in this scope
   16 | ll fac[MAX], finv[MAX], inv[MAX];
      |                   ^~~
a.cc:16:29: error: 'MAX' was not declared in this scope
   16 | ll fac[MAX], finv[MAX], inv[MAX];
      |                             ^~~
a.cc: In function 'void cominit()':
a.cc:19:5: error: 'fac' was not declared in this scope
   19 |     fac[0] = fac[1] = 1LL;
      |     ^~~
a.cc:20:5: error: 'finv' was not declared in this scope
   20 |     finv[0] = finv[1] = 1LL;
      |     ^~~~
a.cc:21:5: error: 'inv' was not declared in this scope; did you mean 'int'?
   21 |     inv[1] = 1LL;
      |     ^~~
      |     int
a.cc:23:20: error: 'MAX' was not declared in this scope
   23 |     for(int i=2; i<MAX; i++){
      |                    ^~~
a.cc: In function 'll com(ll, ll)':
a.cc:33:12: error: 'fac' was not declared in this scope
   33 |     return fac[n] * (finv[k]*finv[n-k]%mod)%mod;
      |            ^~~
a.cc:33:22: error: 'finv' was not declared in this scope
   33 |     return fac[n] * (finv[k]*finv[n-k]%mod)%mod;
      |                      ^~~~
Language: Java

#include <bits/stdc++.h>
using namespace std;
using ll=long long int;

int main (){
    map <string, int> mp;
    ll n;
    cin >> n;
    while (n--){
        string s;
        cin >> s;
        sort (s.begin(), s.end());
        mp[s]++;
    }

    ll count = 0;
    for (auto i = mp.begin(); i != mp.end(); i++){
        ll k = i->second; 
        count += (k)*(k - 1) /2;
    }
    cout << count << endl;
    return 0;
}



Compiler output:
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
         ^
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
using ll=long long int;
^
  (use --enable-preview to enable unnamed classes)
Main.java:3: error: '.class' expected
using ll=long long int;
              ^
Main.java:8: error: not a statement
    cin >> n;
        ^
Main.java:11: error: not a statement
        cin >> s;
            ^
Main.java:21: error: not a statement
    cout << count << endl;
                  ^
7 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0; i<(n); ++i)
#define REP(i, d, n) for(int i=(d); i<(n); ++i)
#define all(v) v.begin(), v.end()
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];
    }

    vector<vector<int>> cnt(n, vector<int>(26));
    rep(i, n){
        rep(j, s[i].size()){
            cnt[i][s[i][j]-'a']++;
        }
    }
    map<vector<int>, int>> mp;
    rep(i, n){
        mp[cnt[i]]++;
    }

    int ans = 0;
    for(const auto& m : mp){
        if(m.second == 1) continue;
        ans += m.second * (m.second-1) / 2;
    }
    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:25: error: expected unqualified-id before '>' token
   24 |     map<vector<int>, int>> mp;
      |                         ^~
a.cc:26:9: error: 'mp' was not declared in this scope
   26 |         mp[cnt[i]]++;
      |         ^~
a.cc:30:25: error: 'mp' was not declared in this scope; did you mean 'm'?
   30 |     for(const auto& m : mp){
      |                         ^~
      |                         m
Language: C++

n = int(input())
table = {}
ans = 0

for i in range(n):
  s = sorted(input())
  s = ''.join(s)
  if not s in table:
    table[s] = 1
  else:
    ans += table[s]
    table[s] += 1
  
print(ans)


Compiler output:
a.cc:7:7: error: empty character constant
    7 |   s = ''.join(s)
      |       ^~
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
a.cc:3:1: error: 'ans' does not name a type
    3 | ans = 0
      | ^~~
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
using in = int64_t;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
const double PI=3.14159265358979323846;
const in MOD = 1000000007;
const in INF=1<<30;
#define vec2(a,y,x) vector<vector<int>> a(y,vector<int>(x,0))
#define vec1(a,n) vector<int> a(n);rep(i,n)cin>>a[i]
using P=pair<int,int>;
vector<int> dx={0,1,-1,0};
vector<int> dy={1,0,0,-1};

in COM(int x){
  in y =(in)(x);
  in ret =1ll;
  ret *=x;
  ret *=(x-1);
  ret /=2ll;
  return ret;
}

int main(){
  ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int n:
  cin>>n;
  vector<vector<char>> a(n,vector<char>(10));
  rep(i,n)rep(j,10) cin>>a[i][j];
  rep(i,n) sort(all(a[i]));
  sort(all(a));
  vector<int> c(0);
  int i=0;
  int cnt=0;
  while(i<a.size()-1){
     if(a[i]==a[i+1]){
     	cnt ++;
       a.erase(a.begin()+i);
     } 
    else if(cnt){
       c.push_back(cnt+1);
      cnt =0;
      i ++;
    }
    else {i++;}
  }
 n=c.size();
  in ans=0ll;
  rep(i,n) ans +=COM(c[i]);
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:6: error: found ':' in nested-name-specifier, expected '::'
   28 | int n:
      |      ^
      |      ::
a.cc:28:5: error: 'n' has not been declared
   28 | int n:
      |     ^
a.cc:29:6: error: qualified-id in declaration before '>>' token
   29 |   cin>>n;
      |      ^~
a.cc:30:26: error: 'n' was not declared in this scope
   30 |   vector<vector<char>> a(n,vector<char>(10));
      |                          ^
Language: C++

m = {}
ans = 0
n = int(input())
def C(x:int) -> 'conbination_nC2':
	return x*(x-1)/2

for i in range(n):
	s = input()
	new_str = ''.join(sorted(s))
	if new_str in m.keys() :
		m[new_str] += 1
	else :
		m[new_str] = int(1)
	

for i in m:
	ans += C(m[i])

print(int(ans))



Compiler output:
a.cc:4:17: warning: multi-character literal with 15 characters exceeds 'int' size of 4 bytes
    4 | def C(x:int) -> 'conbination_nC2':
      |                 ^~~~~~~~~~~~~~~~~
a.cc:9:19: error: empty character constant
    9 |         new_str = ''.join(sorted(s))
      |                   ^~
a.cc:1:1: error: 'm' does not name a type
    1 | m = {}
      | ^
a.cc:2:1: error: 'ans' does not name a type
    2 | ans = 0
      | ^~~
Language: C++

#include<iostream>
#incluse<string>
#include<algorithm>
using namespace std;
int main(){
  int n;
  cin>>n;
  vector<strign> s(n);
  for(int i=0;i<n;++i){
    cin>>s.at(i);
    sort(s.at(i));
  
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #incluse; did you mean #include?
    2 | #incluse<string>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:8:3: error: 'vector' was not declared in this scope
    8 |   vector<strign> s(n);
      |   ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    3 | #include<algorithm>
  +++ |+#include <vector>
    4 | using namespace std;
a.cc:8:10: error: 'strign' was not declared in this scope; did you mean 'stdin'?
    8 |   vector<strign> s(n);
      |          ^~~~~~
      |          stdin
a.cc:8:18: error: 's' was not declared in this scope
    8 |   vector<strign> s(n);
      |                  ^
a.cc:13:2: error: expected '}' at end of input
   13 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include <map>
#include <iostream>

using namespace std;

int main() {
    int n;
    cin >> n;

    int ans = 0;
    map<string, int> mp;
    string str;
    for(int i = 0; i < n; i++) {
        cin >> str;
        sort(str.begin(), str.end());
        if(mp[str]) ans += mp[str];
        mp[str]++;
    }

    printf("%d\n", ans);

    return 0;
}

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

#include <iostream>
#include <vector>
#include <unordered_map>

using namespace std;
#define rep(i, n) for(int i = 0; i < (n); ++i)
typedef long long ll;

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

  return 0;
}


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

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

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

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: expected initializer before '-' token
   18 |         int s - p.second;
      |               ^
a.cc:19:20: error: 's' was not declared in this scope
   19 |         ans += (ll)s*(s-1)/2;
      |                    ^
Language: C++

#include "pch.h"
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <unordered_map>
#include <math.h>
#define INF 1000000000
typedef long long int ll;
using namespace std;

int main() {

    ll n,ans = 0; cin >> n;
	unordered_map<string, ll> data = {};
	for (int i = 0; i < n; i++) {
		string s; cin >> s;
		sort(s.begin(), s.end());
		if (data[s] != 0) { ans += data[s]; }
		data[s]++;
	}
	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N =1e7+100;
const int mod =1e7+3;
char s[100];
int cnt[N];
long long ans;

ll qsm(ll i, ll j) {//快速幂
	ll an = 1;
	while (j) {
		if (j & 1) an = an * i%mod;
		i = i * i%mod;
		j >>= 1;
	}
	return an%mod;
}

void Hash()
{
    int c=1,h =0,p =67;
    while(s[c]!='\0')
    {
        h = ((s[c]-61) * qsm(p,c))%mod;
        c++;
    }
    cnt[h%mod]++;
}
void init()
{
    ans =0;
    memset(cnt,0,sizeof(cnt));
}
int main()
{
    int n;
    while(~scanf("%d",&n))
    {
        init();
        for(int i=0; i<n; i++)
        {
            scanf("%s",s+1);
            sort(s+1,sizeof(s));
            Hash();
        }
        for(int i=0;i<mod;i++)
        {
            ans +=(long long)cnt[i]*(cnt[i]-1)/2;
        }
        printf("%lld\n",ans);
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:17: error: no matching function for call to 'sort(char*, long unsigned int)'
   44 |             sort(s+1,sizeof(s));
      |             ~~~~^~~~~~~~~~~~~~~
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:44:17: note:   deduced conflicting types for parameter '_RAIter' ('char*' and 'long unsigned int')
   44 |             sort(s+1,sizeof(s));
      |             ~~~~^~~~~~~~~~~~~~~
/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
Language: C++

int main(){
    int n;
    cin>>n;
    vector<string> k;
    for(int i=0;i<n;i++){
        string x;
        cin>>x;
        sort(x.begin(),x.end());
        k.push_back(x);
    }
    sort(k.begin(),k.end());
   map<string,long long>freq;
   for(string const &i: k){
       freq[i]++;
   }
  vector<long long>d;

   for(auto y : freq){
       d.push_back(y.second);
   }
  long long sum=0;
  for(int s=0;s<d.size();s++){
      sum=sum+((d[s])*(d[s]-1))/2;
  }
   
  cout<<sum;
}
    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin>>n;
      |     ^~~
a.cc:4:5: error: 'vector' was not declared in this scope
    4 |     vector<string> k;
      |     ^~~~~~
a.cc:4:12: error: 'string' was not declared in this scope
    4 |     vector<string> k;
      |            ^~~~~~
a.cc:4:20: error: 'k' was not declared in this scope
    4 |     vector<string> k;
      |                    ^
a.cc:6:15: error: expected ';' before 'x'
    6 |         string x;
      |               ^~
      |               ;
a.cc:7:14: error: 'x' was not declared in this scope
    7 |         cin>>x;
      |              ^
a.cc:8:9: error: 'sort' was not declared in this scope; did you mean 'short'?
    8 |         sort(x.begin(),x.end());
      |         ^~~~
      |         short
a.cc:11:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |     sort(k.begin(),k.end());
      |     ^~~~
      |     short
a.cc:12:4: error: 'map' was not declared in this scope
   12 |    map<string,long long>freq;
      |    ^~~
a.cc:12:15: error: expected primary-expression before 'long'
   12 |    map<string,long long>freq;
      |               ^~~~
a.cc:13:14: error: expected ';' before 'const'
   13 |    for(string const &i: k){
      |              ^~~~~~
      |              ;
a.cc:16:10: error: expected primary-expression before 'long'
   16 |   vector<long long>d;
      |          ^~~~
a.cc:16:10: error: expected ';' before 'long'
   16 |   vector<long long>d;
      |          ^~~~
      |          ;
a.cc:16:10: error: expected primary-expression before 'long'
   16 |   vector<long long>d;
      |          ^~~~
a.cc:16:10: error: expected ')' before 'long'
   16 |   vector<long long>d;
      |          ^~~~
      |          )
a.cc:13:7: note: to match this '('
   13 |    for(string const &i: k){
      |       ^
a.cc:16:19: error: expected unqualified-id before '>' token
   16 |   vector<long long>d;
      |                   ^
a.cc:18:17: error: 'freq' was not declared in this scope
   18 |    for(auto y : freq){
      |                 ^~~~
a.cc:19:8: error: 'd' was not declared in this scope
   19 |        d.push_back(y.second);
      |        ^
a.cc:22:17: error: 'd' was not declared in this scope
   22 |   for(int s=0;s<d.size();s++){
      |                 ^
a.cc:26:3: error: 'cout' was not declared in this scope
   26 |   cout<<sum;
      |   ^~~~
Language: C++

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

int main(){
  int N;
  cin >> N;
  string tmp;
  vector<string> vec(N);
  for(int i=0; i < N;i++){
    cin >> tmp;
    sort(tmp.begin(), tmp.end());
    vec.at(i) = tmp;
    //cout << vec.at(i) << endl;
  }
  sort(vec.begin(), vec.end());
  vec.push_back("-1");

  
  string str_tmp = vec.at(0);
  long long int ans = 0;
  int cnt = 1;
  long long int ans_tmp;
  for(int i = 1; i <= N; i++){
    if(str_tmp == vec.at(i)){
      cnt += 1;
    } else {
      str_tmp = vec.at(i);
      ans_tmp = cnt * (cnt -1);
      ans += ans_tmp:
      cnt = 1;

    }
  }
  cout << ans/2<< endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:21: error: found ':' in nested-name-specifier, expected '::'
   29 |       ans += ans_tmp:
      |                     ^
      |                     ::
a.cc:29:14: error: 'ans_tmp' is not a class, namespace, or enumeration
   29 |       ans += ans_tmp:
      |              ^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
int main(){
int n;
cin >> n;
vector<string> s(n);
string f;
for(int i = 0; i < n; i++){
cin >> f;
sort(f.begin(),f.end());
s[i] = f;
}
int cnt = 0;
for(int i = 0; i < n; i++){
    for(int j = i + 1; j < n; j++){
        if(s[i] == s[j])
        cnt++;
    }
}
cout << cnt << endl;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

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

int main() {
  int n;cin >> n;
  vector<string> vs(n);
  for(int i=0;i<n;i++) cin >> vs[i];
  map<string,int> mp;
  for(int i=0;i<n;i++) {
    sort(s[i].begin(), s[i].end());
    mp[s[i]]++;
  }
  long long ans = 0;
  for(auto i : mp) ans += (i.second * (i.second-1)) / 2;
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: 's' was not declared in this scope
   10 |     sort(s[i].begin(), s[i].end());
      |          ^
Language: C++

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

int main() {
  int n;cin >> n;
  vector<string> vs(n);
  for(int i=0;i<n;i++) cin >> vs[i];
  map<string,int) mp;
  for(int i=0;i<n;i++) {
    sort(s[i].begin(), s[i].end());
    mp[s[i]]++;
  }
  long long ans = 0;
  for(auto i : mp) ans += (i.second * (i.second-1)) / 2;
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: template argument 2 is invalid
    8 |   map<string,int) mp;
      |              ^~~
a.cc:8:14: error: template argument 4 is invalid
a.cc:8:17: error: expected unqualified-id before ')' token
    8 |   map<string,int) mp;
      |                 ^
a.cc:10:10: error: 's' was not declared in this scope
   10 |     sort(s[i].begin(), s[i].end());
      |          ^
a.cc:11:5: error: 'mp' was not declared in this scope
   11 |     mp[s[i]]++;
      |     ^~
a.cc:14:16: error: 'mp' was not declared in this scope
   14 |   for(auto i : mp) ans += (i.second * (i.second-1)) / 2;
      |                ^~
Language: C++

#include<iostream>
#include<map>
using namespace std;

int main() {
  int n;cin >> n;
  vector<string> vs(n);
  for(int i=0;i<n;i++) cin >> vs[i];
  map<string,int) mp;
  for(int i=0;i<n;i++) {
    sort(s[i].begin(), s[i].end());
    mp[s[i]]++;
  }
  long long ans = 0;
  for(auto i : mp) ans += (i.second * (i.second-1)) / 2;
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<string> vs(n);
      |   ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include<map>
  +++ |+#include <vector>
    3 | using namespace std;
a.cc:7:16: error: expected primary-expression before '>' token
    7 |   vector<string> vs(n);
      |                ^
a.cc:7:18: error: 'vs' was not declared in this scope
    7 |   vector<string> vs(n);
      |                  ^~
a.cc:9:14: error: template argument 2 is invalid
    9 |   map<string,int) mp;
      |              ^~~
a.cc:9:14: error: template argument 4 is invalid
a.cc:9:17: error: expected unqualified-id before ')' token
    9 |   map<string,int) mp;
      |                 ^
a.cc:11:10: error: 's' was not declared in this scope
   11 |     sort(s[i].begin(), s[i].end());
      |          ^
a.cc:11:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |     sort(s[i].begin(), s[i].end());
      |     ^~~~
      |     short
a.cc:12:5: error: 'mp' was not declared in this scope
   12 |     mp[s[i]]++;
      |     ^~
a.cc:15:16: error: 'mp' was not declared in this scope
   15 |   for(auto i : mp) ans += (i.second * (i.second-1)) / 2;
      |                ^~
Language: Java

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

Compiler output:
Main.java:13: error: method toString in class Object cannot be applied to given types;
     fa[i] = new String(toString(c[i])); 
                        ^
  required: no arguments
  found:    char[]
  reason: actual and formal argument lists differ in length
1 error
Language: C++

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

int main(){
  
  int n;
  cin >> n;
  vector<string> s(n);
  for(int i=0; i<n; i++){
    cin>> s[i];
    sort(s[i].begin(),s[i].end());
  }
  sort(s.begin(),s.end());
  
  long count=0;
  long sum=0;
  for(int i=0; i<n-1; i++){
    	if(s[i]==s[i+1]) count++;
    else {sum+=count*(count-1)/2; count=0;}
    }
  }
  cout << sum << endl;
}

Compiler output:
a.cc:22:3: error: 'cout' does not name a type
   22 |   cout << sum << endl;
      |   ^~~~
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: Java

import java.io.*;
import java.util.*;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.next());
    String[] s = new String[N];
    Map<String, Long> map = new HashMap<>();
    
    char[] chars = new char[10];
    StringBuilder sb;
    long sum = 0;
    for (int i = 0; i < N; i++) {
      sc.next().getChars(0, 10, chars, 0);
      Arrays.sort(chars);
      sb = new StringBuilder();
      for (int j = 0; j < 10; j++) {
        sb.append(chars[j]);
      }
      s[i] = sb.toString();
      Long val = map.get(sb.toString());
      
      if (val == null) {
        val = 1;
        map.put(sb.toString(), val);
      } else {
        sum += val;
        val += val;
        map.put(sb.toString(), val);
      }
    }
    
    System.out.println(sum);
  }
}

Compiler output:
Main.java:25: error: incompatible types: int cannot be converted to Long
        val = 1;
              ^
1 error
Language: C++

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

int main(){
  int N;
  cin >> N;
  vector<string> S(N);
  for (int i = 0; i < N; i++){
    cin >> S.at(i);
    sort(S.at(i).begin(),S.at(i).end);
  }
  int64_t sum = 0;
  for (int i = 0; i < N; i++){
    for (int j = i + 1; j < N; j++){
      if (S.at(i) == S.at(j)) sum++;
    }
  }
  cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: no matching function for call to 'sort(std::__cxx11::basic_string<char>::iterator, <unresolved overloaded function type>)'
   10 |     sort(S.at(i).begin(),S.at(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: 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<char*, __cxx11::basic_string<char> >]'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:63: note:   no known conversion for argument 2 from '<unresolved overloaded function type>' to '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |                                         ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/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
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void){
    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 s = p.second;
        ans += (long long)s*(s-1)/2
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: expected initializer before 'for'
    7 |     for(int i = 0; i < n; i++){
      |     ^~~
a.cc:7:20: error: 'i' was not declared in this scope
    7 |     for(int i = 0; i < n; i++){
      |                    ^
a.cc:14:19: error: 'mp' was not declared in this scope; did you mean 'p'?
   14 |     for(auto& p : mp){
      |                   ^~
      |                   p
a.cc:16:36: error: expected ';' before '}' token
   16 |         ans += (long long)s*(s-1)/2
      |                                    ^
      |                                    ;
   17 |     }
      |     ~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'all' was not declared in this scope; did you mean 'std::filesystem::perms::all'?
   10 |         sort(all(s));
      |              ^~~
      |              std::filesystem::perms::all
In file included from /usr/include/c++/14/filesystem:51,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200,
                 from a.cc:1:
/usr/include/c++/14/bits/fs_fwd.h:158:7: note: 'std::filesystem::perms::all' declared here
  158 |       all               =  0777,
      |       ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rep2(i,n) for(int i=0;i<=n;i++)
#define repr(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define double long double
#define INF 1e10
#define MOD 1e9+7
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
using Graph = vector<vector<int>>;
signed main(){
  int a;
  cin>>a;
  vector<vector<char>> b(a, vector<char>(10));
  rep(i,a)rep(j,10)
    cin>>b[i][j];
  rep(i,a)
    sort(all(b[i]);
         int c=0;
  rep(i,a)rep(j,a){
    if(i<j){
         if(b[i]==b[j])
           c++;
           }
           }
         cout<<c<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:19: error: expected ')' before ';' token
   23 |     sort(all(b[i]);
      |         ~         ^
Language: C++

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

using namespace std;

typedef long long ll;

int main()
{
    ll N;
    cin >> N;
    vector<string> s(N);
    for (ll i = 0; i < N; i++) {
        cin >> s[i];
        sort(s[i].begin(), s[i].end());
    }

    map<string, ll> map;
    for (ll i = 0; ll < N; i++) {
        map[s[i]]++;
    }

    ll count = 0;
    for (auto i:map) {
        count += i.second * (i.second-1) / 2;
    }

    cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:20: error: 'll' {aka 'long long int'} is not a template
   22 |     for (ll i = 0; ll < N; i++) {
      |                    ^~
a.cc:22:26: error: expected primary-expression before ';' token
   22 |     for (ll i = 0; ll < N; i++) {
      |                          ^