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

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

struct ststr {
    char str[11];
};

void bsort(char str[]){
    int i,j;
    int len=strlen(str);
    char tmp;
    for(i=0;i<len-1;i++){
        for(j=i+1;j<len;j++){
            if(str[i]>str[j]){
                tmp = str[i];
                str[i] = str[j];
                str[j] = tmp;
            }
        }
    }
}

int main(){
    int N,i,j;
    char buff[11];
    scanf("%d ",&N);
    struct ststr data[N];
    for(i=0;i<N;i++){
        gets(buff);
        bsort(buff);
        strcpy(data[i].str,buff);
    }
    int s=0;
    for(i=0;i<N-1;i++){
        for(i=j+1;j<N;j++){
            if(strcmp(data[i].str,data[j].str)==0)s++;
        }
    }
    printf("%d",s);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   30 |         gets(buff);
      |         ^~~~
      |         getw
Language: C++

void solve(long long N, std::vector<std::string> s){
    
    int n = s.size();
    if (n==0) {
        printf(0);
        return;
    }
    for (auto& w: s){
        sort(w.begin(), w.end());
    }
    sort(s.begin(), s.end());

    long long int result = 0LL;
    int cur = 1;
    for (int i=1; i<n; ++i){
        if (s[i]==s[i-1]){
            cur++;
        } else {
            // C n take 2
            result += (cur*(cur-1))/2;
            cur = 1;
        }
    }
    if (cur!=1){
        result += (cur*(cur-1))/2;
    }
    printf("%lld", result);
}

Compiler output:
a.cc:1:25: error: 'std::vector' has not been declared
    1 | void solve(long long N, std::vector<std::string> s){
      |                         ^~~
a.cc:1:36: error: expected ',' or '...' before '<' token
    1 | void solve(long long N, std::vector<std::string> s){
      |                                    ^
a.cc: In function 'void solve(long long int, int)':
a.cc:3:13: error: 's' was not declared in this scope
    3 |     int n = s.size();
      |             ^
a.cc:5:9: error: 'printf' was not declared in this scope
    5 |         printf(0);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | void solve(long long N, std::vector<std::string> s){
a.cc:9:9: error: 'sort' was not declared in this scope; did you mean 'short'?
    9 |         sort(w.begin(), w.end());
      |         ^~~~
      |         short
a.cc:11:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |     sort(s.begin(), s.end());
      |     ^~~~
      |     short
a.cc:27:5: error: 'printf' was not declared in this scope
   27 |     printf("%lld", result);
      |     ^~~~~~
a.cc:27:5: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long int 
string s;
int main(){
  
  ll i,j,k,n,m,t;
  cin>>n;
  vector<ll>v;
  for(i=0;i<n;i++){
    cin>>s;
    sort(s.begin(),s.end());
    v.push_back(s);
  }
  sort(v.begin(),v.end());
  ll ans=0, cid=0;
  for(i=1;i<n;i++){
    if(v[i]==v[i-1]){
      ans+=(i-cid); 
    }
    else {
      cid=i; 
    }
  }
  cout<<ans<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: no matching function for call to 'std::vector<long long int>::push_back(std::string&)'
   13 |     v.push_back(s);
      |     ~~~~~~~~~~~^~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1283:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = long long int; _Alloc = std::allocator<long long int>; value_type = long long int]'
 1283 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1283:35: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const std::vector<long long int>::value_type&' {aka 'const long long int&'}
 1283 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_vector.h:1300:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = long long int; _Alloc = std::allocator<long long int>; value_type = long long int]'
 1300 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:1300:30: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::vector<long long int>::value_type&&' {aka 'long long int&&'}
 1300 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:26: error: 'struct std::pair<const std::__cxx11::basic_string<char>, int>' has no member named 's'
   17 |                 ans += i.s * 1LL * (i.s - 1) / 2;
      |                          ^
a.cc:17:39: error: 'struct std::pair<const std::__cxx11::basic_string<char>, int>' has no member named 's'
   17 |                 ans += i.s * 1LL * (i.s - 1) / 2;
      |                                       ^
Language: Java

package test2;

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

public class test {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String count = sc.next();
		long ans = 0;
		Map<String, Long> map = new HashMap<String, Long>();

		for (int i = 0; i < Integer.parseInt(count); i++) {
			char[] ary = sc.next().toCharArray();
			Arrays.sort(ary);
			String c = 	new String(ary);
				if (map.containsKey(c)) {
					ans = ans + map.get(c);
					map.put(c, map.get(c) + 1);
				} else {
					map.put(c, (long) 1);
				}
			}

		System.out.println(ans);
	}

}

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

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class test {

	public static void Main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String count = sc.next();
		int ans = 0;
		int loopCount = 0;
		List<String> list = new ArrayList<String>();

		for (int i = 0; i < Integer.parseInt(count); i++) {
			list.add(sc.next());
		}

		for (String match : list) {

			for (int j = loopCount; j < Integer.parseInt(count); j++) {

				if (matcher(match, list.get(j))) {
					ans = ans + 1;
				}
			}
			loopCount = loopCount + 1;
		}
		System.out.println(ans);
	}

	private static boolean matcher(String match, String b) {
		StringBuilder sb = new StringBuilder(b);
		if (match.equals(b)) {
			return false;
		}
		for (int i = 0; i < match.length(); i++) {
			char s = match.charAt(i);
			if (sb.indexOf(String.valueOf(s)) == -1) {
				return false;
			}
			sb.deleteCharAt(sb.indexOf(String.valueOf(s)));
		}
		return true;
	}
}

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

package test2;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class test {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String count = sc.next();
		int ans = 0;
		int loopCount = 0;
		List<String> list = new ArrayList<String>();

		for (int i = 0; i < Integer.parseInt(count); i++) {
			list.add(sc.next());
		}

		for (String match : list) {

			for (int j = loopCount; j < Integer.parseInt(count); j++) {

				if (matcher(match, list.get(j))) {
					ans = ans + 1;
				}
			}
			loopCount = loopCount + 1;
		}
		System.out.println(ans);
	}

	private static boolean matcher(String match, String b) {
		StringBuilder sb = new StringBuilder(b);
		if (match.equals(b)) {
			return false;
		}
		for (int i = 0; i < match.length(); i++) {
			char s = match.charAt(i);
			if (sb.indexOf(String.valueOf(s)) == -1) {
				return false;
			}
			sb.deleteCharAt(sb.indexOf(String.valueOf(s)));
		}
		return true;
	}
}


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

