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

#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(),a.end()
#define rrng(a) a.rbegin(),a.rend()
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define limit(x,l,r) max(l,min(x,r))
#define lims(x,l,r) (x = max(l,min(x,r)))
#define isin(x,l,r) ((l) <= (x) && (x) < (r))
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define uni(x) x.erase(unique(rng(x)),x.end())
#define snuke srand((unsigned)clock()+(unsigned)time(NULL));
#define show(x) cout<<#x<<" = "<<x<<endl;
#define PQ(T) priority_queue<T,v(T),greater<T> >
#define bn(x) ((1<<x)-1)
#define dup(x,y) (((x)+(y)-1)/(y))
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef tuple<int,int,int> T;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
typedef vector<T> vt;
//inline int in() { int x; scanf("%d",&x); return x;}
inline ll in() { ll x; cin >> x; return x; }
template<typename T>inline istream& operator>>(istream&i,v(T)&v)
{rep(j,sz(v))i>>v[j];return i;}
template<typename T>string join(const v(T)&v)
{stringstream s;rep(i,sz(v))s<<' '<<v[i];return s.str().substr(1);}
template<typename T>inline ostream& operator<<(ostream&o,const v(T)&v)
{if(sz(v))o<<join(v);return o;}
template<typename T1,typename T2>inline istream& operator>>(istream&i,pair<T1,T2>&v)
{return i>>v.fi>>v.se;}
template<typename T1,typename T2>inline ostream& operator<<(ostream&o,const pair<T1,T2>&v)
{return o<<v.fi<<","<<v.se;}
template<typename T>inline ll suma(const v(T)& a) { ll res(0); for (auto&& x : a) res += x; return res;}
const double eps = 1e-10;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
#define dame { puts("-1"); return 0;}
#define yn {puts("YES");}else{puts("NO");}
const int MX = 200005;

