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

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


int main() {
    int n; scanf("%d", &n);
    vector<string> ss;
    unordered_map<string, int> ssmap;
    for(int i = 0; i < n; i++){
        scanf("%s", &ss);
        sort(ss.begin(), ss.end());
        ssmap[ss] += 1;
    }
    int ans = 0;
    for(auto itr = ssmap.begin(); itr != ssmap.end(); ++itr){
        ans += itr->second;
    }
    printf("%d\n", ans);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: no match for 'operator[]' (operand types are 'std::unordered_map<std::__cxx11::basic_string<char>, int>' and 'std::vector<std::__cxx11::basic_string<char> >')
   12 |         ssmap[ss] += 1;
      |              ^
In file included from /usr/include/c++/14/unordered_map:41,
                 from /usr/include/c++/14/functional:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/unordered_map.h:987:7: note: candidate: 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = int; _Hash = std::hash<std::__cxx11::basic_string<char> >; _Pred = std::equal_to<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> >; mapped_type = int; key_type = std::__cxx11::basic_string<char>]'
  987 |       operator[](const key_type& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/unordered_map.h:987:34: note:   no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'const std::unordered_map<std::__cxx11::basic_string<char>, int>::key_type&' {aka 'const std::__cxx11::basic_string<char>&'}
  987 |       operator[](const key_type& __k)
      |                  ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/unordered_map.h:991:7: note: candidate: 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::mapped_type& std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](key_type&&) [with _Key = std::__cxx11::basic_string<char>; _Tp = int; _Hash = std::hash<std::__cxx11::basic_string<char> >; _Pred = std::equal_to<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> >; mapped_type = int; key_type = std::__cxx11::basic_string<char>]'
  991 |       operator[](key_type&& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/unordered_map.h:991:29: note:   no known conversion for argument 1 from 'std::vector<std::__cxx11::basic_string<char> >' to 'std::unordered_map<std::__cxx11::basic_string<char>, int>::key_type&&' {aka 'std::__cxx11::basic_string<char>&&'}
  991 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
Language: C

#include <stdio.h>
typedef enum alf(a=1 b c d e f g h i j k l m n o p q r s t u v w x y z)alf;
int unk(char a,char yoshio[10],char kao[10]){
  int kaochan=315,i=0,j=0;
  for(kaochan=0;kaochan<10;kaochan++){
  if(yoshio[kaochan]==a){
    i=i++;
    }
  if(kao[kaochan]==a){
    j=j++;
    }
  }
  if(j==i){
    return 1;
    }
  else return 0;
}

int main(){
  int yoshio=440,kao=315,i=0,j=0,k=0,num=0,ans=0;
  scanf("%d",&yoshio);
  char kaochan[yoshio][10];
  int tkt[2][26];
  for(kao=0;kao<yoshio;kao++){
    gets(kaochan[kao][10]);
  }
  for(k=0;k<yoshio;k++){
      for(j=0;j<yoshio;j++){
          for(i=1;i<=26;i++){
              num=unk(i,kaochan[j][10],kaochan[k][10]);
              if(num==0){
                  goto aaa;
              }
          }
      }
      ans=++ans;


  }
  while(0){
      aaa: printf("0\n");
      return 0;
      }
  printf("%d\n",ans);
  return 0;
}

Compiler output:
main.c:2:19: error: expected ')' before '=' token
    2 | typedef enum alf(a=1 b c d e f g h i j k l m n o p q r s t u v w x y z)alf;
      |                   ^
      |                   )
main.c: In function 'main':
main.c:25:5: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   25 |     gets(kaochan[kao][10]);
      |     ^~~~
      |     fgets
main.c:30:35: error: passing argument 2 of 'unk' makes pointer from integer without a cast [-Wint-conversion]
   30 |               num=unk(i,kaochan[j][10],kaochan[k][10]);
      |                         ~~~~~~~~~~^~~~
      |                                   |
      |                                   char
main.c:3:21: note: expected 'char *' but argument is of type 'char'
    3 | int unk(char a,char yoshio[10],char kao[10]){
      |                ~~~~~^~~~~~~~~~
main.c:30:50: error: passing argument 3 of 'unk' makes pointer from integer without a cast [-Wint-conversion]
   30 |               num=unk(i,kaochan[j][10],kaochan[k][10]);
      |                                        ~~~~~~~~~~^~~~
      |                                                  |
      |                                                  char
main.c:3:37: note: expected 'char *' but argument is of type 'char'
    3 | int unk(char a,char yoshio[10],char kao[10]){
      |                                ~~~~~^~~~~~~
Language: C++

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

int a(int i)
{
  int ans = 0;
  for (; i > 0; i--) {
    ans += i;
  }
  return ans;
}

int main(int argc, char** argv)
{
  int N;
  std::cin >> N;

  std::unorderd_map<std::string, int> dic;
  std::string S;
  for (int i = 0; i < N; i++) {
    std::cin >> S;
    std::sort(std::begin(S), std::end(S));
    if (dic.find(S) == std::end(dic)) {
      dic[S] = 1;  
    }
    else {
      dic[S]++;
    }
  }

  int ans = 0;
  for (auto & e : dic) {
    if (e.second > 1) {
      ans += a(e.second-1);
    }
  }

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

  return 0;
}

Compiler output:
a.cc:5:10: fatal error: unorderd_map: No such file or directory
    5 | #include <unorderd_map>
      |          ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <stdio.h>
typedef enum alf(a=1 b c d e f g h i j k l m n o p q r s t u v w x y z)alf;
int unk(char a,char yoshio[10],char kao[10]){
  int kaochan=315,i=0,j=0;
  for(kaochan=0;kaochan<10;kaochan++){
  if(yoshio[kaochan]==a){
    i=i++;
    }
  if(kao[kaochan]==a){
    j=j++;
    }
  }
  if(j==i){
    return i;
    }
  else return 20;

}
int main(){
  int yoshio=440,kao=315,i=0,j=0;
  scanf("%d",&yoshio);
  char kaochan[yoshio][10];
  int tkt[2][26];
  for(kao=0;kao<yoshio;kao++){
    gets(kaochan[kao][10]);
  }
  unk(1,kaochan[1],kaochan[2])
  
}

Compiler output:
a.cc:2:14: error: use of enum 'alf' without previous declaration
    2 | typedef enum alf(a=1 b c d e f g h i j k l m n o p q r s t u v w x y z)alf;
      |              ^~~
a.cc:2:19: error: expected ')' before '=' token
    2 | typedef enum alf(a=1 b c d e f g h i j k l m n o p q r s t u v w x y z)alf;
      |                 ~ ^
      |                   )
a.cc: In function 'int main()':
a.cc:25:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
   25 |     gets(kaochan[kao][10]);
      |     ^~~~
      |     getw
a.cc:27:31: error: expected ';' before '}' token
   27 |   unk(1,kaochan[1],kaochan[2])
      |                               ^
      |                               ;
   28 | 
   29 | }
      | ~