import math
n = int(input())
l = [input() for _ in range(n)]
l = [[j for j in i] for i in l]
for i in range(n):
    l[i].sort()

l = ["".join(i) for i in l]
al = list(set(l))
ans_dict = {}
for i in al:
    ans_dict[i] = 0
for i in l:
    ans_dict[i] += 1
    ans = 0
for i in al:
    if ans_dict[i] > 1:
        ans += math.factorial(ans_dict[i]-1)
    
print(ans)

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:11:1: error: expected unqualified-id before 'for'
   11 | for i in al:
      | ^~~
Language: C++

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

struct ststr {
    char str[11];
};

int searchChar(char strf[],char strp[],int length){
    int s=0;
    for(int i=0;i<length;i++){
            int flag=0;
        for(int j=0;j<length;j++){
            if(strf[i]==strp[j])flag=1;
        }
    if(flag)s++;
    }
    return s;
}

int main(){
    int N,i,j,a;
    a=0;
    char buf[11];
    scanf("%d ",&N);
    struct ststr data[N];
    for(i=0;i<N;i++){
        gets(data[i].str);
    }
    for(i=0;i<N-1;i++){
        for(j=i+1;j<N;j++){
            strcpy(buf,data[j].str);
            if(searchChar(buf,data[i].str,11)>=10)a++;
        }
    }
    printf("%d",a);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   27 |         gets(data[i].str);
      |         ^~~~
      |         getw
Language: C++

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

using namespace std;

int main(){
	int n;
	map<string,int> cnt;
	string s;
	cin >> n;
	for (int i=0; i<n; i++){
		cin >> s;
		sort(s.begin(), s.end());
		cnt[s]++;
	}
	
	long ans = 0;

	for (auto mp : cnt){
//		cout << mp.first << " " << mp.second << endl;
		ans += (long long)mp.second * (mp.second - 1) / 2;
	}

	cout << ans << endl;
}



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

#include <iostream>
#include <string>
#include <unordered_map>
int main(int argc, const char * argv[]) {
    long int n;
    std::cin >> n;
    std::unordered_map<std::string, int> counter;
    for(long int i=0; i<n; i++)
    {
        std::string s;
        std::cin >> s;
        std::sort(s.begin(), s.end());
        
        counter[s]++;
    }
    long int count=0;
    for(auto iter=counter.begin(); iter!=counter.end(); iter++)
    {
        long int n=(*iter).second;
        if(n >= 2){
            count += n*(n-1)/2;
        }
    }
    std::cout << count << std::endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:12:14: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   12 |         std::sort(s.begin(), s.end());
      |              ^~~~
      |              qsort
Language: C++

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

struct ststr {
    char str[11];
};

int searchChar(char strf[],char strp[],int length){
    int s=0;
    for(int i=0;i<length;i++){
            int flag=0;
        for(int j=0;j<length;j++){
            if(strf[i]==strp[j])flag=1;
        }
    if(flag)s++;
    }
    return s;
}

int main(){
    char buff[11];
    int N,i,j;
    scanf("%d ",&N);
    struct ststr data[N];
    for(i=0;i<N;i++){
        gets(data[i].str);
    }
    int s=0;
    for(i=0;i<N-1;i++){
        for(j=i+1;j<N;j++){
            strcpy(buff,data[i].str);
            if(searchChar(buff,data[j].str,11)==11)s++;
        }
    }
    printf("%d",s);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   26 |         gets(data[i].str);
      |         ^~~~
      |         getw
Language: C++

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

struct ststr {
    char str[11];
};

int searchChar(char strf[],char strp[],int length){
    int s=0;
    for(int i=0;i<length;i++){
            int flag=0;
        for(int j=0;j<length;j++){
            if(strf[i]==strp[j])flag=1;
        }
    if(flag)s++;
    }
    return s;
}

int main(){
    char buff[11];
    int N,i,j;
    scanf("%d ",&N);
    struct ststr data[N];
    for(i=0;i<N;i++){
        gets(data[i].str);
    }
    int s=0;
    for(i=0;i<N-1;i++){
        for(j=i+1;j<N;j++){
            strcpy(buff,data[i].str);
            if(searchChar(buff,data[j].str,11)==11)s++;
        }
    }
    printf("%d",s);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   26 |         gets(data[i].str);
      |         ^~~~
      |         getw
Language: Java

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

    public class Solution {
        public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            int n=in.nextInt();
            String[] sList = new String[n];
            for(int i=0;i<n;i++)
                sList[i]=in.next();
            HashMap<String,Integer> freqMap = new HashMap<>();
            for(int i=0;i<n;i++){
                char[] cur= sList[i].toCharArray();
                Arrays.sort(cur);
                String temp = new String(cur);
                if(!freqMap.containsKey(temp))
                    freqMap.put(temp,0);
                freqMap.put(temp,freqMap.get(temp)+1);
            }   
            long ans=0;
            for(String x:freqMap.keySet())
                ans+=1L*(freqMap.get(x)*(freqMap.get(x)-1))/2;
            System.out.println(ans);
        }
    }

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |         ans=0;
      |         ^~~
      |         abs
Language: C++

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

Compiler output:
a.cc:6:1: error: expected initializer before 'int'
    6 | int main(){
      | ^~~
Language: C++

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

int main () {

    int N;
    cin >> N;

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

    unordered_map<string, int> um;
    long long ans = 0LL;
    for (int i = 0; i < N; i++) {
        sort(s[i].begin(), s[i].end());
        ans += um[s[i]];
        um[s[i]]++;
    }
    cout << ans << endl;

    return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
#define int long long ;
int32_t main()
{
 int n;
  string s;
  map<string,int>m;
  cin>>n;

  for(int i=0;i<n;i++)
  {
  cin>>s;
    sort(s.begin(),s.end());
  int count=0;count+=m[s];
  m[s]++;
  cout<<count<<"\n";
  
  return 0;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long ;
      |                  ^~~~
a.cc:6:2: note: in expansion of macro 'int'
    6 |  int n;
      |  ^~~
a.cc:6:6: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |  int n;
      |      ^
      |      yn
a.cc:3:18: error: template argument 2 is invalid
    3 | #define int long long ;
      |                  ^~~~
a.cc:8:14: note: in expansion of macro 'int'
    8 |   map<string,int>m;
      |              ^~~
a.cc:3:18: error: template argument 4 is invalid
    3 | #define int long long ;
      |                  ^~~~
a.cc:8:14: note: in expansion of macro 'int'
    8 |   map<string,int>m;
      |              ^~~
a.cc:8:17: error: expected primary-expression before '>' token
    8 |   map<string,int>m;
      |                 ^
a.cc:8:18: error: 'm' was not declared in this scope
    8 |   map<string,int>m;
      |                  ^
a.cc:3:18: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long ;
      |                  ^~~~
a.cc:11:7: note: in expansion of macro 'int'
   11 |   for(int i=0;i<n;i++)
      |       ^~~
a.cc:11:11: error: 'i' was not declared in this scope
   11 |   for(int i=0;i<n;i++)
      |           ^
a.cc:11:18: error: expected ')' before ';' token
   11 |   for(int i=0;i<n;i++)
      |      ~           ^
      |                  )
a.cc:11:19: error: 'i' was not declared in this scope
   11 |   for(int i=0;i<n;i++)
      |                   ^
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

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

int main(){
    int i, N;
    long long answer = 0;
    vector<string> s;
    unordered_map<string, int> hashedStr;

    cin >> N;
    for(i = 0; i < N; i++){
        string tmp;
        cin >> tmp;
        sort(tmp.begin(), tmp.end());
        hashedStr[tmp]++;
        if(hashedStr[tmp] != 0){
            answer += hashedStr;
        }
    }

    cout << answer << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:20: error: no match for 'operator+=' (operand types are 'long long int' and 'std::unordered_map<std::__cxx11::basic_string<char>, int>')
   17 |             answer += hashedStr;
      |             ~~~~~~~^~~~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
long long a[100010] , b[30] , INF=100000000007 , ans=0 , x=0;
/*long long f(long long k)
{
	long long c=((k+99)*(k+10))%INF;
	return c*(c+21)%INF;
}*/
int main()
{
	for(int i=1;i<=28;i++)
	{
		b[i]=11384*i*i-i;
		b[i]%=INF;
		b[i]*=(b[i]+i);
		b[i]%=INF;
		b[i]-=(b[i]/i)-INF;
		b[i]+=i*i*i;
		b[i]%=INF;
		b[i]-=INF(b[i]);
	}
	int n;	cin>>n;
	for(int i=1;i<=n;i++)
	{
		string s;	cin>>s;
		for(int j=0;j<s.size();j++){
			a[i]+=b[s[j]-'a'+1];
			a[i]%=INF;
		}
	}
	sort(a+1 , a+1+n);
	a[n+1]=-1;
	for(int i=1;i<=n;i++)
	{
		x++;
		if(a[i]!=a[i+1]){
			ans+=x*(x-1)/2;
			x=0;
		}
	}
	/*for(int i=1;i<=n;i++)
		cout<<a[i]<<endl;*/
	cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:26: error: 'INF' cannot be used as a function
   21 |                 b[i]-=INF(b[i]);
      |                       ~~~^~~~~~
Language: Java

import java.util.*;

class Main{

    public static void main(String[] args){

	Scanner sc = new Scanner(System.in);

	int N = sc.nextInt();

	int count = 0;

	String[] s = new String[N]; 

	for(int i=1; i<N+1; i++){

	s[i] = sc.nextLine();

	char[] c= s[i].toCharArray();

	Arrays.sort(c);

	s[i]= new String(c);
	
  }

	for(int i=1; i<N+1; i++){

	for(int i=1; i<N+1; i++){
	
	if(s[i].equals(s[i])){

	count = count+1;	

   }	
		
  }	

  }			

	System.out.println(count/2);
	  
 }
}

Compiler output:
Main.java:29: error: variable i is already defined in method main(String[])
	for(int i=1; i<N+1; i++){
	        ^
1 error
Language: C

#include<stdio.h>
#include<stdlib.h>
int main() {
	int N, i,x,j,k,l,m,n,ans=0;
	char s[10001][11];
	int**A;
	scanf_s("%d", &N);
	A = (int**)malloc(sizeof(int)*(N + 1));
	for (i = 0; i <= N; i++) {
		A[i] = (int*)malloc(sizeof(int) * 26);
		for (j = 0; j <= 26; j++) {
			A[i][j] = 0;
		}
	}
	for (i = 1; i <= N; i++)
		scanf_s("%s", s[i],11);
	for (k = 1; k <= N; k++) {
		for (j = 0; j < 10; j++) {
			A[k][s[k][j] - 'a']++;
		}
	}
	for (l = 1; l <= N; l++) {
		for (m = l + 1; m <= N; m++) {
			ans += 1;
			for (n = 0; n < 26; n++) {
				if (A[l][n] != A[m][n]) {
					ans -= 1;
					break;
				}
			}
		}
	}
	printf("%d\n", ans);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |         scanf_s("%d", &N);
      |         ^~~~~~~
      |         scanf
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        Long output = 0;
        Hashtable<String,Long> ht = new Hashtable<String,Long>();
		// 整数の入力
		int N = sc.nextInt();
		for(int i = 1; i <= N; i++){
          char[] tmp = sc.next().toCharArray();
          Arrays.sort(tmp);
          String tmp2 = new String(tmp);
          if(ht.get(tmp2) == null){
            ht.put(tmp2,new Long("1"));
          }else{
            output += ht.get(tmp2);
            ht.put(tmp2,ht.get(tmp2) + 1);
          }
        }
		System.out.println(output);
		
		// 出力
		
	}
}

Compiler output:
Main.java:5: error: incompatible types: int cannot be converted to Long
        Long output = 0;
                      ^
Main.java:14: warning: [removal] Long(String) in Long has been deprecated and marked for removal
            ht.put(tmp2,new Long("1"));
                        ^
1 error
1 warning
Language: Java

import java.util.Arrays;

class Main{

    public static void main(String[] args){

	Scanner sc = new Scanner(System.in);

	int N = sc.nextInt();

	int count = 0;

	String[] s = new String[N]; 

	for(int i=1; i<N+1; i++){

	s[i] = sc.nextLine();

	char[] c= s[i].toCharArray();

	Arrays.sort(c);

	s[i]= new String(c);
	
  }

	for(int i=1; i<N+1; i++){

	for(int j=1; j<N+1; j++){
	
	if(s[i].equals(s[j])){

	count += 1;	

   }	
		
  }	

  }			

	System.out.println(count/2);
	  
 }
}

Compiler output:
Main.java:7: error: cannot find symbol
	Scanner sc = new Scanner(System.in);
	^
  symbol:   class Scanner
  location: class Main
Main.java:7: error: cannot find symbol
	Scanner sc = new Scanner(System.in);
	                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#include <iostream>
#include <map>

using namespace std; 
  
map<size_t, int> ans;

int solving(int t){
  return t*(t-1)/2;
}

int main() 
{ 
    int n, count;
    count = 0;
    string needle;
    hash<string> hasher;
    cin >> n ;
    for (int i =0;i<n;i++){
      cin >> needle;
      sort(needle.begin(), needle.end());
      ans[hasher(needle)] += 1;
    }
    count =0;
    for (const auto &x : ans)
    {
      if(x.second>1){
        count += solving(x.second);
      }
    }

    cout << count << endl;
    return 0;
} 



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

#include <iostream>
#include <map>

using namespace std; 
  
map<size_t, int> ans;
int solving(int t){
  return t*(t-1)/2;
}
int main() 
{ 
    int n, count;
    count = 0;
    string needle;
    hash<string> hasher;
    cin >> n ;
    for (int i =0;i<n;i++){
      cin >> needle;
      std::sort(needle.begin(), needle.end());
      ans[hasher(needle)] += 1;
    }
    count =0;
    for (const auto &x : ans)
    {
      if(x.second>1){
        count += solving(x.second);
      }
    }

    cout << count << endl;
    return 0;
} 



Compiler output:
a.cc: In function 'int main()':
a.cc:19:12: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   19 |       std::sort(needle.begin(), needle.end());
      |            ^~~~
      |            qsort
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <cmath>
#include <list>
#include <numeric>
#include <stack>
#include <queue>
#include <tuple>
#include <bitset>
using namespace std;
#define rep(i,n) for(int i = 0; i < n; i++)
typedef long long ll;
typedef pair<int,int> P;
const int inf = 1012345678;
int dx[] = {1,-1,0,0};
int dy[] = {0,0,1,-1};
int N;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:25:3: error: 'map' was not declared in this scope
   25 |   map<string,ll> mp;
      |   ^~~
a.cc:13:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
   12 | #include <bitset>
  +++ |+#include <map>
   13 | using namespace std;
a.cc:25:13: error: expected primary-expression before ',' token
   25 |   map<string,ll> mp;
      |             ^
a.cc:25:16: error: expected primary-expression before '>' token
   25 |   map<string,ll> mp;
      |                ^
a.cc:25:18: error: 'mp' was not declared in this scope
   25 |   map<string,ll> mp;
      |                  ^~
a.cc:29:29: error: expected ';' before 'mp'
   29 |     sort(s.begin(), s.end())
      |                             ^
      |                             ;
   30 |     mp[s]++
      |     ~~                       
a.cc:33:14: error: 'm' was not declared in this scope
   33 |   for(auto p:m){
      |              ^
Language: Java

import java.util.*;

class Main{

    public static void main(String[] args){

	Scanner sc = new Scanner(System.in);

	int N = sc.nextInt();

	int count = 0;

	for(int i=1; i<N+1; i++){

	String s(i) = sc.next();

	char[] c= s(i).toCharArray();

	Arrays.sort(c);

	s(i)= new String(c);
	
  }

	for(int i=1; i<N+1; i++){

	for(int j=1; j<N+1; j++){
	
	if(s(i).equals(s(j))){

	count += 1;	

   }	
		
  }	

  }			

	System.out.println(count/2);
	  
 }
}

Compiler output:
Main.java:15: error: ';' expected
	String s(i) = sc.next();
	        ^
Main.java:15: error: not a statement
	String s(i) = sc.next();
	         ^
Main.java:15: error: ';' expected
	String s(i) = sc.next();
	          ^
3 errors
Language: C++

#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
typedef struct data
{
    int pos;
    char a0;
    char a[12];
}data;
data s[100000+5];
int cmp(data aa,data bb)
{
    int flag=strcmp(aa.a,bb.a);
    if(flag>=0)
        return 1;
    else
        return 0;
}
int main()
{
    char x[12];
    int n,i;
    scanf("%d",&n);
    getchar();
    for(i=0;i<n;i++)
    {
        gets(x);
        sort(x,x+10);
        strcpy(s[i].a,x);
        //printf("%s\n",s[i].a);
        s[i].a0=x[0];
    }
    sort(s,s+n,cmp);
    long long int ans=0;

    /*for(i=0;i<n;i++)
    {
        printf("%s\n",s[i].a);
    }*/
    for(i=0;i<n;i++)
    {
        //printf("%s\n",s[i].a);
        int  cnt=1;
        while(i+1<n&&strcmp(s[i].a,s[i+1].a)==0)
        {
            cnt++;
            i++;
        }
        ans+=(cnt-1)*cnt/2;
    }
    printf("%lld\n",ans);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   28 |         gets(x);
      |         ^~~~
      |         getw
Language: C++

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

int main() {
	int n;
	int mcount = 0,;
  	long long count = 0;
	vector<bool> check_double(10);
	cin >> n;
	vector<string> s(n);
	for (int i = 0; i < n; i++) {
		cin >> s.at(i);
	}

	for (int i = 0; i < n - 1; i++) {
		for (int j = i + 1; j < n; j++) {
			for (int z = 0; z < 10; z++) {
				check_double.at(z) = false;
			}
			for (int k = 0; k < 10; k++) {
				for (int l = 0; l < 10; l++) {
					if (check_double.at(l)){
						continue;
					} else if (s.at(i).at(k) == s.at(j).at(l)) {
						mcount++;
						check_double.at(l) = true;
						break;
					}
				}
				if (mcount == 10) {
					count++;
					mcount = 0;
				}
			}
		}
	}

	cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:24: error: expected unqualified-id before ';' token
    6 |         int mcount = 0,;
      |                        ^
Language: C++

#include <iostream>
#include <unordered_map>
#include <algorithm>
using namespace std;
 
int main() {
    int n;
    unordered_map<string, int> hash;
    string tmp;
    int count;
 
    cin >> n;
    for (int i = 0; i < n; i++) {
        cin >> tmp;
        sort(tmp.begin(), tmp.end());
        if (hash[tmp] > 0) {
            count += hash[tmp];
        }
        hash[tmp] += 1;
    }
 
    cout << count << endl;
    return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:13: error: expected ';' before '}' token
   23 |     return 0
      |             ^
      |             ;
   24 | }
      | ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long int;
int32_t main()
{
 int n;
  string s;
  map<string,int>m;
  cin>>n;

  for(int i=0;i<n;i++)
  {
  cin>>s;
    sort(s.begin(),s.end());
  int count=0;count+=m[s];
  m[s]++;
  cout<<count<<"\n";
  
  return 0;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:3:23: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long int;
      |                       ^~~
a.cc:6:2: note: in expansion of macro 'int'
    6 |  int n;
      |  ^~~
a.cc:6:6: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |  int n;
      |      ^
      |      yn
a.cc:3:23: error: template argument 2 is invalid
    3 | #define int long long int;
      |                       ^~~
a.cc:8:14: note: in expansion of macro 'int'
    8 |   map<string,int>m;
      |              ^~~
a.cc:3:23: error: template argument 4 is invalid
    3 | #define int long long int;
      |                       ^~~
a.cc:8:14: note: in expansion of macro 'int'
    8 |   map<string,int>m;
      |              ^~~
a.cc:8:17: error: expected primary-expression before '>' token
    8 |   map<string,int>m;
      |                 ^
a.cc:8:18: error: 'm' was not declared in this scope
    8 |   map<string,int>m;
      |                  ^
a.cc:3:23: error: declaration does not declare anything [-fpermissive]
    3 | #define int long long int;
      |                       ^~~
a.cc:11:7: note: in expansion of macro 'int'
   11 |   for(int i=0;i<n;i++)
      |       ^~~
a.cc:11:11: error: 'i' was not declared in this scope
   11 |   for(int i=0;i<n;i++)
      |           ^
a.cc:11:18: error: expected ')' before ';' token
   11 |   for(int i=0;i<n;i++)
      |      ~           ^
      |                  )
a.cc:11:19: error: 'i' was not declared in this scope
   11 |   for(int i=0;i<n;i++)
      |                   ^
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
 int n;
  string s;
  map<string int>m;
  cin>>n;
  cin>>s;
  int count=0;count+=m[s];
  m[s]++;
  cout<<count<<"\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: two or more data types in declaration of 'type name'
    7 |   map<string int>m;
      |       ^~~~~~
a.cc:7:17: error: wrong number of template arguments (1, should be at least 2)
    7 |   map<string int>m;
      |                 ^
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/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:10:23: error: no match for 'operator[]' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   10 |   int count=0;count+=m[s];
      |                       ^
a.cc:11:4: error: no match for 'operator[]' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   11 |   m[s]++;
      |    ^
Language: C++

#include<bits/stdc++.h>
#define El Patron
using namespace std;
bool anagram(string s1,string s2)
{
  int n1=s1.length();
  int n2=s2.length();
  if(n1!=n2)
    return false;
  sort(s1.begin(),s1.end());
  sort(s2.begin(),s2.end());
  for(int i=0;i<n1;i++)
    if(s1[i]!=s2[i])
      return false;
  return true;
}
int main()
{
  int n,count=0;
  string s;
  cin>>n;
  for(int i=0;i<n-1;i++)
  {
    cin>>s;
    if(anagram(s[i],s[i+1]))
      count++;
    cout<<count;
  }
  return 0;
}
  
    


Compiler output:
a.cc: In function 'int main()':
a.cc:25:15: error: could not convert 's.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)i))' from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   25 |     if(anagram(s[i],s[i+1]))
      |        ~~~~~~~^~~~~~~~~~~~~
      |               |
      |               __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
Language: C++

#include<bits/stdc++.h>
#define El Patron
using namespace std;
bool anagram(string s1,string s2)
{
  int n1=s1.length();
  int n2=s2.length();
  if(n1!=n2)
    return false;
  sort(s1.begin(),s1.end());
  sort(s2.begin(),s2.end());
  for(int i=0;i<n1;i++)
    if(s1[i]!=s2[i])
      return false;
  return true;
}
int main()
{
  int n,count=0;
  string s;
  cin>>n;
  for(int i=0;i<n-1;i++)
  {
    cin>>s;
    if(anagram(s[i],s[i+1]))
      count++;
    cout<<count
  }
  return 0;
}
  
    

Compiler output:
a.cc: In function 'int main()':
a.cc:25:15: error: could not convert 's.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)i))' from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   25 |     if(anagram(s[i],s[i+1]))
      |        ~~~~~~~^~~~~~~~~~~~~
      |               |
      |               __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
a.cc:27:16: error: expected ';' before '}' token
   27 |     cout<<count
      |                ^
      |                ;
   28 |   }
      |   ~
Language: C++

#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
ll gcd(ll a,ll b){return b!=0?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a*b/gcd(a,b);}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:19:15: error: base operand of '->' has non-pointer type 'std::pair<const std::__cxx11::basic_string<char>, long long int>'
   19 |         ll j=i->second;
      |               ^~
Language: C++

#include <stdio.h>
#include <algorithm>
#include <unordered_map>
using namespace std;
const int N = 1e5+1;
using ll = longa long;
char buf[N];
unordered_map<string, int> m;

void deal(){
	sort(buf, buf+10);
	++m[buf]
}

int main(){
	int n;
	scanf("%d", &n);
	while(n--){
		scanf("%s", buf);
		deal();
	}
	ll ans = 0;
	for(auto &kv: m){
        ll v = kv.second;
		ans += v*(v-1)/2;
	}
	printf("%lld\n", ans);
	return 0;
}

Compiler output:
a.cc:6:12: error: 'longa' does not name a type; did you mean 'long'?
    6 | using ll = longa long;
      |            ^~~~~
      |            long
a.cc:8:15: error: 'string' was not declared in this scope
    8 | unordered_map<string, int> m;
      |               ^~~~~~
a.cc:4:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    3 | #include <unordered_map>
  +++ |+#include <string>
    4 | using namespace std;
a.cc:8:26: error: template argument 1 is invalid
    8 | unordered_map<string, int> m;
      |                          ^
a.cc:8:26: error: template argument 3 is invalid
a.cc:8:26: error: template argument 4 is invalid
a.cc:8:26: error: template argument 5 is invalid
a.cc: In function 'void deal()':
a.cc:12:17: error: expected ';' before '}' token
   12 |         ++m[buf]
      |                 ^
      |                 ;
   13 | }
      | ~                
a.cc: In function 'int main()':
a.cc:22:9: error: 'll' was not declared in this scope
   22 |         ll ans = 0;
      |         ^~
a.cc:23:23: error: 'begin' was not declared in this scope; did you mean 'std::begin'?
   23 |         for(auto &kv: m){
      |                       ^
      |                       std::begin
In file included from /usr/include/c++/14/unordered_map:42,
                 from a.cc:3:
/usr/include/c++/14/bits/range_access.h:114:37: note: 'std::begin' declared here
  114 |   template<typename _Tp> const _Tp* begin(const valarray<_Tp>&) noexcept;
      |                                     ^~~~~
a.cc:23:23: error: 'end' was not declared in this scope; did you mean 'std::end'?
   23 |         for(auto &kv: m){
      |                       ^
      |                       std::end
/usr/include/c++/14/bits/range_access.h:116:37: note: 'std::end' declared here
  116 |   template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
      |                                     ^~~
a.cc:24:11: error: expected ';' before 'v'
   24 |         ll v = kv.second;
      |           ^~
      |           ;
a.cc:25:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   25 |                 ans += v*(v-1)/2;
      |                 ^~~
      |                 abs
a.cc:25:24: error: 'v' was not declared in this scope
   25 |                 ans += v*(v-1)/2;
      |                        ^
a.cc:27:26: error: 'ans' was not declared in this scope; did you mean 'abs'?
   27 |         printf("%lld\n", ans);
      |                          ^~~
      |                          abs
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;
    int kk=0;
    int sk=0;
    while(kk<n){
        kk=calc(ss,n,sk);
        sum=sum+( ((long)(kk-sk)*(long)((kk-sk)-1))/2 );
        sk=kk;
    }
    sum=sum+( ((long)(kk-sk)*(Long)((kk-sk)-1))/2 );
    System.out.println(sum);
  }
  static int calc(String[] ss,int n,int f){
    for(int i=f+1;i<n;i++){
      if(!ss[f].equals(ss[i])){
        return i;
      }
    }
    return n;
  }
}

Compiler output:
Main.java:35: error: incompatible types: int cannot be converted to Long
    sum=sum+( ((long)(kk-sk)*(Long)((kk-sk)-1))/2 );
                                   ^
1 error
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<vector>
#include<cstring>
#include<queue>
#include<cmath>
#include<algorithm>
using namespace std;
int n;
int sum=0;
int base=131;
char a[10010];
long long ans[10010];
long long  hash(char s[]){
	int len=strlen(s);
	long long out=0;
	for(int i=0;i<len;i++){
		out=(out*base+s[i])%1000000007;
	}
	return out;
}
int p=1;
int main() {
	cin>>n;
	for(int i=1;i<=n;i++){
		scanf("%s",a);
		sort(a,a+strlen(a));
		ans[i]=hash(a);
	}
	sort(ans+1,ans+n+1);
	for(int i=1;i<n;i++){
		if(ans[i]==ans[i+1]){
		
			sum+=p;
			p++;
		}
		else p=1;
	}
	cout<<sum;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:24: error: reference to 'hash' is ambiguous
   30 |                 ans[i]=hash(a);
      |                        ^~~~
In file included from /usr/include/c++/14/string_view:50,
                 from /usr/include/c++/14/bits/basic_string.h:47,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:16:12: note:                 'long long int hash(char*)'
   16 | long long  hash(char s[]){
      |            ^~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<vector>
#include<cstring>
#include<queue>
#include<cmath>
#include<algorithm>
using namespace std;
int n;
int sum=0;
int base=131;
char a[10010];
long long ans[10010];
long long  hash(char s[]){
	int len=strlen(s);
	long long out=0;
	for(int i=0;i<len;i++){
		out=(out*base+s[i])%1000000007;
	}
	return out;
}
int p=1;
bool f=0;
int main() {
	cin>>n;
	for(int i=1;i<=n;i++){
		scanf("%s",a);
		sort(a,a+strlen(a));
		ans[i]=hash(a);
	}
	sort(ans+1,ans+n+1);
	for(int i=1;i<n;i++){
		if(ans[i]==ans[i+1]){
		
			sum+=p;
			p++;
		}
		else p=1;
	}
	cout<<sum;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:24: error: reference to 'hash' is ambiguous
   31 |                 ans[i]=hash(a);
      |                        ^~~~
In file included from /usr/include/c++/14/string_view:50,
                 from /usr/include/c++/14/bits/basic_string.h:47,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:16:12: note:                 'long long int hash(char*)'
   16 | long long  hash(char s[]){
      |            ^~~~
Language: C++

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

int main() {
int N;
  long long int ans;
  ans = 0;
  cin >> N;
  vector<string> a(N);
  rep(i, N)
    cin >> a.at(i);
  rep(j, N){
      vector<char> aa(10);
  rep(i, 10){
  aa.at(i) = a.at(j)[i];
  }
    sort(aa.begin(), aa.end());
      rep(i, 10){
  a.at(j)[i] = aa.at(i);
  }
    rep(j, N){
      rep2(i,i){
if(a.at(j)==a.at(i))
  ans++;
    }
             }
  cout<<ans<<endl;
}


Compiler output:
a.cc:24:15: error: macro "rep2" requires 3 arguments, but only 2 given
   24 |       rep2(i,i){
      |               ^
a.cc:4:9: note: macro "rep2" defined here
    4 | #define rep2(i, s, n) for (int i = s; i < (int)(n);i++)
      |         ^~~~
a.cc: In function 'int main()':
a.cc:24:7: error: 'rep2' was not declared in this scope
   24 |       rep2(i,i){
      |       ^~~~
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:6:12: note: to match this '{'
    6 | int main() {
      |            ^
Language: C++

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

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

int main() {
	int n;
	cin >> n;
	map<string, int> mp;
	rep(i, n) {
		string s;
		cin >> s;
		sort(s, begin(), s.end());
		mp[s]++; //ない要素が来たら0初期化
	}
	ll ans = 0;
	for (auto& p : mp) {
		int s = p.second;
		ans += (ll)s(s - 1) / 2;
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:30: error: no matching function for call to 'begin()'
   14 |                 sort(s, begin(), s.end());
      |                         ~~~~~^~
In file included from /usr/include/c++/14/bits/algorithmfwd.h:39,
                 from /usr/include/c++/14/bits/stl_algo.h:59,
                 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/initializer_list:88:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::begin(initializer_list<_Tp>)'
   88 |     begin(initializer_list<_Tp> __ils) noexcept
      |     ^~~~~
/usr/include/c++/14/initializer_list:88:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/range_access.h:52:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(_Container&)'
   52 |     begin(_Container& __cont) -> decltype(__cont.begin())
      |     ^~~~~
/usr/include/c++/14/bits/range_access.h:52:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:63:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(const _Container&)'
   63 |     begin(const _Container& __cont) -> decltype(__cont.begin())
      |     ^~~~~
/usr/include/c++/14/bits/range_access.h:63:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:95:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::begin(_Tp (&)[_Nm])'
   95 |     begin(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~~~
/usr/include/c++/14/bits/range_access.h:95:5: note:   candidate expects 1 argument, 0 provided
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/valarray:1227:5: note: candidate: 'template<class _Tp> _Tp* std::begin(valarray<_Tp>&)'
 1227 |     begin(valarray<_Tp>& __va) noexcept
      |     ^~~~~
/usr/include/c++/14/valarray:1227:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/valarray:1238:5: note: candidate: 'template<class _Tp> const _Tp* std::begin(const valarray<_Tp>&)'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
/usr/include/c++/14/valarray:1238:5: note:   candidate expects 1 argument, 0 provided
a.cc:20:29: error: 's' cannot be used as a function
   20 |                 ans += (ll)s(s - 1) / 2;
      |                            ~^~~~~~~