Language: C

#include<stdio.h>
#include<string.h> 
 
int main(void){
  int n, k, r, s, p;
  int score = 0;
  char t[100000];
  scanf("%d %d", &n, &k);
  scanf("%d %d %d", &r, &s, &p);
  scanf("%s", t);
  
  for(int i=0; i < k; i++){
    if(!strcmp(t[i], "r")){
      score = score + p;
    }else if(!strcmp(t[i], "s")){
      score = score + r;
    }else if(!strcmp(t[i], "p")){
      score = score + s;
    }
  }
  
  for(int i = k; i < n; i ++){
    prev[0] = t[i-k];
    if(strcmp(t[i], prev[0])){
      if(!strcmp(t[i], "r")){
        score = score + p;
      }else if(!strcmp(t[i], "s")){
        score = score + r;
      }else if(!strcmp(t[i], "p")){
        score = score + s;
      }
    }
  }
  printf("%d", score);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:17: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   13 |     if(!strcmp(t[i], "r")){
      |                ~^~~
      |                 |
      |                 char
In file included from main.c:2:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:15:23: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   15 |     }else if(!strcmp(t[i], "s")){
      |                      ~^~~
      |                       |
      |                       char
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:17:23: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   17 |     }else if(!strcmp(t[i], "p")){
      |                      ~^~~
      |                       |
      |                       char
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:23:5: error: 'prev' undeclared (first use in this function)
   23 |     prev[0] = t[i-k];
      |     ^~~~
main.c:23:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:16: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   24 |     if(strcmp(t[i], prev[0])){
      |               ~^~~
      |                |
      |                char
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:25:19: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   25 |       if(!strcmp(t[i], "r")){
      |                  ~^~~
      |                   |
      |                   char
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:27:25: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   27 |       }else if(!strcmp(t[i], "s")){
      |                        ~^~~
      |                         |
      |                         char
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:29:25: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   29 |       }else if(!strcmp(t[i], "p")){
      |                        ~^~~
      |                         |
      |                         char
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~