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

#include<bits/stdc++.h>
using namespace std;
int n;
long long ans;
char c[10];
string s[100010];
int main(){
	cin>>n;
	for(int i=1;i<=n;i++){ 
		for(int j=1;j<=10;j++)
			cin>>c[j];
		sort(c+1,c+11);
		for(int j=1;j<=10;j++)
			s[i]=s[i]+c[j];
	}
	for(int i=1;i<=n;i++)
		ans=ans+max(0,upper_bound(s,s+n,s[i])-lower_bound(s,s+n,s[i])-1);
	cout<<ans;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:28: error: no matching function for call to 'max(int, long int)'
   17 |                 ans=ans+max(0,upper_bound(s,s+n,s[i])-lower_bound(s,s+n,s[i])-1);
      |                         ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:17:28: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long int')
   17 |                 ans=ans+max(0,upper_bound(s,s+n,s[i])-lower_bound(s,s+n,s[i])-1);
      |                         ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:17:28: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   17 |                 ans=ans+max(0,upper_bound(s,s+n,s[i])-lower_bound(s,s+n,s[i])-1);
      |                         ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
char ch[100100][12];
int hash[100100];
const int mod=1007;
int a=233;
map<int,int> mp;
int main()
{
	int n;
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		scanf("%s",ch[i]+1); 
		int len=strlen(ch[i]+1); 
		sort(ch[i]+1,ch[i]+1+len);
	}
	int anss=0;
	for(int i=1;i<=n;i++){
		int leni=strlen(ch[i]+1);
		for(int j=1;j<=leni;j++){
			hash[i]=(hash[i]*a+ch[i][j])%mod;
		}
		mp[hash[i]]++;
		anss+=mp[hash[i]]-1;
	}
	
	printf("%d",anss);
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:21:25: error: reference to 'hash' is ambiguous
   21 |                         hash[i]=(hash[i]*a+ch[i][j])%mod;
      |                         ^~~~
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/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 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:4:5: note:                 'int hash [100100]'
    4 | int hash[100100];
      |     ^~~~
a.cc:21:34: error: reference to 'hash' is ambiguous
   21 |                         hash[i]=(hash[i]*a+ch[i][j])%mod;
      |                                  ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:4:5: note:                 'int hash [100100]'
    4 | int hash[100100];
      |     ^~~~
a.cc:23:20: error: reference to 'hash' is ambiguous
   23 |                 mp[hash[i]]++;
      |                    ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:4:5: note:                 'int hash [100100]'
    4 | int hash[100100];
      |     ^~~~
a.cc:24:26: error: reference to 'hash' is ambiguous
   24 |                 anss+=mp[hash[i]]-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:4:5: note:                 'int hash [100100]'
    4 | int hash[100100];
      |     ^~~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
#include<cmath>
#include<bitset>
#define ll long long
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define RREP(i,n)  FFOR(i,0,n)
#define SORT(V) sort((V).begin(),(V).end())
#define INF ((1LL<<62)-(1LL<<31))
#define MOD 1000000007
using namespace std;

int main(){
  ll N,ans=0,t=1;
  cin>>N;
  char S[N+1][11];
  string SSS[N+1];
  
  for(int i=1; i<=N; ++i){
    for(int j=1; j<=10; ++j) cin>>S[i][j];
    for(int j=1; j<=9; ++j){
      for(int k=j+1; k<=10; ++k){
        if(S[i][j]>S[i][k]){
          string a=S[i][j];
          S[i][j]=S[i][k];
          S[i][k]=a;
        }
      }
    }
  }
  
  for(int i=1; 1<=N; ++i){
    SSS[i]={S[i][1],S[i][2],S[i][3],S[i][4],S[i][5],S[i][6],S[i][7],S[i][8],S[i][9],S[i][10]};
  }
    
    
  vector<string> SS;
  
  for(int i=0; i<N; ++i) SS.push_back(SSS[i]);
  
  SORT(SS);
  
  for(int i=1; i<=N; ++i){
    if(SS[i-1]!=SS[i] || i==N){
      ans+=t*(t+1)/2;
      t=1;
    }
    else t++;
  }
  
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:26: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   29 |           string a=S[i][j];
      |                    ~~~~~~^
a.cc:31:19: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char' in assignment
   31 |           S[i][k]=a;
      |                   ^
      |                   |
      |                   std::string {aka std::__cxx11::basic_string<char>}
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
using namespace std;
#define ll long long

const int maxn = 1e5 + 7;

struct node{
	int a[26];
	int cnt;
	struct node(){
		memset(a, 0, sizeof(a));
		cnt = 0;
	}
};
vector<node> ve;
char s[11];

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

	int n;
	scanf("%d", &n);
	for (int i = 0; i < n; i++){
		scanf("%s", s);
		node x; 
		for (int j = 0; j < 10; j++){
			int now = s[j] - 'a';
			x.a[now]++;
		}
		bool yes = true;
		vector<node>::iterator it;
		for (it = ve.begin(); it != ve.end(); it++){
			bool ok = true;
			for (int j = 0; j < 26; j++){
				if (it->a[j] != x.a[j]){
					ok = false;
					break;
				}
			}
			if (ok){
				it->cnt += (it->cnt + 1);
				yes = false;
				break;
			}
		}
		if (yes){
			ve.push_back(x);
		}
	}
	int ans = 0;
	vector<node>::iterator it;
	for (it = ve.begin(); it != ve.end(); it++){
		ans += it->cnt;
	}
	cout << ans << endl;

	//system("pause");
	return 0;
}

Compiler output:
a.cc:14:21: error: expected unqualified-id before ')' token
   14 |         struct node(){
      |                     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
char ch[100100][12];
int vis[100100];
int hash[100100];
const int mod=1e3+7,a=233;
map<int,int> mp;
int main()
{
	int n;
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		scanf("%s",ch[i]+1); 
		int len=strlen(ch[i]+1); 
		sort(ch[i]+1,ch[i]+1+len);
	}
	int anss=0;
	for(int i=1;i<=n;i++){
		int leni=strlen(ch[i]+1);
		for(int j=1;j<=leni;j++){
			hash[i]=(hash[i]*a+ch[i][j])%mod;
		}
		mp[hash[i]]++;
		anss+=mp[hash[i]]-1;
	}
	
	printf("%d",anss);
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:21:25: error: reference to 'hash' is ambiguous
   21 |                         hash[i]=(hash[i]*a+ch[i][j])%mod;
      |                         ^~~~
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/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 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:5:5: note:                 'int hash [100100]'
    5 | int hash[100100];
      |     ^~~~
a.cc:21:34: error: reference to 'hash' is ambiguous
   21 |                         hash[i]=(hash[i]*a+ch[i][j])%mod;
      |                                  ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:5:5: note:                 'int hash [100100]'
    5 | int hash[100100];
      |     ^~~~
a.cc:23:20: error: reference to 'hash' is ambiguous
   23 |                 mp[hash[i]]++;
      |                    ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:5:5: note:                 'int hash [100100]'
    5 | int hash[100100];
      |     ^~~~
a.cc:24:26: error: reference to 'hash' is ambiguous
   24 |                 anss+=mp[hash[i]]-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:5:5: note:                 'int hash [100100]'
    5 | int hash[100100];
      |     ^~~~
Language: C++

#include<cstdio>
#include<iostream>
using namespace std;
const int M = 1e5+50;
struct node {
	int l[30];
}a[M];
int hash[M],like[M],net[M],cnt;
bool ch(int h,int j) {
	if(!hash[h]){net[++cnt]=h;return 0;}
	for(int i=0;i<26;++i)
		if(a[like[h]].l[i]!=a[j].l[i])
			return 1;
	return 0;
}
void find(int i,int h) {
	while(ch(h,i))++h;
	++hash[h];
	like[h]=i;
}
int main() {
	int n,ans;cin>>n;
	for(int i=1;i<=n;i++) {
		ans=0;
		char s[12];scanf("%s",s+1);
		for(int k=1;k<=10;++k) {
			int t=s[k]-'a';
			++a[i].l[t];
			ans=(ans+t*1234567)%M;
		}
		find(i,ans);
	}
	ans=0;
	for(int i=1;i<=cnt;i++)
		ans+=((hash[net[i]]-1)*hash[net[i]]/2)<<' ';
	printf("%d",ans);
	return 0;
}

Compiler output:
a.cc: In function 'bool ch(int, int)':
a.cc:10:13: error: reference to 'hash' is ambiguous
   10 |         if(!hash[h]){net[++cnt]=h;return 0;}
      |             ^~~~
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:2:
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:8:5: note:                 'int hash [100050]'
    8 | int hash[M],like[M],net[M],cnt;
      |     ^~~~
a.cc: In function 'void find(int, int)':
a.cc:18:11: error: reference to 'hash' is ambiguous
   18 |         ++hash[h];
      |           ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:8:5: note:                 'int hash [100050]'
    8 | int hash[M],like[M],net[M],cnt;
      |     ^~~~
a.cc: In function 'int main()':
a.cc:35:24: error: reference to 'hash' is ambiguous
   35 |                 ans+=((hash[net[i]]-1)*hash[net[i]]/2)<<' ';
      |                        ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:8:5: note:                 'int hash [100050]'
    8 | int hash[M],like[M],net[M],cnt;
      |     ^~~~
a.cc:35:40: error: reference to 'hash' is ambiguous
   35 |                 ans+=((hash[net[i]]-1)*hash[net[i]]/2)<<' ';
      |                                        ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:8:5: note:                 'int hash [100050]'
    8 | int hash[M],like[M],net[M],cnt;
      |     ^~~~
Language: C++

using namespace std;
#include <string>

int main (){
  int n,t;
  cin >> n;
  const char* a[n][10];
  int i,j;
  std::string s;
  for (i = 0;i<n;i++){
    cin >> s;
    a[i] = s.c_str();
    for(j =0;j<i;j++){
      if(!compare(0,10,a[j],a[j+1]))
        t++;
    }
  }
  cout << t;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> n;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <string>
  +++ |+#include <iostream>
    3 | 
a.cc:12:10: error: incompatible types in assignment of 'const char*' to 'const char* [10]'
   12 |     a[i] = s.c_str();
      |     ~~~~~^~~~~~~~~~~
a.cc:14:11: error: 'compare' was not declared in this scope
   14 |       if(!compare(0,10,a[j],a[j+1]))
      |           ^~~~~~~
a.cc:18:3: error: 'cout' was not declared in this scope
   18 |   cout << t;
      |   ^~~~
a.cc:18:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C

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

void chomp(char *s)
{
int len = strlen(s);
if (len > 0 && s[len - 1] == '\n') s[len - 1] = 0;
}

int compare(const void *x, const void *y)
{
const unsigned char *a = (const unsigned char *)x;
const unsigned char *b = (const unsigned char *)y;
return (int)*a - (int)*b;
}

int main(){
  int N,i,j;
  int count = 0;
  scanf("%d", &N);
  char s[N][10];
  for(i= 0; i<N; i++){
    scanf("%s", &s[i][10]);
  }
  for(i=0; i<N; i++){
    for(j=1; j<N; j++){
      chomp(s[i][10]);
      chomp(s[j][10]);
      qsort(s[i], strlen(s[i]), 1, compare);
      qsort(s[j], strlen(s[j]), 1, compare);
      if (strcmp(a, b) == 0) 
      count++;
    }
    printf("%d", count);
    return 0;
  }
}

Compiler output:
main.c: In function 'main':
main.c:28:17: error: passing argument 1 of 'chomp' makes pointer from integer without a cast [-Wint-conversion]
   28 |       chomp(s[i][10]);
      |             ~~~~^~~~
      |                 |
      |                 char
main.c:5:18: note: expected 'char *' but argument is of type 'char'
    5 | void chomp(char *s)
      |            ~~~~~~^
main.c:29:17: error: passing argument 1 of 'chomp' makes pointer from integer without a cast [-Wint-conversion]
   29 |       chomp(s[j][10]);
      |             ~~~~^~~~
      |                 |
      |                 char
main.c:5:18: note: expected 'char *' but argument is of type 'char'
    5 | void chomp(char *s)
      |            ~~~~~~^
main.c:32:18: error: 'a' undeclared (first use in this function)
   32 |       if (strcmp(a, b) == 0)
      |                  ^
main.c:32:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:32:21: error: 'b' undeclared (first use in this function)
   32 |       if (strcmp(a, b) == 0)
      |                     ^
Language: C++

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

int main (){
  int n,t;
  cin >> n;
  const char* a[n][10];
  int i,j;
  std::string s;
  for (i = 0;i<n;i++){
    cin >> s;
    a[i] = str.c_str();
    for(j =0;j<i;j++){
      if(!compare(a[j],a[j+1]))
        t++;
    }
  }
  cout << t;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:12: error: 'str' was not declared in this scope; did you mean 'std'?
   13 |     a[i] = str.c_str();
      |            ^~~
      |            std
a.cc:15:11: error: 'compare' was not declared in this scope
   15 |       if(!compare(a[j],a[j+1]))
      |           ^~~~~~~
Language: Java

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

public class Main { //クラス名はMain
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      PrintWriter out = new PrintWriter(System.out);
      int num = Integer.parseInt(sc.next());
      Map<String, Integer> map = new HashMap<>();
      int ans = 0;
      for(int i = 0;i<num;i++){
        char[] c = sc.next().toCharArray();
        String str = String.valueOf(Arrays.sort(c));
        if(map.containsKey(str)){
          int v = map.get(str);
          ans += v;
          map.put(str,v+1);
        }else map.put(str,1);
      }
      out.println(ans);
      out.flush();
    }
}


Compiler output:
Main.java:16: error: 'void' type not allowed here
        String str = String.valueOf(Arrays.sort(c));
                                               ^
1 error
Language: C++

#include <cstdio>
#include <iostream>
#include <vector>
#include <string>
#include <utility>
#include <algorithm>
using namespace std;
#define ll longlong

void swap1(string *a,string *b){
	string temp=*a;
	*a=*b;
	*b=temp;
}
void sort1(string a[],int lower,int upper){
	 string bound=a[lower];
	 int l=lower,u=upper;
	//printf("lower = %d, upper = %d\n",l,u);
	
	do{
		while(a[l]<bound)l++;
		while(a[u]>bound)u--;
		if(l<=u){
			swap1(&a[l],&a[u]);
			l++;
			u--;
		}
	}while(l<u);
	if(lower<u)sort1(a,lower,u);
	if(l<upper)sort1(a,l,upper);
}
int main(){
	string s[100000];
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>s[i];
		sort(s[i].begin(),s[i].end());
		//cout<<s[i]<<endl;//
	}
	sort1(s,0,n-1);
	for(int i=0;i<n;i++){
		//cout<<s[i]<<endl;//
	}
	ll cnt=0;
	ll ans=0;
	for(int i=0;i<n-1;i++){
		if(s[i]==s[i+1]){
			cnt++;
			ans+=cnt;
			//cout<<"yes!"<<endl;//
		}else{
			cnt=0;
		}
	}
	cout<<ans;
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'longlong' was not declared in this scope
    8 | #define ll longlong
      |            ^~~~~~~~
a.cc:45:9: note: in expansion of macro 'll'
   45 |         ll cnt=0;
      |         ^~
a.cc:46:12: error: expected ';' before 'ans'
   46 |         ll ans=0;
      |            ^~~
a.cc:49:25: error: 'cnt' was not declared in this scope; did you mean 'int'?
   49 |                         cnt++;
      |                         ^~~
      |                         int
a.cc:50:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   50 |                         ans+=cnt;
      |                         ^~~
      |                         abs
a.cc:53:25: error: 'cnt' was not declared in this scope; did you mean 'int'?
   53 |                         cnt=0;
      |                         ^~~
      |                         int
a.cc:56:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   56 |         cout<<ans;
      |               ^~~
      |               abs
Language: C++

#include<stdio.h>
int main(){
  long long int n,z=0;
  int y[10];
  scanf("%lld",&n);
  char s[n][10];
  for(long long int i=0;i<n;i++){
    scanf("%s",s[i]);
    y[i]=-1;
  }
  int p=0;
  for(long long int j=0;j<n;j++){
    for(long long int k=j;k<n;k++){
      for(int l=0;l<=10;l++){
        if(p==1){
          p==0;
          break;
        }
        else if(l==10){
          z++;
          break;
        }
        for(int m=0;m<=10;m++){
          if(m==10){
            p=1;
            break;
          }
          for(int v;v<10;v++){
            if(m==y[v]){
              continue;
            }
          }
          else if(s[j][l]==s[k][m]){
            y[m]=m;
            break;
          }
        }
      }
      for(int o=0;o<10;o++){
        y[o]=-1;
      }
    }
  }
  printf("%lld",z);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:11: error: 'else' without a previous 'if'
   33 |           else if(s[j][l]==s[k][m]){
      |           ^~~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
#include<cmath>
#include<bitset>
#define ll long long
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define RREP(i,n)  FFOR(i,0,n)
#define SORT(V) sort((V).begin(),(V).end())
#define INF ((1LL<<62)-(1LL<<31))
#define MOD 1000000007
using namespace std;

int main(){
  ll N,ans=0,t=1;
  cin>>N;
  string S[N+1];
  
  for(int i=1; i<=N; ++i){
    cin>>S[i];
    for(int j=0; j<=8; ++j){
      for(int k=j+1; k<=9; ++k){
        if(S[i].at(j)>S[i].at(k)){
          string a=S[i].at(j);
          S[i].at(j)=S[i].at(k);
          S[i].at(k)=a;
        }
      }
    }
  }
  
  vector<string> SS;
  
  for(int i=0; i<N; ++i) SS.push_back(S[i]);
  
  SORT(SS);
  
  for(int i=1; i<=N; ++i){
    if(SS[i-1]!=SS[i] || i==N){
      ans+=t*(t+1)/2;
      t=1;
    }
    else t++;
  }
  
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:27: error: conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   28 |           string a=S[i].at(j);
      |                    ~~~~~~~^~~
a.cc:30:22: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} in assignment
   30 |           S[i].at(k)=a;
      |                      ^
      |                      |
      |                      std::string {aka std::__cxx11::basic_string<char>}
Language: C++

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

int main (){
  int n,s;
  cin >> n;
  const char a[n][10];
  int i,j;
  std::string s;
  for (i = 0;i<n;i++){
    cin >> s;
    a[i] = str.c_str();
    for(j =0;j<i;j++){
      if(!compare(a[j],a[j+1]))
        s++;
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: uninitialized 'const a' [-fpermissive]
    8 |   const char a[n][10];
      |              ^
a.cc:10:15: error: conflicting declaration 'std::string s'
   10 |   std::string s;
      |               ^
a.cc:6:9: note: previous declaration as 'int s'
    6 |   int n,s;
      |         ^
a.cc:13:12: error: 'str' was not declared in this scope; did you mean 'std'?
   13 |     a[i] = str.c_str();
      |            ^~~
      |            std
a.cc:15:11: error: 'compare' was not declared in this scope
   15 |       if(!compare(a[j],a[j+1]))
      |           ^~~~~~~
Language: C++

//
//  main.cpp
//  temp
//
//  Created by tolemy on 2019/08/04.
//  Copyright © 2019 tolemy. All rights reserved.
//

#include <iostream>
#include <vector>

using namespace std;

long calcNumOfCombination(int n, int r){
    int num = 1;
    for(int i = 1; i <= r; i++){
        num = num * (n - i + 1) / i;
    }
    return num;
}

int main(int argc, const char * argv[]) {
    
    int n;
    cin >> n;
    
    vector<string> words;
    for(int i=0;i<n;i++)
    {
        string s;
        cin >> s;
        sort(s.begin(), s.end());
        words.push_back(s);
    }
    
    sort(words.begin(), words.end());
    
    long answer = 0;
    int count = 1;
    for(int i=0;i<n-1;i++)
    {
        
        string s1 = words.at(i);
        string s2 = words.at(i+1);
        
        if(s1==s2)
        {
            count++;
        }
        else
        {
            answer += calcNumOfCombination(count, 2);
            count = 1;
        }
        
    }
    
    answer += calcNumOfCombination(count, 2);
    
    
    cout << answer;
    
    
    return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:32:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   32 |         sort(s.begin(), s.end());
      |         ^~~~
      |         short
a.cc:36:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   36 |     sort(words.begin(), words.end());
      |     ^~~~
      |     short
Language: Java

import java.util.Scanner;
import java.util.HashMap;
import java.util.Arrays;
import java.io.PrintWriter;

public class Main { //クラス名はMain
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      PrintWriter out = new PrintWriter(System.out);
      int num = Integer.parseInt(sc.next());
      Map<String, Integer> map = new HashMap<>();
      int ans = 0;
      for(int i = 0;i<num;i++){
        String str = String.valueOf(Arrays.sort(sc.next().toCharArray()));
        if(map.containsKey(str)){
          int v = map.get(str);
          ans += v;
          map.put(str,v+1);
        }else map.put(str,1);
      }
      out.println(ans);
      out.flush();
    }
}


Compiler output:
Main.java:11: error: cannot find symbol
      Map<String, Integer> map = new HashMap<>();
      ^
  symbol:   class Map
  location: class Main
Main.java:14: error: 'void' type not allowed here
        String str = String.valueOf(Arrays.sort(sc.next().toCharArray()));
                                               ^
2 errors
Language: Java

import java.util.Scanner;
import java.io.PrintWriter;

public class Main { //クラス名はMain
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      PrintWriter out = new PrintWriter(System.out);
      int num = Integer.parseInt(sc.next());
      Map<String, Integer> map = new HashMap<>();
      int ans = 0;
      for(int i = 0;i<num;i++){
        String str = String.valueOf(Arrays.sort(sc.next().toCharArray()));
        if(map.containsKey(str)){
          int v = map.get(str);
          ans += v;
          map.put(str,v+1);
        }else map.put(str,1);
      }
      out.println(ans);
      out.flush();
    }
}


Compiler output:
Main.java:9: error: cannot find symbol
      Map<String, Integer> map = new HashMap<>();
      ^
  symbol:   class Map
  location: class Main
Main.java:9: error: cannot find symbol
      Map<String, Integer> map = new HashMap<>();
                                     ^
  symbol:   class HashMap
  location: class Main
Main.java:12: error: cannot find symbol
        String str = String.valueOf(Arrays.sort(sc.next().toCharArray()));
                                    ^
  symbol:   variable Arrays
  location: class Main
3 errors
Language: C++

#include<bits/stdc++.h>
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
using namespace std;

int arr[200005];
int main() {

    fast
    int n;
    cin>>n;

    string *s =new string [n];
    map<int,int>m;

    for(int i=0;i<n;i++)
    {
        cin>>s[i];
        int sizei=s[i].size();

        for(int j=0;j<sizei;j++)
            arr[i]=arr[i]+((int)(s[i][j]-'a')+1219);
        m[arr[i]]++;
    }

    long cnt=0;

    for(auto i=m.begin();i!=m.end();i++){
        if(i->second!=1)
        {
            cnt+=((i->second)*(i->second-1))/2;
        }
    }


    cout<<cnt;

	return 0;
}


/*
ll  modularExponentiation(ll x,ll n,ll M)
{

    ll result=1;

    while(n>0)
    {

	if(n%2==1)

 result=(result*x)%M;

  x=(x*x)%M;

  n=n/2;

}

  return result;
}



*/


#include<bits/stdc++.h>
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
using namespace std;

int arr[200005];
int main() {

    fast
    int n;
    cin>>n;

    string *s =new string [n];
    map<int,int>m;

    for(int i=0;i<n;i++)
    {
        cin>>s[i];
        int sizei=s[i].size();

        for(int j=0;j<sizei;j++)
            arr[i]=arr[i]+((int)(s[i][j]-'a')+1219);
        m[arr[i]]++;
    }

    long cnt=0;

    for(auto i=m.begin();i!=m.end();i++){
        if(i->second!=1)
        {
            cnt+=((i->second)*(i->second-1))/2;
        }
    }


    cout<<cnt;

	return 0;
}


/*
ll  modularExponentiation(ll x,ll n,ll M)
{

    ll result=1;

    while(n>0)
    {

	if(n%2==1)

 result=(result*x)%M;

  x=(x*x)%M;

  n=n/2;

}

  return result;
}



*/




Compiler output:
a.cc:72:5: error: redefinition of 'int arr [200005]'
   72 | int arr[200005];
      |     ^~~
a.cc:5:5: note: 'int arr [200005]' previously declared here
    5 | int arr[200005];
      |     ^~~
a.cc:73:5: error: redefinition of 'int main()'
   73 | int main() {
      |     ^~~~
a.cc:6:5: note: 'int main()' previously defined here
    6 | int main() {
      |     ^~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
#define mod 19260817
int n;
string a[100005];
long long ans=0;

int main()

{
	cin>>n;
	a[n+1]="19260817"
	for (int i=1;i<=n;i++){
		cin>>a[i];
		sort(a[i].begin(),a[i].end());
		//for (int j=0;j<10;j++){
		//	hash1[i]=hash1[i]+(a[i][j]-'a'+1)*27;
		//}
	}

	sort(a+1,a+1+n);
	int cnt=1;

	for (int i=1;i<=n;i++){
		if (a[i]==a[i+1])
			cnt++;
		else{
			ans+=(cnt-1)*cnt/2;
			cnt=1;
		}
	}

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:26: error: expected ';' before 'for'
   14 |         a[n+1]="19260817"
      |                          ^
      |                          ;
   15 |         for (int i=1;i<=n;i++){
      |         ~~~               
a.cc:15:22: error: 'i' was not declared in this scope
   15 |         for (int i=1;i<=n;i++){
      |                      ^
Language: C++

#include<iostream>
#include<algorithm>
#include<cstdio>
#include<string>
#include<math.h>

using namespace std;

int main(void)
{
	int n;
	string *s;
	s = new string[1000000];

	int sum = 0;

	cin >> n;
	for (int i = 0; i < n; i++)
		cin >> s[i];

	for (int i = 0; i < n; i++)
	{
		sort( s[i].begin , s[i].end);
	}
	
	for (int i = 0; i < n - 1; i++)
	{
		for (int j = i + 1; j < n; j++)
		{
			if (s[i].compare(s[j]))
				sum++;
		}
	}

	cout << sum << endl;
	delete[] s;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:21: error: no matching function for call to 'sort(<unresolved overloaded function type>, <unresolved overloaded function type>)'
   23 |                 sort( s[i].begin , s[i].end);
      |                 ~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/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:23:21: note:   couldn't deduce template parameter '_RAIter'
   23 |                 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
Language: Java


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

public class Main {
    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        Map<String, Long> counts = new HashMap<>();
        for (int i = 0; i < n; ++i) {
            String s = scanner.next();
            char[] tmp = s.toCharArray();
            Arrays.sort(tmp);
            s = new String(tmp);
            int count = counts.getOrDefault(s, 0);
            counts.put(s, count + 1L);
        }
        long pairs = 0;
        for (long count : counts.values()) {
            pairs += (count * (count - 1L) / 2);
        }
        System.out.println(pairs);
    }
}

Compiler output:
Main.java:17: error: incompatible types: int cannot be converted to Long
            int count = counts.getOrDefault(s, 0);
                                               ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int N = 10010;
int n;
string s;
int val;
vector<string> ve;
int main()
{
    ll ans = 0;
    scanf("%d",&n);
    for(int i=1;i<=n;++i){
        cin >> s;
        sort(s.begin(),s.end());
        ve.push_back(s);
    }
    sort(ve.begin(),ve.end());
    for(int i=0;i<n;++i){
        int ed = i;
        ll cnt = 0;
        while(ed+1<n && ve[i]==ve[ed+1]){
            ed++;
        }
        cnt = ed - i;
        i=ed;
        if(cnt)
            ans += (cnt*(cnt+1))/2;
    }
    printf("%lld\n",ans);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'll' was not declared in this scope
   10 |     ll ans = 0;
      |     ^~
a.cc:20:11: error: expected ';' before 'cnt'
   20 |         ll cnt = 0;
      |           ^~~~
      |           ;
a.cc:24:9: error: 'cnt' was not declared in this scope; did you mean 'int'?
   24 |         cnt = ed - i;
      |         ^~~
      |         int
a.cc:27:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   27 |             ans += (cnt*(cnt+1))/2;
      |             ^~~
      |             abs
a.cc:29:21: error: 'ans' was not declared in this scope; did you mean 'abs'?
   29 |     printf("%lld\n",ans);
      |                     ^~~
      |                     abs
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin>>N;
  vector<string> s(N);
  for(int i=0;i<N;i++){
    cin>>s.at(i);
    sort(s.at(i).begin(),s.at(i).end);
  }
  int count=0;
  for(int i=0;i<N;i++){
    for(int j=0;j<N;j++){
      if(s.at(i).at(0)==s.at(j).at(0)&&s.at(i).at(1)==s.at(j).at(1)&&s.at(i).at(2)==s.at(j).at(2)&&s.at(i).at(3)==s.at(j).at(3)&&s.at(i).at(4)==s.at(j).at(4)&&s.at(i).at(5)==s.at(j).at(5)&&s.at(i).at(6)==s.at(j).at(6)&&s.at(i).at(7)==s.at(j).at(7)&&s.at(i).at(8)==s.at(j).at(8)&&s.at(i).at(9)==s.at(j).at(9)){
        count++;
      }
    }
  }
  cout<<count;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: no matching function for call to 'sort(std::__cxx11::basic_string<char>::iterator, <unresolved overloaded function type>)'
    9 |     sort(s.at(i).begin(),s.at(i).end);
      |     ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<char*, __cxx11::basic_string<char> >]'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:63: note:   no known conversion for argument 2 from '<unresolved overloaded function type>' to '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |                                         ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
  292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note:   candidate expects 4 arguments, 2 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)'
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note:   candidate expects 3 arguments, 2 provided
Language: C++

#include <iostream>
#include <string>
#include <vector>

void strsort(std::string &s)
{
    std::vector<char> tmp;
    for(int i=0; i<s.size(); i++) tmp.push_back(s[i]);
    std::sort(tmp.begin(), tmp.end());
    for(int i=0; i<s.size(); i++) s[i] = tmp[i];
}

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

    std::sort(s.begin(), s.end());
    long long count = 0;
    std::vector<long long> vcount;
    for(int i=0; i<N; i++){
        count++;
        if(i == N || (i != N && s[i] != s[i+1])) {
            vcount.push_back(count); count = 0;
        }
    }
    long long ans = 0;
    for(auto &&itr = vcount.begin(); itr != vcount.end(); itr++){
        long long c = (*itr);
        ans += c * (c-1) / 2;
    }
    std::cout << ans << std::endl;
}

Compiler output:
a.cc: In function 'void strsort(std::string&)':
a.cc:9:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
    9 |     std::sort(tmp.begin(), tmp.end());
      |          ^~~~
      |          qsort
a.cc: In function 'int main()':
a.cc:23:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'?
   23 |     std::sort(s.begin(), s.end());
      |          ^~~~
      |          qsort
Language: C++

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

int main() {
  int n, s = 0;
  cin >> n;
  vector<vector<char>> v(n);
  for (int i = 0; i < n; i++){
    string p;
    cin >> p;
    for (int j = 0; j < 10; j++){
      v.at(i).at(j) = p.at(j)
    }
  }
  
  for (int i = 0; i < n - 1; i++){
    for (int j = 0; j < n; j++){
      if(v.at(i) == v.at(j))
        s++;
    }
  }
  cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:30: error: expected ';' before '}' token
   12 |       v.at(i).at(j) = p.at(j)
      |                              ^
      |                              ;
   13 |     }
      |     ~
Language: C

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

	t=s[0];
	long count=1L,ans=0L;
	for(int i=1;i<n;i++){
		if(t==s[i])count++;
		else{
			if(count>1)ans+=count*(count-1)/2;
			count=1L;
			t=s[i];
		}
	}
	if(count>1L)ans+=count*(count-1L)/2L;
	cout<<ans<<endl;
	return 0;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
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 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 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 pair<int,P> PP;

vector<PP> v;
const double eps = 1e-10;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
ll dp[1<<26 + 5] = {0};
int main()
{
	
	ll ans = 0,n;
	cin >> n;
	rep(i,n){
		string s;
		cin >> s;
		ll bit = 0;
		rep(j,s.size()){
			bit += (1 << s[j] - 'a');
		}
		ans += dp[bit];
		dp[bit]++;
	}
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc:36:16: error: narrowing conversion of '-2147483648' from 'int' to 'long unsigned int' [-Wnarrowing]
   36 | ll dp[1<<26 + 5] = {0};
      |                ^
a.cc:36:8: error: size '-2147483648' of array 'dp' is negative
   36 | ll dp[1<<26 + 5] = {0};
      |       ~^~~~~~~~
Language: C++

#include<stdio.h>
#include<algorithm>
int main()
{
  int N;
  char S[100005][27]={};
  scanf("%d", &N);
  int i,j;
  char c;
  
  for(i=0;i<N;i++)
  {
    for(j=0;j<10;j++)
    {
      scanf("%c",&c);
      S[i][int(c)-int('a')]++;
    }
  }
  
  long long int count=0;
  for(i=0;i<N;i++)
    for(j=i+1;j<N;j++)
    {
      if(std::equal(S[i].cbegin(), S[i].cend(), S[j].cbegin()))
        count++;
    }
  
  printf("%lld",count);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:26: error: request for member 'cbegin' in 'S[i]', which is of non-class type 'char [27]'
   24 |       if(std::equal(S[i].cbegin(), S[i].cend(), S[j].cbegin()))
      |                          ^~~~~~
a.cc:24:41: error: request for member 'cend' in 'S[i]', which is of non-class type 'char [27]'
   24 |       if(std::equal(S[i].cbegin(), S[i].cend(), S[j].cbegin()))
      |                                         ^~~~
a.cc:24:54: error: request for member 'cbegin' in 'S[j]', which is of non-class type 'char [27]'
   24 |       if(std::equal(S[i].cbegin(), S[i].cend(), S[j].cbegin()))
      |                                                      ^~~~~~
Language: C++

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

signed main() {
	int n;
	cin >> n;
	vector<string> v;
	for (int i = 0; i < n; ++i) {
		string s;
		cin >> s;
		sort(s.begin(), s.end());
		v.push_back(s);
	}
	sort(v.begin(), v.end());
	int cnt = 1;
	int ans = 0;
	for (int i = 1; i < n; ++i) {
		if (v[i - 1] == v[i])++cnt;
		else {
			if (cnt > 1) {
				ans += cnt * (cnt - 1) / 2;
				cnt = 1;
			}
		}
	}
	if (cnt > 1) {
		ans += C(cnt, 2ll);
		cnt = 1;
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:24: error: 'C' was not declared in this scope
   28 |                 ans += C(cnt, 2ll);
      |                        ^
Language: C++

#include <bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;++i)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define double long double
using namespace std;
signed main(){
  int a,e=0;
  cin>>a;
  vector<string> b(a);
  rep(i,a-1){
    rep(j,a-1){
      string c=b.at(i);
      string d=b.at(j);
    sort(all(b.at(i));
         sort(all(b.at(j));
              if(b.at(i)==b.at(j))
              e++;
              b.at(i)=c;
              b.at(j)=d;
              }
              }
              cout<<(e-a)/2;
         
   
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:22: error: expected ')' before ';' token
   16 |     sort(all(b.at(i));
      |         ~            ^
a.cc:17:27: error: expected ')' before ';' token
   17 |          sort(all(b.at(j));
      |              ~            ^
Language: C++

#include <iostream>
#include <vector>
#include <limits.h>
#include <string>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>

using namespace std;


int compare_string(const void* a, const void* b) {
	return strcmp(*(const char**)a, *(const char**)b);
}

int main()
{

	int n;
	vector<string> s;

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

		s.push_back(wk);
	}

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

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

	wk = s[0];
	long long int ans = 0;
	for (int i = 1; i < n; i++) {
		if (wk != s[i]) {
			wk = s[i];
			
		}
		else {
			ans++;
		}

	}



	cout << ans << endl;




}



Compiler output:
a.cc: In function 'int compare_string(const void*, const void*)':
a.cc:14:16: error: 'strcmp' was not declared in this scope
   14 |         return strcmp(*(const char**)a, *(const char**)b);
      |                ^~~~~~
a.cc:9:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    8 | #include <algorithm>
  +++ |+#include <cstring>
    9 |