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

#include<bits/stdc++.h>
using namespace std;
int main(){
int64_t N;
  cin>>N;
  int64_t m=0;
  int64_t a=0;
  int64_t r=0;
  int64_t c=0;
  int64_t h=0;
  for(int i=0;i<N;i++){
  string s;
    cin>>s
      char x=s.at(0);
    if(x=='M') m++;
    if(x=='A') a++;
    if(x=='R') r++;
    if(x=='C') c++;
    if(x=='H') h++;
  }int64_t ans=m*a*r*c*h;
  cout<<ans<<endl;
  
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: expected ';' before 'char'
   13 |     cin>>s
      |           ^
      |           ;
   14 |       char x=s.at(0);
      |       ~~~~ 
a.cc:15:8: error: 'x' was not declared in this scope
   15 |     if(x=='M') m++;
      |        ^
a.cc:16:8: error: 'x' was not declared in this scope
   16 |     if(x=='A') a++;
      |        ^
a.cc:17:8: error: 'x' was not declared in this scope
   17 |     if(x=='R') r++;
      |        ^
a.cc:18:8: error: 'x' was not declared in this scope
   18 |     if(x=='C') c++;
      |        ^
a.cc:19:8: error: 'x' was not declared in this scope
   19 |     if(x=='H') h++;
      |        ^
Language: C++

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

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

	int N;
	scanf("%d", &N);

	long long cnt[5] = {0};
	for (int i = 0; i < N; i++) {
		scanf(" %c%*[^\n]", &c);
		// printf("%c\n", c);
		switch (c) {
			case 'M':
				cnt[0]++;
				break;
			case 'A':
				cnt[1]++;
				break;
			case 'R':
				cnt[2]++;
				break;
			case 'C':
				cnt[3]++;
				break;
			case 'H':
				cnt[4]++;
				break;
			default:
				break;
		}
	}

	long long result = 0;
	for (int i = 0; i < 5; i++) {
		for (int j = i + 1; j < 5; j++) {
			for (int k = j + 1; k < 5; k++) {
				result += cnt[i] * cnt[j] * cnt[k];
				// printf("%d %d %d %lld \n", i, j, k, result);
			}
		}
	}
	printf("%lld", result);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:38: error: 'c' was not declared in this scope
   13 |                 scanf(" %c%*[^\n]", &c);
      |                                      ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  vector<int> name(5);
  for (int i = 0; i < N; i++) {
    string tmp;
    cin >> tmp;
    if (tmp[0] == 'M') name[0]++;
    else if (tmp[0] == 'A') name[1]++;
    else if (tmp[0] == 'R') name[2]++;
    else if (tmp[0] == 'C') name[3]++;
    else if (tmp[0] == 'H') name[4]++;
  }
  int64_t res = 0;
  auto a = {0, 0, 0, 0, 0, 0, 1, 1, 1, 2};
  auto b = {1, 1, 1, 2, 2, 3, 2, 2, 3, 3};
  auto c = {2, 3, 4, 3, 4, 4, 3, 4, 4, 4};
  for (int i = 0; i < 10; i++) {
    res += (name[a[i]]*name[b[i]]*name[c[i]]);
  }
  cout << res << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:19: error: no match for 'operator[]' (operand types are 'std::initializer_list<int>' and 'int')
   22 |     res += (name[a[i]]*name[b[i]]*name[c[i]]);
      |                   ^
a.cc:22:30: error: no match for 'operator[]' (operand types are 'std::initializer_list<int>' and 'int')
   22 |     res += (name[a[i]]*name[b[i]]*name[c[i]]);
      |                              ^
a.cc:22:41: error: no match for 'operator[]' (operand types are 'std::initializer_list<int>' and 'int')
   22 |     res += (name[a[i]]*name[b[i]]*name[c[i]]);
      |                                         ^
Language: C++

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

int main() {
  int N;
  int M = 0;
  int A = 0;
  int R = 0;
  int C = 0;
  int H = 0;
  cin >> N;
  string S;
  
  for(int i = 0; i << N; i++;){
    cin >> S;
    if (S.at[0] = 'M'){
      M++;
    }
    if (S.at[0] = 'A'){
      A++;
    }
    if (S.at[0] = 'R'){
      R++;
    }
    if (S.at[0] = 'C'){
      C++;
    }
    if (S.at[0] = 'H'){
      H++;
    }
    i++;
  }
  
  cout << 

Compiler output:
a.cc: In function 'int main()':
a.cc:14:29: error: expected ')' before ';' token
   14 |   for(int i = 0; i << N; i++;){
      |      ~                      ^
      |                             )
a.cc:14:30: error: expected primary-expression before ')' token
   14 |   for(int i = 0; i << N; i++;){
      |                              ^
a.cc:34:10: error: expected primary-expression at end of input
   34 |   cout <<
      |          ^
a.cc:34:10: error: expected '}' at end of input
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <string>
int main()
{
  int N;
  cin >> N;
  int ptn[5] = {0}; // M, A, R, C, H
  for (int i = 0; i < N; i++) {
    string S;
    cin >> S;
    switch (S[0]) {
      case 'M': {ptn[0]++; break;}
      case 'A': {ptn[1]++; break;}
      case 'R': {ptn[2]++; break;}
      case 'C': {ptn[3]++; break;}
      case 'H': {ptn[4]++; break;}
      default: break;
    }
  }
  long long ans = 0;
  for (int i = 0; i <= 2; i++) {
    for (int j = i+1; j <= 3; j++) {
      for (int k = j+1; k <= 4; k++) {
        ans += ((long long)ptn[i]*ptn[j]*ptn[k]);
      }
    }
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> N;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:5: error: 'string' was not declared in this scope
    9 |     string S;
      |     ^~~~~~
a.cc:9:5: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:10:12: error: 'S' was not declared in this scope
   10 |     cin >> S;
      |            ^
a.cc:28:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   28 |   cout << ans << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:28:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   28 |   cout << ans << endl;
      |                  ^~~~
      |                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main(){
  long long int N;
  cin >> N;
  vector<string> S(N);
  map<string,int> p;
  for(int i = 0; i < N; i++){
    cin >> S[i];
    p[S[i]] += 1;
  }
  long long int sum = 0;
  for(long long int i = 0; i < N; i++){
    if(p[S[i]] == 1){
      if(S[i].front == 'M' || S[i].front == 'A' || S[i].front == 'R' || S[i].front == 'C' || S[i].front == 'H'){ sum++; }
  }
  }

  cout << sum * (sum - 1) * (sum - 2) / 6;
  
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: invalid operands of types '<unresolved overloaded function type>' and 'char' to binary 'operator=='
   16 |       if(S[i].front == 'M' || S[i].front == 'A' || S[i].front == 'R' || S[i].front == 'C' || S[i].front == 'H'){ sum++; }
      |                     ^~ ~~~
      |                        |
      |                        char
a.cc:16:42: error: invalid operands of types '<unresolved overloaded function type>' and 'char' to binary 'operator=='
   16 |       if(S[i].front == 'M' || S[i].front == 'A' || S[i].front == 'R' || S[i].front == 'C' || S[i].front == 'H'){ sum++; }
      |                                          ^~ ~~~
      |                                             |
      |                                             char
a.cc:16:63: error: invalid operands of types '<unresolved overloaded function type>' and 'char' to binary 'operator=='
   16 |       if(S[i].front == 'M' || S[i].front == 'A' || S[i].front == 'R' || S[i].front == 'C' || S[i].front == 'H'){ sum++; }
      |                                                               ^~ ~~~
      |                                                                  |
      |                                                                  char
a.cc:16:84: error: invalid operands of types '<unresolved overloaded function type>' and 'char' to binary 'operator=='
   16 |       if(S[i].front == 'M' || S[i].front == 'A' || S[i].front == 'R' || S[i].front == 'C' || S[i].front == 'H'){ sum++; }
      |                                                                                    ^~ ~~~
      |                                                                                       |
      |                                                                                       char
a.cc:16:105: error: invalid operands of types '<unresolved overloaded function type>' and 'char' to binary 'operator=='
   16 |       if(S[i].front == 'M' || S[i].front == 'A' || S[i].front == 'R' || S[i].front == 'C' || S[i].front == 'H'){ sum++; }
      |                                                                                                         ^~ ~~~
      |                                                                                                            |
      |                                                                                                            char
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,j,n) for (int i = (int)(j); i < (int)(n); ++i)
int main(){
  int n;
  cin>>n;
  char c[]={'M','A','R','C','H'};
  int a[5]={};
  string s;
  rep(i,0,n){
     cin>>s;
      if(s[0]==c[0]){
         a[0]++; 
      }else if(s[0]==c[1]){
         a[1]++; 
      }else if(s[0]==c[2]){
         a[2]++; 
      }else if(s[0]==c[3]){
         a[3]++; 
      }else if(s[0]==c[4]){
         a[4]++; 
      }
  }
  int sum=0;
  rep(i,0,3)
    rep(j,i+1,4)
    rep(k,j+1,5)
    sum+=ans[i]*ans[j]*ans[k];
  cout<<sum; 
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:10: error: 'ans' was not declared in this scope; did you mean 'abs'?
   28 |     sum+=ans[i]*ans[j]*ans[k];
      |          ^~~
      |          abs
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
#define rrep(i, n) for(int i = n-1; i >= 0; --i)
#define fi first
#define se second
using namespace std;
using lint = long long;
using uint = unsigned int;
using ulint = unsigned long long;
using ldouble = long double;
using pii = pair<int, int>;
using pli = pair<lint, lint>;
using pdd = pair<double, double>;
using pld = pair<ldouble, ldouble>;
using v1i = vector<int>;
using v1li = vector<lint>;
using v2i = vector<vector<int>>;
using v2li = vector<vector<lint>>;
using v3i = vector<vector<vector<int>>>;
using v3li = vector<vector<vector<lint>>>;
using v1b = vector<bool>;
using v2b = vector<vector<bool>>;
using v3b = vector<vector<vector<bool>>>;
using v1c = vector<char>;
using v2c = vector<vector<char>>;
using v3c = vector<vector<vector<char>>>;
constexpr lint mod1 = 1e9+7;
constexpr lint mod2 = 998244353;

int main() {
  lint s = 0, n, a = 0, b = 0, c = 0, d = 0, e = 0;
  cin >> n;
  rep(i, n){
    string t;
    cin >> t;
    if(t[0] == 'M') ++a;
    if(t[0] == 'A') ++b;
    if(t[0] == 'R') ++c;
    if(t[0] == 'C') ++d;
    if(t[0] == 'H') ++e;
  }
  s += a * b * c;
  s += a * b * d;
  s += a * b * e;
  s += a * c * d;
  s += a * c * e;
  s += a * d * e;
  s += b * c * d:
  s += b * c * e;
  s += b * d * e;
  s += c * d * e;
  cout << s << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:17: error: found ':' in nested-name-specifier, expected '::'
   48 |   s += b * c * d:
      |                 ^
      |                 ::
a.cc:48:16: error: 'd' is not a class, namespace, or enumeration
   48 |   s += b * c * d:
      |                ^
Language: C++

#include<cstdio>


int count[5];
int combine[10][3] = {
	{0,1,2},{0,1,3},{0,1,4},{0,2,3},{0,2,4},{0,3,4},{1,2,3},{1,2,4},{1,3,4},{2,3,4}
};
int main()
{
	int n
	long long ans;
	char str[15];
	while(~scanf("%d",&n)){
		ans = 0;
		for(int i = 0; i<5; i++)count[i] = 0;
		for(int i = 0; i<n; i++){
			scanf("%s",str);
			if(str[0] == 'M') count[0]++;//M
			else if(str[0] == 'A') count[1]++;//A
			else if(str[0] == 'R') count[2]++;//R
			else if(str[0] == 'C') count[3]++;//C
			else if(str[0] == 'H') count[4]++;//H
			else continue;
		}
		for(int i = 0; i<9; i++){
			ans +=count[combine[i][0]]*count[combine[i][1]]*count[combine[i][2]];
		}
		printf("%lld\n",ans);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: expected initializer before 'long'
   11 |         long long ans;
      |         ^~~~
a.cc:13:28: error: 'n' was not declared in this scope
   13 |         while(~scanf("%d",&n)){
      |                            ^
a.cc:14:17: error: 'ans' was not declared in this scope
   14 |                 ans = 0;
      |                 ^~~
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<stack>
#include<queue>
#include<map>
#include<set>
#define rep(i,a,n) for(int i=(a);i<(n);i++)
#define  int long long
using namespace std;

int main() {
	int n;
	cin >> n;
	string t = "MARCH";
	int sum[5] = { 0 };
	rep(i, 0, n) {
		string s;
		cin >> s;
		rep(j, 0, 5) if (s[0] == t[j])sum[j]++;
	}
	int ans = 0;
		rep(i, 0, 3) {
			rep(j, i + 1, 4) {
				rep(k, j + 1, 5) {
					ans += sum[i] * sum[j] * sum[k];
				}
			}
		}
	cout << ans << endl;
	return 0;
}

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

#include <iostream>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <deque>

int main(){
  int N;
  scanf("%d", &N);
  //std::vector<std::string > vec(N);
  std::map<std::string, int > mp;
  std::string S;
  for (int i=0; i<N; i++){
    std::cin >> S;
    mp[S]++;
  }
  std::vector<int > count(5, 0);
  // 0:M, 1:A, 2:R, 3:C, 4:H
  char moji[5] = {'M', 'A', 'R', 'C', 'H'};
  for (auto &entry : mp){
    //printf("%c\n", entry.first[0]);
    for (int j=0; j<5; j++){
      if (entry.first[0]==moji[j]){
        count[j] += entry.second;
      }
    }
  }
  /*for (int i=0; i<5; i++){
    printf("count[%d]=%d\n",i,count[i]);
    }*/

  long long ans = 0;
  for (int i=0; i<5; i++){
    for (int j=i+1; j<5; j++){
      for (i

Compiler output:
a.cc: In function 'int main()':
a.cc:42:13: error: expected ';' at end of input
   42 |       for (i
      |             ^
      |             ;
a.cc:42:13: error: expected primary-expression at end of input
a.cc:42:13: error: expected ';' at end of input
   42 |       for (i
      |             ^
      |             ;
a.cc:42:13: error: expected primary-expression at end of input
a.cc:42:13: error: expected ')' at end of input
   42 |       for (i
      |           ~ ^
      |             )
a.cc:42:13: error: expected statement at end of input
a.cc:42:13: error: expected '}' at end of input
a.cc:41:30: note: to match this '{'
   41 |     for (int j=i+1; j<5; j++){
      |                              ^
a.cc:42:13: error: expected '}' at end of input
   42 |       for (i
      |             ^
a.cc:40:26: note: to match this '{'
   40 |   for (int i=0; i<5; i++){
      |                          ^
a.cc:42:13: error: expected '}' at end of input
   42 |       for (i
      |             ^
a.cc:14:11: note: to match this '{'
   14 | int main(){
      |           ^
Language: C++

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

int main()
{
  int n;
  cin >> n;
  map<char,int> m;
  m['M'] = 0;
  m['A'] = 1;
  m['R'] = 2;
  m['C'] = 3;
  m['H'] = 4;
  vector<int> count(5);
  for(int i = 0; i < n; ++i){
    string s;
    cin >> s;
    ++count[m[s[0]]];
  }
  
  long long ret = 0;
  int to = 1<<5;
  for(int i = 0; i < to; ++i){
    long long temp = 1;
    int ct = 0;
    for(int j = 0; j < 5; ++j){
      if(i & 1 << j){
        temp *= count[j];
        ++ct
      }
    }
    if(ct == 3){
      ret += temp;
    }
  }
  cout << ret << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: 'vector' was not declared in this scope
   16 |   vector<int> count(5);
      |   ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    3 | #include <map>
  +++ |+#include <vector>
    4 | using namespace std;
a.cc:16:10: error: expected primary-expression before 'int'
   16 |   vector<int> count(5);
      |          ^~~
a.cc:20:7: error: 'count' was not declared in this scope
   20 |     ++count[m[s[0]]];
      |       ^~~~~
a.cc:30:17: error: 'count' was not declared in this scope
   30 |         temp *= count[j];
      |                 ^~~~~
a.cc:31:13: error: expected ';' before '}' token
   31 |         ++ct
      |             ^
      |             ;
   32 |       }
      |       ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
map<char,int>mp;
long long int factorial(long long int n)
{
    // single line to find factorial
    return (n==1 || n==0) ? 1: n * factorial(n - 1);
}
int main()
{
    map<char,int>::iterator it;
   long long int n,c=0,c1=0,d=0,k=0,cs=0,l=0;
   cin>>n;
   string s;
   for(int i=0;i<n;i++)
   {
       cin>>s;
       if(s[0]=='M'||s[0]=='A'||s[0]=='R'||s[0]=='C'||s[0]=='H')
   {
       mp[s[0]]++;
       cs++;
   }

   }

   for(it=mp.begin();it!=mp.end();++it)
   {
       if(it->second>=2){c++;}
       if(it->second>=3){c1++;}
   }
   if(cs<3){cout<<"0"<<endl; return 0;}
  if(c!=0) c+=1;
  if(c1!=0) c1+=1;

//   cout<<"cs= "<<c<<endl;
   l=factorial(cs);
//   cout<<"l= "<<l<<endl;
if(cs-3>=0)d=(factorial(3)*factorial(cs-3));
//   cout<<"d= "<<d<<endl;
  if(d>0) k=l/d;
 if(cs-c>=0)  l=factorial(cs-c);
if(Cs-c-1>=0)   d=factorial(cs-c-1);
  if(d>0) l=l/d;
//   cout<<"l= "<<l<<endl;

k-=l;
k-=c1;
   if(k>=0)cout<<k<<endl;
   else cout<<"0"<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:4: error: 'Cs' was not declared in this scope; did you mean 'cs'?
   42 | if(Cs-c-1>=0)   d=factorial(cs-c-1);
      |    ^~
      |    cs
Language: C++

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

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = (int)(n)-1; i >=0; i--)

using ll = long long;

int main(){
  int n;
  cin >> n;
  vector<int> p = {0,0,0,0,0,0,1,1,1,2}
  vector<int> q = {1,1,1,2,2,3,2,2,3,3}
  vector<int> r = {2,3,4,3,4,4,3,4,4,4}
  int m,a,r,c,h;
  rep(i,n){
    string tmp;
    cin>>tmp;
    if(tmp.at(0)='M')m++;
    if(tmp.at(0)='A')a++;
    if(tmp.at(0)='R')r++;
    if(tmp.at(0)='C')c++;
    if(tmp.at(0)='H')h++;
  }
  vector<int> D = {m,a,r,c,h};
  ll ans = 0;
  rep(i,10) ans += D.at(p.at(0))*D.at(q.at(0))*D.at(r.at(0));
  cout<<ans<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: expected ',' or ';' before 'vector'
   13 |   vector<int> q = {1,1,1,2,2,3,2,2,3,3}
      |   ^~~~~~
a.cc:15:3: error: expected ',' or ';' before 'int'
   15 |   int m,a,r,c,h;
      |   ^~~
a.cc:19:22: error: 'm' was not declared in this scope
   19 |     if(tmp.at(0)='M')m++;
      |                      ^
a.cc:20:22: error: 'a' was not declared in this scope
   20 |     if(tmp.at(0)='A')a++;
      |                      ^
a.cc:21:23: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   21 |     if(tmp.at(0)='R')r++;
      |                      ~^~
a.cc:22:22: error: 'c' was not declared in this scope
   22 |     if(tmp.at(0)='C')c++;
      |                      ^
a.cc:23:22: error: 'h' was not declared in this scope
   23 |     if(tmp.at(0)='H')h++;
      |                      ^
a.cc:25:20: error: 'm' was not declared in this scope
   25 |   vector<int> D = {m,a,r,c,h};
      |                    ^
a.cc:25:22: error: 'a' was not declared in this scope
   25 |   vector<int> D = {m,a,r,c,h};
      |                      ^
a.cc:25:26: error: 'c' was not declared in this scope
   25 |   vector<int> D = {m,a,r,c,h};
      |                          ^
a.cc:25:28: error: 'h' was not declared in this scope
   25 |   vector<int> D = {m,a,r,c,h};
      |                            ^
a.cc:25:29: error: could not convert '{<expression error>, <expression error>, r, <expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'std::vector<int>'
   25 |   vector<int> D = {m,a,r,c,h};
      |                             ^
      |                             |
      |                             <brace-enclosed initializer list>
a.cc:27:39: error: 'q' was not declared in this scope
   27 |   rep(i,10) ans += D.at(p.at(0))*D.at(q.at(0))*D.at(r.at(0));
      |                                       ^
Language: C++

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

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)   FOR(i,0,n)
#define ALL(a)     (a).begin(),(a).end()
#define MOD 1000000007

typedef long long int ll;

const ll INF=(ll)1e19;
//const int INF=(1<<30);


int main(){
  vector<ll> cnt(5,0);

  int N;
  cin >> N;
  ll ans=0;
  REP(i,N){
    string s;
    cin >> s;
    switch(s[0]){
      case 'M':
        cnt[0]++;
        break;

      case 'A':
        cnt[1]++;
        break;

      case 'R':
        cnt[2]++;
        break;

      case 'C':
        cnt[3]++;
        break;

      case 'H':
        cnt[4]++;
        break;
    }
  }
  REP(i,5)FOR(j,i+1,5)FOR(k,j+1,5){
    ll += cnt[i]*cnt[j]*cnt[k];
//    cout << ans << endl;
  }
  cout << ans << endl;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:47:8: error: expected unqualified-id before '+=' token
   47 |     ll += cnt[i]*cnt[j]*cnt[k];
      |        ^~
Language: C

#include<stdio.iostream>
int main()
{
    int MASHIKE,RUMOI,OBIRA,HABORO,HOROKANAI,;
    char s [11];
    scanf ("%d %d %d",&MASAKIE,&RUMOI,&HABORO);
    scanf ("%d %d %d",&MASAKIE,&RUMOI,&HOROKANAI);
    scanf ("%d",s);
    printf("%d %s\n" ,2);
    return 0;
    
    
}


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

incloud.(studio.h)
int main()
{
    int MASHIKE,RUMOI,OBIRA,HABORO,HOROKANAI,;
    char s [11];
    scanf ("%d %d %d",&MASAKIE,&RUMOI,&HABORO);
    scanf ("%d %d %d",&MASAKIE,&RUMOI,&HOROKANAI);
    scanf ("%d",s);
    printf("%d %s\n" ,2);
    return 0;
    
    
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | incloud.(studio.h)
      |        ^
Language: C

incloud.(studio.h)
int main()
{
    int MASHIKE,RUMOI,OBIRA,HABORO,HOROKANAI,;
    char s [11];
    scanf ("%d", &MASAKI);
    scanf ("%d %d %d %d %d" ,&RUMOI,BIRA,HABORO,HOROKANAI);
    scanf ("%d",s);
    printf("%d %s\n" ,2);
    return 0;
    
    
}


Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | incloud.(studio.h)
      |        ^
Language: C

incloud.(studio.h)
int main()
{
    int MASHIKE,RUMOI,OBIRA,HABORO,HOROKANAI,;
    char s [11];
    scanf ("%d", &MASAKI);
    scanf ("%d %d %d %d %d" ,&RUMOI,BIRA,HABORO,HOROKANAI);
    scanf ("%d",s);
    printf("%d %s\n" ,2);
    
    
    
}

    

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | incloud.(studio.h)
      |        ^
Language: C++

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

int main (){
  int N ;
  cin>>N;
  int M = 0 ;
  int A = 0 ;
  int R = 0 ;
  int C = 0 ;
  int H = 0 ;
  for ( int i = 0 ; i < N ; i++){
    string name ;
    cin>>name;
    if(name.at(0)=='M'){
      M++;
    }
    if(name.at(0)=='A'){
      A++;
    }
    if(name.at(0)=='R'){
      R++;
    }
    if(name.at(0)=='C'){
      C++;
    }
    if(name.at(0)=='H'){
      H++;
    }
  }
  int answer = 0 ;
  answer += M*A*R+M*A*C+M*A*H+M*R*C+M*R*H+M*C*H+A*R*C+A*R*H+A*C*H+R*C*H
  cout<<answer<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:72: error: expected ';' before 'cout'
   32 |   answer += M*A*R+M*A*C+M*A*H+M*R*C+M*R*H+M*C*H+A*R*C+A*R*H+A*C*H+R*C*H
      |                                                                        ^
      |                                                                        ;
   33 |   cout<<answer<<endl;
      |   ~~~~
Language: C++

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

int main (){
  int N ;
  cin>>N;
  int M = 0 ;
  int A = 0 ;
  int R = 0 ;
  int C = 0 ;
  int H = 0 ;
  for ( int i = 0 ; i < N ; i++){
    string name ;
    cin>>name;
    if(name.at(0)=="M"){
      M++;
    }
    if(name.at(0)=="A"){
      A++;
    }
    if(name.at(0)=="R"){
      R++;
    }
    if(name.at(0)=="C"){
      C++;
    }
    if(name.at(0)=="H"){
      H++;
    }
  }
  int answer = 0 ;
  answer += M*(A*(R+C+H)+R*(C+H)+C*H);
  answer += A*(R*(C+H)+C*H));
  answer += R*C*H;
  cout<<answer<<endl;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |     if(name.at(0)=="M"){
      |        ~~~~~~~~~~^~~~~
a.cc:18:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |     if(name.at(0)=="A"){
      |        ~~~~~~~~~~^~~~~
a.cc:21:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |     if(name.at(0)=="R"){
      |        ~~~~~~~~~~^~~~~
a.cc:24:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   24 |     if(name.at(0)=="C"){
      |        ~~~~~~~~~~^~~~~
a.cc:27:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   27 |     if(name.at(0)=="H"){
      |        ~~~~~~~~~~^~~~~
a.cc:33:28: error: expected ';' before ')' token
   33 |   answer += A*(R*(C+H)+C*H));
      |                            ^
      |                            ;
Language: C++

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

int main() {
  int n, m = 0, a = 0, r = 0, c = 0, h = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    if (s[0] == "M") {
      m++;
    } else if (s[0] == "A") {
      a++;
    } else if (s[0] == "R") {
      r++;
    } else if (s[0] == "C") {
      c++;
    } else if (s[0] == "H") {
      h++;
    }
  }
  cout << m*a*r + m*a*c + m*a*h + m*r*c + m*r*h + m*c*h + a*r*c + a*r*h + a*c*h + r*c*h << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if (s[0] == "M") {
a.cc:12:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |     } else if (s[0] == "A") {
a.cc:14:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     } else if (s[0] == "R") {
a.cc:16:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     } else if (s[0] == "C") {
a.cc:18:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |     } else if (s[0] == "H") {
Language: C++

n = int(input())
m  = [0]*5
for i in range(n):
    s = input()
    if s[0] == 'M':
        m[0] += 1
    elif s[0] == 'A':
        m[1] += 1
    elif s[0] == 'R':
        m[2] += 1
    elif s[0] == 'C':
        m[3] += 1
    elif s[0] == 'H':
        m[4] += 1
ans = m[0]*m[1]*m[2]
ans += m[0]*m[1]*m[3]
ans += m[0]*m[1]*m[4]
ans += m[0]*m[2]*m[3]
ans += m[0]*m[2]*m[4]
ans += m[0]*m[3]*m[4]
ans += m[1]*m[2]*m[3]
ans += m[1]*m[2]*m[4]
ans += m[1]*m[3]*m[4]
ans += m[2]*m[3]*m[4]
print(ans)


Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  map<char,int> mp;
  for (int i = 0;i < N; i++) {
    string s;
    cin >> s;
    char a = s.at(0);
    if ((a == 'M') || (a=='A') || (a=='R') || (a=='C') || (a=='H')) {
      mp[a]++;
    }
  }
  long long ans = 0;
  ans += mp[M]*mp[A]*mp[R];
  ans += mp[M]*mp[A]*mp[C];
  ans += mp[M]*mp[A]*mp[H];
  ans += mp[M]*mp[R]*mp[C];
  ans += mp[M]*mp[R]*mp[H];
  ans += mp[M]*mp[C]*mp[H];
  ans += mp[A]*mp[R]*mp[C];
  ans += mp[A]*mp[R]*mp[H];
  ans += mp[A]*mp[C]*mp[H];
  ans += mp[R]*mp[C]*mp[H];
  cout << ans << endl;

  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: 'M' was not declared in this scope
   17 |   ans += mp[M]*mp[A]*mp[R];
      |             ^
a.cc:17:19: error: 'A' was not declared in this scope
   17 |   ans += mp[M]*mp[A]*mp[R];
      |                   ^
a.cc:17:25: error: 'R' was not declared in this scope
   17 |   ans += mp[M]*mp[A]*mp[R];
      |                         ^
a.cc:18:25: error: 'C' was not declared in this scope
   18 |   ans += mp[M]*mp[A]*mp[C];
      |                         ^
a.cc:19:25: error: 'H' was not declared in this scope
   19 |   ans += mp[M]*mp[A]*mp[H];
      |                         ^
Language: C++

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

int main() {
  int N;
  cin >> N;
  string str("MRACH");
  vector<string> name(N);
    int countM = 0;
    int countR = 0;
    int countA = 0;
    int countC = 0;
    int countH = 0;
    int all;
  for(int i = 0; i < N; i++){
    cin >> name.at(i);
    char I = name.at(i).at(0);
    for(int j = 0; j < 5; j++){
      if(I == str(j)){
        countM++;
      }else if(I == str.at(j)){
        countR++;
      }else if(I == str.at(j)){
        countA++;
      }else if(I == str.at(j)){
        countC++;
      }else if(I == str.at(j)){
        countH++;
      }
    }
    
      if(countM == 0){
        countM++;
      }else if(countR == 0){
        countR++;
      }else if(countA == 0){
        countA++;
      }else if(countC == 0){
        countC++;
      }else if(countH == 0){
        countH++;
      }
  }
  if(countM+countR+countA+countC+countH <= 7){
    all = 0;
  }else{
    all = countM*countR*countA*countC*countH;  
  }
    cout << all << endl;
}
      



Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int&)'
   19 |       if(I == str(j)){
      |               ~~~^~~
Language: C++

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

int main() {
  int N;
  cin >> N;
  string str("MRACH");
  vector<string> name(N);
    int countM = 0;
    int countR = 0;
    int countA = 0;
    int countC = 0;
    int countH = 0;
    int all;
  for(int i = 0; i < N; i++){
    cin >> name.at(i);
    char I = name.at(i).at(0);
    for(int j = 0; j < 5; j++){
      if(I == str(j)){
        countM++;
      }else if(I == str(j)){
        countR++;
      }else if(I == str(j)){
        countA++;
      }else if(I == str(j)){
        countC++;
      }else if(I == str(j)){
        countH++;
      }
    }
    
      if(countM == 0){
        countM++;
      }else if(countR == 0){
        countR++;
      }else if(countA == 0){
        countA++;
      }else if(countC == 0){
        countC++;
      }else if(countH == 0){
        countH++;
      }
  }
  if(countM+countR+countA+countC+countH <= 7){
    all = 0;
  }else{
    all = countM*countR*countA*countC*countH;  
  }
    cout << all << endl;
}
      



Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int&)'
   19 |       if(I == str(j)){
      |               ~~~^~~
a.cc:21:24: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int&)'
   21 |       }else if(I == str(j)){
      |                     ~~~^~~
a.cc:23:24: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int&)'
   23 |       }else if(I == str(j)){
      |                     ~~~^~~
a.cc:25:24: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int&)'
   25 |       }else if(I == str(j)){
      |                     ~~~^~~
a.cc:27:24: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int&)'
   27 |       }else if(I == str(j)){
      |                     ~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0; i<(n); i++)
int main() {
  int n;
  cin >> n;
  vector<string> s(n);
  rep(i,n) cin >> s[i];
  vector<int> num(5);
  rep(i,n){
    if(s[i][0]=='M'){
      num[0]++;
    }
    if(s[i][0]=='A'){
      num[1]++;
    }
    if(s[i][0]=='R'){
      num[2]++0;
    }
    if(s[i][0]=='C'){
      num[3]++;
    }
    if(s[i][0]=='H'){
      num[4]++;
    }
  }
  ll ans = 0;
  for(int i=0; i<5; i++){
    for(int j=i+1; j<5; j++){
      for(int k=j+1; k<5; k++){
        ans += (ll)num[i]*num[j]*num[k];
      }
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:15: error: expected ';' before numeric constant
   19 |       num[2]++0;
      |               ^
      |               ;
Language: C++

# include < cstdio >
# include < iostream >
using namespace std ;
typedef long long ll ;
string s ;
int N ;
ll m ,a ,r ,c , h ;
ll D [5];
int P [10]={0 ,0 ,0 ,0 ,0 ,0 ,1 ,1 ,1 ,2};
int Q [10]={1 ,1 ,1 ,2 ,2 ,3 ,2 ,2 ,3 ,3};
int R [10]={2 ,3 ,4 ,3 ,4 ,4 ,3 ,4 ,4 ,4};
int main ()
{
scanf ("% d " ,& N );
for ( int i =0; i < N ; i ++)
{
cin > > s ;
if ( s [0]== ’ M ’) m ++;
if ( s [0]== ’ A ’) a ++;
if ( s [0]== ’ R ’) r ++;
if ( s [0]== ’ C ’) c ++;
if ( s [0]== ’ H ’) h ++;
}
D [0]= m , D [1]= a , D [2]= r , D [3]= c , D [4]= h ;
ll res =0;
for ( int d =0; d <10; d ++)
res += D [ P [ d ]]* D [ Q [ d ]]* D [ R [ d ]];
printf ("% lld \ n " , res );
}


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin>>N;
  vector<int> march(5);
  for(int i=0;i<N;i++){
    string s;
    cin>>s;
    char c=s.at(0);
    if(c=='M'){march.at(0)++;}
    else if(c=='A'){march.at(1)++;}
    else if(c=='R'){march.at(2)++;}
    else if(c=='C'){march.at(3)++;}
    else if(c=='H'){march.at(4)++;}
  }
  long long int res=0;
  for(int f=0;f<3;f++){
    for(int s=f+1;s<4;s++){
      for(int t=s+1;t<5;t++){
        long long int r=march.at(f)*march.at(s)*march.at(t)
        res+=r;
      }
    }
  }
  cout<<res<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:9: error: expected ',' or ';' before 'res'
   23 |         res+=r;
      |         ^~~
Language: C++

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

int main(void){
    int N; cin >> N;
    string S;
    int CNT[5] = {0};
    for (int i = 0; i < N; i++)
    {
        cin >> S;
        if(S[0] == 'M') CNT[0]++;
        if(S[0] == 'A') CNT[1]++;
        if(S[0] == 'R') CNT[2]++;
        if(S[0] == 'C') CNT[3]++;
        if(S[0] == 'H') CNT[4]++;
    }

    int ans = 0;
    for (int i = 0; i < 3; i++)
    {
        for (int j = i+1; j < 4; j++)
        {
            for (int k = j+1; k < 5; k++)
            {
                ans += CNT[i]*CNT[j]*CNT[k];
            }
            
        }
        
    }
    cout << ans << endl;
}#include<bits/stdc++.h>
typedef long long ll;
#define sz(x) int(x.size())
#define rep(i,n) for(int i = 0; i < (n); ++i)
using namespace std;

int main(void){
    int N; cin >> N;
    string S;
    int CNT[5] = {0};
    for (int i = 0; i < N; i++)
    {
        cin >> S;
        if(S[0] == 'M') CNT[0]++;
        if(S[0] == 'A') CNT[1]++;
        if(S[0] == 'R') CNT[2]++;
        if(S[0] == 'C') CNT[3]++;
        if(S[0] == 'H') CNT[4]++;
    }

    int ans = 0;
    for (int i = 0; i < 3; i++)
    {
        for (int j = i+1; j < 4; j++)
        {
            for (int k = j+1; k < 5; k++)
            {
                ans += CNT[i]*CNT[j]*CNT[k];
            }
            
        }
        
    }
    cout << ans << endl;
}

Compiler output:
a.cc:35:2: error: stray '#' in program
   35 | }#include<bits/stdc++.h>
      |  ^
a.cc:35:3: error: 'include' does not name a type
   35 | }#include<bits/stdc++.h>
      |   ^~~~~~~
a.cc:41:5: error: redefinition of 'int main()'
   41 | int main(void){
      |     ^~~~
a.cc:7:5: note: 'int main()' previously defined here
    7 | int main(void){
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++)
#define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++)
#define MOD 1000000007
#define int int64_t
#define ALL(a) (a).begin(),(a).end()
signed main(){
  int N;
  cin>>N;
  vi A(5);
  rep(i,0,N){
    string S;
    cin>>S;
    if(S[0]=='M')
      A[0]++;
    else if(S[0]=='A')
      A[1]++;
    else if(S[0]=='R')
      A[2]++;
    else if(S[0]=='C')
      A[3]++;
    else if(S[0]=='H')
      A[4]++;
    }
  int ans=0;
  rep(i,0,3){
    rep(j,i+1,4){
      rep(k,j+1,5)
        ans+=A[i]*A[j]*A[k];
      }
    }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'vi' was not declared in this scope
   11 |   vi A(5);
      |   ^~
a.cc:16:7: error: 'A' was not declared in this scope
   16 |       A[0]++;
      |       ^
a.cc:18:7: error: 'A' was not declared in this scope
   18 |       A[1]++;
      |       ^
a.cc:20:7: error: 'A' was not declared in this scope
   20 |       A[2]++;
      |       ^
a.cc:22:7: error: 'A' was not declared in this scope
   22 |       A[3]++;
      |       ^
a.cc:24:7: error: 'A' was not declared in this scope
   24 |       A[4]++;
      |       ^
a.cc:30:14: error: 'A' was not declared in this scope
   30 |         ans+=A[i]*A[j]*A[k];
      |              ^
Language: Java

import java.util.Scanner;

public class Main{

    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);

        // input
        int num = scan.nextInt();
        long[] initial = new int[5];
        for(int i = 0; i < num; i++){
            String temp = scan.next();
            switch(temp.charAt(0)){
                case 'M':
                    initial[0] += 1;
                    break;
                case 'A':
                    initial[1] += 1;
                    break;
                case 'R':
                    initial[2] += 1;
                    break;
                case 'C':
                    initial[3] += 1;
                    break;
                case 'H':
                    initial[4] += 1;
            }
        }

        // search
        long sum = 0;
        for(int a = 0; a < 3; a++){
            for(int b = a + 1; b < 4; b++){
                for(int c = b + 1; c < 5; c++){
                    if(initial[a] == 0 || initial[b] == 0 || initial[c] == 0){
                        continue;
                    }
                    sum += initial[a] * initial[b] * initial[c];
                }
            }
        }

        // answer
        System.out.println(sum);

    }
}

Compiler output:
Main.java:10: error: incompatible types: int[] cannot be converted to long[]
        long[] initial = new int[5];
                         ^
1 error
Language: C++

#include "bits/stdc++.h"
using namespace std;
#define INF 1000000000
#define rep(i, n) for(int i = 0; i < n; i++)
#define ALL(x) (x).begin(), (x).end()  //昇順
#define RALL(x) (x).rbegin(), (x).rend() // 降順
const long long mod = 1e9+7;
typedef priority_queue<int> PQ;
typedef vector<long long> VL;
typedef vector<int> VI;  // VI a(n);
typedef vector<string> VS;  
typedef vector<char> VC; 
typedef vector<VS> VSS;
typedef vector<VC> VCC;    
typedef vector<VI> VVI;   // VVI a(n,vector<int>(m)) n * m 
typedef vector<Vl> VVl;
typedef pair<int, int> PII;
typedef map<int, int> MP;   //MP a;
typedef vector<pair<int, int> > PS;
typedef long long ll;  //ll とdoubleは違う
template <class T>  // chmax(max, a);
bool chmax(T &a, const T &b)
{
    if (a < b)
    {
        a = b;
        return 1;
    }
    return 0;
}
template <class T> //chmin(min,a)
bool chmin(T &a, const T &b)
{
    if (b < a)
    {
        a = b;
        return 1;
    }
    return 0;
}
template<typename T>   // operator << (cout,a);
ostream& operator << (ostream& os, vector<T>& v) {
    os << "{";
    rep(i, (int)v.size()) { os << v[i] << (i < v.size() - 1 ? ", " : ""); }
    os << "}";
    return os;
}

int main(){
    ll x,y,n,m,h,k,ans=0,sum=0;
    string s,t;
    cin >> n;
    VL a(5);
    int P[10] = {0,0,0,0,0,0,1,1,1,2};
    int Q[10] = {1,1,1,2,2,3,2,2,3,3};
    int R[10] = {2,3,4,3,4,4,3,4,4,4};
    rep(i,n){
        cin >> s;
        if(s[0]=='M')a[0]++;
        if(s[0]=='A')a[1]++;
        if(s[0]=='R')a[2]++;
        if(s[0]=='C')a[3]++;
        if(s[0]=='H')a[4]++;
	}
    rep(i,10){
        ans += a[P[i]] * a[Q[i]] * a[R[i]];
    }
    cout << ans <<endl;
    return 0;
}

Compiler output:
a.cc:16:16: error: 'Vl' was not declared in this scope; did you mean 'VL'?
   16 | typedef vector<Vl> VVl;
      |                ^~
      |                VL
a.cc:16:18: error: template argument 1 is invalid
   16 | typedef vector<Vl> VVl;
      |                  ^
a.cc:16:18: error: template argument 2 is invalid
Language: Java

import java.util.*;
import java.lang.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		char[] alp = new char[]{"M","A","R","C","H"};
		long[] count = new int[5];
		for( int i=1; i<=N; i++ ){
			String ss = sc.next();
			char cc = ss.charAt(0);
			for( int j=0; j<=4; j++ ){
				if( cc==alp[j] ){
					count[j]++;
					break;
				}
			}
		}
		long ans = 0;
		for( int i=0; i<=2; i++ ){
			for( int j=i+1; j<=3; j++ ){
				for( int k=j+1; k<=4; k++ ){
					ans += count[i]*count[j]*count[k];
				}
			}
		}
		System.out.println(ans);
	}
}


Compiler output:
Main.java:8: error: incompatible types: String cannot be converted to char
		char[] alp = new char[]{"M","A","R","C","H"};
		                        ^
Main.java:8: error: incompatible types: String cannot be converted to char
		char[] alp = new char[]{"M","A","R","C","H"};
		                            ^
Main.java:8: error: incompatible types: String cannot be converted to char
		char[] alp = new char[]{"M","A","R","C","H"};
		                                ^
Main.java:8: error: incompatible types: String cannot be converted to char
		char[] alp = new char[]{"M","A","R","C","H"};
		                                    ^
Main.java:8: error: incompatible types: String cannot be converted to char
		char[] alp = new char[]{"M","A","R","C","H"};
		                                        ^
Main.java:9: error: incompatible types: int[] cannot be converted to long[]
		long[] count = new int[5];
		               ^
6 errors
Language: C++

#include<bits/stdc++.h>
#define ll  long long
#define endl '\n'
const ll mod = 1000000007;
const double PI = 3.141592653589793238463;
using namespace std;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    // long long m=0,r=0,a=0,c=0,h=0;
    int x;
    int A[5]= {0};
    cin>>x;
    string s;
    set<string>se;
    while(x--)
    {
        cin>>s;
        if(s[0]=='M')
        {
            if(count(se.begin(),se.end(),s)==0)
                A[0]++;
            se.insert(s);
        }
        if(s[0]=='R')
        {
            if(count(se.begin(),se.end(),s)==0){
                A[1]++;
            se.insert(s);
            }
        }
        if(s[0]=='A')
        {
            if(count(se.begin(),se.end(),s)==0)}{
                A[2]++;
            se.insert(s);
            }
        }
        if(s[0]=='C')
        {
            if(count(se.begin(),se.end(),s)==0){
                A[3]++;
            se.insert(s);
            }
        }
        if(s[0]=='H')
        {
            if(count(se.begin(),se.end(),s)==0){
                A[4]++;
            se.insert(s);
            }
        }
    }
    int sum=0;
    for(int i=0; i<3; i++)
    {
        for(int j=i+1; j<4; j++)
        {
            for(int k=j+1; k<5; k++)
            {
                if(A[i]!=0&&A[j]!=0&&A[k]!=0)
                    sum+=(A[i]*A[j]*A[k]);
            }
        }
    }
    cout<<sum;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:48: error: expected primary-expression before '}' token
   36 |             if(count(se.begin(),se.end(),s)==0)}{
      |                                                ^
a.cc: At global scope:
a.cc:57:5: error: expected unqualified-id before 'for'
   57 |     for(int i=0; i<3; i++)
      |     ^~~
a.cc:57:18: error: 'i' does not name a type
   57 |     for(int i=0; i<3; i++)
      |                  ^
a.cc:57:23: error: 'i' does not name a type
   57 |     for(int i=0; i<3; i++)
      |                       ^
a.cc:68:5: error: 'cout' does not name a type
   68 |     cout<<sum;
      |     ^~~~
a.cc:69:5: error: expected unqualified-id before 'return'
   69 |     return 0;
      |     ^~~~~~
a.cc:70:1: error: expected declaration before '}' token
   70 | }
      | ^
Language: C++

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

int main() {
    long long n;
    cin>>n;
    int arr[26];
    for(int i=0;i<26;i++){
    arr[i]=0;
        
        
    }
    for(int i=0;i<n;i++)
    {
        
        string s;
        cin>>s;
        arr[s[0]-65]++;
        
    
    }
     long long ar[5];
     ar[0]=arr['M'-65];
      ar[1]=arr['A'-65];
       ar[2]=arr['R'-65];
        ar[3]=arr['C'-65];
            ar[4]=arr['H'-65];
        long long sum=0;
        for(int i=0;i<3;i++)
        {
           for(int j=i+1;j<4;j++)
        {
            
            for(int k=j+1;k<5;k++)
        {
            sum+=ar[i]*ar[j]*ar[k];
        }
        } 
            
        }
    cout<<sum;
    return 0;
}

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

int main() {
    long long n;
    cin>>n;
    int arr[26];
    for(int i=0;i<26;i++){
    arr[i]=0;
        
        
    }
    for(int i=0;i<n;i++)
    {
        
        string s;
        cin>>s;
        arr[s[0]-65]++;
        
    
    }
     long long ar[5];
     ar[0]=arr['M'-65];
      ar[1]=arr['A'-65];
       ar[2]=arr['R'-65];
        ar[3]=arr['C'-65];
            ar[4]=arr['H'-65];
        long long sum=0;
        for(int i=0;i<3;i++)
        {
           for(int j=i+1;j<4;j++)
        {
            
            for(int k=j+1;k<5;k++)
        {
            sum+=ar[i]*ar[j]*ar[k];
        }
        } 
            
        }
    cout<<sum;
    return 0;
}

Compiler output:
a.cc:50:5: error: redefinition of 'int main()'
   50 | int main() {
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main() {
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double lld;
ll MOD = (1e9)+7;
void fastIO(){
  ios_base::sync_with_stdio(0); cin.tie(0);
}


int main(){
  fastIO();
  ll n;
  cin>>n;
  vector<ll>march(5);
  for(int i=0;i<n;i++){
  	string s;
  	cin>>s;
  	s[0]=='M'?march[0]++:march[0]=march[0];
  	s[0]=='A'?march[1]++:march[1]=march[1];
  	s[0]=='R'?march[2]++:march[2]=march[2];
  	s[0]=='C'?march[3]++:march[3]=march[3];
  	s[0]=='H'?march[4]++:march[4]=march[4];
  }
  ll tot = 0;
  for(int a=0;a<5;a++){
  	 for(int b=a+1;b<5;b++){
  			tot+=march[a]*march[b]*march[c];
  		}
  	}
  }
  cout<<tot<<endl;
}  


Compiler output:
a.cc: In function 'int main()':
a.cc:28:54: error: 'c' was not declared in this scope
   28 |                         tot+=march[a]*march[b]*march[c];
      |                                                      ^
a.cc: At global scope:
a.cc:32:3: error: 'cout' does not name a type
   32 |   cout<<tot<<endl;
      |   ^~~~
a.cc:33:1: error: expected declaration before '}' token
   33 | }
      | ^