Language: C++

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

int main(){
    long long int N;
    string S[110000];
    char c[110000];
    int a = 0;
    for(int i = 0; i < N; i++){
        cin >> S[i];
        c[i] = S[i][1];
    }
    for(int i = 0; i < N; i++){
        if(strcmp(c[i],'M')==0 || strcmp(c[i],'A')==0 || strcmp(c[i],'R')==0 || strcmp(c[i],'C')==0 || strcmp(c[i],'H')==0){
            for(int j = i+1; j < N; j++){
                if(strcmp(c[j],'M')==0 || strcmp(c[j],'A')==0 || strcmp(c[j],'R')==0 || strcmp(c[j],'C')==0 || strcmp(c[j],'H')==0 && strcmp(c[i],c[j])==0){
                    for(int k = j+1; k < N; k++){
                        if(strcmp(c[k],'M')==0 || strcmp(c[k],'A')==0 || strcmp(c[k],'R')==0 || strcmp(c[k],'H')==0 || strcmp(c[k],'C')==0 && strcmp(c[k],c[i])!=0 && strcmp(c[k],c[j])!=0){
                            a += 1;
                        }
                    }
                }
            }
        }
    }
    cout << a << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:22: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   15 |         if(strcmp(c[i],'M')==0 || strcmp(c[i],'A')==0 || strcmp(c[i],'R')==0 || strcmp(c[i],'C')==0 || strcmp(c[i],'H')==0){
      |                   ~~~^
      |                      |
      |                      char
In file included from a.cc:2:
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:15:24: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   15 |         if(strcmp(c[i],'M')==0 || strcmp(c[i],'A')==0 || strcmp(c[i],'R')==0 || strcmp(c[i],'C')==0 || strcmp(c[i],'H')==0){
      |                        ^~~
      |                        |
      |                        char
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
a.cc:15:45: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   15 |         if(strcmp(c[i],'M')==0 || strcmp(c[i],'A')==0 || strcmp(c[i],'R')==0 || strcmp(c[i],'C')==0 || strcmp(c[i],'H')==0){
      |                                          ~~~^
      |                                             |
      |                                             char
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:15:47: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   15 |         if(strcmp(c[i],'M')==0 || strcmp(c[i],'A')==0 || strcmp(c[i],'R')==0 || strcmp(c[i],'C')==0 || strcmp(c[i],'H')==0){
      |                                               ^~~
      |                                               |
      |                                               char
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
a.cc:15:68: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   15 |         if(strcmp(c[i],'M')==0 || strcmp(c[i],'A')==0 || strcmp(c[i],'R')==0 || strcmp(c[i],'C')==0 || strcmp(c[i],'H')==0){
      |                                                                 ~~~^
      |                                                                    |
      |                                                                    char
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:15:70: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   15 |         if(strcmp(c[i],'M')==0 || strcmp(c[i],'A')==0 || strcmp(c[i],'R')==0 || strcmp(c[i],'C')==0 || strcmp(c[i],'H')==0){
      |                                                                      ^~~
      |                                                                      |
      |                                                                      char
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
a.cc:15:91: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   15 |         if(strcmp(c[i],'M')==0 || strcmp(c[i],'A')==0 || strcmp(c[i],'R')==0 || strcmp(c[i],'C')==0 || strcmp(c[i],'H')==0){
      |                                                                                        ~~~^
      |                                                                                           |
      |                                                                                           char
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:15:93: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   15 |         if(strcmp(c[i],'M')==0 || strcmp(c[i],'A')==0 || strcmp(c[i],'R')==0 || strcmp(c[i],'C')==0 || strcmp(c[i],'H')==0){
      |                                                                                             ^~~
      |                                                                                             |
      |                                                                                             char
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
a.cc:15:114: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   15 |         if(strcmp(c[i],'M')==0 || strcmp(c[i],'A')==0 || strcmp(c[i],'R')==0 || strcmp(c[i],'C')==0 || strcmp(c[i],'H')==0){
      |                                                                                                               ~~~^
      |                                                                                                                  |
      |                                                                                                                  char
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:15:116: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   15 |         if(strcmp(c[i],'M')==0 || strcmp(c[i],'A')==0 || strcmp(c[i],'R')==0 || strcmp(c[i],'C')==0 || strcmp(c[i],'H')==0){
      |                                                                                                                    ^~~
      |                                                                                                                    |
      |                                                                                                                    char
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
a.cc:17:30: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   17 |                 if(strcmp(c[j],'M')==0 || strcmp(c[j],'A')==0 || strcmp(c[j],'R')==0 || strcmp(c[j],'C')==0 || strcmp(c[j],'H')==0 && strcmp(c[i],c[j])==0){
      |                           ~~~^
      |                              |
      |                              char
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:17:32: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   17 |                 if(strcmp(c[j],'M')==0 || strcmp(c[j],'A')==0 || strcmp(c[j],'R')==0 || strcmp(c[j],'C')==0 || strcmp(c[j],'H')==0 && strcmp(c[i],c[j])==0){
      |                                ^~~
      |                                |
      |                                char
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
a.cc:17:53: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   17 |                 if(strcmp(c[j],'M')==0 || strcmp(c[j],'A')==0 || strcmp(c[j],'R')==0 || strcmp(c[j],'C')==0 || strcmp(c[j],'H')==0 && strcmp(c[i],c[j])==0){
      |                                                  ~~~^
      |                                                     |
      |                                                     char
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:17:55: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   17 |                 if(strcmp(c[j],'M')==0 || strcmp(c[j],'A')==0 || strcmp(c[j],'R')==0 || strcmp(c[j],'C')==0 || strcmp(c[j],'H')==0 && strcmp(c[i],c[j])==0){
      |                                                       ^~~
      |                                                       |
      |                                                       char
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
a.cc:17:76: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   17 |                 if(strcmp(c[j],'M')==0 || strcmp(c[j],'A')==0 || strcmp(c[j],'R')==0 || strcmp(c[j],'C')==0 || strcmp(c[j],'H')==0 && strcmp(c[i],c[j])==0){
      |                                                                         ~~~^
      |                                                                            |
      |                                                                            char
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:17:78: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   17 |                 if(strcmp(c[j],'M')==0 || strcmp(c[j],'A')==0 || strcmp(c[j],'R')==0 || strcmp(c[j],'C')==0 || strcmp(c[j],'H')==0 && strcm