int main() {
  int n = in();
  map<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 << and << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:72:15: error: expected identifier before '<<' token
   72 |   cout << and << endl;
      |               ^~
Language: C++

n = int(input())
ln = []
cnt = 1
ans = 0

for i in range(n):
    ln.append(''.join(sorted(input())))

ln.sort()

for i in range(len(ln)-1):
    if ln[i] == ln[i+1]:
        cnt += 1
    else:
        ans += cnt*(cnt - 1)/2
        cnt = 1

ans += cnt*(cnt - 1)/2

print(int(ans))


Compiler output:
a.cc:7:15: error: empty character constant
    7 |     ln.append(''.join(sorted(input())))
      |               ^~
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(),a.end()
#define rrng(a) a.rbegin(),a.rend()
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define limit(x,l,r) max(l,min(x,r))
#define lims(x,l,r) (x = max(l,min(x,r)))
#define isin(x,l,r) ((l) <= (x) && (x) < (r))
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define uni(x) x.erase(unique(rng(x)),x.end())
#define snuke srand((unsigned)clock()+(unsigned)time(NULL));
#define show(x) cout<<#x<<" = "<<x<<endl;
#define PQ(T) priority_queue<T,v(T),greater<T> >
#define bn(x) ((1<<x)-1)
#define dup(x,y) (((x)+(y)-1)/(y))
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef tuple<int,int,int> T;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
typedef vector<T> vt;
//inline int in() { int x; scanf("%d",&x); return x;}
inline ll in() { ll x; cin >> x; return x; }
template<typename T>inline istream& operator>>(istream&i,v(T)&v)
{rep(j,sz(v))i>>v[j];return i;}
template<typename T>string join(const v(T)&v)
{stringstream s;rep(i,sz(v))s<<' '<<v[i];return s.str().substr(1);}
template<typename T>inline ostream& operator<<(ostream&o,const v(T)&v)
{if(sz(v))o<<join(v);return o;}
template<typename T1,typename T2>inline istream& operator>>(istream&i,pair<T1,T2>&v)
{return i>>v.fi>>v.se;}
template<typename T1,typename T2>inline ostream& operator<<(ostream&o,const pair<T1,T2>&v)
{return o<<v.fi<<","<<v.se;}
template<typename T>inline ll suma(const v(T)& a) { ll res(0); for (auto&& x : a) res += x; return res;}
const double eps = 1e-10;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
#define dame { puts("-1"); return 0;}
#define yn {puts("YES");}else{puts("NO");}
const int MX = 200005;

int main() {
  int n = in();
  map<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 << and << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:69:11: error: expected initializer before 'p'
   69 |     int s p.second;
      |           ^
a.cc:70:16: error: 's' was not declared in this scope
   70 |     ans += (ll)s*(s-1)/2;
      |                ^
a.cc:72:15: error: expected identifier before '<<' token
   72 |   cout << and << endl;
      |               ^~
Language: Java

import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;
		public class Main {
			public static void main(String[] args) {
				Scanner s=new Scanner(System.in);
				int n=s.nextInt();

				HashMap<String,Integer>m=new HashMap<>();

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


Compiler output:
Main.java:19: error: class, interface, enum, or record expected
}
^
1 error
Language: Java

import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;
public class Mian {
	public static void main(String[] args) {
				Scanner s=new Scanner(System.in);
				int n=s.nextInt();

				HashMap<String,Integer>m=new HashMap<>();

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

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

#include<iostream>
#include<algorithm>
#include<map>
using namespace std;
int main() {
  long long n,ans=0;
  cin >> n;
  map<string int> m;
  string s;
  for(int i=0; i<n; i++) {
    cin >> s;
    sort(s.begin(),s.end());
    ans+=m[s];
    m[s]++;
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: two or more data types in declaration of 'type name'
    8 |   map<string int> m;
      |       ^~~~~~
a.cc:8:17: error: wrong number of template arguments (1, should be at least 2)
    8 |   map<string int> m;
      |                 ^
In file included from /usr/include/c++/14/map:63,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:13:11: error: no match for 'operator[]' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   13 |     ans+=m[s];
      |           ^
a.cc:14:6: error: no match for 'operator[]' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   14 |     m[s]++;
      |      ^
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int main() {
  long long n,ans=0;
  cin >> n;
  map<string int> m;
  string s;
  for(int i=0; i<n; i++) {
    cin >> s;
    sort(s.begin(),s.end());
    ans+=m[s];
    m[s]++;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'map' was not declared in this scope
    8 |   map<string int> m;
      |   ^~~
a.cc:4:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    3 | #include<cmath>
  +++ |+#include <map>
    4 | using namespace std;
a.cc:8:14: error: expected primary-expression before 'int'
    8 |   map<string int> m;
      |              ^~~
a.cc:13:10: error: 'm' was not declared in this scope
   13 |     ans+=m[s];
      |          ^
Language: C++

#include <bits/stdc++.h>

#define mod 1000000007

using namespace std;
typedef long long ll; 
 
int main(void){
	
	int N;
	ll ans = 0;
	
	cin >> N;
	
	map<string, int> mp;
	
	for(int i=0; i<N; i++){
		string s;
		cin >> s;
		sort(s.begin(), s.end());
		mp[s]++;
	}
	
	for(auto p:mp)
		ans += p.second(ll)(p.second - 1) / 2;
	
	cout << ans;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:35: error: expected primary-expression before ')' token
   25 |                 ans += p.second(ll)(p.second - 1) / 2;
      |                                   ^
a.cc:25:35: error: expression cannot be used as a function
Language: C++

#include<bits/stdc++>
typedef long long l1;
using namespace std;
int main()
{
	ll n,c=0;
	// c is count of pairs before taking new input
	// map second value is occurence of that string previously
	cin>>n;
	unordered_map<string,int> m;
	string s;
	for(int i=0;i<n;i++)
	{
		cin>>s;
		sort(s.begin(),s.end());
		c+=m[s]; // 2 strings=1 pair
		m[s]++;
		
		
	}
	cout<<c;
	
	
}

Compiler output:
a.cc:1:9: fatal error: bits/stdc++: No such file or directory
    1 | #include<bits/stdc++>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;
import java.util.Map.Entry;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner scan = new Scanner(System.in);
        Integer N = scan.nextInt();
        long count = 0;
        HashMap<String, Long> map = new HashMap<String, Long>(); 
        for(int i = 0; i < N; i++) {
            String s = scan.next();
            char[] sArray = s.toCharArray();
            Arrays.sort(sArray);
            String sorted = new String(sArray);
            if(map.containsKey(sorted))
                map.put(sorted, map.get(sorted) + 1);
            else
                map.put(sorted, 1);
        }
        for(Entry<String, Long> entry : map.entrySet()) {
            long value = entry.getValue();
            count += value * (value - 1) / 2;
        }
        System.out.println(count);
        
    }
}


Compiler output:
Main.java:19: error: incompatible types: int cannot be converted to Long
                map.put(sorted, 1);
                                ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: C++

#include <iostream>
#include <vector>
#include <algorithm> // sort
#include <map> // pair
#include <numeric> // accumulate(begin,end,初期値)
#include <string>

typedef long long ll;
using namespace std;

#define FALSE printf("false\n");
#define TRUE printf("true\n");
#define all(x) (x).begin(),(x).end()
#define print(x) cout<<x<<endl
#define rep(i,n) for(ll i = 0;i < n;++i)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define SUM(vec) accumulate(all(vec),0)

const ll INF = 1e9+7;

// 各桁の和
template<typename T>T digit(T num){T sum = 0;while(num){sum+=num%10;num/=10;}return sum;}
template<typename T>T gcd(T a,T b){if(b == 0)return a;return gcd(b,a%b);}
template<typename T>T lcm(T a, T b){T g = gcd(a,b);return a/g*b;}
template<typename T>T power(T a,T b){T tmp=1;rep(i,b){tmp*=a;}return tmp;}
ll bikkuri(ll n){
  if(n == 2)return 1;
  ll tmp = 3;
  for(ll i = 4;i <= n;++i){
  	tmp *= i;
  }
  return tmp;
}
int main(){
  int n;cin>>n;
  vector<string> s(n);
  map<string,ll> m;
  rep(i,n){
    cin>>s[i];
    sort(all(s[i]));
  }
  sort(all(s));
  for(auto S:s){
    m[S]++;
  }
  for(auto x:m){
    ll tmp = x.se;
    ans+=tmp*(tmp-1)/2;
  }
  print(ans);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:51:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   51 |     ans+=tmp*(tmp-1)/2;
      |     ^~~
      |     abs
a.cc:53:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   53 |   print(ans);
      |         ^~~
a.cc:14:24: note: in definition of macro 'print'
   14 | #define print(x) cout<<x<<endl
      |                        ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm> // sort
#include <map> // pair
#include <numeric> // accumulate(begin,end,初期値)
#include <string>

typedef long long ll;
using namespace std;

#define FALSE printf("false\n");
#define TRUE printf("true\n");
#define all(x) (x).begin(),(x).end()
#define print(x) cout<<x<<endl
#define rep(i,n) for(ll i = 0;i < n;++i)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define SUM(vec) accumulate(all(vec),0)

const ll INF = 1e9+7;

// 各桁の和
template<typename T>T digit(T num){T sum = 0;while(num){sum+=num%10;num/=10;}return sum;}
template<typename T>T gcd(T a,T b){if(b == 0)return a;return gcd(b,a%b);}
template<typename T>T lcm(T a, T b){T g = gcd(a,b);return a/g*b;}
template<typename T>T power(T a,T b){T tmp=1;rep(i,b){tmp*=a;}return tmp;}
ll bikkuri(ll n){
  if(n == 2)return 1;
  ll tmp = 3;
  for(ll i = 4;i <= n;++i){
  	tmp *= i;
  }
  return tmp;
}
int main(){
  int n;cin>>n;
  vector<string> s(n);
  map<string,ll> m;
  rep(i,n){
    cin>>s[i];
    sort(all(s[i]));
  }
  sort(all(s));
  for(auto S:s){
    m[S]++;
  }
  for(auto x:m){
    ll tmp = x.se;
    ans += bikkuri(tmp);
  }
  print(ans);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:51:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   51 |     ans += bikkuri(tmp);
      |     ^~~
      |     abs
a.cc:53:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   53 |   print(ans);
      |         ^~~
a.cc:14:24: note: in definition of macro 'print'
   14 | #define print(x) cout<<x<<endl
      |                        ^
Language: Java

import java.util.Arrays;
import java.util.Scanner;

public class Mian {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String renketu = "";
		String s[] = new String[n];
		String t[] = new String[n];
		char tani[];

		for (int i = 0; i < n; i++) {
			tani = sc.next().toCharArray();
			Arrays.sort(tani);
			 t[i]=String.valueOf(tani);
		}
		Arrays.sort(t);
		int cnt = 0, sum = 0;
		for (int i = 0; i < n - 1; i++) {
			if (t[i].equals(t[i + 1])) {
				cnt++;
			} else {
				sum += (cnt) * (cnt + 1) / 2;
				cnt = 0;
			}
		}
		sum += (cnt) * (cnt + 1) / 2;
		System.out.println(sum);
    }
}


Compiler output:
Main.java:4: error: class Mian is public, should be declared in a file named Mian.java
public class Mian {
       ^
1 error
Language: Java

import java.util.Arrays;
import java.util.Scanner;

public class Mian {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String renketu = "";
		String s[] = new String[n];
		String t[] = new String[n];
		char tani[];

		for (int i = 0; i < n; i++) {
			tani = sc.next().toCharArray();
			Arrays.sort(tani);
			 t[i]=String.valueOf(tani);
		}
		for(String a:t) {
		System.out.println(a);
		}
		Arrays.sort(t);
		int cnt = 0, sum = 0;
		for (int i = 0; i < n - 1; i++) {
			if (t[i].equals(t[i + 1])) {
				cnt++;
			} else {
				sum += (cnt) * (cnt + 1) / 2;
				cnt = 0;
			}
		}
		sum += (cnt) * (cnt + 1) / 2;
		System.out.println(sum);
    }
}

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

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

int main(){
  int n;
  cin >> n;
  vector<string> s(n);
  int count = 0;
  std::unordered_map<std::string, int> hash;
  for(int i = 0; i < n; i++){
    cin >> s[i];
    sort(s[i].begin(), s[i].end());
    if(hash[s[i]] > 0) hash(s[i])++;
    else hash[s[i]] = 1;
  }
  cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:28: error: no match for call to '(std::unordered_map<std::__cxx11::basic_string<char>, int>) (__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&)'
   13 |     if(hash[s[i]] > 0) hash(s[i])++;
      |                        ~~~~^~~~~~
Language: C++

#include<stdio.h>
#include<iostream>
#include<string>
#include<vector>
#include<stdlib.h>
#include<set>
#include<math.h>
#include<iomanip>
#include<unordered_map>
#include<algorithm>

using namespace std;


int main(void)
{
    int n;
    cin>>n;
    string s;
    unordered_map<string,long int> mp;
    long int an=0;
    
    for(int i=0;i<n;i++){
        cin>>s;
        sort(s.begin(),s.end());
        
        unordered_map<string,long int>::const_iterator itr=mp.find(s);
        
        if(itr!=mp.end()){
            ans+=mp[s];
            mp[s]++;
        }
        else{
            mp[s]=1;
        }
    }
    
    
    
   
    
    cout<<an<<endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:13: error: 'ans' was not declared in this scope; did you mean 'an'?
   30 |             ans+=mp[s];
      |             ^~~
      |             an
Language: C++

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

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

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

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:49: error: expected ';' before '}' token
   29 |         ans += (itr->second * itr->second+1) / 2
      |                                                 ^
      |                                                 ;
   30 |     }
      |     ~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main(){
    int n;
    cin >> n ;
    vector<string> s(n) ;
    for (size_t i = 0; i < n; i++)
    {
        cin >> s.at(i) ;
        sort(s.at(i).begin() ,s.at(i).end()) ;
    }
    sort(s.begin(),s.end()) ;
    int64_t ans = 0;
    int count = 0;
    for (size_t i = 0; i < n; i++)
    {
        
        
            /* code */
        
            if (s.at(i) == s.at(i+1))
            {
                count ++ ;
                ans += count
            }
            else
            {
                count = 0 ;
            }
        
        
    }
    cout << ans << endl ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:29: error: expected ';' before '}' token
   27 |                 ans += count
      |                             ^
      |                             ;
   28 |             }
      |             ~
Language: C++

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

int main() {
    int N; cin >> N;
    map<vector<int>,int> m;
    ll ans=0;
    rep(i,N){
        string S; cin >> S;
        vector<int> data(26);
        rep(j,S.size()){
            int k; k=S[j]-'a';
            data[k]++;
        }
        m[data]++;
    }
    for(auto p:m){
        int count; count=p.second;
        ans+=count*(count-1)/2;
    }
    cout << ans << endl;

    return 0;
}


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> S(N);
	for(int i = 0; i < N; i++){
		cin >> S[i];
		sort(S[i].begin(), S.end());
	}
	
	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:
a.cc: In function 'int main()':
a.cc:10:21: error: no matching function for call to 'sort(std::__cxx11::basic_string<char>::iterator, std::vector<std::__cxx11::basic_string<char> >::iterator)'
   10 |                 sort(S[i].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:10:21: note:   deduced conflicting types for parameter '_RAIter' ('__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' and '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >')
   10 |                 sort(S[i].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;
int main() {
    int N;
    cin >> N;

    string s[N];
    for(int i=0; i<N; i++){
        cin >> s[i];
        s[i] = sort(s[i].begin,s[i].end);
    }
    int ans = 0
    unordered_map<string,int> mp;
    for(int i=0; i<N; i++){
        if(mp.find(s[i]) == mp.end){
            mp[s[i]] = 0;
        }else{
            ans += mp.find(s[i]);
            mp[s[i]]++;
        }
    }


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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: no matching function for call to 'sort(<unresolved overloaded function type>, <unresolved overloaded function type>)'
   10 |         s[i] = sort(s[i].begin,s[i].end);
      |                ~~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note:   template argument deduction/substitution failed:
a.cc:10:20: note:   couldn't deduce template parameter '_RAIter'
   10 |         s[i] = sort(s[i].begin,s[i].end);
      |                ~~~~^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 2 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 2 provided
a.cc:13:5: error: expected ',' or ';' before 'unordered_map'
   13 |     unordered_map<string,int> mp;
      |     ^~~~~~~~~~~~~
a.cc:15:12: error: 'mp' was not declared in this scope
   15 |         if(mp.find(s[i]) == mp.end){
      |            ^~
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

#define p(x) cout << x << endl
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()

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

    vector<string> ss(n);
    rep(i, n) {
        cin >> ss.at(i);
        sort(all(ss.at(i)));
    }

    map<string, int> sm;
    rep(i, n) { sm[ss.at(i)]++; }

    ll count = 0;
    for(auto i = sm[i].begin(); i != sm[i].end(); ++i) {
        ll j = i->second;
        count = j * (j - 1) / 2;
    };

    p(count);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:21: error: use of 'i' before deduction of 'auto'
   25 |     for(auto i = sm[i].begin(); i != sm[i].end(); ++i) {
      |                     ^
Language: C++

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

typedef long long ll;
typedef pair<ll,ll> P;

const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const ll INF = 1LL<<29;
const ll mod = 1e9+7;

#define rep(i, a, b) for(ll (i) = (a); (i) < (b);++i)

string s[100000];

int main() {
	ll N;
	cin >> N;
	
	rep(i,0,N) {
		cin >> s[i];
		sort(s[i].begin(), s[i].end());
	}
	sort(s, s+N, compare);

	bool result;
	ll suu = 1;
	ll ans = 0;
	std::map<std::string,int> maps;

	rep(i,0,N) {
		maps[s[i]]++;
	}

	rep(i,0,N) {
		ans += maps[s[i]] * (maps[s[i]] - 1) /2;
	}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:24:22: error: 'compare' was not declared in this scope
   24 |         sort(s, s+N, compare);
      |                      ^~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <string>
#include <cmath>
#include<cstdio>
using namespace std;

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

  int N;
  cin >> N;
  
  vector<string> s(N);
  set<string> t; 
  
  int res = 0;
  
  for (int i = 0; i < N; ++i) {
    string input;
    cin >> input;
    
    sort(input.begin(), input.end());
    
    if (i >= 1) {
      int anag = find(s.begin(), s.end(), input);
      ret += anag;
    }
    
    s.at(i) = input;
  }
  
  cout << res;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:22: error: cannot convert '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' to 'int' in initialization
   33 |       int anag = find(s.begin(), s.end(), input);
      |                  ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                      |
      |                      __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >
a.cc:34:7: error: 'ret' was not declared in this scope; did you mean 'res'?
   34 |       ret += anag;
      |       ^~~
      |       res
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <numeric>
#include <algorithm>
using namespace std;
int N;
long long int ans = 0;
int ansCheck = 0;
string strTmp;

int main() {
	cin >> N;
	vector<string> S(N + 1);
	vector<string> value(N, "00000000000000000000000000");
	//vector<vector<int>> digits(N + 1, vector<int>(26, 0));

	for (int i = 0;i < N;i++) {
		cin >> S[i];
	}
	for (int n = 0;n < N;n++) {
		for (int i = 0;i < 10;i++) {
			if ((int)value[n][((char)S[n][i] - 97)] < 9) {
				value[n][((char)S[n][i] - 97)] = (char)((int)value[n][((char)S[n][i] - 97)] + 1);
			}
			else {
				value[n][((char)S[n][i] - 97)] = (char)"X";
			}
			//digits[n][(char)S[n][i] - 97]++;
		}
	}

	int beginN = 0;
	int count = 0;
	std::sort(value.begin(), value.end());
	for (int i = 0;i < N;i++) {
		if (value[beginN] != value[i]) {
			ans += (i - beginN)*(i - beginN - 1);
			beginN = i;
		}
	
	}
	ans += (N - beginN) * (N - beginN - 1);
	cout << ans/2;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:66: error: cast from 'const char*' to 'char' loses precision [-fpermissive]
   28 |                                 value[n][((char)S[n][i] - 97)] = (char)"X";
      |                                                                  ^~~~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <numeric>
#include <algorithm>
using namespace std;
int N;
long long int ans = 0;
int ansCheck = 0;
string strTmp;

int main() {
	cin >> N;
	vector<string> S(N + 1);
	vector<string> value(N, "00000000000000000000000000");
	//vector<vector<int>> digits(N + 1, vector<int>(26, 0));

	for (int i = 0;i < N;i++) {
		cin >> S[i];
	}
	for (int n = 0;n < N;n++) {
		for (int i = 0;i < 10;i++) {
			if ((int)value[n][((char)S[n][i] - 97) < 9) {
				value[n][((char)S[n][i] - 97)] = (char)((int)value[n][((char)S[n][i] - 97)] + 1);
			}
			else {
				value[n][((char)S[n][i] - 97)] = "X";
			}
			//digits[n][(char)S[n][i] - 97]++;
		}
	}

	int beginN = 0;
	int count = 0;
	std::sort(value.begin(), value.end());
	for (int i = 0;i < N;i++) {
		if (value[beginN] != value[i]) {
			ans += (i - beginN)*(i - beginN - 1);
			beginN = i;
		}
	
	}
	ans += (N - beginN) * (N - beginN - 1);
	cout << ans/2;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:67: error: expected ']' before ')' token
   24 |                         if ((int)value[n][((char)S[n][i] - 97) < 9) {
      |                                                                   ^
      |                                                                   ]
a.cc:28:66: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   28 |                                 value[n][((char)S[n][i] - 97)] = "X";
      |                                                                  ^~~
      |                                                                  |
      |                                                                  const char*
Language: C++

//
// Created by kuroneko on 2019-08-10.
//

#include <iostream>
#include <vector>
#include <cmath>
#include <iomanip>
#include <string>

using namespace std;

typedef long long ll;

#define INF 1000000000000009LL
#define MOD 1000000007LL

typedef int Weight;
struct Edge {
    int src, dst;
    Weight weight;
    Edge(int src, int dst, Weight weight):src(src), dst(dst), weight(weight) {}
};

typedef vector<Edge> Edges;
typedef vector<Edges> Graph;

typedef vector<Weight> Array;
typedef vector<Array> Matrix;

int main() {
    com_init();
    int N; cin >> N;
    vector<vector<char>> v(N);
    vector<string> s(N);

    for (int i = 0; i < N; i++) {
        string st; cin >> st;
        for (int j = 0; j < 10; j++) v[i].push_back(st[j]);
        sort(v[i].begin(), v[i].end());
        for (int j = 0; j < 10; j++) st[j] = v[i][j];
        s[i] = st;
    }

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

    bool prev = false;
    vector<int> res;
    for (int i = 0; i < N-1; i++) {
        bool flag = true;
        for (int j = 0; j < 10; j++) {
            if (s[i][j] != s[i+1][j]) flag = false;
        }
        if (flag) {
            if (prev) {
                res[int(res.size())-1] += 1;
            } else {
                res.push_back(2);
            }

            prev = true;
        } else {
            prev = false;
        }
    }
    ll ans = 0;
    for (int i = 0; i < res.size(); i++) {
        ans += ll(res[i]) * (res[i] - 1) / 2;
    }

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


Compiler output:
a.cc: In function 'int main()':
a.cc:32:5: error: 'com_init' was not declared in this scope
   32 |     com_init();
      |     ^~~~~~~~
a.cc:40:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   40 |         sort(v[i].begin(), v[i].end());
      |         ^~~~
      |         sqrt
a.cc:45:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   45 |     sort(s.begin(), s.end());
      |     ^~~~
      |     sqrt
Language: C++

#include <bits/stdc++.h>
using namespace std;
bool isAnag(string s1, string s2){
  std::sort(s1.begin(), s1.end());
  std::sort(s2.begin(), s2.end());
  return s1 == s2;
}

int main(void){
  int N,num = 0; bool isAnag;
  cin >> N;
  vector<string> s(N);
  for(int i = 0; i < N; i++){
    cin >> s.at(i);
  }
  for(int i = 0; i < N; i++){
    for(int j = i+1; j < N; j++){
     if(isAnag(s.at(i),s.at(j))){ num++; }
   }
  }
  cout << num << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: 'isAnag' cannot be used as a function
   18 |      if(isAnag(s.at(i),s.at(j))){ num++; }
      |         ~~~~~~^~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
long long sankaku[1000000];
void init(){
  sankaku[0] = 0;
  for(int i = 1; 1000000 > i; i++){
    sankaku[i] = sankaku[i-1]+i;
  }
}
using namespace std;
int main(){
  int n;cin>>n;
  vector<string> s(n);
  init();
  for(int i = 0; n > i; i++){
    cin>>s[i];
    sort(s[i].begin(),s[i].end());
  }
  sort(s.begin(),s.end());
  vector<int> ans;
  int tmp = 1;
  for(int i = 1; n > i; i++){
    if(s[i-1]!=s[i]){
      ans.push_back(tmp);
      tmp = 1;
    }else tmp++;
  }
  ans.push_back(tmp);
  long long ret = 0;
  for(int i = 0; ans.size() > i; i++){
    ret += sankaku[ans[i]-1];
  }
  cout << ret << endl;
  

Compiler output:
a.cc: In function 'int main()':
a.cc:34:23: error: expected '}' at end of input
   34 |   cout << ret << endl;
      |                       ^
a.cc:12:11: note: to match this '{'
   12 | int main(){
      |           ^
Language: C++

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

using namespace std;



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

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

    for (int i = 0; i < N; i++){
        const char* c = s[i].c_str();
        char r[11];
        strcpy(r, c);
        sort(r, r+sizeof(r));

        string str(r, 11);
        s[i] = str;
    }
    std::sort(s.begin(), s.end());

    int cnt = 0;
    int i = 0;
    while (i < N){
        string tmp = s[i];
        int j = i + 1;
        while(true){

            if (s[j] == tmp){
                j++;
                cnt++;
            }
            else{
                break;
            }
        }
        i++;
    }
    cout << cnt << endl;    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   24 |         sort(r, r+sizeof(r));
      |         ^~~~
      |         short
a.cc:29:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   29 |     std::sort(s.begin(), s.end());
      |          ^~~~
      |          qsort
Language: C++

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

using namespace std;



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

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

    for (int i = 0; i < N; i++){
        const char* c = s[i].c_str();
        char r[11];
        strcpy(r, c);
        sort(r, r+sizeof(r));

        string str(r, 11);
        s[i] = str;
    }
    sort(s.begin(), s.end());

    int cnt = 0;
    int i = 0;
    while (i < N){
        string tmp = s[i];
        int j = i + 1;
        while(true){

            if (s[j] == tmp){
                j++;
                cnt++;
            }
            else{
                break;
            }
        }
        i++;
    }
    cout << cnt << endl;    
}


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

import java.util.*;
 
class Main{
  public static void main(String args[]){
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    StringBuffer s[]=new StringBuffer[n];
    String ss[]=new String[n];
    for(int i=0;i<n;i++){
      s[i]=new StringBuffer(sc.next());
    }
    
    for(int i=0;i<n;i++){
      for(int j=1;j<10;j++){
        for(int k=j;k>0;k--){
          if(s[i].charAt(k)<s[i].charAt(k-1)){
            char t=s[i].charAt(k);
            s[i].setCharAt(k,s[i].charAt(k-1));
            s[i].setCharAt(k-1,t);
          }
        }
      }
      ss[i]=new String(s[i]);
    }
    Arrays.sort(ss);
    
    long sum=0;
    long kk=0;
    long sk=0;
    while(kk<n){
        kk=calc(ss,n,sk);
        sum+=( ((kk-sk)*((kk-sk)-1))/2 );
        sk=kk;
    }
    sum+=( ((kk-sk)*((kk-sk)-1))/2 );
    System.out.println(sum);
  }
  static long calc(String[] ss,int n,long f){
    for(long i=f+1;i<n;i++){
      if(!ss[f].equals(ss[i])){
        return (long)i;
      }
    }
    return (long)n;
  }
}

Compiler output:
Main.java:40: error: incompatible types: possible lossy conversion from long to int
      if(!ss[f].equals(ss[i])){
                          ^
Main.java:40: error: incompatible types: possible lossy conversion from long to int
      if(!ss[f].equals(ss[i])){
             ^
2 errors
Language: C++

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

using namespace std;



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

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

    for (int i = 0; i < N; i++){
        const char* c = s[i].c_str();
        char r[11];
        strcpy(r, c);
        sort(r, r+sizeof(r));

        string str(r, 11);
        s[i] = str;
    }
    sort(s.begin(), s.end());

    int cnt = 0;
    int i = 0;
    while (i < N){
        string tmp = s[i];
        int j = i + 1;
        while(true){

            if (s[j] == tmp){
                j++;
                cnt++;
            }
            else{
                break;
            }
        }
        i++;
    }
    cout << cnt << endl;    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:9: error: 'strcpy' was not declared in this scope
   22 |         strcpy(r, c);
      |         ^~~~~~
a.cc:5:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include <vector>
  +++ |+#include <cstring>
    5 | 
a.cc:23:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   23 |         sort(r, r+sizeof(r));
      |         ^~~~
      |         short
a.cc:28:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   28 |     sort(s.begin(), s.end());
      |     ^~~~
      |     short
Language: C++

#include <iostream>
#include <vector>
#include <string.h>
#include <algorithm>
 
 
int main()
{
	int num = 0;
 
	std::cin >> num;
 
	if (num <= 0)
	{
		std::cout << 0 << std::endl;
		return 0;
	}
 
	std::vector<std::string> str(num);
 
	for (int i = 0; i < num; ++i)
	{
		std::cin >> str[i];
		std::sort(str[i].begin(), str[i].end());
	}
 
	int fitNum = 0;
 
	for (int i = 0, n = num - 1; i < n; ++i)
	{
		for (int j = i + 1; j < num; ++j)
		{
			if (std::strcmp(str[i].c_str(), str[j].c_str()) == 0)
			{
				fitNum++;
			}
		}
	}
 
	std::cout << fitNum << std::endl;
 
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:34: error: 'strcmp' is not a member of 'std'; did you mean 'strcmp'?
   33 |                         if (std::strcmp(str[i].c_str(), str[j].c_str()) == 0)
      |                                  ^~~~~~
In file included from a.cc:3:
/usr/include/string.h:156:12: note: 'strcmp' declared here
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |            ^~~~~~
Language: Java

import java.util.*;

class Main{
  public static void main(String args[]){
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    StringBuffer s[]=new StringBuffer[n];
    String ss[]=new String[n];
    for(int i=0;i<n;i++){
      s[i]=new StringBuffer(sc.next());
    }
    
    for(int i=0;i<n;i++){
      for(int j=1;j<10;j++){
        for(int k=j;k>0;k--){
          if(s[i].charAt(k)<s[i].charAt(k-1)){
            char t=s[i].charAt(k);
            s[i].setCharAt(k,s[i].charAt(k-1));
            s[i].setCharAt(k-1,t);
          }
        }
      }
      ss[i]=new String(s[i]);
    }
    Arrays.sort(ss);
    
    long sum=0;
    long kk=0;
    long sk=0;
    while(kk<n){
        kk=calc(ss,n,sk);
        sum+=( ((kk-sk)*((kk-sk)-1))/2 );
        sk=kk;
    }
    sum+=( ((kk-sk)*((kk-sk)-1))/2 );
    System.out.println(sum);
  }
  static long calc(String[] ss,int n,long f){
    for(int i=f+1;i<n;i++){
      if(!ss[f].equals(ss[i])){
        return (long)i;
      }
    }
    return (long)n;
  }
}

Compiler output:
Main.java:39: error: incompatible types: possible lossy conversion from long to int
    for(int i=f+1;i<n;i++){
               ^
Main.java:40: error: incompatible types: possible lossy conversion from long to int
      if(!ss[f].equals(ss[i])){
             ^
2 errors
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i=0;i<(n);++i)
#define RREP(i, n) for(int i=1;i<=(n);++i)
#define ALL(v) (v).begin(), (v).end()
#define RALL(v) (v).rbegin(), (v).rend()
#define DUMP(x) cout<<#x<<"="<<(x)<<endl;
#define pb push_back
#define eb emplace_back
using namespace std;
typedef long long lint;
typedef pair<int, int> pii;
typedef pair<lint, lint> pll;

class CGreenBin {
public:
	void solve(std::istream& in, std::ostream& out) {
	    int N;
	    in>>N;
	    map<map<char, int>, lint> mp;
	    REP(i, N){
	        string s;
	        in>>s;
	        map<char, int> mm;
	        for(auto c : s) mm[c]++;
	        mp[mm]++;
	    }
	    lint ans = 0;
	    for(auto m : mp){
	        ans += m.second * (m.second-1) / 2;
	    }
	    out<<ans<<'\n';
	}
};


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
using namespace std;
stringstream ss;
long long n;
string its(long long x)
{
	string aans;
	ss<<x;
	ss>>aans;
	ss.clear();
	ss.str("");
	return ans;
}
int cnt[300];
string tmp,s;
unsigned long long ans=0; 
unordered_map<string,unsigned long long>us;
unordered_map<string,unsigned long long>::iterator it;
char c;
int main()
{
	
	cin>>n;
	for(int i=0;i<n;i++)
	{
		fill(cnt,cnt+256,0);
		tmp="";
		cin>>s;
		for(int j=0;j<s.size();j++)
		{
			cnt[(int)(s[j]='a')]++;
		}
		for(int j=0;j<s.size();j++)
		{
			tmp=rmp+its(cnt[j]);
			us[tmp]++;
		}
	}
	for(it=us.begin();it!=us.end();it++)
	{
		if(it->second>=2)
		{
			unsigned long long tmp;
			tmp=it->second*(it->second-1)/2;
			ans+=tmp;
		}
	}
	cout<<ans;
	return 0;
}

Compiler output:
a.cc: In function 'std::string its(long long int)':
a.cc:12:16: error: 'ans' was not declared in this scope; did you mean 'aans'?
   12 |         return ans;
      |                ^~~
      |                aans
a.cc: In function 'int main()':
a.cc:35:29: error: 'rmp' was not declared in this scope; did you mean 'tmp'?
   35 |                         tmp=rmp+its(cnt[j]);
      |                             ^~~
      |                             tmp
Language: Java

import java.util.*;

class Main{
  public static void main(String args[]){
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    StringBuffer s[]=new StringBuffer[n];
    String ss[]=new String[n];
    for(int i=0;i<n;i++){
      s[i]=new StringBuffer(sc.next());
    }
    
    for(int i=0;i<n;i++){
      for(int j=1;j<10;j++){
        for(int k=j;k>0;k--){
          if(s[i].charAt(k)<s[i].charAt(k-1)){
            char t=s[i].charAt(k);
            s[i].setCharAt(k,s[i].charAt(k-1));
            s[i].setCharAt(k-1,t);
          }
        }
      }
      ss[i]=new String(s[i]);
    }
    Arrays.sort(ss);
    
    long sum=0;
    long kk=0;
    long sk=0;
    while(kk<n){
        kk=calc(ss,n,sk);
        sum+=( ((kk-sk)*((kk-sk)-1))/2 );
        sk=kk;
    }
    sum+=( ((kk-sk)*((kk-sk)-1))/2 );
    System.out.println(sum);
  }
  static int calc(String[] ss,int n,long f){
    for(int i=f+1;i<n;i++){
      if(!ss[f].equals(ss[i])){
        return i;
      }
    }
    return n;
  }
}

Compiler output:
Main.java:39: error: incompatible types: possible lossy conversion from long to int
    for(int i=f+1;i<n;i++){
               ^
Main.java:40: error: incompatible types: possible lossy conversion from long to int
      if(!ss[f].equals(ss[i])){
             ^
2 errors
Language: C++

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

using namespace std;

string sort_chars(string s){
    const char* c = s.c_str();
    char r[11];
    strcpy(r, c);
    std::sort(r, r+sizeof(r));

    string str(r, 11);
    return str;
}


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

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

    for (int i = 0; i < N; i++){
        s[i] = sort_chars(s[i]);
    }
    sort(s.begin(), s.end());

    int cnt = 0;
    int i = 0;
    while (i < N){
        string tmp = s[i];
        int j = i + 1;
        while(true){

            if (s[j] == tmp){
                j++;
                cnt++;
            }
            else{
                break;
            }
        }
        i++;
    }
    cout << cnt << endl;    
}


Compiler output:
a.cc: In function 'std::string sort_chars(std::string)':
a.cc:11:5: error: 'strcpy' was not declared in this scope
   11 |     strcpy(r, c);
      |     ^~~~~~
a.cc:5:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    4 | #include <vector>
  +++ |+#include <cstring>
    5 | 
a.cc:12:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   12 |     std::sort(r, r+sizeof(r));
      |          ^~~~
      |          qsort
a.cc: In function 'int main()':
a.cc:31:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   31 |     sort(s.begin(), s.end());
      |     ^~~~
      |     short