Language: C

#include<stdio.h>
 
char H[1000000][14]; 
 
int getChar(char ch){
  if ( ch == 'A') return 1;
  else if ( ch == 'C') return 2;
  else if ( ch == 'G') return 3;
  else if ( ch == 'T') return 4;
}
 

long long getKey(char str[]){
  long long sum = 0, p = 1, i;
  for ( i = 0; i < strlen(str); i++ ){
    sum += p*(getChar(str[i]));
    p *= 5;
  }
  return sum;
}
 
int h1(int key){
  key = key%1000000;
  return key;
}
int h2(int key){
  key = 1+key%(1000000-1);
  return key;
}
 
int find(char str[]){
  long long sum,key2,i;
  sum = getKey(str);
  for(i=0;i<20;i++){
    key2=(h1(sum)+i*h2(sum))%1000000;
    if(strcmp(H[key2],str)==0)return 1;
    else if(strlen(H[key2])==0)return 0;
  }
  return 0;
}
 
int insert(char str[]){
  long long sum,key2,i;
  sum = getKey(str);
  for(i=0;i<20;i++){
    key2=(h1(sum)+i*h2(sum))%1000000;
    if(strcmp(H[key2],str)==0)return 1;
    if(strlen(H[key2])==0){
      strcpy(H[key2],str);
      return 0;
    }
  }
}
 
int main(){
  int i, n, h;
  char str[L], com[9];
  for ( i = 0; i < 1000000; i++ ) H[i][0] = '\0';
   
  scanf("%d", &n);
   
  for ( i = 0; i < n; i++ ){
    scanf("%s %s", com, str);
     
    if ( com[0] == 'i' )
      insert(str);
     else {
      if (find(str))
    printf("yes\n");
       else 
    printf("no\n");
      
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'getKey':
main.c:15:20: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
   15 |   for ( i = 0; i < strlen(str); i++ ){
      |                    ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c:15:20: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
   15 |   for ( i = 0; i < strlen(str); i++ ){
      |                    ^~~~~~
main.c:15:20: note: include '<string.h>' or provide a declaration of 'strlen'
main.c: In function 'find':
main.c:36:8: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
   36 |     if(strcmp(H[key2],str)==0)return 1;
      |        ^~~~~~
main.c:36:8: note: include '<string.h>' or provide a declaration of 'strcmp'
main.c:37:13: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
   37 |     else if(strlen(H[key2])==0)return 0;
      |             ^~~~~~
main.c:37:13: note: include '<string.h>' or provide a declaration of 'strlen'
main.c: In function 'insert':
main.c:48:8: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
   48 |     if(strlen(H[key2])==0){
      |        ^~~~~~
main.c:48:8: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:49:7: error: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration]
   49 |       strcpy(H[key2],str);
      |       ^~~~~~
main.c:49:7: note: include '<string.h>' or provide a declaration of 'strcpy'
main.c:49:7: warning: incompatible implicit declaration of built-in function 'strcpy' [-Wbuiltin-declaration-mismatch]
main.c:49:7: note: include '<string.h>' or provide a declaration of 'strcpy'
main.c: In function 'main':
main.c:57:12: error: 'L' undeclared (first use in this function)
   57 |   char str[L], com[9];
      |            ^
main.c:57:12: note: each undeclared identifier is reported only once for each function it appears in