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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:19:23: error: expected ';' before '}' token
   19 |     ans+=(ll)s*(s-1)/2
      |                       ^
      |                       ;
   20 |   }
      |   ~
Language: Java

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

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

Compiler output:
Main.java:1: error: illegal character: '#'
#include<bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<bits/stdc++.h>
        ^
Main.java:2: error: illegal character: '#'
#define rep(i,n) for(int i=0;i<(n);++i)
^
Main.java:2: error: class, interface, enum, or record expected
#define rep(i,n) for(int i=0;i<(n);++i)
                             ^
Main.java:2: error: class, interface, enum, or record expected
#define rep(i,n) for(int i=0;i<(n);++i)
                                   ^
Main.java:4: error: class, interface, enum, or record expected
typedef long long ll;
^
Main.java:8: error: not a statement
  cin >> n;
      ^
Main.java:12: error: not a statement
    cin >> s;
        ^
Main.java:17: error: not a statement
  for(auto& p:mp){
          ^
Main.java:17: error: not a statement
  for(auto& p:mp){
              ^
Main.java:21: error: not a statement
  cout<< ans <<endl;
             ^
Main.java:6: error: unnamed classes are a preview feature and are disabled by default.
int main(){
^
  (use --enable-preview to enable unnamed classes)
Main.java:10: error: ';' expected
  rep(i,n){
          ^
Main.java:17: error: ';' expected
  for(auto& p:mp){
             ^
Main.java:17: error: ';' expected
  for(auto& p:mp){
                ^
Main.java:19: error: ';' expected
    ans+=(ll)s*(s-1)/2
                      ^
16 errors
Language: Java

package AtCoderBeginnerContest137;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.stream.Collectors;

public class C {
//public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] s = new String[n];
        for (int i = 0; i < n; i++) {
            String tmp = sc.next();
            s[i] = convert(tmp);
        }
        sc.close();

        Map<String, Integer> map = new HashMap<>();
        long ans = 0;
        for (int i = 0; i < n; i++) {
//            System.out.println(s[i]);
            if (map.keySet().contains(s[i])) {
                ans += map.get(s[i]);
            } else {
                map.put(s[i], 0);
            }
            map.put(s[i], map.get(s[i]) + 1);
        }
        System.out.println(ans);

    }

    static String convert(String input) {
        List<Character> list = new ArrayList<>();
        for (int i = 0; i < input.length(); i++) {
            list.add(input.charAt(i));
        }
        Collections.sort(list);
        String result = list.stream().map(e -> String.valueOf(e)).collect(Collectors.joining(""));
        return result;
    }
}


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'map' was not declared in this scope
   12 |   map<string,int> mp;
      |   ^~~
a.cc:4:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    3 | #include<vector>
  +++ |+#include <map>
    4 | #include<algorithm>
a.cc:12:13: error: expected primary-expression before ',' token
   12 |   map<string,int> mp;
      |             ^
a.cc:12:14: error: expected primary-expression before 'int'
   12 |   map<string,int> mp;
      |              ^~~
a.cc:17:5: error: 'mp' was not declared in this scope
   17 |     mp[s]++;
      |     ^~
a.cc:19:16: error: 'mp' was not declared in this scope
   19 |   for(auto b : mp){
      |                ^~
a.cc:21:12: error: expected initializer before '+=' token
   21 |     ll ans += c*(c-1)/2;
      |            ^~
a.cc:23:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   23 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

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

int64_t frac(int num){
  if(num < 2) return 0;
  int64_t res = 1;
  for(int i=2; i<=num; ++i){
    res *= i;
  }
  return res;
}

int main(){
  int n; cin >> n;
  vector<string> s(n);
  for(int i=0; i<n; ++i){
    string s; cin >> s;
    sort(s.at(i).begin(), s.at(i).end());
  }
  
  sort(s.begin(), s.end());
  string base = s.at(0);
  int64_t res = 0;
  for(int i=1; i<n; ++i){
    static int c = 0;
    if(base != s.at(i)){
      base = s.at(i);
      res += frac(c)/(frac(c-2)*2);
      c = 0;
      continue;
    }
    else ++c;
  }
  
  cout << res << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:18: error: request for member 'begin' in 's.std::__cxx11::basic_string<char>::at(((std::__cxx11::basic_string<char>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
   18 |     sort(s.at(i).begin(), s.at(i).end());
      |                  ^~~~~
a.cc:18:35: error: request for member 'end' in 's.std::__cxx11::basic_string<char>::at(((std::__cxx11::basic_string<char>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
   18 |     sort(s.at(i).begin(), s.at(i).end());
      |                                   ^~~
Language: C++

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

int64_t frac(num){
  if(num < 2) return 0;
  int64_t res = 1;
  for(int i=2; i<=num; ++i){
    res *= i;
  }
  return res;
}

int main(){
  int n; cin >> n;
  vector<string> s(n);
  for(int i=0; i<n; ++i){
    string s; cin >> s;
    sort(s.at(i).begin(), s.at(i).end());
  }
  
  sort(s.begin(), s.end());
  string base = s.at(0);
  int64_t res = 0;
  for(int i=1; i<n; ++i){
    static int c = 0;
    if(base != s.at(i)){
      base = s.at(i);
      res += frac(c)/(frac(c-2)*2);
      c = 0;
      continue;
    }
    else ++c;
  }
  
  cout << res << endl;
  return 0;
}


Compiler output:
a.cc:4:14: error: 'num' was not declared in this scope; did you mean 'enum'?
    4 | int64_t frac(num){
      |              ^~~
      |              enum
a.cc: In function 'int main()':
a.cc:18:18: error: request for member 'begin' in 's.std::__cxx11::basic_string<char>::at(((std::__cxx11::basic_string<char>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
   18 |     sort(s.at(i).begin(), s.at(i).end());
      |                  ^~~~~
a.cc:18:35: error: request for member 'end' in 's.std::__cxx11::basic_string<char>::at(((std::__cxx11::basic_string<char>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
   18 |     sort(s.at(i).begin(), s.at(i).end());
      |                                   ^~~
a.cc:28:18: error: 'frac' cannot be used as a function
   28 |       res += frac(c)/(frac(c-2)*2);
      |              ~~~~^~~
a.cc:28:27: error: 'frac' cannot be used as a function
   28 |       res += frac(c)/(frac(c-2)*2);
      |                       ~~~~^~~~~
Language: C++

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

int main(){
  int n; cin >> n;
  vector<vector<int>> num(n, vector<int>(27, 0));
  for(int i=0; i<n; ++i){
    int s; cin >> s;
    for(int j=0; j<10; ++j){
      int c = (int)s[j];
      ++num.at(i).at((int)c-97);
    }
  }
  
  int64_t r = 0;
  for(int i=0; i<n-1; ++i){
    for(int j=i+1; j<n; ++j){
      if(num.at(i) == num.at(j)) ++r;
    }
  }
  
  cout << r << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: invalid types 'int[int]' for array subscript
   10 |       int c = (int)s[j];
      |                     ^
Language: C++

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

int main(){
  int n; cin >> n;
  vector<vector<int>> num(n, vector<int>(27, 0));
  for(int i=0; i<n; ++i){
    int s; cin >> s;
    for(int j=0; j<10; ++j){
      int c = s[j];
      ++num.at(i).at((int)c-97);
    }
  }
  
  int64_t r = 0;
  for(int i=0; i<n-1; ++i){
    for(int j=i+1; j<n; ++j){
      if(num.at(i) == num.at(j)) ++r;
    }
  }
  
  cout << r << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: invalid types 'int[int]' for array subscript
   10 |       int c = s[j];
      |                ^
Language: C++

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

int main(){
  int n; cin >> n;
  vector<vector<int>> num(n, vector<int>(27, 0));
  for(int i=0; i<n; ++i){
    int s; cin >> s;
    for(int j=0; j<10; ++j){
      int c = s.at(j)
      ++num.at(i).at((int)c-97);
    }
  }
  
  int64_t r = 0;
  for(int i=0; i<n-1; ++i){
    for(int j=i+1; j<n; ++j){
      if(num.at(i) == num.at(j)) ++r;
    }
  }
  
  cout << r << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: request for member 'at' in 's', which is of non-class type 'int'
   10 |       int c = s.at(j)
      |                 ^~
Language: C

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

int main(){
    char h[11];
    int t,n,d=0;
    scanf("%d",&n);
    int sum=0;
    register int s[n];
    for(int k=0;k<n;k++){
        scanf("%s",h);
        for(int i=0;i<10;i++){
            sum+=h[i];
        }
        s[k]=sum;
        sum=0;
        if(k>0){
            for(int x=k-1;x>=0;x--){
                if(s[k]==s[x]){
                    d++;
                }
            }
        }
    }
    printf("%d\n",d);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:15:9: error: address of register variable 's' requested
   15 |         s[k]=sum;
      |         ^
main.c:19:17: error: address of register variable 's' requested
   19 |                 if(s[k]==s[x]){
      |                 ^~
main.c:19:17: error: address of register variable 's' requested
Language: Java

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

string sort(string str){
  	map<char, int> count;
	for(int i=0;i<str.length();i++){
    	count[str[i]]++;
    }
  	string ans="";
  	for(auto itr=count.begin();itr!=count.end();itr++){
    	ans += string(itr->second, itr->first);
    }
  	return ans;
}

ll combination(ll num){
	return (num*(num-1LL))/2LL;
}

int main(){
	int n;cin>>n;
  	map<string, int> mp;
  	while(n--){
    	string s;cin>>s;
        mp[sort(s)]++;
    }
  	ll ans=0LL;
  	for(auto itr=mp.begin();itr!=mp.end();itr++){
    	ans += combination(itr->second);
    }
  	cout<<ans<<endl;
	return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include<bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<bits/stdc++.h>
        ^
Main.java:3: error: class, interface, enum, or record expected
using namespace std;
^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
string sort(string str){
^
  (use --enable-preview to enable unnamed classes)
Main.java:18: error: not a statement
	return (num*(num-1LL))/2LL;
	                   ^
Main.java:18: error: not a statement
	return (num*(num-1LL))/2LL;
	                         ^
Main.java:18: error: ';' expected
	return (num*(num-1LL))/2LL;
	                    ^
Main.java:22: error: not a statement
	int n;cin>>n;
	         ^
Main.java:25: error: not a statement
    	string s;cin>>s;
    	            ^
Main.java:28: error: not a statement
  	ll ans=0LL;
  	         ^
Main.java:32: error: not a statement
  	cout<<ans<<endl;
  	         ^
11 errors
Language: C++

N = int(input())

S = []

a = ord("a")
for i in range(N):
    s = list(input())
    s.sort()
    s_= "".join(s)
    S.append(s_)
S.sort()

ans = 0
tmp = S[0]
# print(S)
for i in range(1, N):
    # print(tmp, S[i])
    if(tmp == S[i]):
        ans += 1
    else:
        tmp = S[i]

print(ans)



Compiler output:
a.cc:15:3: error: invalid preprocessing directive #print
   15 | # print(S)
      |   ^~~~~
a.cc:17:7: error: invalid preprocessing directive #print
   17 |     # print(tmp, S[i])
      |       ^~~~~
a.cc:1:1: error: 'N' does not name a type
    1 | N = int(input())
      | ^
Language: C++

#include <bits/stdc++.h>
#include<string.h>

using namespace std;

int main()
{
    int n,j,i,c=0;
    cin>>n;
    string a[n];
    for(i=0;i<n;i++)
    {
            cin>>a[i];
    }
    for(i=0;i<n;i++)
    {
        sort(a[i].begin(),a[i].end());
    }
    sort()
   
    for(i=0;i<n-1;i++)
    {
        for(j=i+1;j<n;j++)
        {
            if((strcmp(&a[i][0],&a[j][0]))==0)
                c++;
        }
    }
    cout<<c;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: no matching function for call to 'sort()'
   19 |     sort()
      |     ~~~~^~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)'
 4762 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4762:5: note:   candidate expects 2 arguments, 0 provided
/usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)'
 4793 |     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~
/usr/include/c++/14/bits/stl_algo.h:4793:5: note:   candidate expects 3 arguments, 0 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, 0 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, 0 provided
a.cc:21:22: error: expected ';' before ')' token
   21 |     for(i=0;i<n-1;i++)
      |                      ^
      |                      ;
Language: Java

import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner scan=new Scanner(System.in);
    long N=scan.nextlong();
    scan.nextLine();
    String[][] S=new String[N][10];
    String[] s=new String[N];
    for(long i=0;i<N;i++){
      S[i]=scan.nextLine().split("");
      Arrays.sort(S[i]);
      s[i]="";
    }
    for(long i=0;i<N;i++){
      for(long j=0;j<10;j++){
        s[i]+=S[i][j];
      }
    }
    long count=0;
    for(long i=0;i<N;i++){
      for(long j=i+1;j<N;j++){
        if(s[i].equals(s[j])){
          count++;
        }
      }
    }
    System.out.println(count);
  }
}

Compiler output:
Main.java:5: error: cannot find symbol
    long N=scan.nextlong();
               ^
  symbol:   method nextlong()
  location: variable scan of type Scanner
Main.java:7: error: incompatible types: possible lossy conversion from long to int
    String[][] S=new String[N][10];
                            ^
Main.java:8: error: incompatible types: possible lossy conversion from long to int
    String[] s=new String[N];
                          ^
Main.java:10: error: incompatible types: possible lossy conversion from long to int
      S[i]=scan.nextLine().split("");
        ^
Main.java:11: error: incompatible types: possible lossy conversion from long to int
      Arrays.sort(S[i]);
                    ^
Main.java:12: error: incompatible types: possible lossy conversion from long to int
      s[i]="";
        ^
Main.java:16: error: incompatible types: possible lossy conversion from long to int
        s[i]+=S[i][j];
          ^
Main.java:16: error: incompatible types: possible lossy conversion from long to int
        s[i]+=S[i][j];
                ^
Main.java:16: error: incompatible types: possible lossy conversion from long to int
        s[i]+=S[i][j];
                   ^
Main.java:22: error: incompatible types: possible lossy conversion from long to int
        if(s[i].equals(s[j])){
                         ^
Main.java:22: error: incompatible types: possible lossy conversion from long to int
        if(s[i].equals(s[j])){
             ^
11 errors
Language: C++

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

bool read(string a,string b){
  vector<char>al(26);
vector<char>al={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
  vector<int>A(26,0);
  vector<int>B(26,0);
  for(int p=0;p<10;p++){
    for(int q=0;q<26;q++){
      if(a[p]==al[q])A[q]++;
      if(b[p]==al[q])B[q]++;
    }
  }
  if(A==B) return true;
  else return false;
}
int main(){
  int N;
  cin>>N;
  vector<string>s(N);
  
  for(int i=0;i<N;i++)cin>>s[i];
  long x=0;
  for(int i=0;i<N;i++){
    for(int j=i+1;j<N;j++){
      if(read(s[i],s[j])) x++;
    }
  }
  cout<<x<<endl;
}
  

Compiler output:
a.cc: In function 'bool read(std::string, std::string)':
a.cc:6:13: error: redeclaration of 'std::vector<char> al'
    6 | vector<char>al={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
      |             ^~
a.cc:5:15: note: 'std::vector<char> al' previously declared here
    5 |   vector<char>al(26);
      |               ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
vector<char>al(26);
vector<char>al={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
bool read(string a,string b){
  vector<int>A(26,0);
  vector<int>B(26,0);
  for(int p=0;p<10;p++){
    for(int q=0;q<26;q++){
      if(a[p]==al[q])A[q]++;
      if(b[p]==al[q])B[q]++;
    }
  }
  if(A==B) return true;
  else return false;
}
int main(){
  int N;
  cin>>N;
  vector<string>s(N);
  for(int i=0;i<N;i++)cin>>s[i];
  long x=0;
  for(int i=0;i<N;i++){
    for(int j=i+1;j<N;j++){
      if(read(s[i],s[j])) x++;
    }
  }
  cout<<x<<endl;
}
  

Compiler output:
a.cc:4:13: error: redefinition of 'std::vector<char> al'
    4 | vector<char>al={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
      |             ^~
a.cc:3:13: note: 'std::vector<char> al' previously declared here
    3 | vector<char>al(26);
      |             ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
vector<char>al(26);
al={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
bool read(string a,string b){
  vector<int>A(26,0);
  vector<int>B(26,0);
  for(int p=0;p<10;p++){
    for(int q=0;q<26;q++){
      if(a[p]==al[q])A[q]++;
      if(b[p]==al[q])B[q]++;
    }
  }
  if(A==B) return true;
  else return false;
}
int main(){
  int N;
  cin>>N;
  vector<string>s(N);
  for(int i=0;i<N;i++)cin>>s[i];
  long x=0;
  for(int i=0;i<N;i++){
    for(int j=i+1;j<N;j++){
      if(read(s[i],s[j])) x++;
    }
  }
  cout<<x<<endl;
}
  

Compiler output:
a.cc:4:1: error: 'al' does not name a type
    4 | al={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
      | ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
vector<char>al(26)={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
bool read(string a,string b){
  vector<int>A(26,0);
  vector<int>B(26,0);
  for(int p=0;p<10;p++){
    for(int q=0;q<26;q++){
      if(a[p]==al[q])A[q]++;
      if(b[p]==al[q])B[q]++;
    }
  }
  if(A==B) return true;
  else return false;
}
int main(){
  int N;
  cin>>N;
  vector<string>s(N);
  for(int i=0;i<N;i++)cin>>s[i];
  long x=0;
  for(int i=0;i<N;i++){
    for(int j=i+1;j<N;j++){
      if(read(s[i],s[j])) x++;
    }
  }
  cout<<x<<endl;
}
  

Compiler output:
a.cc:3:19: error: expected ',' or ';' before '=' token
    3 | vector<char>al(26)={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
      |                   ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<string> p(N);
  for (int i = 0; i < N; i++) {
    cin >> p.at(i);
    sort(p.at(i).begin(), p.at(i).end());
  }
  sort(p.begin(), p.end());
  long long int c = 0;
  t = 0;
  while (t < N - 1) {
    long long int a = 1;
    for (int i = t + 1; i < N; i++) {
      if (p.at(t) == p.at(i)) {
        a++;
      }
      else {
        t = i;
        c += a * (a - 1) / 2;
        break;
      }
      if (i == N - 1) {
        c += a * (a - 1) / 2;
        t = N - 1;
      }
    }
  }
  printf("%lld\n", c);      
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 't' was not declared in this scope
   14 |   t = 0;
      |   ^
Language: C++

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

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

  long long int ans = 0;

  for(int i=0;i<N;i++) {
    if(taked[i]) {
      continue;
    }
    long long int total = 1;
    for(int j=i+1;j<N;j++) {
      if(taked[j]) {
        continue;
      }
      if(s[i] == s[j]) {
        taked[j] = true;
        total++;
      }
    }

    ans += total * (total-1) / 2;
  }

  cout << ans << endl;

  return 0;
}

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

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

int N, ans=0;
vector<string> s;

int main(){
    cin >> N;
    string s_in;
    for(int i=0; i<N; i++){
        cin >> s_in;
        sort(s_in.begin(), s_in.end());
        s.push_back(s_in);
    }
    for(int i=0; i<N; i++){
        for(int j=i+1; j<N; j++){
            if(s[i] == s[j]) ans += 1;
        }
    }
    cout << ans << endl;
    return 0;
}

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

#include<iostream>
#include<vector>
#include<string>
#define MAX 100001
using namespace std;

int main(){
    int N, ans=0;
    vector<string> s;
    cin >> N;
    string s_in;
    for(int i=0; i<N; i++){
        cin >> s_in;
        sort(s_in.begin(), s_in.end());
        s.push_back(s_in);
    }
    for(int i=0; i<N; i++){
        for(int j=i+1; j<N; j++){
            if(s[i] == s[j]) ans += 1;
        }
    }
    cout << ans << endl;
    return 0;
}

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

#include<iostream>
#include<vector>
#include<string>
#define MAX 100001
using namespace std;

int N, ans=0;
vector<string> s;

int main(){
    cin >> N;
    string s_in;
    for(int i=0; i<N; i++){
        cin >> s_in;
        sort(s_in.begin(), s_in.end());
        s.push_back(s_in);
    }
    for(int i=0; i<N; i++){
        for(int j=i+1; j<N; j++){
            if(s[i] == s[j]) ans += 1;
        }
    }
    cout << ans << endl;
    return 0;
}

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

#include<iostream>
#include<vector>
#include<string>
#define MAX 100001
using namespace std;

int N, ans=0;
vector<string> s;

int main(){
    cin >> N;
    string s_in;
    for(int i=0; i<N; i++){
        cin >> s_in;
        sort(s_in.begin(), s_in.end());
        s.push_back(s_in);
    }
    for(int i=0; i<N; i++){
        for(int j=i+1; j<N; j++){
            if(s[i] == s[j]) ans += 1;
        }
    }
    cout << ans << endl;
}

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

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

using ll = long long;
// #define int long long

#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPS(i, r, n) for (int i = (r); i < (n); ++i)
#define REPR(i, n) for(int i = (n); i >= 0; --i) // from n to 0
#define REPRS(i, r, n) for(int i = (n); i >= (r); --i) // from n to r
#define COUTB(x) cout << (x) << "\n"
#define COUTS(x) cout << (x) << " "
#define PB push_back
#define SORT(obj) sort((obj).begin(), (obj).end())
#define SORTR(obj) sort((obj).begin(), (obj).end(), greater<>())
#define ALL(obj) (obj).begin(), (obj).end()
#define MOD 1000000007
#define PI (acos(-1))

ll dp[100005];

ll factorial(int number){
  int ans = 1;
  while(number > 1){
    ans *= number;
    --number;
  }
  return ans;
}

ll NPR(int n, int r) {
  return factorial(n)/factorial(n-r);
}

llnt NCR (int n, int r){
  return NPR(n,r)/factorial(r);
}

ll combi(int n) {
  if(dp[n] != 0) return dp[n];
  dp[n] = NCR(n, 2);
  return dp[n];
}


/***** MAIN *****/
signed main() {
  int n;
  int ans = 0;
  cin >> n;
  vector<vector<char>> v_vector(n);
  REP(i,n) {
    string s;
    cin >> s;
    vector<char> v(ALL(s));
    SORT(v);
    v_vector[i] = v;
  }
  
  SORT(v_vector);
  
  int tmp = 1;
  REPS(i, 1, n) {
    if(v_vector[i] == v_vector[i-1]) {
      tmp++;
    } else {
      ans += combi(tmp);
      tmp = 1;
    }
  }
  ans += combi(tmp);
  cout << ans;
  cout << "\n";
  return 0;
}
/***** MAIN *****/


Compiler output:
a.cc:35:1: error: 'llnt' does not name a type
   35 | llnt NCR (int n, int r){
      | ^~~~
a.cc: In function 'll combi(int)':
a.cc:41:11: error: 'NCR' was not declared in this scope; did you mean 'NPR'?
   41 |   dp[n] = NCR(n, 2);
      |           ^~~
      |           NPR
Language: C++

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

#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPS(i, r, n) for (int i = (r); i < (n); ++i)
int factorial(int number){
  int ans = 1;
  while(number > 1){
    ans *= number;
    --number;
  }
  return ans;
}

int NPR(int n, int r) {
  return factorial(n)/factorial(n-r);
}

int NCR (int n, int r){
  return NPR(n,r)/factorial(r);
}


/***** MAIN *****/
signed main() {
  int n;
  int ans = 0;
  cin >> n;
  vector<vector<char>> v_vector(n);
  string s;
  REP(i,n) {
    cin >> s;
    vector<char> v(ALL(s));
    SORT(v);
    v_vector[i] = v;
  }
  REP(i,n) {
    REPS(j, i+1, n) {
      if(v_vector[i] == v_vector[j]) ++ans;
    }
  }
  cout << ans;
  cout << "\n";
  return 0;
}
/***** MAIN *****/


Compiler output:
a.cc: In function 'int main()':
a.cc:33:20: error: 'ALL' was not declared in this scope
   33 |     vector<char> v(ALL(s));
      |                    ^~~
a.cc:34:5: error: 'SORT' was not declared in this scope
   34 |     SORT(v);
      |     ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'map' was not declared in this scope
   11 |   map<string,ll> mp;
      |   ^~~
a.cc:4:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    3 | #include<vector>
  +++ |+#include <map>
    4 | #define rep(i,n) for(int i=0;i<n;i++)
a.cc:11:13: error: expected primary-expression before ',' token
   11 |   map<string,ll> mp;
      |             ^
a.cc:11:16: error: expected primary-expression before '>' token
   11 |   map<string,ll> mp;
      |                ^
a.cc:11:18: error: 'mp' was not declared in this scope
   11 |   map<string,ll> mp;
      |                  ^~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'map' was not declared in this scope
   11 |   map<string,ll> mp;
      |   ^~~
a.cc:4:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    3 | #include<vector>
  +++ |+#include <map>
    4 | #define rep(i,n) for(int i=0;i<n;i++)
a.cc:11:13: error: expected primary-expression before ',' token
   11 |   map<string,ll> mp;
      |             ^
a.cc:11:16: error: expected primary-expression before '>' token
   11 |   map<string,ll> mp;
      |                ^
a.cc:11:18: error: 'mp' was not declared in this scope
   11 |   map<string,ll> mp;
      |                  ^~
Language: C++

#include <iomanip>
#include <ios>
#include <vector>
#include <string>
#include <algorithm>
#include <string>
#include<limits>
#include<cstdlib>
#include<functional>
#include<cassert>
#include <cstdio>
#include <stack>
#include <queue>
#include <map>
#define fi(p) for(int i=0;i<(p);i++)
#define ce(d) cout<<d<<endl;
#define ll long long
#define sorts(c) sort((c).begin(),(c).end());

using namespace std;

void solve() {
	ll sum=0;
	int N;
	cin >> N;
	vector<string> L(N);

	fi(N) {
		cin >> L[i];
		sorts(L[i]);
	}
	
	sorts(L);

/*	for (int i = 0; i < N-1; i++) {
		for (int n = i+1; n < N; n++) {
			for (int l = 0; l < 10;l++) {
				if (L[i][l] != L[n][l]) {
					break;
				}
				if (l == 9) {
					sum++;
				}
			}
			
		}
	}
*/


/*	fi(N-1) {
		cout << "i=" << i << endl;
		for (int n = i + 1; n < N; n++) {
			
			if (L[i] == L[n]) {
				count++;
				ce("count");
			}
			else {
				sum += (count * (count - 1)) / 2;
				count = 1;
				i = n;
				ce("No");
				n = N;
			}
		}
	}*/
	int count = 1;
	for (int i = 0; i < N; i++) {
		for (int n = i + 1; n < N; n++) {
			if (L[i] == L[n]) {
				count++;
				if (n == N - 1) {
					sum += (count*(count - 1)) / 2;
				}
			}
			else {
				sum += (count*(count - 1)) / 2;
				count = 1;
				i = n-1;
				n = N;
			}
		}
	}


	ce(sum);
}



int main()
{

	solve();

	int a;//止める用
	cin >> a;
	return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:25:9: error: 'cin' was not declared in this scope
   25 |         cin >> N;
      |         ^~~
a.cc:15:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
   14 | #include <map>
  +++ |+#include <iostream>
   15 | #define fi(p) for(int i=0;i<(p);i++)
a.cc:16:15: error: 'cout' was not declared in this scope
   16 | #define ce(d) cout<<d<<endl;
      |               ^~~~
a.cc:87:9: note: in expansion of macro 'ce'
   87 |         ce(sum);
      |         ^~
a.cc:16:15: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
   16 | #define ce(d) cout<<d<<endl;
      |               ^~~~
a.cc:87:9: note: in expansion of macro 'ce'
   87 |         ce(sum);
      |         ^~
a.cc: In function 'int main()':
a.cc:98:9: error: 'cin' was not declared in this scope
   98 |         cin >> a;
      |         ^~~
a.cc:98:9: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<iostream>
#include <iomanip>
#include <ios>
#include <vector>
#include <string>
#include <algorithm>
#include <string>
#include<limits>
#include<cstdlib>
#include<functional>
#include<cassert>
#include <cstdio>
#include <stack>
#include <queue>
#include <map>
#define fi(p) for(int i=0;i<(p);i++)
#define ce(d) cout<<d<<endl;
#define ll long long
#define sorts(c) sort((c).begin(),(c).end());

using namespace std;

void solve() {
	ll sum=0;
	int N;
	cin >> N;
	vector<string> L(N);

	fi(N) {
		cin >> L[i];
		sorts(L[i]);
	}
	
	sorts(L);

/*	for (int i = 0; i < N-1; i++) {
		for (int n = i+1; n < N; n++) {
			for (int l = 0; l < 10;l++) {
				if (L[i][l] != L[n][l]) {
					break;
				}
				if (l == 9) {
					sum++;
				}
			}
			
		}
	}
*/


/*	fi(N-1) {
		cout << "i=" << i << endl;
		for (int n = i + 1; n < N; n++) {
			
			if (L[i] == L[n]) {
				count++;
				ce("count");
			}
			else {
				sum += (count * (count - 1)) / 2;
				count = 1;
				i = n;
				ce("No");
				n = N;
			}
		}
	}*/
	int count = 1;
	for (int i = 0; i < N; i++) {
		for (int n = i + 1; n < N; n++) {
			if (L[i] == L[n]) {
				count++;
				if (n == N - 1) {
					sum += (count*(count - 1)) / 2;
				}
			}
			else {
				sum += (count*(count - 1)) / 2;
				count = 1;
				i = n-1;
				n = N;
			}
		}
	}


	ce(sum);
}

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

#include<iostream>
#include<string>
#include<vector>
#include<unordered_map>
#include<algorithm>
#include<cmath>
#include<limits>
using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)

typedef long long ll;

int main() {

	int n;
	cin >> n;
	vector<string> s;
	string tmp;
	vector<vector<int>> abc_count(n, vector<int>(26)); //アルファベットの登場回数を記録するn*26配列;
	REP(i, n) {
		cin >> tmp;
		s.push_back(tmp);
		REP(j, 10) {
			abc_count[i][(int)s[i][j] - 97]++;
		}

	}

	ll ans = 0;

	REP(i, n - 1) {
		FOR(j, i + 1, n) {
			bool ok_flg = true;
			REP(k, 26) {
				if (abc_count[i][k] != abc_count[j][k]) ok_flg = false;
			}
			if (ok_flg) ans++;
		}
	}

	cout << ans << endl;

	return 0;


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

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
int main(){
  int N;
  cin>>N;
  vector<string> S(N);
  rep(i,N){
    cin>>S.at(i);
    sort(S.at(i).begin(),S.at(i).end());
  }
  long long ans=0;
  sort(S.begin(),S.end());
  int i=1,sum=0;
  rep(i,N-1){
    if(S.at(i)==S.at(i+1)){
      sum++;
    }
    else{
      ans+=sum*(sum-1)/2;
      sum=0
    }
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:12: error: expected ';' before '}' token
   21 |       sum=0
      |            ^
      |            ;
   22 |     }
      |     ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define int long long
int main(){
  int N;
  cin>>N;
  vector<string> S(N);
  rep(i,N){
    cin>>S.at(i);
    sort(S.at(i).begin(),S.at(i).end());
  }
  int ans=0;
  sort(S.begin(),S.end());
  rep(i,N-1){
    for(int j=i+1;j<N;j++){
      if(S.at(i)==S.at(j))
        ans++;
      else if(S.at(i)<S.at(j)) break;
    }
  }
  cout<<ans<<endl;
}


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

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define int long long
int main(){
  int N;
  cin>>N;
  vector<string> S(N);
  rep(i,N){
    cin>>S.at(i);
    sort(S.at(i).begin(),S.at(i).end());
  }
  int ans=0;
  sort(S.begin(),S.end());
  rep(i,N-1){
    for(int j=i+1;j<N;j++){
      if(S.at(i)==S.at(j))
        ans++;
      else if(s.at(i)<S.at(j)) break;
    }
  }
  cout<<ans<<endl;
}


Compiler output:
cc1plus: error: '::main' must return 'int'
a.cc: In function 'int main()':
a.cc:19:15: error: 's' was not declared in this scope
   19 |       else if(s.at(i)<S.at(j)) break;
      |               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define int long long
int main(){
  int N;
  cin>>N;
  vector<string> S(N);
  rep(i,N){
    cin>>S.at(i);
    sort(S.at(i).begin(),S.at(i).end());
  }
  int ans=0;
  rep(i,N-1){
    for(int j=i+1;j<N;j++){
      if(S.at(i)==S.at(j))
        ans++;
    }
  }
  cout<<ans<<endl;
}

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

#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <algorithm>
#include <unordered_map>

int main()
{
	unsigned long long N = 0, ans = 0;

	std::cin >> N;
	std::vector<std::string> S(N);

	for (long long i = 0; i < N; i++)
	{
		std::cin >> S[i];
		std::sort(S[i].begin(), S[i].end());
	}

	for (long long i = 0; i < S.size() - 1; i++)
	{
		for (long long j = i + 1; j < S.size(); j++)
		{
			ans += (S[i] == S[j]) ? 1 : 0;
			if (S[i] == S[j]){
				S.erase(S.begin() + j)
					j--;
			}
		}
	}

	std::cout << ans << std::endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:55: error: expected ';' before 'j'
   27 |                                 S.erase(S.begin() + j)
      |                                                       ^
      |                                                       ;
   28 |                                         j--;
      |                                         ~
Language: C++

#各文字列をソートしながらハッシュテーブルへぶち込む
import sys
input = sys.stdin.readline

def cmb(n, r):
    if n - r < r: r = n - r
    if n == 1: return 0
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result
 
N = int(input())
table = {}
cache = {}
for x in range(N):
    s = ''.join(sorted(list(input())))
    s = s.strip()
    if s in table:
        table[s] = table[s] + 1
    else:
        table[s] = 1

ans = 0
for x in table:
    if table[x] not in cache:
        p = cmb(table[x], 2)
        cache[x] = p
    ans = ans + cache[x]
    #print("{}: {} → {}".format(x, table[x], cache[x]))
print(ans)


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #\U00005404\U00006587\U00005b57\U00005217\U00003092\U000030bd\U000030fc\U000030c8\U00003057\U0000306a\U0000304c\U00003089\U000030cf\U000030c3\U000030b7\U000030e5\U000030c6\U000030fc\U000030d6\U000030eb\U00003078\U00003076\U00003061\U00008fbc\U00003080
    1 | #各文字列をソートしながらハッシュテーブルへぶち込む
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:33:9: error: empty character constant
   33 |     s = ''.join(sorted(list(input())))
      |         ^~
a.cc:46:6: error: invalid preprocessing directive #print
   46 |     #print("{}: {} → {}".format(x, table[x], cache[x]))
      |      ^~~~~
a.cc:2:1: error: 'import' does not name a type
    2 | import sys
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:31:1: error: 'cache' does not name a type
   31 | cache = {}
      | ^~~~~
a.cc:32:1: error: expected unqualified-id before 'for'
   32 | for x in range(N):
      | ^~~
Language: C++

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

int combination(int x, int y){
	if(x < y) return 0;
	int a = 1;
	int b = 1;
	rep(i,y){
		a *= i+1;
		b *= x-i;	
	}
	return b/a;
}

		

int main(){
	int n;
	cin >> n;
	vector<string> s(n+1);
	rep(i,n){
		cin >> s[i];
		sort(s[i].begin(), s[i].end());
	}
	sort(s.begin(), s.end());
	int ans=0, count=1;
	string tmp = NULL;
	s[n] = NULL;
	rep(i,n+1){
		if(tmp == s[i]){
			count++;
		}else{
			tmp = s[i];
			ans += combination(count, 2);
			count=1;
		}
	}		
	cout << ans << endl;
	return 0;
}

Compiler output:
In file included from /usr/include/uchar.h:29,
                 from /usr/include/c++/14/cuchar:57,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:134,
                 from a.cc:1:
a.cc: In function 'int main()':
a.cc:31:16: error: ambiguous overload for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} and 'long int')
   31 |         s[n] = NULL;
      |                ^~~~
In file included 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:
/usr/include/c++/14/bits/basic_string.h:817:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  817 |       operator=(const basic_string& __str)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:828:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  828 |       operator=(const _CharT* __s)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:840:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  840 |       operator=(_CharT __c)
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:858:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator=(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
  858 |       operator=(basic_string&& __str)
      |       ^~~~~~~~
Language: C

#coding: utf-8
import math
import heapq
import bisect

MOD = 10**9+7

N = int(input())

D = dict()
for i in range(N):
    a = input()
    a = ''.join(sorted(a))
    if a in D:
        D[a] = D[a]+1
    else:
        D[a] = 1

ans = 0
for i in D:
    ans += D[i]*(D[i]-1)//2

print(ans)

Compiler output:
main.c:1:2: error: invalid preprocessing directive #coding
    1 | #coding: utf-8
      |  ^~~~~~
main.c:2:1: error: unknown type name 'import'
    2 | import math
      | ^~~~~~
main.c:3:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'import'
    3 | import heapq
      | ^~~~~~
main.c:3:1: error: unknown type name 'import'
main.c:13:9: error: empty character constant
   13 |     a = ''.join(sorted(a))
      |         ^~
Language: C++

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

using namespace std;

#define int long long

signed main()
{
    int n;
    vector<string> s;
    map<string, int> s_count;

    cin >> n;

    s.resize(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());

        if(s_count.count(s[i]) == 0)
        {
            s_count[s[i]] = 1;
        }
        else
        {
            ++s_count[s[i]];
        }
    }

    int ans = 0;
    for(auto count : s_count)
    {
        ans += count.second * (count.second - 1) / 2LL;
    }

    cout << ans << endl;
}

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

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

using namespace std;

#define int long long

signed main()
{
    int n;
    vector<string> s;
    map<string, int> s_count;

    cin >> n;

    s.resize(n);

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

    for(int i = 0; i < n; ++i)
    {
        map<char, int> chars;
        string sorted_s = "";

        for(int j = 0; j < s[i].size(); ++j)
        {
            ++chars[s[i][j]];
        }

        for(auto c : chars)
        {
            sorted_s += c.first;
        }

        if(s_count.count(sorted_s) == 0)
        {
            s_count[sorted_s] = 1;
        }
        else
        {
            ++s_count[sorted_s];
        }
    }

    int ans = 0;
    for(auto count : s_count)
    {
        ans += count.second * (count.second - 1) / 2;
    }

    cout << ans << endl;
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: Java


import static java.util.Arrays.sort;
import java.util.Scanner;

/**
 *
 * @author cs18097
 */
public class GreenBin {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] ary = new String[n];
        String[] ans = new String[n];
        long poyo = 0;
        for(int i = 0;i < n;i++){
            String tmp = sc.next();
            char[] hoge = new char[10];
            for(int j = 0;j < 10;j++){
                hoge[j] = tmp.charAt(j);
            }
            sort(hoge);
            StringBuilder bl = new StringBuilder();
            bl.append(hoge);
            tmp = bl.toString();
            ary[i] = tmp;            
        }
        for(int i = 0; i < n;i++){
            for(int j = 0;j < n;j++){
                if(i!=j&&ary[i].equals(ary[j]))poyo++;
            }
        }
        System.out.print(poyo/2);
    }
    
}


Compiler output:
Main.java:9: error: class GreenBin is public, should be declared in a file named GreenBin.java
public class GreenBin {
       ^
1 error