Language: C++

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

bool isAnagram(std::vector<char>& s1, std::vector<char>& s2)
{
    for (int i = 0; i < 10; i++) {
        if (s1[i] != s2[i]) return false;
    }

    return true;
}

int main(int argc, char** argv)
{
    int N;
    std::cin >> N;

    std::vector<std::string> strs;
    std::vector<std::vector<char>> parsed;

    for (int i = 0; i < N; i++) {
        std::string S;
        std::cin >> S;
        strs.push_back(S);
        std::vector<char> line;
        for (int j = 0; j < 10; j++) {
            line.push_back(std::to_int(S[j]));
        }
        std::sort(std::begin(line), std::end(line));
        parsed.push_back(line);
    }

    int ans = 0;
    for (int i = 0; i < N-1; i++) {
        for (int j = i+1; j < N; j++) {
            if (isAnagram(parsed[i], parsed[j])) {
                ans++;
            }
        }
    }

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

    return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:29:33: error: 'to_int' is not a member of 'std'
   29 |             line.push_back(std::to_int(S[j]));
      |                                 ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
	int n,cnt=0;
	cin >> n;
	vector<string> s(n);
	REP(i, n) {
		cin >> s[i];
		sort(s[i].begin(),s[i].end());
	}
	REP(i, n) for (int j=1;i+j<n;j++) {
		if (s[i] == s[i+j])cnt++;
	}
	cout << cnt << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'i' was not declared in this scope
    7 |         REP(i, n) {
      |             ^
a.cc:7:9: error: 'REP' was not declared in this scope
    7 |         REP(i, n) {
      |         ^~~
a.cc:11:34: error: 'j' was not declared in this scope
   11 |         REP(i, n) for (int j=1;i+j<n;j++) {
      |                                  ^
Language: C++

#include <iostream>
#include <vector>
#include <map>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int MOD = 1E9 + 9;
const int INF = 1<<29; 

int main(){
    int ans = 0;
    int N;
    cin >> N;
    vector<string> s(N);
    rep(i, N) cin >> s[i];
    map<string, int> cnt;
    rep(i, N){
        sort(s[i].begin(), s[i].end()); 
        cnt[s[i]]++;
    }
    for(int i = 0; i < N; i++){
        // cout << &cnt[s[i]] << endl;
        ans += (cnt[s[i]] - 1);
    }
    cout << ans / 2 << endl;
}

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(s[i].begin(), s[i].end());
      |         ^~~~
      |         short
Language: C++

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

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]++;
  }
  
  long long 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:19:13: error: 'll' was not declared in this scope
   19 |     ans += (ll)s*(s-1)/2;
      |             ^~
Language: C++

from functools import reduce
n = int(input())
s = []
count = 0
for _ in range(n):
    s.append(sorted(input()))
    s[_] = ''.join(s[_]).rstrip('\n')
set_s = set(s)
for i in range(len(set_s)):
    s_count = s.count(list(set_s)[i])
    if s_count > 1:
        count += reduce((lambda x, y: x*y), range(1,s_count+1))
print(count//2)

Compiler output:
a.cc:7:12: error: empty character constant
    7 |     s[_] = ''.join(s[_]).rstrip('\n')
      |            ^~
a.cc:1:1: error: 'from' does not name a type
    1 | from functools import reduce
      | ^~~~
Language: C++

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

int main(int argc, char* argv[]){
  int n;
  std::vector<std::string>s;
  std::cin >> n;
  for (int i = 0; i < n; i++){
	char str [10];
    std::cin >> str;
    std::sort(str, str + 10);   
    s.push_back(std::string(str));
  }

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

  
  int c = 0;
  int c_c = 0;
  int i = 0;
  int j = 1;
  while (j < n){
    if (s[i] == s[j]){
      c_c++;
      j++;
    } else {
      c += c_c * (c_c + 1) / 2;
      c_i = 0;
      i = j;
      j++;
    }
  }
  c += c_i * (c_i - 1) / 2;
  std::cout << c << std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:31:7: error: 'c_i' was not declared in this scope; did you mean 'c_c'?
   31 |       c_i = 0;
      |       ^~~
      |       c_c
a.cc:36:8: error: 'c_i' was not declared in this scope; did you mean 'c_c'?
   36 |   c += c_i * (c_i - 1) / 2;
      |        ^~~
      |        c_c
Language: C++

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

int main (){
  int n;
  cin >> n;
  map<string,int> ans;
  for (int i=0;i<n;i++) {
    string s;
    cin >> s;
    sort(s.begin(),s.end());
    ans[s]++;
  }
  sort(vec.begin(),vec.end());
  long long int count=0;
  //vector<string>::iterator sx = vec.begin();
  long long int count_=0;
  int count__=0;
    /*
  for (int i=0;i<n;i++){
    if (*sx==*(sx+1)){
      if (count_==0){
        count_=1;
      }
      count_++;
    } else {
      count+=count_*(count_-1)/2;
      count_=0;
    }
    sx++;
  }
  */
  cout << count;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: 'vec' was not declared in this scope
   14 |   sort(vec.begin(),vec.end());
      |        ^~~
Language: C++

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

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 |     ans += s*(s-1)/2ll;
      |     ^~~
      |     abs
a.cc:20:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C

#include <bits/stdc++.h>

using namespace std;

#define rep(i, n) for (int i = 0; i < (int)n; ++i)
#define all(a) a.begin(), a.end()

typedef long long lint;

int table[3][26];
int mod[3];
vector<int> primes;

struct node {
    int h[3];
    bool operator == (const node &other) {
        return h[0] == other.h[0] && h[1] == other.h[1] && h[2] == other.h[2];
    }
    bool operator < (const node &other) const {
        if (h[0] == other.h[0]) {
            if (h[1] == other.h[1]) return h[2] < other.h[2];
            return h[1] < other.h[1];
        }
        return h[0] < other.h[0];
    }
};

map<node, int> mp;

int main() {
    rep(i, 2309) {
        int cnt = 0;
        rep(j, (i + 1)) {
            if ((i + 1) % (j + 1) == 0) ++cnt;
        }
        if (cnt == 2) primes.push_back((i + 1));
    }
    rep(i, 3) {
        mod[i] = primes.back();
        primes.pop_back();
        rep(j, 26) {
            table[i][j] = primes.back();
            primes.pop_back();
        }
    }
    int N;
    scanf("%d", &N);
    rep(i, N) {
        char s[11];
        scanf("%s", s);
        int sn = (int)strlen(s);
        node tmp = {{1, 1, 1}};
        rep(j, 3) rep(k, sn) tmp.h[j] *= table[j][s[k] - 'a'];
        mp[tmp]++;
    }
    lint ans = 0LL;
    for (auto m : mp) ans += m.second * (m.second - 1LL) / 2LL;
    printf("%lld\n", ans);
}


Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
string str[1000005];
string dic[1000005];



int main(){
  int n;
  cin >> n;
  for(int i = 0;i < n;i++){
    cin >> str[i];
  }
  
  for(int i = 0;i < n;i++){
    mojiSort(str[i]);
  }
  
  int cnt = 0; 
  for(int i = 0;i<n;i++){
    for(int j = i; j < n; j++){
      if(str[i] = str[j]) cnt++;
    }
  }
  cout <<cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'mojiSort' was not declared in this scope
   16 |     mojiSort(str[i]);
      |     ^~~~~~~~
a.cc:22:17: error: could not convert 'str[i].std::__cxx11::basic_string<char>::operator=(str[j])' from 'std::__cxx11::basic_string<char>' to 'bool'
   22 |       if(str[i] = str[j]) cnt++;
      |          ~~~~~~~^~~~~~~~
      |                 |
      |                 std::__cxx11::basic_string<char>
Language: C

#include<stdio.h>
int main(void){
  char s[100001][10];
  int n;
  int i,j;
  unsigned int total[100001];
  int count;
  char a = "a";
  scanf("%d",&n);
  
  for(i=1;i<=n;i++){
    scanf("%s",s[i]);
  }
  for(i=1;i<=n;i++){
  for(j=0;j<=9;j++){
    total[i] += 2**(s[i][j] - a);
  }
  
  for(i=1;i<=n-1;i++){
    for(j=i+1;j<=n;j++){
      if (total[i]==total[j]){
        count += 1;
      }}}
    printf("%d",count);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:12: error: initialization of 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
    8 |   char a = "a";
      |            ^~~
main.c:16:19: error: invalid type argument of unary '*' (have 'int')
   16 |     total[i] += 2**(s[i][j] - a);
      |                   ^~~~~~~~~~~~~~
main.c:27:1: error: expected declaration or statement at end of input
   27 | }
      | ^
Language: C++

#include <bits/stdc++.h>
 
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define rep(i, n)  for(int i=0;i<(n);++i)
#define REPr(i, n) for(int i=(n)-1;i>=0; --i)
#define FORq(i, m, n) for(int i = (m);i <= (n);++i)
#define FORqr(i, m, n) for(int i = (n);i >=(m);--i)
#define PB push_back
#define MP make_pair
#define DEBUG printf("%s\n","debug")
#define fst first
#define snd second
#define SIN(x, S) (S.count(x) != 0)
#define M0(x) memset(x,0,sizeof(x))
#define FILL(x, y) memset(x,y,sizeof(x))
#define MM(x) memset(x,-1,sizeof(x))
#define ALL(x) (x).begin(),(x).end()
using namespace std;
typedef pair<int, int> PII;
typedef pair<long long, long long> PLL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<long long> VL;
typedef long long ll;
typedef long long integer;
///////////////////////////////////////////////
/* (๑╹◡╹) */
ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; }
ll MOD = 1000000007;
template<class T>
inline bool chmin(T &a, T b) {
	if (a > b) {
		a = b;
		return true;
	}
	return false;
}
 /* (๑╹◡╹)(๑╹◡╹)(๑╹◡╹)*/
template<class T>
inline bool chmax(T &a, T b) {
	if (a < b) {
		a = b;
		return true;
	}
	return false;
}
/* (๑╹◡╹)(๑╹◡╹)(๑╹◡╹)(๑╹◡╹)(๑╹◡╹)(๑╹◡╹) */
///////////////////////////////////////////////
const int MAX = 510000;

long long fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
    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;
}
 



int main() {
	ll ans = 0;
	int N; scanf("%d",&N);
	vector<string> A(N);
	for (int i = 0; i < N; i++)
	{

		string s; getline(cin,s) //i番目の文字列(10文字)
		//vector<string> S(10);//sを1文字ずつ格納して，それをソート後，結合してA[i]を作る
		//for (int k = 0; k < 10; k++){S[k] = s[k];}
		sort(ALL(s));
		//A[i] = S[0] + S[1] + S[2] + S[3] + S[4] + S[5] + S[6] + S[7] + S[8] + S[9];
		A[i] = s;
	}
	sort(ALL(A));
	for (int i = 0; i < N-1; i++)
	{
		if(A[i] == A[i+1])
		{
			int a = 2;
			if(i+1 == N-1){;}
			else{
			for (int j = i+2; j < N; j++)
			{
				if(A[i] == A[j]){a++;}
				else{i = j-1;break;}
			}
			}
			ans += a*(a-1)/2;
		}
	}
	
	

	cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:82:41: error: expected ';' before 'sort'
   82 |                 string s; getline(cin,s) //i番目の文字列(10文字)
      |                                         ^
      |                                         ;
......
   85 |                 sort(ALL(s));
      |                 ~~~~
Language: C++

#include <bits/stdc++.h>
 
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define rep(i, n)  for(int i=0;i<(n);++i)
#define REPr(i, n) for(int i=(n)-1;i>=0; --i)
#define FORq(i, m, n) for(int i = (m);i <= (n);++i)
#define FORqr(i, m, n) for(int i = (n);i >=(m);--i)
#define PB push_back
#define MP make_pair
#define DEBUG printf("%s\n","debug")
#define fst first
#define snd second
#define SIN(x, S) (S.count(x) != 0)
#define M0(x) memset(x,0,sizeof(x))
#define FILL(x, y) memset(x,y,sizeof(x))
#define MM(x) memset(x,-1,sizeof(x))
#define ALL(x) (x).begin(),(x).end()
using namespace std;
typedef pair<int, int> PII;
typedef pair<long long, long long> PLL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<long long> VL;
typedef long long ll;
typedef long long integer;
///////////////////////////////////////////////
/* (๑╹◡╹) */
ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; }
ll MOD = 1000000007;
template<class T>
inline bool chmin(T &a, T b) {
	if (a > b) {
		a = b;
		return true;
	}
	return false;
}
 /* (๑╹◡╹)(๑╹◡╹)(๑╹◡╹)*/
template<class T>
inline bool chmax(T &a, T b) {
	if (a < b) {
		a = b;
		return true;
	}
	return false;
}
/* (๑╹◡╹)(๑╹◡╹)(๑╹◡╹)(๑╹◡╹)(๑╹◡╹)(๑╹◡╹) */
///////////////////////////////////////////////
const int MAX = 510000;

long long fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
    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;
}
 



int main() {
	ll ans = 0;
	int N; cin >> N;
	vector<string> A(N);
	for (int i = 0; i < N; i++)
	{

		string s; cin >> s;
		vector<string> S(10);
		for (int k = 0; k < 10; k++)
		{
			S[k] = s[k];
		}
		sort(ALL(S));
		A[i] = S[0] + S[1] + S[2] + S[3] + S[4] + S[5] + S[6] + S[7] + S[8] + S[9];
	}
	sort(ALL(A));
	
	vector<int> U;
	int count = 1;
	REP(i,10-1){
		if (A[i] == A[i+1]){
			count++;
		}else{
			U.PB(count);
			count = 1;
		}
	}
	U.PB(count);
 
	REP(i,U.size()){
	    ll ncount = U[i];
	    ans += ncount * (ncount-1) / 2;
	}
 
	cout << ans << "\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:95:13: error: 'i' was not declared in this scope
   95 |         REP(i,10-1){
      |             ^
a.cc:95:9: error: 'REP' was not declared in this scope; did you mean 'REPr'?
   95 |         REP(i,10-1){
      |         ^~~
      |         REPr
Language: C++

#include <bits/stdc++.h>
 
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define rep(i, n)  for(int i=0;i<(n);++i)
#define REPr(i, n) for(int i=(n)-1;i>=0; --i)
#define FORq(i, m, n) for(int i = (m);i <= (n);++i)
#define FORqr(i, m, n) for(int i = (n);i >=(m);--i)
#define PB push_back
#define MP make_pair
#define DEBUG printf("%s\n","debug")
#define fst first
#define snd second
#define SIN(x, S) (S.count(x) != 0)
#define M0(x) memset(x,0,sizeof(x))
#define FILL(x, y) memset(x,y,sizeof(x))
#define MM(x) memset(x,-1,sizeof(x))
#define ALL(x) (x).begin(),(x).end()
using namespace std;
typedef pair<int, int> PII;
typedef pair<long long, long long> PLL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<long long> VL;
typedef long long ll;
typedef long long integer;
///////////////////////////////////////////////
/* (๑╹◡╹) */
ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; }
ll MOD = 1000000007;
template<class T>
inline bool chmin(T &a, T b) {
	if (a > b) {
		a = b;
		return true;
	}
	return false;
}
 /* (๑╹◡╹)(๑╹◡╹)(๑╹◡╹)*/
template<class T>
inline bool chmax(T &a, T b) {
	if (a < b) {
		a = b;
		return true;
	}
	return false;
}
/* (๑╹◡╹)(๑╹◡╹)(๑╹◡╹)(๑╹◡╹)(๑╹◡╹)(๑╹◡╹) */
///////////////////////////////////////////////
const int MAX = 510000;

long long fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
    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;
}
 



int main() {
	ll ans = 0;
	int N; cin >> N;
	vector<string> A(N);
	for (int i = 0; i < N; i++)
	{

		string s; cin >> s;
		vector<string> S(10);
		for (int k = 0; k < 10; k++)
		{
			S[k] = s[k];
		}
		sort(ALL(S));
		A[i] = S[0] + S[1] + S[2] + S[3] + S[4] + S[5] + S[6] + S[7] + S[8] + S[9];
	}
	sort(ALL(A));
	
	vector<int> U;
	int count = 1;
	REP(i,A.size()-1){
		if (A[i] == A[i+1]){
			count++;
		}else{
			U.PB(count);
			count = 1;
		}
	}
	U.PB(count);
 
	REP(i,U.size()){
	    ll ncount = U[i];
	    ans += ncount * (ncount-1) / 2;
	}
 
	cout << ans << "\n";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:95:13: error: 'i' was not declared in this scope
   95 |         REP(i,A.size()-1){
      |             ^
a.cc:95:9: error: 'REP' was not declared in this scope; did you mean 'REPr'?
   95 |         REP(i,A.size()-1){
      |         ^~~
      |         REPr
Language: C++

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

int main() {
  int n;
  cin >> n;
  vector<string> s(n);
  for(int i = 0; i < n; i++){
    cin >> s.at(i);
    sort(s.at(i).begin(), s.at(i).end());
  }
  
  int  count = 0;
  while(int )
  for(int i = 0; i < n-1; i++){
    for(int j = i+1; j < n; j++){
      if(s.at(i) == s.at(j)) count++;
    }
  }
      
  cout << count <<  endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: expected unqualified-id before ')' token
   14 |   while(int )
      |             ^
Language: C++

#include <bits/stdc++.h>
 
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define rep(i, n)  for(int i=0;i<(n);++i)
#define REPr(i, n) for(int i=(n)-1;i>=0; --i)
#define FORq(i, m, n) for(int i = (m);i <= (n);++i)
#define FORqr(i, m, n) for(int i = (n);i >=(m);--i)
#define PB push_back
#define MP make_pair
#define DEBUG printf("%s\n","debug")
#define fst first
#define snd second
#define SIN(x, S) (S.count(x) != 0)
#define M0(x) memset(x,0,sizeof(x))
#define FILL(x, y) memset(x,y,sizeof(x))
#define MM(x) memset(x,-1,sizeof(x))
#define ALL(x) (x).begin(),(x).end()
using namespace std;
typedef pair<int, int> PII;
typedef pair<long long, long long> PLL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<long long> VL;
typedef long long ll;
typedef long long integer;
///////////////////////////////////////////////
/* (๑╹◡╹) */
ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; }
ll MOD = 1000000007;
template<class T>
inline bool chmin(T &a, T b) {
	if (a > b) {
		a = b;
		return true;
	}
	return false;
}
 /* (๑╹◡╹)(๑╹◡╹)(๑╹◡╹)*/
template<class T>
inline bool chmax(T &a, T b) {
	if (a < b) {
		a = b;
		return true;
	}
	return false;
}
/* (๑╹◡╹)(๑╹◡╹)(๑╹◡╹)(๑╹◡╹)(๑╹◡╹)(๑╹◡╹) */
///////////////////////////////////////////////
const int MAX = 510000;

long long fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
    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;
}
 



int main() {
	COMinit();
	ll ans = 0;
	int N; cin >> N;
	vector<string> A(N);
	for (int i = 0; i < N; i++)
	{

		string s; cin >> s;
		vector<string> S(10);
		for (int k = 0; k < 10; k++)
		{
			S[k] = s[k];
		}
		sort(ALL(S));
		A[i] = S[0] + S[1] + S[2] + S[3] + S[4] + S[5] + S[6] + S[7] + S[8] + S[9];
	}
	sort(ALL(A));
	for (int i = 0; i < N-1; i++)
	{
		if(A[i] == A[i+1])
		{
			int a = 2;
			if(i+1 == N-1){;}
			else{
			for (int j = i+2; j < N; j++)
			{
				if(A[i] == A[j]){a++;}
				else{i = j-1;break;}
			}
			}
			ans += a(a-1)/2;
		}
	}
	
	

	cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:106:33: error: 'a' cannot be used as a function
  106 |                         ans += a(a-1)/2;
      |                                ~^~~~~
Language: C++

#include <bits/stdc++.h>
#include <cstdlib>
#include <vector>
#include <string>
#include <unordered_map>

using namespace std;

int main() {
    int n;
    unordered_map<string, int> mp;
    long long cnt = 0;
    cin >> n;
    string str[n];
    for(int i = 0; i < n; i++) {
      cin >> str[i];
    }
    for(int i = 0; i < n; i++) {
      sort(str[i].begin(), str[i].end());
      if(mp.count(str[i])){
        mp[str[i]] += 1;
      }else {
        mp[str[i]] = 1;
      }
    }
    for(auto& i : mp) {
        long long s = i.second;
        if(s > 1) {
          cnt += s*(s-1) / 2;
        }
    }
    cout << cnt;

    return 0;


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

#include <bits/stdc++.h>
#include <cstdlib>
#include <vector>
#include <string>
#include <unordered_map>

using namespace std;

int main() {
    int n;
    unordered_map<string, int> mp;
    long long cnt = 0;
    cin >> n;
    string str[n];
    for(int i = 0; i < n; i++) {
      cin >> str[i];
    }
    for(int i = 0; i < n; i++) {
      sort(str[i].begin(), str[i].end());
      if(mp.count(str[i])){
        mp[str[i]] += 1;
      }else {
        mp[str[i]] = 1;
      }
    }
    for(auto& i : mp) {
        long long s = i.second
        if(s > 1) {
          cnt += s*(s-1) / 2;
        }
    }
    cout << cnt;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:9: error: expected ',' or ';' before 'if'
   28 |         if(s > 1) {
      |         ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;cin>>n;long long a=0;
  vector<vector<char>s(n,vector<char>(10));
  for(int i=0;i<n;i++){
    string S;cin>>S;
    for(int j=0;j<10;j++)s.at(i).at(j)=S.at(j);
    sort(s.at(i).begin(),s.at(i).end());
  }
  if(n>2){
    for(int i=0;i<n-1;i++){
      for(int j=i+1;j<n;j++){
        int p=0;
        for(int k=0;k<10;k++){
          if(s.at(i).at(k)!=s.at(j).at(k))p++;
        }
        if(p==0)a++;
      }
    }
  }
  else{
    int p=0;
    for(int i=0;i<10;i++){
      if(s.at(0).at(i)!=s.at(1).at(i))p++;
    }
    if(p==0)a=1;
    else a=0;
  }
  cout<<a<<endl;
}
      


Compiler output:
a.cc: In function 'int main()':
a.cc:5:42: error: template argument 1 is invalid
    5 |   vector<vector<char>s(n,vector<char>(10));
      |                                          ^
a.cc:5:42: error: template argument 2 is invalid
a.cc:8:26: error: 's' was not declared in this scope
    8 |     for(int j=0;j<10;j++)s.at(i).at(j)=S.at(j);
      |                          ^
a.cc:9:10: error: 's' was not declared in this scope
    9 |     sort(s.at(i).begin(),s.at(i).end());
      |          ^
a.cc:16:14: error: 's' was not declared in this scope
   16 |           if(s.at(i).at(k)!=s.at(j).at(k))p++;
      |              ^
a.cc:25:10: error: 's' was not declared in this scope
   25 |       if(s.at(0).at(i)!=s.at(1).at(i))p++;
      |          ^
Language: C++

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:19:12: error: expected primary-expression before 'long'
   19 |     ans += long long(a*(a-1))/2;
      |            ^~~~
Language: C++

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

int main(){
  int N;
  strings s;
  cin >> N;
  unordred_map<string, int> map;
  for(int i=0;i<N;i++){
    cin >> s;
    sort(s.begin(),s.end());
    map[s]++;
  }
  
  long long ans = 0;
  
  for(auto &i : map){
    a = i.second;
    ans += (a*(a-1))/2;
  }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'strings' was not declared in this scope; did you mean 'stdin'?
    6 |   strings s;
      |   ^~~~~~~
      |   stdin
a.cc:8:3: error: 'unordred_map' was not declared in this scope
    8 |   unordred_map<string, int> map;
      |   ^~~~~~~~~~~~
a.cc:8:22: error: expected primary-expression before ',' token
    8 |   unordred_map<string, int> map;
      |                      ^
a.cc:8:24: error: expected primary-expression before 'int'
    8 |   unordred_map<string, int> map;
      |                        ^~~
a.cc:10:12: error: 's' was not declared in this scope
   10 |     cin >> s;
      |            ^
a.cc:12:11: error: expected initializer before '++' token
   12 |     map[s]++;
      |           ^~
a.cc:17:20: error: missing template arguments before ')' token
   17 |   for(auto &i : map){
      |                    ^
a.cc:18:5: error: 'a' was not declared in this scope
   18 |     a = i.second;
      |     ^
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#include <iostream>
#include <cmath>
using namespace std;
bool is_int_lround(double x){
  return std::lround(x)==x;
}
int ketasuu(int x){
  int n=0;
  while(x>0){
    x /=10 ;
    n ++;
  }
  return n;
}

int main(){
  int N;
  cin >> N;
  vector<string> S(N);
  for(int i =0; i<N ;i++){
    cin >> S.at(i);
    sort(S.at(i).begin(), S.at(i).end());
  }
  sort(S.begin(), S.end());
  longlong ans =0,tmp =1;
  for(int i=1; i<N; i++){
    if(S.at(i) ==S.at(i-1)){
      tmp++;
    }
    else{
      ans += tmp*(tmp-1)/2;
      tmp =1;
    }
  }
  ans += (tmp*(tmp-1)) / 2;
  cout << ans <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:3: error: 'longlong' was not declared in this scope
   27 |   longlong ans =0,tmp =1;
      |   ^~~~~~~~
a.cc:30:7: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   30 |       tmp++;
      |       ^~~
      |       tm
a.cc:33:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   33 |       ans += tmp*(tmp-1)/2;
      |       ^~~
      |       abs
a.cc:33:14: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   33 |       ans += tmp*(tmp-1)/2;
      |              ^~~
      |              tm
a.cc:37:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   37 |   ans += (tmp*(tmp-1)) / 2;
      |   ^~~
      |   abs
a.cc:37:11: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   37 |   ans += (tmp*(tmp-1)) / 2;
      |           ^~~
      |           tm
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#include <cmath>
using namespace std;
bool is_int_lround(double x){
  return std::lround(x)==x;
}
int ketasuu(int x){
  int n=0;
  while(x>0){
    x /=10 ;
    n ++;
  }
  return n;
}

int main(){
  int N;
  cin >> N;
  vector<string> S(N);
  for(int i =0; i<N ;i++){
    cin >> S.at(i);
    sort(S.at(i).begin(), S.at(i).end());
  }
  sort(S.begin(), S.end());
  longlong ans =0,tmp =1;
  for(int i=1; i<N; i++){
    if(S.at(i) ==S.at(i-1)){
      tmp++;
    }
    else{
      ans += tmp*(tmp-1)/2;
      tmp =1;
    }
  }
  ans += (tmp*(tmp-1)) / 2;
  cout << ans <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:3: error: 'longlong' was not declared in this scope
   26 |   longlong ans =0,tmp =1;
      |   ^~~~~~~~
a.cc:29:7: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   29 |       tmp++;
      |       ^~~
      |       tm
a.cc:32:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   32 |       ans += tmp*(tmp-1)/2;
      |       ^~~
      |       abs
a.cc:32:14: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   32 |       ans += tmp*(tmp-1)/2;
      |              ^~~
      |              tm
a.cc:36:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   36 |   ans += (tmp*(tmp-1)) / 2;
      |   ^~~
      |   abs
a.cc:36:11: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   36 |   ans += (tmp*(tmp-1)) / 2;
      |           ^~~
      |           tm
Language: C

 #include<stdio.h>
 #include<string.h>
 
int main(void)
{
  int n
  int i, j;
 int cnt = 0;
  scanf("%d", &n);
  
  char moji[n][11], tmp[11];
 
  for (i=0;i<n;i++) {
    scanf("%s", moji[i]);
  }
 
  for(i=1;i<n;i++){
    for(j=1;j<n;j++){
      if(strcmp(moji[j-1], moji[j])>0){
        strcpy(tmp, moji[j-1]);
        strcpy(moji[j-1], moji[j]);
        strcpy(moji[j], tmp);
      }
    }
  }
 
  for(i = 0; i < n - 1; i++){
    if(strcmp(moji[i], moji[i + 1]) == 0){
      cnt++;
    }
  }
  printf("%d", cnt);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:8: error: expected ';' before 'int'
    6 |   int n
      |        ^
      |        ;
    7 |   int i, j;
      |   ~~~   
main.c:9:16: error: 'n' undeclared (first use in this function)
    9 |   scanf("%d", &n);
      |                ^
main.c:9:16: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main(){
  int n;
  cin >> n;
  vector<string> str[n];
  
  rep(i,n){
    string tmp;
    cin >> tmp;
    str[i].push_back(tmp);
    sort(str[i].at(0).begin(),str[i].at(0).end());
  }
  int cnt=0;
  rep(i,n){
  for (int j=i+1;j<n,j++){
    if (i==j) continue;
    if (str[i]==str[j]) cnt++;
  }
  }
  cout << cnt/2 << endl;
}
  
    

Compiler output:
a.cc: In function 'int main()':
a.cc:18:25: error: expected ';' before ')' token
   18 |   for (int j=i+1;j<n,j++){
      |                         ^
      |                         ;
Language: C++

#include <functional>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstring>
#include <string>
#include <vector>
#include <random>
#include <bitset>
#include <queue>
#include <cmath>
#include <stack>
#include <set>
#include <map>
typedef long long ll;
using namespace std;
const ll MOD = 1000000007LL;

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

    int n;
    cin >> n;

    vector <string> vec(n);
    for (int i = 0; i < n; i++) {
        cin >> v[i];
        sort(v[i].begin(), v[i].end());
    }

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

    ll count = 1;
    ll ans = 0;
    for (int i = 1; i < n; i++) {
        if (vec[i] != vec[i - 1]) {
            ans += count * (count - 1) / 2LL;
            count = 1;
        } else {
            count++;
        }
    }

    ans += count * (count - 1) / 2LL;
    cout << ans << "\n";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:16: error: 'v' was not declared in this scope
   29 |         cin >> v[i];
      |                ^
Language: C++

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

int main()
{
    int n; cin >> n;
    unordered_map<string, int> m;
    
    string str;
    while(n--){
    	cin >> str;
    	sort(str.begin(),str.end());
    	++m[str];
    }
    long long int count = 0;
    for(auto &const it: m){
    	if(it->second >1){
    		count += it->second - 1;
    	}
    }

    cout <<count << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: 'const' qualifiers cannot be applied to 'auto&'
   16 |     for(auto &const it: m){
      |                     ^~
a.cc:17:14: error: base operand of '->' has non-pointer type 'std::pair<const std::__cxx11::basic_string<char>, int>'
   17 |         if(it->second >1){
      |              ^~
a.cc:18:28: error: base operand of '->' has non-pointer type 'std::pair<const std::__cxx11::basic_string<char>, int>'
   18 |                 count += it->second - 1;
      |                            ^~
Language: C++

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

long long comb2(long long x) {
  long long bunsi = 1, bunbo = 1;
  for (long long i = 2; i <= x; ++i) {
    bunsi *= i; 
    if (i <= x - 2) bunbo *= i;
  }
  return bunsi / bunbo / 2;
}

int main() {
  int n;
  cin >> n;
  unordered_map<string, int> count;
  for (int i = 0; i < n; ++i) {
    string s;
    cin >> s;
    sort(s.begin(), s.end());
    auto it = count.find(s);
    if (it == count.end()) {
      *it.second = 1;
    } else {
      *it.second += 1;
    }
  }
  
  long long ans = 0;
  for (auto x : count) {
    if (x.second > 1) {
      ans += comb2(x.second);
    }
  }
  
  cout << ans << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:11: error: 'struct std::__detail::_Node_iterator<std::pair<const std::__cxx11::basic_string<char>, int>, false, true>' has no member named 'second'
   25 |       *it.second = 1;
      |           ^~~~~~
a.cc:27:11: error: 'struct std::__detail::_Node_iterator<std::pair<const std::__cxx11::basic_string<char>, int>, false, true>' has no member named 'second'
   27 |       *it.second += 1;
      |           ^~~~~~
Language: C++

import sys
N = int(sys.stdin.readline())

lists=[]
count=0
 
for i in range(N):
   lists.append(sorted(sys.stdin.readline()))
 
for i in range(N-1):
    j=lists.pop(0)
    count +=lists.count(j)
 
print(count)

Compiler output:
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'
Language: C++

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

int main(){
    ll n, ans = 0;
    cin >> n;

    map<string,ll> mp;
    for(int i = 0; i < n; i++){
        string s;
        cin >> s;
        sort(all(s));
        ans += ++mp[s]-1;
    }

    cout << ans << endl;
    return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: 'all' was not declared in this scope; did you mean 'std::filesystem::perms::all'?
   13 |         sort(all(s));
      |              ^~~
      |              std::filesystem::perms::all
In file included from /usr/include/c++/14/filesystem:51,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200,
                 from a.cc:1:
/usr/include/c++/14/bits/fs_fwd.h:158:7: note: 'std::filesystem::perms::all' declared here
  158 |       all               =  0777,
      |       ^~~
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main() {
    int N;
    cin >> N;
    int **nchar = new int*N];
    for (int i = 0; i < N; ++i) {
        nchar[i] = new int[26]();
    }
    for (int i = 0; i < N; ++i) {
        string s;
        cin >> s;
        for (char c : s) {
            nchar[i][c - 'a'] += 1;
        }
    }

    int cnt = 0;
    for (int i = 0; i < N; ++i) {
        for (int j = i + 1; j < N; ++j) {
            for (int k = 0; k < 26; ++k) {
                if (nchar[i][k] != nchar[j][k]) break;
                if (k == 25 && nchar[i][k] == nchar[j][k]) cnt++;
            }
        }
    }
    cout << cnt << endl;

    for (int i = 0; i < N; ++i) {
        delete[] nchar[i];
    }
    delete[] nchar;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: expected ',' or ';' before 'N'
    9 |     int **nchar = new int*N];
      |                           ^
Language: C++

/*
このコード、と～おれ!
Be accepted!
∧＿∧　
（｡･ω･｡)つ━☆・*。
⊂　　 ノ 　　　・゜+.
　しーＪ　　　°。+ *´¨)
 　　　　　　　　　.· ´¸.·*´¨) ¸.·*¨)
		  　　　　　　　　　　(¸.·´ (¸.·'* ☆
					*/

#pragma GCC optimize("Ofast")
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define rep1(i, n) for(int i = 1; i <= (n); ++i)
#define repr(i, n) for(int i = n; i >= 0; --i)
#define reprm(i, n) for(int i = n - 1; i >= 0; --i)
#define prinrynl(a) printf(a ? "yes\n" : "no\n")
#define prinryn(a) printf(a ? "Yes\n" : "No\n")
#define prinrYN(a) printf(a ? "YES\n" : "NO\n")
#define prinrin(a) printf(a ? "possible\n" : "inposible\n")
#define printdb(a) printf("%.16f\n", a)
#define all(x) (x).begin(), (x).end()

using ll = long long;

const int INF = 2147483647;
const ll LINF = ll(9223372036854775807);

//マクロとかここまで

#include <stdio.h>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstring>
#include <vector>
#include <numeric>
#include <map>
#include <unordered_map>

using namespace std;

int ggd(int number1, int number2) {
	int m = number1;
	int n = number2;

	if (number2 > number1) {
		m = number2;
		n = number1;
	}

	while (m != n) {
		int temp = n;
		n = m - n;
		m = temp;
	}

	return m;
}

int lcm(int number1, int number2) {
	return number1 * number2 / ggd(number1, number2);
}

bool is_prime(int64_t x) {
	for (int64_t i = 2; i * i <= x; i++) {
		if (x % i == 0) return false;
	}
	return true;
}

ll nPk(ll n, ll k) {
	if (n - k < 0)return -1;
	ll ans = 1;
	for (ll i = n; i => n - k; --i) {
		ans *= n;
	}
	return max(ans, ll(0));
}

ll nCk(ll n, ll k) {
	ll ans = nPk(n, k);
	for (ll i = 2; i <= k; ++i) {
		ans /= i;
	}

	return max(ans, ll(0));
}
/*-----------------------------------------ここまでライブラリとか-----------------------------------------*/



int main() {

	int n;
	ll ans = 0;
	unordered_map<string, int> str;
	char s[100010];
	scanf("%d", &n);
	rep(i, n) {
		scanf("%s", s);
		sort(s, s + 10);
		++str[s];
	}
	for (auto a : str) {
		ans += nCk(a.second, 2);
	}
	printf("%lld\n", ans);

	return 0;
}


Compiler output:
a.cc: In function 'll nPk(ll, ll)':
a.cc:75:27: error: expected primary-expression before '>' token
   75 |         for (ll i = n; i => n - k; --i) {
      |                           ^
Language: C++

/*
このコード、と～おれ!
Be accepted!
∧＿∧　
（｡･ω･｡)つ━☆・*。
⊂　　 ノ 　　　・゜+.
　しーＪ　　　°。+ *´¨)
 　　　　　　　　　.· ´¸.·*´¨) ¸.·*¨)
		  　　　　　　　　　　(¸.·´ (¸.·'* ☆
					*/

#pragma GCC optimize("Ofast")
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define rep1(i, n) for(int i = 1; i <= (n); ++i)
#define repr(i, n) for(int i = n; i >= 0; --i)
#define reprm(i, n) for(int i = n - 1; i >= 0; --i)
#define prinrynl(a) printf(a ? "yes\n" : "no\n")
#define prinryn(a) printf(a ? "Yes\n" : "No\n")
#define prinrYN(a) printf(a ? "YES\n" : "NO\n")
#define prinrin(a) printf(a ? "possible\n" : "inposible\n")
#define printdb(a) printf("%.16f\n", a)
#define all(x) (x).begin(), (x).end()

using ll = long long;

const int INF = 2147483647;
const ll LINF = ll(9223372036854775807);

//マクロとかここまで

#include <stdio.h>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstring>
#include <vector>
#include <numeric>
#include <map>
#include <unordered_map>

using namespace std;

int ggd(int number1, int number2) {
	int m = number1;
	int n = number2;

	if (number2 > number1) {
		m = number2;
		n = number1;
	}

	while (m != n) {
		int temp = n;
		n = m - n;
		m = temp;
	}

	return m;
}

int lcm(int number1, int number2) {
	return number1 * number2 / ggd(number1, number2);
}

bool is_prime(int64_t x) {
	for (int64_t i = 2; i * i <= x; i++) {
		if (x % i == 0) return false;
	}
	return true;
}

ll nPk(ll n, ll k) {
	if (n - k < 0)return -1;
	ll ans = 1;
	for (int i = n - 1; i > n - k; --i) {
		ans *= n;
	}
	return ans;
}

ll nPk(ll n, ll k) {
	if (n - k < 0)return -1;
	ll ans = 1;
	for (int i = n - 1; i > n - k; --i) {
		ans *= n;
	}
	return ans;
}

ll nCk(ll n, ll k) {
	ll ans = nPk(n, k);
	for (int i = 2; i < k; ++i) {
		ans /= i;
	}

	return ans;
}
/*-----------------------------------------ここまでライブラリとか-----------------------------------------*/



int main() {

	int n, ans = 0;
	unordered_map<string, int> str;
	char s[100010];
	scanf("%d", &n);
	rep(i, n) {
		scanf("%s", s);
		sort(s, s + 10);
		printf("%s\n", s);
		++str[s];
	}
	for (auto a : str) {
		ans += nCk(a.second, 2);
	}
	printf("%d\n", ans);

	return 0;
}


Compiler output:
a.cc:81:4: error: redefinition of 'll nPk(ll, ll)'
   81 | ll nPk(ll n, ll k) {
      |    ^~~
a.cc:72:4: note: 'll nPk(ll, ll)' previously defined here
   72 | ll nPk(ll n, ll k) {
      |    ^~~
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[i];
        sort(s[i].begin(), s[i].end());
    }
    sort(s.begin(), s.end());
    int ans = 0;
    for(int i=0; i<N-1; i++){
        if(s[i] == s[i+1]){
            ans++;
        }
        else{
            ans += 0
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:21: error: expected ';' before '}' token
   19 |             ans += 0
      |                     ^
      |                     ;
   20 |         }
      |         ~