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

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

long long int kaijyou(int i){
    long long int answer = 0;
    while(i>0){
        answer += i;
        i--;
    }
    return answer;
}

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

    vector<int> k_count;
    int same;
    for(int i=0;i<N;i++){
        same = 1;
        if(i==N-1) k_count.push_back(1);

        for(int k=i+1;k<N;k++){
            if(s[i] == s[k]){
                same++;
                if(k == N-1){
                k_count.push_back(same);
                i = k;
                }
            }
            else if(s[i] != s[k]){
                k_count.push_back(same);
                i = k-1;
                break;
            }
        }
    }

    for(int i=0;i<k_count.size();i++) if(k_count[i]!=1) answer += kaijyou(k_count[i]-1);

    cout << answer << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:57: error: 'answer' was not declared in this scope
   45 |     for(int i=0;i<k_count.size();i++) if(k_count[i]!=1) answer += kaijyou(k_count[i]-1);
      |                                                         ^~~~~~
a.cc:47:13: error: 'answer' was not declared in this scope
   47 |     cout << answer << endl;
      |             ^~~~~~
Language: C++

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

int main(){
  long N; cin >> N;
  long count =1, ANS =0;
  string s[N];
  
  for(int i=0; i<N; i++){
    cin >> s[i];
    sort(s[i].begin(), s[i].end());
  }
  
  std :: sort(s.begin(), s.end());
  
  for(int i=0; i<N-1; i++){
    if(s[i] == s[i+1]){
      count++;}
    else{ANS += (count * (count - 1))/2;
        count = 1; }
  }
  
  if(count!=1){ANS += (count * (count - 1))/2;}
  
  cout << ANS << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: request for member 'begin' in 's', which is of non-class type 'std::string [N]' {aka 'std::__cxx11::basic_string<char> [N]'}
   14 |   std :: sort(s.begin(), s.end());
      |                 ^~~~~
a.cc:14:28: error: request for member 'end' in 's', which is of non-class type 'std::string [N]' {aka 'std::__cxx11::basic_string<char> [N]'}
   14 |   std :: sort(s.begin(), s.end());
      |                            ^~~
Language: C++

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

int main(){
  long N; cin >> N;
  long count =1, ANS =0;
  string s[N];
  
  for(int i=0; i<N; i++){
    cin >> s[i];
    sort(s[i].begin(), s[i].end());
  }
  
  sort(s.begin(), s.end());
  
  for(int i=0; i<N-1; i++){
    if(s[i] == s[i+1]){
      count++;}
    else{ANS += (count * (count - 1))/2;
        count = 1; }
  }
  
  if(count!=1){ANS += (count * (count - 1))/2;}
  
  cout << ANS << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: request for member 'begin' in 's', which is of non-class type 'std::string [N]' {aka 'std::__cxx11::basic_string<char> [N]'}
   14 |   sort(s.begin(), s.end());
      |          ^~~~~
a.cc:14:21: error: request for member 'end' in 's', which is of non-class type 'std::string [N]' {aka 'std::__cxx11::basic_string<char> [N]'}
   14 |   sort(s.begin(), s.end());
      |                     ^~~
Language: C++

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

int main(){
  long N; cin >> N;
  long count =1, ANS =0;
  string s[N];
  
  for(int i=0; i<N; i++){
    cin >> s[i];
    sort(s[i].begin(), s[i].end())
  }
  
  sort(s.begin(), s.end());
  
  for(int i=0; i<N-1; i++){
    if(s[i] == s[i+1]){
      count++;}
    else{ANS += (count * (count - 1))/2;
        count = 1; }
  }
  
  if(count!=1){ANS += (count * (count - 1))/2;}
  
  cout << ANS << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:35: error: expected ';' before '}' token
   11 |     sort(s[i].begin(), s[i].end())
      |                                   ^
      |                                   ;
   12 |   }
      |   ~                                
a.cc:14:10: error: request for member 'begin' in 's', which is of non-class type 'std::string [N]' {aka 'std::__cxx11::basic_string<char> [N]'}
   14 |   sort(s.begin(), s.end());
      |          ^~~~~
a.cc:14:21: error: request for member 'end' in 's', which is of non-class type 'std::string [N]' {aka 'std::__cxx11::basic_string<char> [N]'}
   14 |   sort(s.begin(), s.end());
      |                     ^~~
Language: C++

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

int main(){
  long N; cin >> N;
  long count =1, ANS =0;
  string s[N];
  
  for(i=0; i<N; i++){
    cin >> s[i];
    sort(s[i].begin, s[i].end())
  }
  
  sort(s.begin(), s.end());
  
  for(i=0; i<N-1; i++){
    if(s[i] == s[i+1]){
      count++;}
    else{ANS += (count * (count - 1))/2;
        count = 1; }
  }
  
  if(count!=1){ANS += (count * (count - 1))/2;}
  
  cout << ANS << endl;
}

      

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   for(i=0; i<N; i++){
      |       ^
a.cc:14:10: error: request for member 'begin' in 's', which is of non-class type 'std::string [N]' {aka 'std::__cxx11::basic_string<char> [N]'}
   14 |   sort(s.begin(), s.end());
      |          ^~~~~
a.cc:14:21: error: request for member 'end' in 's', which is of non-class type 'std::string [N]' {aka 'std::__cxx11::basic_string<char> [N]'}
   14 |   sort(s.begin(), s.end());
      |                     ^~~
a.cc:16:7: error: 'i' was not declared in this scope
   16 |   for(i=0; i<N-1; i++){
      |       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(_loop_int i=0; i<(_loop_int)(n); i++)

int main(){
    
    int n;
    cin >> n;
    vector<string> s(n);
    map<string, int> mp;
    REP(i,n){
        cin >> s.at(i);
        sort(s.at(i).begin(), s.at(i).end());
        mp[s.at(i)]++;
    }
    
    long long pattern;
    
    for(int x: mp){
        pattern += x * (x - 1) / 2;
    }
    
    cout << pattern << endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:22: error: '_loop_int' was not declared in this scope
    3 | #define REP(i,n) for(_loop_int i=0; i<(_loop_int)(n); i++)
      |                      ^~~~~~~~~
a.cc:11:5: note: in expansion of macro 'REP'
   11 |     REP(i,n){
      |     ^~~
a.cc:11:9: error: 'i' was not declared in this scope
   11 |     REP(i,n){
      |         ^
a.cc:3:37: note: in definition of macro 'REP'
    3 | #define REP(i,n) for(_loop_int i=0; i<(_loop_int)(n); i++)
      |                                     ^
a.cc:19:16: error: cannot convert 'std::pair<const std::__cxx11::basic_string<char>, int>' to 'int' in initialization
   19 |     for(int x: mp){
      |                ^~
Language: C++

import sys
from functools import reduce
sys.setrecursionlimit(10 ** 7)


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def comb(x):
    a = 1
    for i in range(1, x+1):
        a *= i
    return a//2


def main():
    N = int(input())
    M = {}
    for _ in range(N):
        s = ''.join(sorted(input()))
        if (s in M.keys()):
            M[s] += 1
            continue
        M[s] = 1

    print(sum([comb(m) for m in M.values()]))


if __name__ == "__main__":
    main()


Compiler output:
a.cc:20:13: error: empty character constant
   20 |         s = ''.join(sorted(input()))
      |             ^~
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:19:5: error: expected unqualified-id before 'for'
   19 |     for _ in range(N):
      |     ^~~
Language: C++

#include "bits/stdc++.h"

#define REP(i, a, b) for (int i = (a); i <= (b); ++i)
#define REV(i, a, b) for (int i = (a); i >= (b); --i)
#define FORV(a, A) for (auto &a : A)

ll kaijo(int n)
{
   ll x = 1;
   REP(i, 1, n)
   {
      x *= i;
   }
   return x / 2;
}

using namespace std;

using ll = long long;
void Main()
{
   int N;
   cin >> N;
   vector<string> S(N);
   string s;
   REP(i, 0, N - 1)
   {
      cin >> s;
      sort(s.begin(), s.end());
      S[i] = s;
   }
   sort(S.begin(), S.end());

   ll ans = 0;
   int count = 0;
   s = S[0];
   REP(i, 0, N - 1)
   {
      if (S[i] == s)
         count++;
      else if (count - 1)
      {
         ans += kaijo(count);
         count = 1;
         s = S[i];
      }
      else
      {
         count = 1;
         s = S[i];
      }
   }
   if (count - 1)
   {
      ans += kaijo(count);
   }

   cout << ans << endl;
   return;
}

int main()
{
   std::cin.tie(nullptr);
   std::ios_base::sync_with_stdio(false);
   std::cout << std::fixed << std::setprecision(15);
   Main();
   return 0;
}

Compiler output:
a.cc:7:1: error: 'll' does not name a type
    7 | ll kaijo(int n)
      | ^~
a.cc: In function 'void Main()':
a.cc:43:17: error: 'kaijo' was not declared in this scope
   43 |          ans += kaijo(count);
      |                 ^~~~~
a.cc:55:14: error: 'kaijo' was not declared in this scope
   55 |       ans += kaijo(count);
      |              ^~~~~
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:9:9: error: 'n' was not declared in this scope
    9 |   rep(i,n){
      |         ^
a.cc:2:33: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i=0;i<(n);++i)
      |                                 ^
Language: C++

#include <iostream>
#include <string>
#include <vector> 
using namespace std;
bool sortAsc(char c, char d){
		return c < d;
}
int main(){
		int N;
		cin >> N;
		vector<string> words(10);
		for(int i = 0; i < N; ++i){
				string str;
				cin >> str;
				words[i] = str;
		}
		for(int i = 0; i < N; ++i){
				sort(words[i].begin(),words[i].end(), sortAsc);
		}
		long int answer = 0;
		for(int i = 0; i < N; ++i){
				for(int j = i + 1; j < N; ++j){
						int count = 0;
						int k = 0;
						while(words[i][k] == words[j][k] && k <= 9){
								count += 1;
								++k;
						}
						if(count == 10){
								answer += 1;
						}
				}
		}
		cout << answer << endl;
}



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

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define ALL(v) (v).begin(), (v).end()

using namespace std;
using ll = long long;

int main()
{
  int N; cin >> N;
  map<string, int> cnt;
  REP(i, N) {
    string s; cin >> s;
    sort(ALL(s));
    cnt[s]++;
  }

  ll ans = 0;
  for (auto v : cnt) {
    if (v.second == 1) continue;
    ans += v.second*(v.second-1)/2;
  }

  cout << ans << endl
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:22: error: expected ';' before '}' token
   24 |   cout << ans << endl
      |                      ^
      |                      ;
   25 | }
      | ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define REP(i,m,n) for(int i=(m);i<(n);i++)
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const int inf=1e9+7;
int main(){
    int n;cin>>n;
    vector<string>v(n);
    rep(i,n){
        string s;cin>>s;
        sort(s.begin(),s.end());
        v[i]=s;
    }
    sort(v.begin(),v.end());
    int now=0,k=0,ans=0;
    while(now<=n){
        if(v[now]!=v[k]||now==n){
            ans+=(now-k)*(now-k-1)/2;
            k=now;
        }
        else if(v[now]==v[k])now++;
        }
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc:27:5: error: 'cout' does not name a type
   27 |     cout<<ans<<endl;
      |     ^~~~
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:11: error: 'll' was not declared in this scope
   17 |     ans+=(ll)a*(a-1)/2;
      |           ^~
Language: C++

#include<bits/stdc++.h>
define int long long
using namespace std;
map<string,int> count;
vector<string> v;
signed int(){
  int n,i,sum=0;
  cin>>n;
  for(i=0;i<n;i++){
    string s;
    cin>>s;
    sort(s.begin(),s.end());
    v.push_back(s);
  }
  for(i=0;i<n;i++){
    count[v[i]]++;
  }
  map<string,int>:: iterator it;
  for(it=count.begin();it!=count.end();it++){
    int y=it->second;
    sum+=y*(y-1)/2;
  }
  cout<<sum;
}


Compiler output:
a.cc:2:1: error: 'define' does not name a type
    2 | define int long long
      | ^~~~~~
a.cc:4:1: error: 'map' does not name a type
    4 | map<string,int> count;
      | ^~~
a.cc:5:1: error: 'vector' does not name a type
    5 | vector<string> v;
      | ^~~~~~
a.cc:6:12: error: expected unqualified-id before ')' token
    6 | signed int(){
      |            ^
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#include <algorithm>
#define ll long long
#define ld long double
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pld pair<ld, ld>
#define f first
#define s second
#define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define pb push_back
#define eb emplace_back
#define in insert
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define FOR(i, n, x) for(int i = x; i < n; i++)
#define OUT(a, e) FOR(i, e, 0) cout << a[i] << ' '
#define OUTV(a) for(auto i : a) cout << i << ' ';
#define maxim(a, n, mx) FOR(i, n, x)mx = max(mx, a[i]);


#if !defined(ONLINE_JUDGE)
#include "prettyprint.hpp"
#endif

using namespace std;
map<ll, int> a;
string now = "";
int mod = 1e9 + 7;

int get_hash()
{
    ll rez = 1;
    for(auto i : now)
    {
        rez *= (int)i - 'a' + 1;
    }
    return (rez % mod);
}
int main()
{
    fast;
    int n; cin >> n;
    ll cnt = 0;
    while(n--)
    {
        cin >> now;
        int nhash = get_hash();
        cnt += a[nhash];
        a[nhash]++;
    }
    cout << cnt;
    return 0;
}


Compiler output:
a.cc:24:10: fatal error: prettyprint.hpp: No such file or directory
   24 | #include "prettyprint.hpp"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#include <algorithm>
#define ll long long
#define ld long double
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pld pair<ld, ld>
#define f first
#define s second
#define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define pb push_back
#define eb emplace_back
#define in insert
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define FOR(i, n, x) for(int i = x; i < n; i++)
#define OUT(a, e) FOR(i, e, 0) cout << a[i] << ' '
#define OUTV(a) for(auto i : a) cout << i << ' ';
#define maxim(a, n, mx) FOR(i, n, x)mx = max(mx, a[i]);


#if !defined(ONLINE_JUDGE)
#include "prettyprint.hpp"
#endif

using namespace std;
multiset<int> a;
string now = "";

int get_hash()
{
    int rez = 1;
    for(auto i : now)
    {
        rez *= (int)i - 'a' + 1;
    }
    return rez;
}
int main()
{
    fast;
    int n; cin >> n;
    ll cnt = 0;
    while(n--)
    {
        cin >> now;
        int hsh = get_hash();
        cnt += a.count(hsh);
        a.insert(hsh);
    }
    cout << cnt;
    return 0;
}


Compiler output:
a.cc:24:10: fatal error: prettyprint.hpp: No such file or directory
   24 | #include "prettyprint.hpp"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int N;

    cin >> N;

    vector<string> s;

    for ( int i=0; i < N; i ++ )  {
        char buf[16];

        cin >> buf;
        sort( buf, buf+10 );

        s.push_back( string( buf ) );
    }

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

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

    long count = 0;
    for ( int i = 0; i < (N-1); i ++ ) {
        for ( int j = i+1; j < N; j ++ ) {
            if ( s[i].compare( s[j] ) == 0) count ++;
        }
    }

    cout << count << endl;


    return 0;
}

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


#include <iostream>
#include <vector>
#include <cstdint>
#include <string>
#include <algorithm>


uint32_t to_onehot(const std::string& str) {
    uint32_t ret = 0;

    for (const auto& c : str) {
        ret |= (1 << (c - 'a'));
    }

    return ret;
}


int main(void) {

    std::vector<uint32_t> values;

    int N;
    std::string str;

    std::cin >> N;

    if (N == 0) {
        std::cout << 0 << std::endla;
        return 0;
    }

    for (int i = 0; i < N; i++) {
        std::cin >> str;

        values.push_back(to_onehot(str));
    }
    std::sort(values.begin(), values.end());

    // get sum of continuous scequence
    std::size_t num = 0;
    std::size_t len = 0;
    for (std::size_t i = 1; i < values.size(); i++) {
        if (values[i] == values[i-1]) {
            len++;
        } else {
            num += len * (len + 1) / 2;
            len = 0;
        }
    }
    if (len != 0) {
        num += len * (len + 1) / 2;
    }

    std::cout << num << std::endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:32: error: 'endla' is not a member of 'std'; did you mean 'endl'?
   30 |         std::cout << 0 << std::endla;
      |                                ^~~~~
      |                                endl
Language: C++

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

int32_t main(){
	int n;
	long long int c=0;
	cin>>n;
	vector<string> a(n);
	for(int i=0;i<n;i++){
		cin>>a[i];
	}
	for(int i=0;i<n;i++){
		sort(a[i].begin(),a[i].end());
	}
	map<string,int> data;
	for(int i=0;i<n;i++){
		data[a[i]]++;
	}
	for(map<string,int>::iterator it=data.begin();it!=data.end();it++){
		c+=it->second*(it->second-1)/2;
	}
	cout<<c;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:2:13: error: 'long long long' is too long for GCC
    2 | #define int long long int
      |             ^~~~
a.cc:7:19: note: in expansion of macro 'int'
    7 |         long long int c=0;
      |                   ^~~
a.cc:2:18: error: 'long long long' is too long for GCC
    2 | #define int long long int
      |                  ^~~~
a.cc:7:19: note: in expansion of macro 'int'
    7 |         long long int c=0;
      |                   ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int n;
  stirng s;
  map<string, int>m;
  int64_t result = 0;
  
  cin >> n;
  
  for(int i = 0; i < n; i++){
    cin >> s;
    sort(s.begin(), s.end());
    
    if(m.count(s)){
      result += m.at(s);
      m.at(s)++;
    }else{
      m[s] = 1;
    }
  }
  
  cout << result << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'stirng' was not declared in this scope
    6 |   stirng s;
      |   ^~~~~~
a.cc:13:12: error: 's' was not declared in this scope
   13 |     cin >> s;
      |            ^
Language: C++

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

int main(){
  int n;
  long long result;
  map<string, int>m{};
  
  cin >> n;
  
  for(int i = 0; i < n; i++){
    cin >> s;
    sort(s.begin(), s.end());
    
    if(m.count(s)){
      result += m.at(s);
      m.at(s)++;
    }else{
      m.at(s) = 1; 
    }
  }
  
  cout << result;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: 's' was not declared in this scope
   12 |     cin >> s;
      |            ^
Language: C++

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

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

int main(){
  int n;
  long long result = 0;
  vector<string> s;
    qsort((void*)s, 10, sizeof(char*), int_cmp);
  for(int i = 0; i < s.size(); i++){
    for(int j = i; j < s.size(); j++){
      if(s[i] == s[j]) result++;
    }
  }
  
  cout << result << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: invalid cast from type 'std::vector<std::__cxx11::basic_string<char> >' to type 'void*'
   12 |     qsort((void*)s, 10, sizeof(char*), int_cmp);
      |           ^~~~~~~~
Language: C++

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

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

int main(){
  int n;
  long long result = 0;
  vector<string> s;
    qsort(s, 10, sizeof(s), int_cmp);
  for(int i = 0; i < s.size(); i++){
    for(int j = i; j < s.size(); j++){
      if(s[i] == s[j]) result++;
    }
  }
  
  cout << result << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: cannot convert 'std::vector<std::__cxx11::basic_string<char> >' to 'void*'
   12 |     qsort(s, 10, sizeof(s), int_cmp);
      |           ^
      |           |
      |           std::vector<std::__cxx11::basic_string<char> >
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:970:26: note:   initializing argument 1 of 'void qsort(void*, size_t, size_t, __compar_fn_t)'
  970 | extern void qsort (void *__base, size_t __nmemb, size_t __size,
      |                    ~~~~~~^~~~~~
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)

char s[100000][10];

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:22:27: error: request for member 'begin' in 's[i]', which is of non-class type 'char [10]'
   22 |                 sort(s[i].begin(), s[i].end());
      |                           ^~~~~
a.cc:22:41: error: request for member 'end' in 's[i]', which is of non-class type 'char [10]'
   22 |                 sort(s[i].begin(), s[i].end());
      |                                         ^~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main(){
  int N;
  cin >> N;
  
  string str[N];
  for(int i=0; i<N; i++){
    cin >> str[i];
    sort(str[i][], str[i][]+10);
  }
  
  int count=0;
  for(int i=0; i<N-1; i++){
    for(int j=i+1; j<N; j++){
      if(str[i]==str[j]){
      count++;
      }
    }
  }
  
  cout << count << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: expected primary-expression before ']' token
   14 |     sort(str[i][], str[i][]+10);
      |                 ^
a.cc:14:27: error: expected primary-expression before ']' token
   14 |     sort(str[i][], str[i][]+10);
      |                           ^
Language: C++

#include <bits/stdc++.h>

using namespace std;
#define MOD 1000000007
#define pi 3.1415926535897932384626433832795028841971693993751058209749445923078164062
#define ll long long
#define pb push_back
#define pf push_front
#define mp make_pair
#define mt make_tuple
#define popb pop_back()
#define popf pop_front()
#define ff first
#define ss second
#define vl vector<ll>
#define vi vector<int>
#define vs vector<string>
#define vll vector< pair<ll,ll> >
#define vii vector< pair<int,int> >
#define viii vector< tuple <int,int,int> >
#define vlll vector< tuple <ll,ll,ll> >
#define vvl vector<vector<ll>>
#define vv vector<vector<int>>
#define all(v) v.begin(),v.end()
#define sqrt sqrtl
#define cbrt cbrtl
#define pll pair<ll,ll>
#define pii pair<int,int>
#define mapcl map<char,ll>
#define mapci map<char,int>
#define mapll map<ll,ll>
#define mapii map<int,int>
#define seti set<int>
ifstream fin("input.txt");
ofstream fout("output.txt");

ll pows(int a , int b)
{
	ll res=1;
	for(int i=0; i<b; ++i)
	{
		res*=a;
	}
	return res;
}

int main()
{	
    std::ios::sync_with_stdio(false);
    //cin.tie(NULL);
    //cout.tie(NULL);
    int x;
    cin>>x;
    ll sum=0;
    vs vec;
    map<string,int> mps;
    while(x--)
    {a
    	string s;
    	cin>>s;
    	sort(all(s));
    	++mps[s];
    }
    for(auto x : mps)
    {
    	sum+=(x.second*(x.second-1))/2;
    }
    cout<<sum<<"\n";


}

Compiler output:
a.cc: In function 'int main()':
a.cc:58:6: error: 'a' was not declared in this scope
   58 |     {a
      |      ^
a.cc:60:14: error: 's' was not declared in this scope
   60 |         cin>>s;
      |              ^
Language: C++

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

int main() {
	int n;
	cin >> n;
	map<string, int>mp;
	for (int i = 0;i < n;++i) {
		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:3:9: error: 'Long' does not name a type; did you mean 'long'?
    3 | typedef Long Long ll;
      |         ^~~~
      |         long
a.cc: In function 'int main()':
a.cc:15:9: error: 'll' was not declared in this scope
   15 |         ll ans = 0;
      |         ^~
a.cc:18:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 |                 ans += (ll)s * (s - 1) / 2;
      |                 ^~~
      |                 abs
a.cc:20:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |         cout << ans << endl;
      |                 ^~~
      |                 abs
Language: C

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

int main()
{
	int n;
	int ans=0;
	cin>>n;
	vector<string> s(n);
	for (int i = 0; i < n; i++) {
		cin>>s[i];
		std::sort(s[i].begin(),s[i].end());
	}
	sort(s.begin(),s.end());
	int temp=1;
	for (int i = 0; i < n-1; i++) {
		if(s[i]==s[i+1]){
			temp++;
		}else{
			ans+=temp*(temp-1)/2;
			temp=1;
		}
		if (i==n-2) {
			ans+=temp*(temp-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: C++

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

int main(){
  int n,ctr=0;
  cin>>n;
  set<string>x;
  for(int i=0;i<n;i++){
    string s;
    cin>>s;
    sort(s.begin(),s.end());
    if(x.count()==0)
      x.insert(s);
    else{
      ctr++;
      set<int>::iterator it;
      for(auto it=x.begin();it!=x.end();it++){
        if(*it==s){
          x.erase(it);
          break;
        }
      }
    }
  }
  cout<<ctr<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: no matching function for call to 'std::set<std::__cxx11::basic_string<char> >::count()'
   12 |     if(x.count()==0)
      |        ~~~~~~~^~
In file included from /usr/include/c++/14/set:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:158,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_set.h:756:9: note: candidate: 'template<class _Kt> decltype (((const std::set<_Key, _Compare, _Alloc>*)this)->std::set<_Key, _Compare, _Alloc>::_M_t._M_count_tr(__x)) std::set<_Key, _Compare, _Alloc>::count(const _Kt&) const [with _Key = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::basic_string<char> >]'
  756 |         count(const _Kt& __x) const
      |         ^~~~~
/usr/include/c++/14/bits/stl_set.h:756:9: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/stl_set.h:750:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::count(const key_type&) const [with _Key = std::__cxx11::basic_string<char>; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::__cxx11::basic_string<char> >; size_type = long unsigned int; key_type = std::__cxx11::basic_string<char>]'
  750 |       count(const key_type& __x) const
      |       ^~~~~
/usr/include/c++/14/bits/stl_set.h:750:7: note:   candidate expects 1 argument, 0 provided
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() {
    cin >> n;
    unordered_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;
}

 

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |     cin >> n;
      |            ^
      |            yn
a.cc:18:19: error: expected primary-expression before 's'
   18 |         ans += ll s*(s-1)/2;
      |                   ^
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() {
    cin >> n;
    unordered_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;
}

 

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |     cin >> n;
      |            ^
      |            yn
a.cc:2:17: error: expected primary-expression before '=' token
    2 | #define rep(i,n)=for(int i=0;i<(n);i++)
      |                 ^
a.cc:9:5: note: in expansion of macro 'rep'
    9 |     rep(i,n){
      |     ^~~
a.cc:2:18: error: expected primary-expression before 'for'
    2 | #define rep(i,n)=for(int i=0;i<(n);i++)
      |                  ^~~
a.cc:9:5: note: in expansion of macro 'rep'
    9 |     rep(i,n){
      |     ^~~
a.cc:9:9: error: 'i' was not declared in this scope
    9 |     rep(i,n){
      |         ^
a.cc:2:30: note: in definition of macro 'rep'
    2 | #define rep(i,n)=for(int i=0;i<(n);i++)
      |                              ^
a.cc:18:19: error: expected primary-expression before 's'
   18 |         ans += ll s*(s-1)/2;
      |                   ^
Language: C++

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

#define DEBUG_MSG_off

int N;
vector<string> s_list;

class WordInfo {
  string org;
  map<char, int> char_cnt_map;
public:
  WordInfo(string org) : org(org) {
    //cerr << org << "\n";
    for (int i=0; i<org.size();i++) {
      //cerr << org[i] << "\n";
      add(org[i]);
    }
  }
#if 0
  bool operator<(const WordInfo& obj) const {
#if 1
    return char_cnt_map<obj.char_cnt_map;
#else
    return org<obj.org;
#endif
  }
#else
  bool operator==(const WordInfo& obj) const {
    return char_cnt_map==obj.char_cnt_map;
  }
#endif

private:
  void add(char c) {
     map<char, int>::const_iterator
         find_it  = char_cnt_map.find(c);
     if (find_it == char_cnt_map.end()) {
       char_cnt_map[c] = 1;
     } else {
       char_cnt_map[c]++;
     }
  }

}; // class WordInfo end

#if 0
bool cmp(const WordInfo& obj, const WordInfo& obj2) const {
  return obj.char_cnt_map==obj2.char_cnt_map;
}
#endif

int main() {
  cin >> N;
  s_list.resize(N);
  vector<WordInfo> tmp_list;;
  int rst = 0;
  for(int i=0;i<N;i++) {
    cin >> s_list[i];
    WordInfo obj = WordInfo(s_list[i]);
    int cnt = count(tmp_list.begin(),
                    tmp_list.end(),
                    obj);

    if (cnt==0) {
#ifdef DEBUG_MSG
      cerr << s_list[i] << ":no hit\n";
      cerr << "tmp_list.size()=" << tmp_list.size() << "\n";
#endif
    } else {
#ifdef DEBUG_MSG
      cerr << s_list[i] << ":hit cnt=" << cnt << "\n";
      cerr << "tmp_list.size()=" << tmp_list.size() << "\n";
#endif
    }

    rst = rst + cnt;
    tmp_list.push_back(obj);
  }
  cout << rst << "\n";

#if 0
  map<char, int> char_cnt_map, char_cnt_map2;
  char_cnt_map['a']=1;
  char_cnt_map['b']=1;
  char_cnt_map2['c']=0;
  char_cnt_map2['a']=1;
  char_cnt_map2['b']=1;
  char_cnt_map2['c']=1;
  bool is_equ = (char_cnt_map==char_cnt_map2);
  cerr << "is_equ=" << is_equ << "\n";
#endif

#ifdef DEBUG_MSG
  cerr << "default cerr\n";
  cerr << N << "\n";
  for(auto s: s_list) cerr << s << "\n"; 
#endif
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:64:15: error: 'count' was not declared in this scope; did you mean 'cnt'?
   64 |     int cnt = count(tmp_list.begin(),
      |               ^~~~~
      |               cnt
Language: C++

//
//  main.cpp
//  C-green_bin
//
//  Created by david chong on 8/14/19.
//  Copyright © 2019 david chong. All rights reserved.
//

#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <cstring>

using namespace std;

int solve(int n, vector<string> inVec) {
    
    set<int> mySet;
    
    vector<int> table[n+1];
    bool skipTable[n+1];
    memset(skipTable, false, sizeof(skipTable));
    
    string str, tempStr;
    
    int resultCount = 0;
    
    for(int i = 0; i < n-1; i++) {
        
        if(skipTable[i]) {
            continue;
        }
        str = inVec[i];
//        cout << str << endl;
        
        for(int k = i+1; k < n; k++) {
            tempStr = inVec[k];
//            cout << "\t" << tempStr << endl;
            if(str == tempStr) {
//                printf("(%i, %i)\n", i, k);
                table[i].push_back(k);
                skipTable[k] = true;
                mySet.insert(i);
            }
        }
    }
    
    set<int>::iterator it;
    
    int x;
    
    for(it=mySet.begin(); it!=mySet.end(); it++) {
//        cout << *it << " " << table[*it].size() << endl;
        x = table[*it].size();
        if(x > 1) {
            x = x * (1+x);
            x /= 2;
            resultCount += x;
        } else {
            resultCount += x;
        }
    }
    
    return resultCount;
    
}

int main(int argc, const char * argv[]) {
    
//    freopen("input.in", "r", stdin);
    
    int n;
    string str;
    vector<string> inVec;
    
    cin >> n;
    
    for(int i = 0; i < n; i++) {
        cin >> str;
        sort(str.begin(), str.end());
        inVec.push_back(str);
    }
    
    cout << solve(n, inVec) << endl;
    
    return 0;
}


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

//
//  main.cpp
//  C-green_bin
//
//  Created by david chong on 8/14/19.
//  Copyright © 2019 david chong. All rights reserved.
//

#include <iostream>
#include <vector>
#include <map>
#include <set>

using namespace std;

int solve(int n, vector<string> inVec) {
    
    set<int> mySet;
    
    vector<int> table[n+1];
    
    bool skipTable[n+1];
    memset(skipTable, false, sizeof(skipTable));
    
    vector<int> resVec;
    
    map<char, int> myMap, otherMap;

    string str, tempStr;
    
    int resultCount = 0;
    
    bool flag;
    
    for(int i = 0; i < n-1; i++) {
        
        if(skipTable[i]) {
            continue;
        }
        
        str = inVec[i];
//        cout << str << endl;
        myMap.clear();
        for(int j = 0; j < str.length(); j++) {
            myMap[str[j]]++;
        }
        
        for(int k = i+1; k < n; k++) {
            tempStr = inVec[k];
//            cout << "\t" << tempStr << " : " << count << endl;
            otherMap.clear();
            
            for(int j = 0; j < tempStr.length(); j++) {
                otherMap[tempStr[j]]++;
            }
            
            flag = true;
            
            for(int j = 0; j < tempStr.length(); j++) {
                if(myMap[tempStr[j]] != otherMap[tempStr[j]]) {
                    flag = false;
                    break;
                }
            }
            
            if(flag) {
//                printf("(%i, %i)\n", i, k);
                table[i].push_back(k);
                
                skipTable[k] = true;
                
//                rootTable.push_back(i);
                
                mySet.insert(i);
//                resultCount++;
            }
        }
    }
    
    set<int>::iterator it;
    
    int x;
    
    for(it=mySet.begin(); it!=mySet.end(); it++) {
//        cout << *it << " " << table[*it].size() << endl;
        x = table[*it].size();
        if(x > 1) {
            x = x * (1+x);
            x /= 2;
            resultCount += x;
        } else {
            resultCount += x;
        }
    }
    
    return resultCount;
    
}

int main(int argc, const char * argv[]) {
    
//    freopen("input.in", "r", stdin);
    
    int n;
    string str;
    vector<string> inVec;
    
    cin >> n;
    
    for(int i = 0; i < n; i++) {
        cin >> str;
        inVec.push_back(str);
    }
    
    cout << solve(n, inVec) << endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int solve(int, std::vector<std::__cxx11::basic_string<char> >)':
a.cc:23:5: error: 'memset' was not declared in this scope
   23 |     memset(skipTable, false, sizeof(skipTable));
      |     ^~~~~~
a.cc:13:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   12 | #include <set>
  +++ |+#include <cstring>
   13 |
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: request for member 'begin' in 's', which is of non-class type 'std::string [n]' {aka 'std::__cxx11::basic_string<char> [n]'}
   13 |   sort(s.begin(),s.end());
      |          ^~~~~
a.cc:13:20: error: request for member 'end' in 's', which is of non-class type 'std::string [n]' {aka 'std::__cxx11::basic_string<char> [n]'}
   13 |   sort(s.begin(),s.end());
      |                    ^~~
Language: C++

#include <iostream>
#include <string>
 
#include <set>
#include <map>
#include <vector>
#include <cmath>
#include <algorithm>
 
using namespace std;
 
 
int mainC()
{
	string str;
	cin >> str;
	int n = stoi(str);
	map<string, long long> strMap;
  	map<string, int> strMap2;
	for (int i = 0; i < n; ++i)
	{
		cin >> str;
		sort(str.begin(), str.end());
		strMap[str]++;
      	strMap2[str]++;
	}
 
	long long m = 0;
	for (const auto& x : strMap)
	{
		auto k = x.second;
      	auto k2 = strMap2.find(k.first)->second;
      	if(k != k2)
          return 0;
		if(k > 1)
			m += (k - 1) * k;
	}
	m /= 2;
	cout << m << endl;
	return 0;
 
}
 
int main()
{
	return mainC();
}


Compiler output:
a.cc: In function 'int mainC()':
a.cc:32:34: error: request for member 'first' in 'k', which is of non-class type 'long long int'
   32 |         auto k2 = strMap2.find(k.first)->second;
      |                                  ^~~~~
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<climits>
#include<numeric>
#include<cmath>
#include<cstring>
#include<deque>
#include<map>

#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 FORR(i, m, n) for(int i = m;i >= n;i--)
#define VSORT(v) sort(v.begin(), v.end());
#define VE vector<int>
#define VEP vector<pair<int,int>>
#define llong long long
#define pb(a) push_back(a)
using namespace std;
long long GCD(long long a, long long b) {
	if (b == 0) return a;
	else return GCD(b, a % b);
}
int main() {
	int n;
	cin >> n;
	map<string, int> ma;
	for (int i = 0; i < n; ++i) {
		string str;
		cin >> str;
		sort(str.begin(), str.end());
		int before_size = ma.size();
		ma[str];
		if (ma.size() == before_size) {
			ma[str]++;
		}
	}
	llong ans = 0;
	auto ans = accumulate(ma.begin(), ma.end(), 0LL, [](llong acc, auto itr) {return acc + static_cast<llong>(itr.second) * (itr.second + 1) / 2; });
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:14: error: conflicting declaration 'auto ans'
   41 |         auto ans = accumulate(ma.begin(), ma.end(), 0LL, [](llong acc, auto itr) {return acc + static_cast<llong>(itr.second) * (itr.second + 1) / 2; });
      |              ^~~
a.cc:40:15: note: previous declaration as 'long long int ans'
   40 |         llong ans = 0;
      |               ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin>>n;
  vector<string> vs;
  for(int i=0;i<n;i++){
    string s;
    cin>>s;
    sort(s.begin(),s.end());
    vs.push_back(s);
  }
 bool chk[n][n];
  for(int i=0;i<n;i++){
    for(int j=0;j<n;j++)
      chk[i][j]=false;
  }
}
int c=0;
for(int i=0;i<n;i++){
  for(int j=0;j<n;j++){
    if(i!=j&&chk[i][j]==false&&vs[i]==vs[j]){
      c++;
      chk[i][j]=true;
      chk[j][i]=true;
    }
  }
}
cout<<c<<endl;
return 0;
}


Compiler output:
a.cc:20:1: error: expected unqualified-id before 'for'
   20 | for(int i=0;i<n;i++){
      | ^~~
a.cc:20:13: error: 'i' does not name a type
   20 | for(int i=0;i<n;i++){
      |             ^
a.cc:20:17: error: 'i' does not name a type
   20 | for(int i=0;i<n;i++){
      |                 ^
a.cc:29:1: error: 'cout' does not name a type
   29 | cout<<c<<endl;
      | ^~~~
a.cc:30:1: error: expected unqualified-id before 'return'
   30 | return 0;
      | ^~~~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int cmp(const void *a, const void *b) {
  return *(char *)a - *(char *)b;
}
int cmps(const void *a,const void *b){
  return strcmp((char*)a,(char*)b);
}
int main(void){
  int n,i,j,k,ans=0;
  char tmp;
  scanf("%d",&n);
  char s[n][11];
  for(i=0;i<n;i++) scanf("%s",s[i]);
  for(i=0;i<n;i++) qsort(s[i],10;sizeof(char),cmp);
  qsort(s,n,sizeof(char)*11,cmp);
  for(i=0;i<n;i++) printf("%s\n",s[i]);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:33: error: expected ')' before ';' token
   16 |   for(i=0;i<n;i++) qsort(s[i],10;sizeof(char),cmp);
      |                         ~       ^
      |                                 )
main.c:16:20: error: too few arguments to function 'qsort'
   16 |   for(i=0;i<n;i++) qsort(s[i],10;sizeof(char),cmp);
      |                    ^~~~~
In file included from main.c:2:
/usr/include/stdlib.h:970:13: note: declared here
  970 | extern void qsort (void *__base, size_t __nmemb, size_t __size,
      |             ^~~~~
Language: C++

#include <bits/stdc++.h>
#include <unordered_map>
 
using namespace std;
 
typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;
 
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
typedef pair<ld,ld> pd;
 
typedef vector<int> vi;
typedef vector<ld> vd;
typedef vector<ll> vl;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
typedef vector<cd> vcd;
 
#define FOR(i, a, b) for (int i=a; i<(b); i++)
#define F0R(i, a) for (int i=0; i<(a); i++)
#define FORd(i,a,b) for (int i = (b)-1; i >= a; i--)
#define F0Rd(i,a) for (int i = (a)-1; i >= 0; i--)
 
#define sz(x) (int)(x).size()
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
#define all(x) x.begin(), x.end()
#define shandom_ruffle random_shuffle
 
const long MOD = 3.037e+09; // sqrt(LONG_MAX)
const ll INF = 1e18;
const int MX = 100001; //check the limits, dummy

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    unordered_map<string, ll> h2c; // hash => count
    int n;
    cin >> n;
    string str;
    for (int i = 0; i < n; ++i) {
        cin >> str;
        string sstr = str;
        sort(sstr.begin(), sstr.end());
        ++h2c[sstr];
    }

    unsigned ll ans = 0;
    for (auto pa : h2c) {
        ans += (pa.second) * (pa.second - 1) / 2;
    }

    cout<<ans<<endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:54:17: error: expected initializer before 'ans'
   54 |     unsigned ll ans = 0;
      |                 ^~~
a.cc:56:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   56 |         ans += (pa.second) * (pa.second - 1) / 2;
      |         ^~~
      |         abs
a.cc:59:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   59 |     cout<<ans<<endl;
      |           ^~~
      |           abs
Language: C++

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

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

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

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

int main(void){
    int n;
    map<string, int> mp;
    cin>>n;
    rep(i, n){
        string s;
        cin>>s;
        sort(s.begin(), s.end());
        mp[s]++;
    }
    ll ans =0;
    for (auto itr=mp.begin();itr!=mp.end();itr++){
        int a=itr->second;
        ans+=(ll)a*(a-1)/2;
    }
    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.begin(), s.end());
      |         ^~~~
      |         short
Language: C++

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

int main(void){
    int n;
    map<string, int> mp;
    cin>>n;
    rep(i, n){
        string s;
        cin>>s;
        sort(s.begin(), s.end());
        mp[s]++;
    }
    ll ans =0;
    for (auto p:mp){
        int a=p.second;
        ans+=(ll)a*(a-1)/2;
    }
    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.begin(), s.end());
      |         ^~~~
      |         short
Language: C++

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

int main(void){
    int n;
    map<string, int> mp;
    cin>>n;
    rep(i, n){
        string s;
        cin>>s;
        sort(s.begin(), s.end());
        mp[s]++;
    }
    ll ans =0;
    for (auto& p:mp){
        int a=p.second;
        ans+=(ll)a*(a-1)/2;
    }
    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.begin(), s.end());
      |         ^~~~
      |         short