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

#include<algorithm>
#include<cmath>
#include<deque>
#include<iomanip>
#include<iostream>
#include<list>
#include<numeric> //xとyの最大公約数は__gcd(x,y),xとyの最小公倍数は(x*y)/__gcd
#include<string>
#include<vector>

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

int main(){
  ll n;
  cin >> n;
  vector<string>  s(n);
  rep(i,n){
    cin >> s[i];
  }
  vector<int> sum(n,0);
  rep(i,n){
    for(int j = 0; j < 10; j++){
      sum += atoi(s[i][j]);
    }
  }
  int ans = 0;
  rep(i,n){
    for(int j = i+1; j < n; j++){
      if(sum[i] == sum[j]){
        ans++;
      }
    }
  }
  cout << ans;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:18: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   27 |       sum += atoi(s[i][j]);
      |              ~~~~^~~~~~~~~
      |                  |
      |                  __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/bits/stl_algo.h:71,
                 from /usr/include/c++/14/algorithm:61,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:27:11: error: no match for 'operator+=' (operand types are 'std::vector<int>' and 'int')
   27 |       sum += atoi(s[i][j]);
      |       ~~~~^~~~~~~~~~~~~~~~
Language: C

#include<stdio.h>

int main(void){
    int N;
    scanf("%d",&N);

    char s[N][11];

    int i,j;

    int f[N];

    int ni[26];

    int count[N] ;

    for(i=0;i<N;i++){
        count[i]=0;
    }

    ni[0]=1;

    for(i=1;i<26;i++){
        ni[i]=ni[i-1]*2;
    }

    for(i=0;i<N;i++){
        f[i]=0;
    }

   

    for(i=0;i<N;i++){
        scanf("%s",s[i]);
        for(j=0;j<10;j++){
            int al=s[i][j]-'a';
            f[i]+=ni[al];
        }
    }

    for(i=0;i<N;i++){
        for(j=i+1;j<N;j++){
            if(f[i]==f[j]){
                count++;
            }
        }
    }


    /*for(i=0;i<N;i++){
       
        printf("%d\n",f[i]);
       
    }*/

    printf("%d",count);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:44:22: error: lvalue required as increment operand
   44 |                 count++;
      |                      ^~
Language: Java

import java.util.*;

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

Compiler output:
Main.java:31: error: incompatible types: possible lossy conversion from long to int
        kk=calc(ss,n,sk);
                     ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error
Language: C++

#include<algorithm>
#include<cmath>
#include<deque>
#include<iomanip>
#include<iostream>
#include<list>
#include<numeric> //xとyの最大公約数は__gcd(x,y),xとyの最小公倍数は(x*y)/__gcd
#include<string>
#include<vector>

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

int main(){
  ll n;
  cin >> n;
  vector<string>  s(n);
  rep(i,n){
    cin >> s[i];
  }
  vector<int> sum(n,0);
  rep(i,n){
    for(int j = 0; j < 10; j++){
      sum += s[i][j];
    }
  }
  int ans = 0;
  rep(i,n){
    for(int j = i+1; j < n; j++){
      if(sum[i] == sum[j]){
        ans++;
      }
    }
  }
  cout << ans;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:11: error: no match for 'operator+=' (operand types are 'std::vector<int>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
   27 |       sum += s[i][j];
Language: C++

#include<algorithm>
#include<cmath>
#include<deque>
#include<iomanip>
#include<iostream>
#include<list>
#include<numeric> //xとyの最大公約数は__gcd(x,y),xとyの最小公倍数は(x*y)/__gcd
#include<string>
#include<vector>

#include<map>
#include<set>
#define rep0_n(i,n) for(int i=0; i<n; i++)
#define reps_n(i, s, n) for(int i=s; i<n; i++)
typedef long long ll;
using namespace std;

int main(){
  ll n;
  cin >> n;
  vector<string>  s(n);
  rep(i,n){
    cin >> s[i];
  }
  vector<int> sum(n,0);
  rep(i,n){
    for(int j = 0; j < 10; j++){
      sum += s[i][j];
    }
  }
  int ans = 0;
  rep(i,n){
    for(int j = i+1; j < n; j++){
      if(sum[i] == sum[j]){
        ans++;
      }
    }
  }
  cout << ans;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:7: error: 'i' was not declared in this scope
   22 |   rep(i,n){
      |       ^
a.cc:22:3: error: 'rep' was not declared in this scope; did you mean 'frexp'?
   22 |   rep(i,n){
      |   ^~~
      |   frexp
Language: C

import java.util.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        var stdin = new BufferedReader(new InputStreamReader(System.in));
        
        Long count = new Long(0);

        Integer n = Integer.parseInt(stdin.readLine());
        
        Map<String, Integer> map = new HashMap<>();
        
        // 標準入力を1行ずつ読み出す。
        String line;
        while ((line = stdin.readLine()) != null) {
            char[] chars = line.toCharArray();
            Arrays.sort(chars);
            String newStr = new String(chars);
            Integer temp = map.get(newStr);
            if (temp == null) {
                map.put(newStr, 1);
            } else {
                count += temp;
                map.put(newStr, temp+1);
            }
        }
        System.out.println(count);
    }
}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.*;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.*;
      |            ^
main.c:2:1: error: unknown type name 'import'
    2 | import java.io.BufferedReader;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.io.BufferedReader;
      |            ^
main.c:3:1: error: unknown type name 'import'
    3 | import java.io.InputStreamReader;
      | ^~~~~~
main.c:3:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    3 | import java.io.InputStreamReader;
      |            ^
main.c:5:1: error: unknown type name 'public'
    5 | public class Main {
      | ^~~~~~
main.c:5:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    5 | public class Main {
      |              ^~~~
Language: C++

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

int main(){
  int N;
  cin >>N;
  vector<string> s(N);
  for(int t = 0;t<N;t++){
    cin >>s.at(t);
  }
  for(int t =0 ;t<N;t++){
    sort(s.at(t).begin(),s.at(t).end());
  }
  sort(s.begin(),s.end());
  int i = 0;
  int tmp=1;
  queue<int> t;
  while(i<N-1){
    if(s.at(i)==s.at(i+1)){
      tmp++;
    }else{
      t.push(tmp);
      tmp=1;
    }
    i++;
  }
  long long ans=0;
  for(int i=0;i<t.size();i++){
    tmp = t.front();
    if(tmp==0){
    }else if(tmp==1){
      ans++}else{
    ans +=tmp*(tmp-1)/2;
    t.pop();}
  }
  cout <<ans<<endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:32:12: error: expected ';' before '}' token
   32 |       ans++}else{
      |            ^
      |            ;
Language: C++

#include <vector>
#include <iostream>
#include <algorithm>
#include <functional>

using namespace std;

int main(void)
{
  int i,j,k,n;
  long ans = 0;
  string buff;

  cin >> n;

  vector<string> S;
  for(i = 0;i < n;i++){
    cin >> buff;
    S.push_back(buff);
  }

  sort(S.begin(),S.end(),generator<char*>());

  for(i = 0;i < n - 1;i++){
    for(j = i + 1;j < n;j++){
      if(S[i] == S[j]) ans++;
    }
  }


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


Compiler output:
a.cc: In function 'int main()':
a.cc:22:26: error: 'generator' was not declared in this scope
   22 |   sort(S.begin(),S.end(),generator<char*>());
      |                          ^~~~~~~~~
a.cc:22:36: error: expected primary-expression before 'char'
   22 |   sort(S.begin(),S.end(),generator<char*>());
      |                                    ^~~~
Language: C

#include <stdio.h>
#include <math.h>
int main(void){
    
    // C - Green Bin
    
    // 22:40
    
    int n;
    
    scanf("%d", &n);
    
    for(int x=1; x<=n; x++){
        
        char s[x[99]];
        scanf("%s", s[x]);
        
    }
    
    for(int i=0, i<10, i++){
        
        for(int j=0, j<10, j++){
            
            s[i];
            
        }
        
    }
    
    return 0;
    
}

Compiler output:
main.c: In function 'main':
main.c:15:17: error: subscripted value is neither array nor pointer nor vector
   15 |         char s[x[99]];
      |                 ^
main.c:20:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   20 |     for(int i=0, i<10, i++){
      |                   ^
main.c:30:5: error: expected expression before 'return'
   30 |     return 0;
      |     ^~~~~~
main.c:32:1: error: expected expression before '}' token
   32 | }
      | ^
main.c:32:1: error: expected expression before '}' token
Language: C++

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


int main() {
	int N;
	cin >> N;
	vector<vector<char>> s(N, vector<char>(10));
	for(int i = 0; i < N; i++){
		for(int j = 0; j < 10; j++){
			cin >> s.at(i).at(j);
		}
	}
	int counter1 = 0;
	for(int i = 0; i < N - 1; i++){
		int counter2 = 0;
		for(int j = i + 1; j < N; j++){
			if(sort(s.at(i).begin(), s.at(i).end()) == sort(s.at(j).begin(), s.at(j).end())){
				counter2++;
			}
			if(counter2 != 0){
				counter2++;
			}
		}
		counter1 += counter2;
	}
	cout << (counter1 * (counter1 - 1)) / 2 << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:65: error: invalid operands of types 'void' and 'void' to binary 'operator=='
   18 |                         if(sort(s.at(i).begin(), s.at(i).end()) == sort(s.at(j).begin(), s.at(j).end())){
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                |                                       |
      |                                void                                    void
Language: C++

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


int main()
{
	int num = 0;

	std::cin >> num;

	if (num <= 0)
	{
		std::cout << 0 << std::endl;
		return 0;
	}

	std::vector<char*> str(num);

	for (int i = 0; i < num; ++i)
	{
		str[i] = new char[10];
		std::cin >> str[i];
		std::sort(str[i], str[i]);
	}

	int fitNum = 0;

	for (int i = 0, n = num - 1; i < n; ++i)
	{
		for (int j = i + 1; j < num; ++j)
		{
			if (std::strcmp(str[i], str[j]) == 0)
			{
				fitNum++;
			}
		}
	}

	std::cout << fitNum << std::endl;

	return 0;
}

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

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

int main(){
  int N;
  long cnt=0;
  string str;
  
  cin >> N;
  vector<int> vec(N);
  for (int i=0;i<N;i++){
    cin >> str;
    sort(str.begin(),str.end());
    vec.at(i)=str;
  }
  
  for (int i=0;i<N;i++){
    for (int k=i+1;k<N;k++){
      if(vec.at(i)==vec.at(k)){
        cnt++;
      }
    }
  }
  cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} in assignment
   14 |     vec.at(i)=str;
      |               ^~~
      |               |
      |               std::string {aka std::__cxx11::basic_string<char>}
Language: C++

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

int main() {
    int N;
    vector<string> s;
    vector<int> w;

    cin >> N;
    for(int i = 0; i < N; i++) {
        string tmp;
        cin >> tmp;
        sort(tmp.begin(), tmp.end());
        s.emplace_back(tmp);
        w.emplace_back(1);
    }

    int answer = 0;
    for(int i = 0; i < N; i++) {
        bool flag = true;
        for(int j = i + 1; j < N; j++) {
            if(s[i] == s[j]) {
                w[j] += w[i];
                flag = false;
                break;
            }
        }
        if(flag) {
            answer += w[i] * (w[i] - 1) / 2;
            s.erase(v.begin() + i);
            w.erase(w.begin() + i);
            N--;
        }
    }

    for(int i = 0; i < N; i++) {
        cout << w[i] << endl;
    }

    cout << answer << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:21: error: 'v' was not declared in this scope
   30 |             s.erase(v.begin() + i);
      |                     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;char a[11];int b[50000000];long long mod[27];
int main(){
	int n;long long ans=0;cin>>n;
	for(int i=1;i<=26;i++){
		mod[i]=(long long)rand()*RAND_MAX;
	}
	for(int i=1;i<=n;i++){scanf("%s",a+1);long long p=0;
	for(int j=1;j<=10;j++)p+=mod[(a[j]-'a'+1)];b[(abs)p%30000000]+=1;ans+=b[(abs)p%30000000]-1;}
	cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:59: error: expected ']' before 'p'
    9 |         for(int j=1;j<=10;j++)p+=mod[(a[j]-'a'+1)];b[(abs)p%30000000]+=1;ans+=b[(abs)p%30000000]-1;}
      |                                                           ^
      |                                                           ]
a.cc:9:53: error: invalid types 'int [50000000][<unresolved overloaded function type>]' for array subscript
    9 |         for(int j=1;j<=10;j++)p+=mod[(a[j]-'a'+1)];b[(abs)p%30000000]+=1;ans+=b[(abs)p%30000000]-1;}
      |                                                     ^
a.cc:9:86: error: expected ']' before 'p'
    9 |         for(int j=1;j<=10;j++)p+=mod[(a[j]-'a'+1)];b[(abs)p%30000000]+=1;ans+=b[(abs)p%30000000]-1;}
      |                                                                                      ^
      |                                                                                      ]
a.cc:9:80: error: invalid types 'int [50000000][<unresolved overloaded function type>]' for array subscript
    9 |         for(int j=1;j<=10;j++)p+=mod[(a[j]-'a'+1)];b[(abs)p%30000000]+=1;ans+=b[(abs)p%30000000]-1;}
      |                                                                                ^
Language: C++

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

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

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

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

template<class Abel> struct UnionFind {
    vector<int> par;
    vector<int> rank;
    vector<Abel> diff_weight;

    UnionFind(int n = 1, Abel SUM_UNITY = 0) {
        init(n, SUM_UNITY);
    }

    void init(int n = 1, Abel SUM_UNITY = 0) {
        par.resize(n); rank.resize(n); diff_weight.resize(n);
        for (int i = 0; i < n; ++i) par[i] = i, rank[i] = 0, diff_weight[i] = SUM_UNITY;
    }

    int root(int x) {
        if (par[x] == x) {
            return x;
        }
        else {
            int r = root(par[x]);
            diff_weight[x] += diff_weight[par[x]];
            return par[x] = r;
        }
    }

    Abel weight(int x) {
        root(x);
        return diff_weight[x];
    }

    bool issame(int x, int y) {
        return root(x) == root(y);
    }

    bool merge(int x, int y, Abel w) {
        w += weight(x); w -= weight(y);
        x = root(x); y = root(y);
        if (x == y) return false;
        if (rank[x] < rank[y]) swap(x, y), w = -w;
        if (rank[x] == rank[y]) ++rank[x];
        par[y] = x;
        diff_weight[y] = w;
        return true;
    }

    Abel diff(int x, int y) {
        return weight(y) - weight(x);
    }
};


template<class T>
void combination(const vector<T>& seed, int target_size, bool (*callback)(const vector<T>&)) {
    vector<int> indices(target_size);
    const int seed_size = seed.size();
    int start_index = 0;
    int size = 0;

    while (size >= 0) {
        for (int i = start_index; i < seed_size; ++i) {
            indices[size++] = i;
            if (size == target_size) {
                vector<T> comb(target_size);
                for (int x = 0; x < target_size; ++x) {
                    comb[x] = seed[indices[x]];
                }
                if (callback(comb)) return;
                break;
            }
        }
        --size;
        if (size < 0) break;
        start_index = indices[size] + 1;
    }
}

bool compare(string a, string b) {
	for (int i; i< 10 ;i++) {
		if (a[i] < b[i]) return false;
	}
    return true;
}

string s[100000];
ll ans = 0
UnionFind<int> uf(100000);

bool my_callback(const vector<int>& comb) {
    bool result = true;
	rep(i,0,10) {
		if (s[comb[0]][i] != s[comb[1]][i]) {
			result = false;
			break;
		}
	}
	if (result) ans++;
    return false;
}

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

	bool result;
	ll suu = 1;
	ll ans = 0;
	rep(i,0,N-1) {
		result = true;
		rep(j,0,10) {
			if (s[i][j] != s[i+1][j]) {
				result = false;
				ans += (suu * (suu-1)) /2;
				// cout << suu << " " << (suu * (suu-1)) /2 << endl;
				suu = 1;
				break;
			}
		}
		if (result) {
			suu++;
			// ans++;
		}
	}
	ans += (suu * (suu-1)) /2;

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

Compiler output:
a.cc:99:1: error: expected ',' or ';' before 'UnionFind'
   99 | UnionFind<int> uf(100000);
      | ^~~~~~~~~
Language: C

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

int main(void){
    int n;
    scanf("%d",&n);

    char str[n][11];
    for(int i = 0;i < n;i++){
        scanf("%s",&str[i]);
    }

    int strsum[n];
    for(int i = 0;i < n;i++){
        int sumj = 0;
        for(int j = 0;j < 10;j++){
            sumj += (int)str[i][j] - 1;
        }
        strsum[i] = sumj;
    }

    qsort(strsum, sizeof(strsum) / sizeof(int), sizeof(int), asc);

    int count = 0;
    int numcou = 0;
    int temp = strsum[0];
    for(int i = 1;i < n;i++){
        if (temp == strsum[i]){
            count += numcou + 1;
            numcou++;
        } else {
            numcou = 0;
            temp = strsum[i];
        }
    } 

    printf("%d",count);
}

int asc(const void *a, const void *b) {
  return *(int *)a - *(int *)b;
}

Compiler output:
main.c: In function 'main':
main.c:22:62: error: 'asc' undeclared (first use in this function)
   22 |     qsort(strsum, sizeof(strsum) / sizeof(int), sizeof(int), asc);
      |                                                              ^~~
main.c:22:62: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main(){
  int n;
  cin>>n;
  vector<string>s(n+1);
  rep(i,n)cin>>s[i];
  ll ans=0;
  for(int i=0;i<n-1;i++){
    int j=i+1;
      vector<ll>a(26);
      vector<ll>b(26);
      rep(e,10){
        int q=s[i][e]-'a';
        a[q]++;
      }
      rep(e,10){
      int z=s[j][e]-'a';
      b[z]++;
      }
      bool f=true;
      rep(i,26){
        if(a[i]!=b[i]){
          f=false;
          break;
        }
      }
      if(f)ans++;
    }
  }
  cout<<2*ans<<endl;
}



Compiler output:
a.cc:41:3: error: 'cout' does not name a type
   41 |   cout<<2*ans<<endl;
      |   ^~~~
a.cc:42:1: error: expected declaration before '}' token
   42 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#include <string.h>
using namespace std;// std::cout, std::cin

int main()
{
	int A, B, n, i, j, len, ans;
	char s[1000][1000], t[1000];
	char s1[1000][1000], t[1000];

	for (int i = 0; i < n; i++) {
		char string[] = "";
		cin >> string;

		char temp;

		int i1, j1;
		int n1 = strlen(string);

		//	printf("Chuoi truoc khi sap xep: %s \n", string);

		for (i1 = 0; i1 < n1 - 1; i1++) {
			for (j1 = i1 + 1; j1 < n1; j1++) {
				if (string[i1] > string[j1]) {
					temp = string[i1];
					string[i1] = string[j1];
					string[j1] = temp;
				}
			}
		}
		strcpy(s[i], string);

	}

	for (int i = 0; i < n; i++) {
		for (i = 0; i < n; i++)

			for (i = 1; i < n; i++) {
				for (j = 1; j < n; j++) {
					if (strcmp(s[j - 1], s[j]) > 0) {
						strcpy(t, s[j - 1]);
						strcpy(s[j - 1], s[j]);
						strcpy(s[j], t);
					}
				}
			}
	}
	for (i = 0; i < n; i++) {
		if (i + 1 < n) {
			if (s[i] == s[i + 1]) {
				ans++;
			}
		}
	}
	std::cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:30: error: redeclaration of 'char t [1000]'
    9 |         char s1[1000][1000], t[1000];
      |                              ^
a.cc:8:29: note: 'char t [1000]' previously declared here
    8 |         char s[1000][1000], t[1000];
      |                             ^
Language: C++

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

using namespace std;

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

    if (n == 1) {
        cout << 0 << endl;
        return 0;
    }

    vector<string> vec;

    for (int i = 0; i < n; i++) {
        string tmp;
        cin >> tmp;
        vector<char> chars;
        for (int i = 0; i < tmp.length(); i++) {
            chars.push_back(tmp[i]);
        }
        sort(chars.begin(), chars.end());
        string str(chars.begin(), chars.end());
        vec.push_back(str);
    }
    sort(vec.begin(), vec.end());

    vector<string> vec_uni;
    copy(vec.begin(), vec.end(), back_inserter(vec_uni));
    vec.erase(unique(vec_uni.begin(), vec_uni.end()), vec_uni.end());

    int sum = 0;
    for (string s : vec_uni) {
        size_t num = count(vec.begin(), vec.end(), s);
        sum += num - 1;
    }

    cout << sum << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   25 |         sort(chars.begin(), chars.end());
      |         ^~~~
      |         short
a.cc:29:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   29 |     sort(vec.begin(), vec.end());
      |     ^~~~
      |     short
a.cc:33:15: error: 'unique' was not declared in this scope
   33 |     vec.erase(unique(vec_uni.begin(), vec_uni.end()), vec_uni.end());
      |               ^~~~~~
a.cc:37:22: error: 'count' was not declared in this scope
   37 |         size_t num = count(vec.begin(), vec.end(), s);
      |                      ^~~~~
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		String[] a = new String[N];
		for(int i = 0;i<N;i++) {
			a[i]=sc.next();
		}
		int anagramct=0;
		for(int j=0;j<N;j++) {
			for(int k= j+1;k<N;k++) { 
		anagramct += MyisAnagram(a[j],a[k]);				
			}
		}
		System.out.print(anagramct+","+count);

	}
	static int MyisAnagram(String word1,String word2){
        int sumCode_1=0;
        int sumCode_2=0;
        
        if(word1.length()!=word2.length())
            return 0;
        
        for(int i=0;i<word1.length();i++){
            sumCode_1 += word1.charAt(i);
        }
        for(int i=0;i<word2.length();i++){
            sumCode_2 += word2.charAt(i);
        }
        
        if(sumCode_1 == sumCode_2){
            return 1;
        }
        else{
            return 0;
        }
    }
}


Compiler output:
Main.java:8: error: incompatible types: possible lossy conversion from long to int
		String[] a = new String[N];
		                        ^
Main.java:18: error: cannot find symbol
		System.out.print(anagramct+","+count);
		                               ^
  symbol:   variable count
  location: class Main
2 errors
Language: C++

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

using namespace std;


int main(void)
{
    int n;
    cin>>n;
    
    char s[n][10];
    
    for(int i=0;i<n;i++){
        char sq[10];
        scanf("%s",sq);
        strcpy(s[i],sq);
    }
    
    for(int i=0;i<n;i++){
        for(int j=8;j>=0;j--){
            for(int k=0;k<=j;k++){
                if(s[i][k]>s[i][k+1]){
                    char temp=s[i][k];
                    s[i][k]=s[i][k+1];
                    s[i][k+1]=temp;
                }
            }
        }
    }
    
    
    
    long int num=0;
    int flag=0;
    
    
    for(int i=0;i<n;i++){
        for(int j=i+1;j<n;j++){
            flag=0;
            for(int k=0;k<10;k++){
                if(s[i][k]!=s[j][k]){
                    flag=1;
                    break;
                }
            }
            if(flag==0) num++;
        }
    }
    
    cout<<num<<endl;
     
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:9: error: 'strcpy' was not declared in this scope
   23 |         strcpy(s[i],sq);
      |         ^~~~~~
a.cc:9:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    8 | #include<iomanip>
  +++ |+#include <cstring>
    9 |
Language: C++

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

using namespace std;

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

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


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

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

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

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

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


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

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

using namespace std;


int main(void)
{
    int n;
    cin>>n;
    
    char s[n][10];
    
    for(int i=0;i<n;i++){
        char sq[10];
        scanf("%s",sq);
        strcpy(s[i],sq);
    }
    
    for(int i=0;i<n;i++){
        for(int j=8;j>=0;j--){
            for(int k=0;k<=j;k++){
                if(s[i][k]>s[i][k+1]){
                    char temp=s[i][k];
                    s[i][k]=s[i][k+1];
                    s[i][k+1]=temp;
                }
            }
        }
    }
    
    
    
    long int num=0;
    int flag=0;
    
    
    for(int i=0;i<n;i++){
        for(int j=i+1;j<n;j++){
            flag=0;
            for(int k=0;k<10;k++){
                if(s[i][k]!=s[j][k]){
                    flag=1;
                    break;
                }
            }
            if(flag==0) num++;
        }
    }
    
    cout<<num<<endl;
   
   
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:9: error: 'strcpy' was not declared in this scope
   23 |         strcpy(s[i],sq);
      |         ^~~~~~
a.cc:9:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    8 | #include<iomanip>
  +++ |+#include <cstring>
    9 |
Language: C++

#include<bits/stdc++.h>
#define ll long long

using namespace std;

///dir array for Queen int dxq[10] = {-1,-1,-1,1,1,1,0,0};
///dir array for Queen int dyq[10] = {-1,0,1,-1,0,1,-1,1};
///dir array for knight int dxk[10] = {-2,-2,-1,-1,1,1,2,2};
///dir array for knight int dyk[10] = {1,-1,-2,2,-2,2,-1,1};

map<string , ll >M;

int main(){
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);

    ll n;
    while(cin>>n){
        M.clear();
        string A;
        ll i,j;
        ll k = 1;
        ll res = 0;
        ll sum[100005];


        //cout<<n<<endl;

        for(i =0; i<n; i++){
            cin>>A;
            sort(A.begin(),A.end());
            if(M[A] == 0){
                M[A] = k;
                k++;
                //cout<<"sad"<<endl;
            }
            else{
                    //cout<<"yes "<<endl;
               sum[M[A]]++;
                //cout<<sum[M[A]]<<endl;
            }
        }
        //cout<<"asdas "<<k<<endl;
        ll calc;
        for(i = 1; i<=k; i++){

            calc = sum[i];
            //cout<< calc<<endl;
            res += ll(calc*((double)(calc + 1)/2));
        }
        cout<<res<<endl;
   }


}


Compiler output:
a.cc: In function 'int main()':
a.cc:2:12: error: expected primary-expression before 'long'
    2 | #define ll long long
      |            ^~~~
a.cc:49:20: note: in expansion of macro 'll'
   49 |             res += ll(calc*((double)(calc + 1)/2));
      |                    ^~
Language: C++

#include <bits/stdc++.h>
#include <string.h>
using namespace std;// std::cout, std::cin

int main()
{
	int  n, i, j, len, ans;
	char s1[1000][1000], t[1000];
	for (int i = 0; i < n; i++) {
		char string[] = "";
		cin >> string;
		char temp;
		int i1, j1;
		int n1 = strlen(string);
		for (i1 = 0; i1 < n1 - 1; i1++) {
			for (j1 = i1 + 1; j1 < n1; j1++) {
				if (string[i1] > string[j1]) {
					temp = string[i1];
					string[i1] = string[j1];
					string[j1] = temp;
				}
			}
		}
		strcpy(s[i], string);
	}
	for (int i = 0; i < n; i++) {
		for (i = 0; i < n; i++)
			for (i = 1; i < n; i++) {
				for (j = 1; j < n; j++) {
					if (strcmp(s[j - 1], s[j]) > 0) {
						strcpy(t, s[j - 1]);
						strcpy(s[j - 1], s[j]);
						strcpy(s[j], t);
					}
				}
			}
	}
	for (i = 0; i < n; i++) {
		if (i + 1 < n) {
			if (s[i] == s[i + 1]) {
				ans++;
			}
		}
	}
	std::cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:24: error: 's' was not declared in this scope
   24 |                 strcpy(s[i], string);
      |                        ^
a.cc:30:52: error: 's' was not declared in this scope
   30 |                                         if (strcmp(s[j - 1], s[j]) > 0) {
      |                                                    ^
a.cc:40:29: error: 's' was not declared in this scope
   40 |                         if (s[i] == s[i + 1]) {
      |                             ^
Language: C++

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

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

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:29: error: expected ',' or ';' before '=' token
   12 |         vector<int> data(30)={-1};
      |                             ^
Language: C++

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

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

using namespace std;

typedef long long ll;

#define INF 1000000000000009LL
#define MOD 10000000007LL

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

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

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

//10^7まで
const int MAX = 100005;
long long fac[MAX], finv[MAX], inv[MAX];
void com_init() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;

    for (int i = 2; i < MAX; i++) {
        fac[i] = fac[i-1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i-1] * inv[i] % MOD;
    }
}

long long com(int n, int k) {
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

ll po(int n) {
  ll res = 1;
  for (int i = 1; i <= n; i++) res *= i;
  return res;
}

ll com1(int n, int k) {
  ll ans = po(n);
  ans /= po(k);
  ans /= po(n-k);
  return ans;
}



int main() {k
;
            ans /= po(n-k);
            return ans;com_init();
    int N; cin >> N;
    vector<vector<char>> v(N);
    vector<string> s(N);

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

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

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:67:13: error: 'k' was not declared in this scope
   67 | int main() {k
      |             ^
a.cc:69:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   69 |             ans /= po(n-k);
      |             ^~~
      |             abs
a.cc:69:23: error: 'n' was not declared in this scope; did you mean 'yn'?
   69 |             ans /= po(n-k);
      |                       ^
      |                       yn
a.cc:78:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   78 |         sort(v[i].begin(), v[i].end());
      |         ^~~~
      |         sqrt
a.cc:83:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   83 |     sort(s.begin(), s.end());
      |     ^~~~
      |     sqrt
Language: C++

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

int main() {
  int N;
  cin >> N;
  
  vector<string> strList;
  for(int itr = 0; itr < N; itr++)
  {
    string S;
    cin >> S;
    strList.push_back(S);
  }
  
  // countを用意する。
  vector<vector<int>> count;
  for(int itr = 0; itr < N; itr++)
  {
    vector<int> alphabets {
      0,0,0,0,0,0,0,0,
      0,0,0,0,0,0,0,0,
      0,0,0,0,0,0,0,0
    };
    count.push_back(alphabets);
  }
  
  // 文字をcountする。
  for(int itr = 0; itr < N; itr++)
  {
    for(int nanmoji = 0; nanmoji < 10; nanmoji++)
    {
      int index = int((strList[itr].substr(nanmoji, 1).c_str())[0]) - 97;
      count[itr][index]++;
    }
  }
  
  // 一致している組を探す。
  int result_count = 0;
  for(int comp1 = 0; comp1 < N; comp1++)
  {
    for(int comp2 = 0; comp2 < N; comp2++)
    {
      if(comp1 <= comp2)
        continue;
      
      int match_count = 0;
      for(int alphabet = 0; alphabet < 24; alphabet++)
      {
        if(count[comp1][alphabet] == count[comp2][alphabet])
        {
          match_count++;
        }else
        {
          break;
        }
      }      
      if(match_count == 24)
      {
        result_count++;
      }
    }
  }
  
  cout << result_count << endl;
  
  return 0;
  
  
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> N;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <vector>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:66:3: error: 'cout' was not declared in this scope
   66 |   cout << result_count << endl;
      |   ^~~~
a.cc:66:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:66:27: error: 'endl' was not declared in this scope
   66 |   cout << result_count << endl;
      |                           ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <vector>
  +++ |+#include <ostream>
    3 | using namespace std;
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
 
int main(){
	int n,count = 0;
  	cin >> n;
  	vector<string> s(n);
  	vector<string> temp(10);
  	vector<int> flg(n,1);
  	for(int i = 0;i<n;i++){
      	cin >> s.at(i);
    	for(int j = 0;j<10;j++){
        	temp.at(j) = (s.at(i)).substr(j); 
        }
      	sort(temp.begin(),temp.end());
      	s.at(i) = temp.at(0)+temp.at(1)+temp.at(2)+temp.at(3)+temp.at(4)+temp.at(5)+temp.at(6)+temp.at(7)+temp.at(8)+temp.at(9);
    }
  	for(int i = 0;i<n;i++){
      	if(!flg){
        	continue;
        }
    	for(int j = i+1;j<n-i;j++){
        	if(s.at(i) == s.at(j) && flg){
            	++count;
              	flg.at(j) = 0;
            }
        }
    }
  	cout << count << endl;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:12: error: no match for 'operator!' (operand type is 'std::vector<int>')
   22 |         if(!flg){
      |            ^~~~
a.cc:22:12: note: candidate: 'operator!(bool)' (built-in)
a.cc:22:12: note:   no known conversion for argument 1 from 'std::vector<int>' to 'bool'
a.cc:26:39: error: no match for 'operator&&' (operand types are 'bool' and 'std::vector<int>')
   26 |                 if(s.at(i) == s.at(j) && flg){
      |                    ~~~~~~~~~~~~~~~~~~ ^~ ~~~
      |                            |             |
      |                            bool          std::vector<int>
a.cc:26:39: note: candidate: 'operator&&(bool, bool)' (built-in)
   26 |                 if(s.at(i) == s.at(j) && flg){
      |                    ~~~~~~~~~~~~~~~~~~~^~~~~~
a.cc:26:39: note:   no known conversion for argument 2 from 'std::vector<int>' to 'bool'
Language: C++

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


int main()
{
	int num = 0;

	std::cin >> num;

	if (num <= 0)
	{
		std::cout << 0 << std::endl;
		return 0;
	}

	std::vector<char[10]> str(num);

	for (int i = 0; i < num; ++i)
	{
		std::cin >> str[i];
		std::sort(str[i], str[i]);
	}

	int fitNum = 0;

	for (int i = 0, n = num - 1; i < n; ++i)
	{
		for (int j = i + 1; j < num; ++j)
		{
			if (std::strcmp(str[i], str[j]) == 0)
			{
				fitNum++;
			}
		}
	}

	std::cout << fitNum << std::endl;

	return 0;
}

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

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

using namespace std;

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

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


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

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

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

    int cnt = 0;
    int i = 0;
    while (i < N){
        string tmp = s[i];
        int j = i + 1;
        while(true){
            // cout << j << " broke" << endl;
            if (s[j] == tmp){
                j++;
                cnt++;
            }
            else{
                break;
            }
        }
        i++;
    }
    cout << cnt << endl;
    
}


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

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;

int inputValue(){
    int a;
    cin >> a;
    return a;
};

void inputArray(int * p, int a){
    REP(i, a){
        cin >> p[i];
    }
};

void inputVector(vector<int> * p, int a){
    REP(i, a){
        int input;
        cin >> input;
        p -> push_back(input);
    }
}

int main()
{
	int N = inputValue();
	char dic[100001][26];
	int diccnt[100001];
	memset(diccnt, 0, 100000*sizeof(int));
	int dicN = 0;
	REP(i, N){
		char s[10];
		cin >> s;
		
		char cmpA[27];
		memset(cmpA, '0', 26);
		cmpA[26] = \0;
		REP(x, 10){
			int idx = s[x] - 'a';
			cmpA[idx]++;
		}
		bool exist = false;
		REP(idx, dicN){
			if(strcmp(dic[idx], cmpA)==0){
				diccnt[idx]++;
				exist = true;
				break;
			}
		}
		if(!exist){
			strcpy(dic[dicN], cmpA);
			diccnt[dicN]++;
			dicN++;
		}
	};
	ll ans = 0;
	REP(i, dicN){
		ans += diccnt[i] * (diccnt[i] - 1) / 2;
	};
	cout << ans << endl;
}


Compiler output:
a.cc:43:28: error: stray '\' in program
   43 |                 cmpA[26] = \0;
      |                            ^
Language: C++

#include <bits/stdc++.h> 
using namespace std; 
#define NO_OF_CHARS 256 
 
int r=0;
bool areAnagram(string str1, string str2) 
{ 
 
    int count[NO_OF_CHARS] = {0}; 
    int i; 
 
 
    for (i = 0; str1[i] && str2[i]; i++) 
    { 
        count[str1[i]]++; 
        count[str2[i]]--; 
    } 
 
    
    if (str1[i] || str2[i]) 
    return false; 
 
    for (i = 0; i < NO_OF_CHARS; i++) 
        if (count[i]) 
            return false; 
    return true; 
} 
 
 
int main() 
{ 
     
    long long n1;
    cin>>n1;
    string arr[n1];
    for(int i=0; i<n1; i++)
    {
            cin>>arr[i];
    }
    
    int n = sizeof(arr)/sizeof(arr[0]); 
     for (int i = 0; i < n; i++) 
        for (int j = i+1; j < n; j++) 
            if (areAnagram(arr[i], arr[j])) 
                r=r+1;
    cout<<r;
                
} 
    return 0; 
} 

Compiler output:
a.cc:49:5: error: expected unqualified-id before 'return'
   49 |     return 0;
      |     ^~~~~~
a.cc:50:1: error: expected declaration before '}' token
   50 | }
      | ^
Language: C++

    #include <stdio.h>
    int cmpfunc (const void * a, const void * b) {
    return ( *(char*)a - *(char*)b );
    }
    int main()
    {
    long long int test,n,i,j,sum1,m,flag=0,count=0,b,c[26],a1,a2[26]={0};
    char a[100000][11],k[11];
    scanf("%lld",&n);
    for(i=0;i<n;i++){
    scanf("%s",&k);
   
  //   printf("%s %s\n",k,a[i]);
  qsort(k, 10, sizeof(char), cmpfunc);
 //printf("%s %s\n",k,a[i]);
  strcpy(a[i],k);
    }
    count=0;
    for(i=0;i<n-1;i++){
    for(j=i+1;j<n;j++){
  
    if((strcmp(a[i],a[j]))==0){
    count++;
    }
    
    }
    }
    printf("%lld",count);
    return 0;
    }
     
     



Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'qsort' was not declared in this scope
   14 |   qsort(k, 10, sizeof(char), cmpfunc);
      |   ^~~~~
a.cc:16:3: error: 'strcpy' was not declared in this scope
   16 |   strcpy(a[i],k);
      |   ^~~~~~
a.cc:2:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 |     #include <stdio.h>
  +++ |+#include <cstring>
    2 |     int cmpfunc (const void * a, const void * b) {
a.cc:22:9: error: 'strcmp' was not declared in this scope
   22 |     if((strcmp(a[i],a[j]))==0){
      |         ^~~~~~
a.cc:22:9: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
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);
  }
  for(int i=0;i<n;i++){
  sort(s.at(i).begin(),s.at(i).end());
  }
  sort(s.begin(),s.end());
  int count=0;
  for(int i=0;i<N-1;i++){
    if(s.at(i)==s.at(i+1)){
      count++;
    }
    }
  cout<<count;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 'n' was not declared in this scope
   10 |   for(int i=0;i<n;i++){
      |                 ^
Language: C++

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

int main(void) {
    int N;
    cin >> N;
    
    vector<string> v;
    string s;
    for(int i=0; i<N; i++) {
        cin >> s;
        v.push_back(s);
    }

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

    int result = 0;
    for(int i=0; i<v.size(); i++) {
        result += count(v.begin()+i, v.end(), v[i]) - 1;
    }
    
    cout << result << endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   17 |         sort(v[i].begin(), v[i].end());
      |         ^~~~
      |         short
a.cc:22:19: error: 'count' was not declared in this scope
   22 |         result += count(v.begin()+i, v.end(), v[i]) - 1;
      |                   ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
struct a
{
	string s;
}a[100010];

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

Compiler output:
a.cc: In function 'int main()':
a.cc:20:40: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   20 |                         if(strcmp(a[i].s,a[j].s)==0)    ans++;
      |                                   ~~~~~^
      |                                        |
      |                                        std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~