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

#include<stdio.h>
#include<string.h>

#define M 1046527
#define NIL (-1)
#define L 14

char H[M][L];

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;
	else return 0;
}

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){
	return key % M;
}

int h2(int key){
	return 1+(key%(M-1));
}

int find(char str[]){
	long long key,i,h;
	key=getKey(str);
	for(i=0;;i++){
		h=(h1(key)+i*h2(key))%M;
		if(strcmp(H[h],str)==0)
			return 1;
		else if(strlen(H[h])==0)
			return 0;
	}
	return 0;
}

int insert(char str[]){
	long long key,i,h;
	key=getKey(str);
	for(i=0;;i++){
		h=(h1(key)+i*h2(key))%M;
		if(strcmp(H[h],str)==0)
			return 1;
		else if(strlen(H[h])==0)
			strcpy(H[h],str);
			return 0;
	}
}
	return 0;
}

int main(){
	int i,n,h;
	char str[L],com[9];
	for(i=0;i<M;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:60:9: error: expected identifier or '(' before 'return'
   60 |         return 0;
      |         ^~~~~~
main.c:61:1: error: expected identifier or '(' before '}' token
   61 | }
      | ^
Language: C

#include<stdio.h>

/* a^b */
int opow(int a, int b)
{
  int i;
  int ret = 1;
  for(i = 0; i < b; i++)
    ret *= a;
  return ret;
}

int hash(char *str)
{
  int i, ret = 0;
  for (i = 0; str[i] != '\0'; i++) {
    switch(str[i]) {
    case 'A':
      break;
    case 'C':
      ret += 1 * opow(4, i);
      break;
    case 'G':
      ret += 2 * opow(4, i);
      break;
    case 'T':
      ret += 3 * opow(4, i);
      break;
    }
  }
  return ret;
}


int main()
{
  char dict[1700000];
  int n, i, j,k = 0;
  char command[7];
  char str[13];
  char ans[1000000];


  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%s %s", command, str);
    j = hash(str);
    if( command[0] == 'i' ) {
      dict[j] = 1;
    } else {
      if( dict[j] ) ans[k] = 1;
      else and[k] = 0;
k++;
    }
  }
 for(i = 0; i < k; i++) {
if(ans[k] == 1)printf("yes\n");
else printf("no\n");
}
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:52:12: error: 'and' undeclared (first use in this function); did you mean 'ans'?
   52 |       else and[k] = 0;
      |            ^~~
      |            ans
main.c:52:12: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

typedef long long ll;
const ll mod = 9999937LL;
const ll base = 9973LL;

ll table[mod];

ll hash(char *str) {
  ll h = 0, p = 1;  
  int len = strlen(str);
  int i;
  
  for(i = 0; i < len; i++) {
    h = (h + str[i])*p % mod;
    p *= base;
  }
  
  return h;
}

void insert(char *str) {
  int h = hash(str);
  if(table[h]) {
    fprintf(stderr, "collision");
    exit(8);
  }
  table[h] = 1;
}

int find(char *str) {
  int h = hash(str);
  return table[h];
}

int main() {
  int n;
  char cmd[256], str[256];
  int i;

  memset(table, 0, sizeof(table));
  scanf("%d", &n);
  for(i = 0; i < n; i++) {
    scanf("%s %s", cmd, str);
    if(strcmp(cmd, "insert") == 0) {      
      insert(str);
    } else if(strcmp(cmd, "find") == 0) {
      int flag = find(str);
      puts((flag ? "yes" : "no"));
    }
  }
  
  return 0;
}

Compiler output:
main.c:9:4: error: variably modified 'table' at file scope
    9 | ll table[mod];
      |    ^~~~~
Language: C

#include<stdio.h>
#include<string.h>

#define M 1000000/* your task*/
#define L 14

char H[M][L]; /* Hash Table */

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;
}

/* convert a string into an integer value */
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){ return key%M; }

int h2(int key){ return (1+key%(M-1)); }

int find(char str[]){
    long long key;
    long long add;
    long long i=0;
    while(i!=3){
        key=getKey(str);
        add=(h1(key)+i*h2(key))%M;
        if(strcmp(H[add],str)==0)return 1;
        i++;
    }
    return 0;
    
    
}

int insert(char str[]){
    long long key;
    long long add;
    long long i=0;
    while(!=4){
        key=getKey(str);
        add=(h1(key)+i*h2(key))%M;
        if(H[add][0]=='\0'){
            strcpy(H[add],str);
            break;
        }
        i++;
    }
    return 0;
}

int main(){
    int i, n, h;
    char str[L], com[9];
    for ( i = 0; i < M; 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 'insert':
main.c:49:11: error: expected expression before '!=' token
   49 |     while(!=4){
      |           ^~
Language: C

#include<stdio.h>
#include<string.h>

#define M 1000000
#define L 14

char H[M][L]; /* Hash Table */

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;
}

/* convert a string into an integer value */
long long getKey(char str[]){
  long long sum = 0, p = 1, i;
  for ( i = 6
insert AAA
insert AAC
find AAA
find CCC
insert CCC0; i < strlen(str); i++ ){
    sum += p*(getChar(str[i]));
    p *= 5; //????????°??¨?????????
  }
  return sum;
}

int h1(int key){
  int h1;
  h1 = key % M;
  return h1;
}
int h2(int key){
  int h2;
  h2 = 1 + key % (M - 1);
  return h2;
}

int find(char str[]){
  int i=0,j;
  int k;
  
  k = getKey(str);
  while(1){
    j = (h1(k) + i * h2(k))%M;
    if (strcmp(H[j],str)==0) return j;
    else if(H[j][0] == '\0' || i >= M) return 0;
    else i++;
  }
}

int insert(char str[]){
  int i=0,j;
  int k;
  
  k = getKey(str);
  while(1){
    j = (h1(k) + i * h2(k))%M;
    if(H[j][0]=='\0'){
      strcpy(H[j],str);
      return j;
    }
    else i++;
  }
}

int main(){
  int i, n, h;
  char str[L], com[9];
  for ( i = 0; i < M; 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:19:14: error: expected ';' before 'insert'
   19 |   for ( i = 6
      |              ^
      |              ;
   20 | insert AAA
      | ~~~~~~
Language: C

#include<stdio.h>
#include<string.h>

#define M 1000000
#define L 14

char H[M][L]; /* Hash Table */

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;
}

/* convert a string into an integer value */
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){ return /* your task */; }
int h2(int key){ return /* your task */; }

int find(char str[]){

  int i,j=0;
  for(i=0;i<L;i++)H[j][i]=str[i];
  j++;
}

int insert(char str[]){
  int i;
  for(i=0;i<n;i++)if(strcmp(str,H[i])==0);
}

int main(){
    int i, n, h;
    char str[L], com[9];
    for ( i = 0; i < M; 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 'h1':
main.c:26:18: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   26 | int h1(int key){ return /* your task */; }
      |                  ^~~~~~
main.c:26:5: note: declared here
   26 | int h1(int key){ return /* your task */; }
      |     ^~
main.c: In function 'h2':
main.c:27:18: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   27 | int h2(int key){ return /* your task */; }
      |                  ^~~~~~
main.c:27:5: note: declared here
   27 | int h2(int key){ return /* your task */; }
      |     ^~
main.c: In function 'insert':
main.c:38:13: error: 'n' undeclared (first use in this function)
   38 |   for(i=0;i<n;i++)if(strcmp(str,H[i])==0);
      |             ^
main.c:38:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<string.h>

#define M 1000000/* your task*/
#define L 14

char H[M][L]; /* Hash Table */

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;
}

/* convert a string into an integer value */
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){ return /* your task */key%M; }
int h2(int key){ return /* your task */1+key%(M-1); }

int find(char str[]){
  /* your task */
  int i;
  for(i=0;i<M;i++){
    if(strcmp(H[i],str) == 0) break;
    return 0;
  }
  else return 1;
}

void insert(char str[]){
  /* your task */
  long long key;
  int x,y,z,i=1;

  key = getKey(str);
  x = h1((int)key);
  if(H[x][0] != '\0'){
    y = h2((int)key);
    z = x;
    while(H[z][0] != '\0'){
      z = (x+i*y)%M;
      i++;
    }
    strcpy(H[z],str);
  }
  else strcpy(H[x],str);
}

int main(){
   int i, n, h;
    char str[L], com[9];
    for ( i = 0; i < M; 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) == 0){
		printf("yes\n");
	    } else {
		printf("no\n");
	    }
	}
    }

    return 0;
}

Compiler output:
main.c: In function 'find':
main.c:36:3: error: 'else' without a previous 'if'
   36 |   else return 1;
      |   ^~~~
Language: C

#include <cstdio>
#define SIZE 33554432
char Key[128];
int Hash;
char* c;
#define HASH(A) c = A; Hash = 1; while(*c){ Hash <<= 2; Hash += Key[*c]; ++c;}
int main()
{
    Key['A'] = 0;
    Key['C'] = 1;
    Key['G'] = 2;
    Key['T'] = 3;
    bool* dic = new bool[SIZE];
    int n;
    std::scanf("%d\n", &n);
    char str[21];
    for(int i = 0; i < n; ++i){
        std::gets(str);
        if(str[0] == 'i'){
            HASH(str+7)
            dic[Hash] = true;
        }else{
            HASH(str+5)
            std::puts((dic[Hash] ? "yes" : "no"));
        }
    }
    return 0;
}

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

#include <stdio.h>
#include <string.h>
 
#define MAX 30000000
 
int array[MAX];
char s[13];
 
int getChar(char ch){
  if(ch == 'A')
    {
    return 1;
  }
  else if(ch == 'C')
    {
    return 2;
  }
  else if(ch == 'G')
    {
    return 3;
  }
  return 4;
}
 
int gainKagi(){
  
  int sum = 0,p = 1;
  int i;
 
  for(i = 0 ; i < strlen(s) ; i++){
    sum += p * (gainChar(s[i]));
    p *= 5;
  }
  return sum;
}
 
int findOut(){
  int key = gainKagi();
 
  if(array[key]){
    return 1;
  }
 
  return 0;
}
 
void insert(){
  array[gainKagi()] = 1;
}

int main(){
  int n;
  char array2[7];
 
  scanf("%d" ,&n);
  
  while(n--){
    
    scanf("%s %s" ,array2 ,s);
 
    if(array2[0] == 'i')
      {
      insert();
    }
    
    else{
      if(findOut())
	{
    puts("yes");
      }
      else{
    puts("no");
      }
    }
  }
 
  return 0;
}

Compiler output:
main.c: In function 'gainKagi':
main.c:31:17: error: implicit declaration of function 'gainChar' [-Wimplicit-function-declaration]
   31 |     sum += p * (gainChar(s[i]));
      |                 ^~~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
 
#define M 1046527
#define NIL (-1)
#define L 14
 
char H[M][L];
 
int getChar(char c){
  if(c == 'A') return 1;
  else if(c == 'C') return 2;
  else if(c == 'G') return 3;
  else if(c == 'T') return 4;
  else return 0;
}
 
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){ return key % M; }
int h2(int key){ return 1 + (key % (M - 1)); }
 
int find(char str[]){
  long long key, i, h;
  key = getKey(str[str]);
  for(i = 0; ; i++){
    h = (h1(key) + i * h2(key)) % M;
    if(strcmp(H[h], str) == 0) return 1;
    else if(strlen(H[h]) == 0) return 0;
  }
  return 0;
}
 
int insert(char str[]){
  long long key, i, h;
  key = getKey(str);
  for( i = 0; ; i++){
    h = (h1(key) + i * h2(key)) % M;
    if(strcmp(H[h], str) == 0) return 1;
    else if(strlen(H[h]) == 0){
      strcpy(H[h], str);
      return 0;
    }
  }
  return 0;
}
 
int main(){
  int i, n, h;
  char str[L], com[9];
  for(i = 0; i < M; 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 'find':
main.c:32:19: error: array subscript is not an integer
   32 |   key = getKey(str[str]);
      |                   ^
Language: C

#include<stdio.h>
#include<string.h>

#define M 100000 /* your task*/
#define L 14

char H[M][L]; /* Hash Table */

int getChar(char ch){
  if ( ch == 'A') return 1;
  else if ( ch == 'C') return 2;
  else if ( ch == 'G') return 3;
  else return 4;
}

/* convert a string into an integer value */
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 find(char str[]){
if(H[getKey(str)][0] == 0) return 0;
else return 1;
}

void insert(char str[]){
  int key;
  key=getKey(str);
strcpy(H[k??ey], str);
}

int main(){
    int i, n, h;
    char str[L], com[9];

    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 'insert':
main.c:34:10: error: 'k' undeclared (first use in this function)
   34 | strcpy(H[k??ey], str);
      |          ^
main.c:34:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:34:12: error: expected expression before '?' token
   34 | strcpy(H[k??ey], str);
      |            ^
main.c:34:13: error: 'ey' undeclared (first use in this function); did you mean 'key'?
   34 | strcpy(H[k??ey], str);
      |             ^~
      |             key
Language: C

#include <iostream>
#include <string>
#include <cstdio>

#define M 1000030
#define NIL -1
#define L 14

using namespace std;

char H[M][L];
int getchar(char c){

  if(c == 'A') return 1;
  else if(c == 'C') return 2;
  else if(c == 'G') return 3;
  else if(c == 'C') return 4;
  else return 0;
}


long long getkey(char str[]){

  long long sum = 0,p = 1;

  for(int i = 0;i < strlen(str); i++){
    sum += p * (getchar(str[i]));
    p *= 5;
  }
  return sum;
}

int h1(int key) {return key % M;}
int h2(int key) {return 1 + (key % (M - 1));}

int find(char str[]){
  long long key,i,h;
  key = getkey(str);

  for(i = 0;;i++){
    h = (h1(key) + i * h2(key)) % M;
    if(strcmp(H[h],str) == 0) return 1;
    else if(strlen(H[h]) == 0) return 0;
  }
  return 0;
}

int insert(char str[]){
  long long key,i,h;
  key = getkey(str);
  for(i = 0;;i++){
    h = (h1(key) + i * h2(key)) % M;
    if(strcmp(H[h],str) == 0) return 1;
    else if(strlen(H[h]) == 0){
      strcpy(H[h], str);
      return 0;
    }
  }
  return 0;
}

int main(){

  int i,n,h;

  char str[L],com[9];
  for(i = 0;i < M;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) == 1){
        printf("yes\n");
      }
      else printf("no\n");
    }
  }
  return 0;
}

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

#include<stdio.h>
#include<string.h>

#define M 10000000/* your task*/
#define L 14

char H[M][L]; /* Hash Table */

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;
}

/* convert a string into an integer value */
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){ return key%M;/* your task */ }
int h2(int key){ return 1+(key%(M-1));/* your task */ }

int find(char str[]){
  long long key,i,n;
  key=getkey(str);
  for(i=0;;i++){
    n=(h1(key)+i*h2(key))%M;
    if(strcmp(H[n],str)==0) return 1;
    else if(strlen(H[n])==0) return 0;
  }
  return 0;

}

int insert(char str[]){
  long long key,i,n;
   
  key = getKey(str);
   for ( i = 0; ; i++ ){
     n = (h1(key) + i * h2(key)) % M;
     
    if( strcmp(H[n],str) == 0 ) {
      return 1;
    }
    else if ( strlen(H[n]) == 0 ){
      strcpy(H[n], str);
      return 0;  
    }
  }
  return 0;

}

int main(){
    int i, n, h;
    char str[L], com[9];
    for ( i = 0; i < M; 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 'find':
main.c:31:7: error: implicit declaration of function 'getkey'; did you mean 'getKey'? [-Wimplicit-function-declaration]
   31 |   key=getkey(str);
      |       ^~~~~~
      |       getKey
Language: C

#include <stdio.h>
#include <string.h>

#define M 1046527
#define NIL (-1)
#define L 14

char H[M][L];

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;
  else return 0;
  }

  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){return key % M;}
  int h2(int key){return 1+(key%(M-1));}

  int find(char str[]){
    long long key,i,h;
    key=getKey(str);
    for(i=0;;i++){
      h=(h1(key)+i*h2(key))%M;
      if(strcmp(H[h],str)==0)return 1;
      else if(strlen(H[h])==0)return 0;
    }
    return 0;
    }

int insert(char str[]){
  long long key,i,h;
  key=getKey(str);
  for(i=0;;i++){
    h=(h1(key)+i*h2(key))%M;
    if(strcmp(H[h],str)==0)return 1;
    else if(strlen(H[h])==0){
      strcpy(H[h],str);
      return 0;
    }
    }
    return 0;
  }

  int main(){
    int i,n,h;
    char str[L],com[9];
    for(i=0;i<M;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(dinf(str)){
          printf("yes\n");
        }else{
          printf("no\n");
        }
      }
    }
    return 0;
  }

Compiler output:
main.c: In function 'main':
main.c:66:12: error: implicit declaration of function 'dinf' [-Wimplicit-function-declaration]
   66 |         if(dinf(str)){
      |            ^~~~
Language: C

#include<stdio.h>
#include<string.h>
#define M 1046527
#define NIL (-1)
#define L 14
charH[M][L]
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;
  else return 0;
}
long long getKey(char str[]){
  long long sum=0,p=1,i;
  for(i=0;i<strlen(str);i++){
    sum+=p*(getChar9(str[i]));
    p*=5;
  }
  return sum;
}
int h1(int key){return key%M;}
int h2(int key){return 1+(key%(M-1));}
int find(char str[]){
  long long key,i,h;
  key=getKey(str);
  for(i=0; ;i++){
    h=(h1(key)+i*h2(key))%M;
    if(strcmp(H[h],str)==0) return 1;
    else if(strlen(H[h])==0) return 0;
  }
  return 0;
}
int insert(char str[]){
  long long ker,i,h;
  key=getKey(str);
  for(i=0; ;i++){
    h=(h1(key)+i*h2(key))%M;
    if(strcmp(H[h],str)==0) return 1;
    else if(strlen(H[h])==0){
      strcpy(H[h],str);
      return 0;
    }
  }
  return 0;
}
int main(){
  int i,n,h;
  char str[L],com[9];
  for(i=0;i<M;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:6:12: error: expected ';' before 'int'
    6 | charH[M][L]
      |            ^
      |            ;
    7 | int getChar(char ch){
      | ~~~         
main.c: In function 'getKey':
main.c:17:13: error: implicit declaration of function 'getChar9'; did you mean 'getChar'? [-Wimplicit-function-declaration]
   17 |     sum+=p*(getChar9(str[i]));
      |             ^~~~~~~~
      |             getChar
main.c: In function 'find':
main.c:29:15: error: 'H' undeclared (first use in this function)
   29 |     if(strcmp(H[h],str)==0) return 1;
      |               ^
main.c:29:15: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'insert':
main.c:36:3: error: 'key' undeclared (first use in this function); did you mean 'ker'?
   36 |   key=getKey(str);
      |   ^~~
      |   ker
main.c:39:15: error: 'H' undeclared (first use in this function)
   39 |     if(strcmp(H[h],str)==0) return 1;
      |               ^
main.c: In function 'main':
main.c:50:20: error: 'H' undeclared (first use in this function)
   50 |   for(i=0;i<M;i++) H[i][0]='\0';
      |                    ^
Language: C

#include<stdio.h>
#include<string.h>
#define M 1046527
#define NIL (-1)
#define L 14
char H[M][L]
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;
  else return 0;
}
long long getKey(char str[]){
  long long sum=0,p=1,i;
  for(i=0;i<strlen(str);i++){
    sum+=p*(getChar9(str[i]));
    p*=5;
  }
  return sum;
}
int h1(int key){return key%M;}
int h2(int key){return 1+(key%(M-1));}
int find(char str[]){
  long long key,i,h;
  key=getKey(str);
  for(i=0; ;i++){
    h=(h1(key)+i*h2(key))%M;
    if(strcmp(H[h],str)==0) return 1;
    else if(strlen(H[h])==0) return 0;
  }
  return 0;
}
int insert(char str[]){
  long long ker,i,h;
  key=getKey(str);
  for(i=0; ;i++){
    h=(h1(key)+i*h2(key))%M;
    if(strcmp(H[h],str)==0) return 1;
    else if(strlen(H[h])==0){
      strcpy(H[h],str);
      return 0;
    }
  }
  return 0;
}
int main(){
  int i,n,h;
  char str[L],com[9];
  for(i=0;i<M;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:6:13: error: expected ';' before 'int'
    6 | char H[M][L]
      |             ^
      |             ;
    7 | int getChar(char ch){
      | ~~~          
main.c: In function 'getKey':
main.c:17:13: error: implicit declaration of function 'getChar9'; did you mean 'getChar'? [-Wimplicit-function-declaration]
   17 |     sum+=p*(getChar9(str[i]));
      |             ^~~~~~~~
      |             getChar
main.c: In function 'find':
main.c:29:15: error: 'H' undeclared (first use in this function)
   29 |     if(strcmp(H[h],str)==0) return 1;
      |               ^
main.c:29:15: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'insert':
main.c:36:3: error: 'key' undeclared (first use in this function); did you mean 'ker'?
   36 |   key=getKey(str);
      |   ^~~
      |   ker
main.c:39:15: error: 'H' undeclared (first use in this function)
   39 |     if(strcmp(H[h],str)==0) return 1;
      |               ^
main.c: In function 'main':
main.c:50:20: error: 'H' undeclared (first use in this function)
   50 |   for(i=0;i<M;i++) H[i][0]='\0';
      |                    ^
Language: C

#include<stdio.h>
#include<string.h>
#define M 1046527
#define NIL (-1)
#define L 14
char H[M][L];
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;
  else return 0;
}
long long getKey(char str[]){
  long long sum=0,p=1,i;
  for(i=0;i<strlen(str);i++){
    sum+=p*(getChar9(str[i]));
    p*=5;
  }
  return sum;
}
int h1(int key){return key%M;}
int h2(int key){return 1+(key%(M-1));}
int find(char str[]){
  long long key,i,h;
  key=getKey(str);
  for(i=0; ;i++){
    h=(h1(key)+i*h2(key))%M;
    if(strcmp(H[h],str)==0) return 1;
    else if(strlen(H[h])==0) return 0;
  }
  return 0;
}
int insert(char str[]){
  long long ker,i,h;
  key=getKey(str);
  for(i=0; ;i++){
    h=(h1(key)+i*h2(key))%M;
    if(strcmp(H[h],str)==0) return 1;
    else if(strlen(H[h])==0){
      strcpy(H[h],str);
      return 0;
    }
  }
  return 0;
}
int main(){
  int i,n,h;
  char str[L],com[9];
  for(i=0;i<M;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:17:13: error: implicit declaration of function 'getChar9'; did you mean 'getChar'? [-Wimplicit-function-declaration]
   17 |     sum+=p*(getChar9(str[i]));
      |             ^~~~~~~~
      |             getChar
main.c: In function 'insert':
main.c:36:3: error: 'key' undeclared (first use in this function); did you mean 'ker'?
   36 |   key=getKey(str);
      |   ^~~
      |   ker
main.c:36:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<string.h>
#define M 1046527
#define NIL (-1)
#define L 14
char H[M][L];
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;
  else return 0;
}
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){return key%M;}
int h2(int key){return 1+(key%(M-1));}
int find(char str[]){
  long long key,i,h;
  key=getKey(str);
  for(i=0; ;i++){
    h=(h1(key)+i*h2(key))%M;
    if(strcmp(H[h],str)==0) return 1;
    else if(strlen(H[h])==0) return 0;
  }
  return 0;
}
int insert(char str[]){
  long long ker,i,h;
  key=getKey(str);
  for(i=0; ;i++){
    h=(h1(key)+i*h2(key))%M;
    if(strcmp(H[h],str)==0) return 1;
    else if(strlen(H[h])==0){
      strcpy(H[h],str);
      return 0;
    }
  }
  return 0;
}
int main(){
  int i,n,h;
  char str[L],com[9];
  for(i=0;i<M;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 'insert':
main.c:36:3: error: 'key' undeclared (first use in this function); did you mean 'ker'?
   36 |   key=getKey(str);
      |   ^~~
      |   ker
main.c:36:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <string.h>
#define M 1046527
#define NIL (-1)
#define L 14

char H[M][L];

int getChar(char ch){
  if(ch == 'A') return 1;
  else if(ch == 'C') return 2;
  if(ch == 'G') return 3;
  if(ch == 'T') return 4;
  return 0;
}

/* convert a string into an integer value */
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){ return key % M; }
int h2(int key){ return 1 + (key % (M - 1)); }

int find(char str[]){
  long long key, i, h;
  key = getKey(str);
  for(i=0; ; i++){
    h = (h1(key) + i * h2(key)) % M;
    if(strcmp(H[h],str) == 0) return 1;
    else if(strlen(H[h],str) == 0) return 0;
    }
    return 0;
}

int insert(char str[]){
  long long key, i, h;
  key = getKey(str);
  for(i = 0;; i++){
  h = (h1(key) + i * h2(key)) % M;
  if(strcmp(H[h],str) == 0) return 1;
  else if(strlen(H[h]) == 0){
    strcpy(H[h], str);
    return 0;
    } 
  }
return 0;
}

int main(){
  int i, n, h;
  char str[L], com[9];
  for ( i = 0; i < M; 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 'find':
main.c:36:13: error: too many arguments to function 'strlen'
   36 |     else if(strlen(H[h],str) == 0) return 0;
      |             ^~~~~~
In file included from main.c:2:
/usr/include/string.h:407:15: note: declared here
  407 | extern size_t strlen (const char *__s)
      |               ^~~~~~
Language: C

#include <stdio.h>
#include <string.h>
#define M 1046527
#define NIL (-1)
#define L 14

char H[M][L];

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;
  else return 0;
}

/* convert a string into an integer value */
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){ return key % M; }
int h2(int key){ return 1 + (key % (M - 1)); }

int find(char str[]){
  long long key, i, h;
  key = getKey(str);
  for(i=0; ; i++){
    h = (h1(key) + i * h2(key)) % M;
    if(strcmp(H[h], str) == 0) return 1;
    else if(strlen(H[h]) == 0) return 0;
  }
  return 0;
}

int insert(char str[]){
  long long key, i, h;
  key = getKey(str);
  for(i=0; ; i++){
    h = (h1(key) + i * h2(key)) % M;
    if(strcmp(H[h], str) == 0) return 1;
    else if(strlen(H[h]) == 0){
      strcpy(H[h], str);
      return 0;
    }

Compiler output:
main.c: In function 'insert':
main.c:50:5: error: expected declaration or statement at end of input
   50 |     }
      |     ^
main.c:50:5: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>
#include <string.h>
#define M 1046527
#define NIL (-1)
#define L 14

char H[M][L];

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;
  else return 0;
}

/* convert a string into an integer value */
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){ return key % M; }
int h2(int key){ return 1 + (key % (M - 1)); }

int find(char str[]){
  long long key, i, h;
  key = getKey(str);
  for(i=0; ; i++){
    h = (h1(key) + i * h2(key)) % M;
    if(strcmp(H[h], str) == 0) return 1;
    else if(strlen(H[h]) == 0) return 0;
  }
  return 0;
}

int insert(char str[]){
  long long key, i, h;
  key = getKey(str);
  for(i=0; ; i++){
    h = (h1(key) + i * h2(key)) % M;
    if(strcmp(H[h], str) == 0) return 1;
    else if(strlen(H[h]) == 0){
      strcpy(H[h], str);
      return 0;
    }

int main(){
  int i, n, h;
  char str[L], com[9];
  for ( i = 0; i < M; 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 'insert':
main.c:74:1: error: expected declaration or statement at end of input
   74 | }
      | ^
main.c:74:1: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>
#include <string.h>

#define M 1046527
#define NIL (-1)
#define L 14

char H[M][L];

int getchar(char ch){
	if(ch=='A') return 1;
	else if(ch=='B') return 2;
	else if(ch=='C') return 3;
	else if(ch=='D') return 4;
	return 0;
}

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){
	return key % M;
}

int h2(int key){
	return 1+(key % (M-1));
}

int find(char str[]){
	long long key,i,h;
	key = getKey(str);
	
	for(i=0;i;i++){
		h = (h1(key) + i*h2(key)) % M;
		if(strcmp(H[h],str)==0) return 1;
		else if(strlen(H[h])==0) return 0;
	}
	return 0;
}

int insert(char str[]){
	long long key, i ,h;
	key = getKey(str);
	for(i=0;;i++){
		h = (h1(key)+ i*h2(key)) % M;
		if(strcmp(H[h],str) ==0) return 1;
		else if(strlen(H[h])==0) {
			strcpy(H[h],str);
			return 0;
		}
	}
}

int main(){
	int i,n,h;
	char str[L],com[9];
	for(i=0;i<M;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:10:5: error: conflicting types for 'getchar'; have 'int(char)'
   10 | int getchar(char ch){
      |     ^~~~~~~
In file included from main.c:1:
/usr/include/stdio.h:582:12: note: previous declaration of 'getchar' with type 'int(void)'
  582 | extern int getchar (void);
      |            ^~~~~~~
Language: C


  i=0;
  while(1){
    h=(h1(key)+i*h2(key))%M;
    if(strcmp(HASH[h],str)==0)return 1;
    else if(strlen(HASH[h])==0){
      strcpy(HASH[h],str);
      return 0;
    }
i++;
  }
return 0;
}

Compiler output:
main.c:2:3: warning: data definition has no type or storage class
    2 |   i=0;
      |   ^
main.c:2:3: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
main.c:3:3: error: expected identifier or '(' before 'while'
    3 |   while(1){
      |   ^~~~~
main.c:12:1: error: expected identifier or '(' before 'return'
   12 | return 0;
      | ^~~~~~
main.c:13:1: error: expected identifier or '(' before '}' token
   13 | }
      | ^
Language: C

#include<stdio.h>
#include<string.h>
#define M 20000000
#define L 14
int find(char str[L]);
int getChar(char ch);
long long getKey(char str[L]);
int insert(char str[L]);
   
char H[M][L]; 
 
int getChar(char ch){
  if ( ch == 'A') return 1;
  else if ( ch == 'C') return 2;
  else if ( ch == 'G') return 3;
  else return 4;
}
 
/* convert a string into an integer value */
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 find(char str[L]){
  if(H[getKey(str)][0]=='\0')return 0;
  else return 1;
 
}
 

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h
#include<string.h>
#define M 1046527
#define NIL -1
#define L 14

char H[M][L];

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;
else return 0;
}

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){
return key%M;
}

int h2(int key){
return 1+(key%(M-1));
}

int find(char str[]){
long long key,i,h;
key=getkey(str);
for(i=0; ; i++){
h=(h1(key)+i*h2(key))%M;
if(strcmp(H[h[,str)==0)return 1;
else if(strlen(H[h])==0)return 0;
}
return 0;
}

int insert(char str[]){
long long key,i,h;
key=getkey(str);
for(i=0; ; i++){
h=(h1(key)+i*h2(key))%M;
if(strcmp(H[h],str)==0)return 1;
else if(strlen(H[h])==0){
strcpy(H[h],str);
return 0;
}
}
return 0;
}

int main(){
int i,n,h;
char str[L],com[9];

for(i=0;i<M;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:1:17: error: missing terminating > character
    1 | #include<stdio.h
      |                 ^
main.c:9:5: error: conflicting types for 'getchar'; have 'int(char)'
    9 | int getchar(char ch){
      |     ^~~~~~~
In file included from main.c:1:
/usr/include/stdio.h:582:12: note: previous declaration of 'getchar' with type 'int(void)'
  582 | extern int getchar (void);
      |            ^~~~~~~
main.c: In function 'find':
main.c:39:15: error: expected expression before ',' token
   39 | if(strcmp(H[h[,str)==0)return 1;
      |               ^
main.c:39:19: error: expected ']' before ')' token
   39 | if(strcmp(H[h[,str)==0)return 1;
      |                   ^
      |                   ]
main.c:39:4: error: too few arguments to function 'strcmp'
   39 | if(strcmp(H[h[,str)==0)return 1;
      |    ^~~~~~
In file included from main.c:2:
/usr/include/string.h:156:12: note: declared here
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |            ^~~~~~
Language: C

#include<stdio.h
#include<string.h>
#define M 1046527
#define NIL -1
#define L 14

char H[M][L];

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;
else return 0;
}

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){
return key%M;
}

int h2(int key){
return 1+(key%(M-1));
}

int find(char str[]){
long long key,i,h;
key=getkey(str);
for(i=0; ;i++){
h=(h1(key)+i*h2(key))%M;
if(strcmp(H[h],str)==0)return 1;
else if(strlen(H[h])==0)return 0;
}
return 0;
}

int insert(char str[]){
long long key,i,h;
key=getkey(str);
for(i=0; ; i++){
h=(h1(key)+i*h2(key))%M;
if(strcmp(H[h],str)==0)return 1;
else if(strlen(H[h])==0){
strcpy(H[h],str);
return 0;
}
}
return 0;
}

int main(){
int i,n,h;
char str[L],com[9];

for(i=0;i<M;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:1:17: error: missing terminating > character
    1 | #include<stdio.h
      |                 ^
main.c:9:5: error: conflicting types for 'getchar'; have 'int(char)'
    9 | int getchar(char ch){
      |     ^~~~~~~
In file included from main.c:1:
/usr/include/stdio.h:582:12: note: previous declaration of 'getchar' with type 'int(void)'
  582 | extern int getchar (void);
      |            ^~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
#define M 1046527
#define NIL -1
#define L 14

char H[M][L];

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;
else return 0;
}

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){
return key%M;
}

int h2(int key){
return 1+(key%(M-1));
}

int find(char str[]){
long long key,i,h;
key=getkey(str);
for(i=0; ;i++){
h=(h1(key)+i*h2(key))%M;
if(strcmp(H[h],str)==0)return 1;
else if(strlen(H[h])==0)return 0;
}
return 0;
}

int insert(char str[]){
long long key,i,h;
key=getkey(str);
for(i=0; ; i++){
h=(h1(key)+i*h2(key))%M;
if(strcmp(H[h],str)==0)return 1;
else if(strlen(H[h])==0){
strcpy(H[h],str);
return 0;
}
}
return 0;
}

int main(){
int i,n,h;
char str[L],com[9];

for(i=0;i<M;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:9:5: error: conflicting types for 'getchar'; have 'int(char)'
    9 | int getchar(char ch){
      |     ^~~~~~~
In file included from main.c:1:
/usr/include/stdio.h:582:12: note: previous declaration of 'getchar' with type 'int(void)'
  582 | extern int getchar (void);
      |            ^~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
#define M 1046527
#define NIL -1
#define L 14

char H[M][L];

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;
else return 0;
}

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){
return key%M;
}

int h2(int key){
return 1+(key%(M-1));
}

int find(char str[]){
long long key,i,h;
key=getkey(str);
for(i=0; ;i++){
h=(h1(key)+i*h2(key))%M;
if(strcmp(H[h],str)==0)return 1;
else if(strlen(H[h])==0)return 0;
}
return 0;
}

int insert(char str[]){
long long key,i,h;
key=getkey(str);
for(i=0; ; i++){
h=(h1(key)+i*h2(key))%M;
if(strcmp(H[h],str)==0)return 1;
else if(strlen(H[h])==0){
strcpy(H[h],str);
return 0;
}
}
return 0;
}

int main(){
int i,n,h;
char str[L],com[9];

for(i=0;i<M;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:20:9: error: too many arguments to function 'getchar'
   20 | sum+=p*(getchar(str[i]));
      |         ^~~~~~~
In file included from main.c:1:
/usr/include/stdio.h:582:12: note: declared here
  582 | extern int getchar (void);
      |            ^~~~~~~
Language: C

#include <stdio.h>
#include <string.h>
#define MAX 100000000

char str[14];
char H[MAX];

int find(void);
void insert(void);
int getChar(char);
int getkey(void);

int main(){
  int i,j,n;
  char a[7];

  scanf("%d",&n);

  for(i=0;i<n;i++){
    scanf("%s%s",a,str);
    if(a[0]=='i'){
      insert();
    }
    else if(a[0]=='f'){
      if(find())printf("yes\n");
      else printf("no\n");
    }
  }
  return 0;
}

int getChar(char c){
  if(c=='A')return 1;
  else if(c=='C')return 2;
  else if(c=='G')return 3;
  else if(c=='T')return 4;
}

int getkey(){
  int sum=0, b=1,i;
  for(i=0;i<strlen(str);i++){
    sum+=b*(getChar(str[i]));
    b*=10;
  }
  return sum;
}

int getkey(){
  int sum=0, b=1,i;
  for(i=0;i<strlen(str);i++){
    sum+=b*(getChar(str[i]));
    b*=10;
  }
  return sum;
}

int find(){
  int key = getkey();
  if(H[key])return 1;
  else return 0;
}

void insert(){
  int sum;
  sum=getkey();
  H[sum]=1;
}

Compiler output:
main.c:48:5: error: redefinition of 'getkey'
   48 | int getkey(){
      |     ^~~~~~
main.c:39:5: note: previous definition of 'getkey' with type 'int(void)'
   39 | int getkey(){
      |     ^~~~~~
Language: C

#include<stdio.h>
#include<string.h>

#define M 1000000
#define L 14

char H[M][L]; /

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;
}

/* convert a string into an integer value */
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){ return key%M; }
int h2(int key){ return 1+(key%(M-1)); }

int find(char str[]){
  int i,h;
  h= (h1(getKey(str)) + i * h2(getKey(str))) % M;
  for(i=0;i<14;i++){
    h= (h1(getKey(str)) + i * h2(getKey(str))) % M;
    if(strcmp( H[h], str)==0) return 1;
  }
  return 0;
  
}

int insert(char str[]){
  
  int i;
  if(find(str)) return 0;
  for(i=0;i<14;i++){
    if(H[ (h1(getKey(str)) + i * h2(getKey(str))) % M ][0]=='\0'){
      strcpy(H[ (h1(getKey(str)) + i * h2(getKey(str))) % M ],str);
      return 1;
    }
  }
  return 0;

}

int main(){
    int i, n, h;
    char str[L], com[9];
    for ( i = 0; i < M; 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:7:15: error: expected identifier or '(' before '/' token
    7 | char H[M][L]; /
      |               ^
main.c: In function 'getKey':
main.c:20:15: error: implicit declaration of function 'getChar'; did you mean 'getchar'? [-Wimplicit-function-declaration]
   20 |     sum += p*(getChar(str[i]));
      |               ^~~~~~~
      |               getchar
Language: C

#include<stdio.h>
#include<string.h>
#define N 1000000
#define L 14

int getChar(char);
long long getKey(char);
int h1(int);
int h2(int);
int search(char);
int insert(char);

char H[N][L];
int main()
{
  int i,n,h;
  char str[L],c[L];
  for (i=0;i<M;i++)
    {
      H[i][0]='\0';
    }
  scanf("%d",&n);
  for (i=0;i<n;i++)
    {
      scanf("%s %s",c,str);
      if (c[0]=='i')   insert(str);
      else
        {
          if (search(str))  printf("yes\n");
          else printf("no\n");
        }
    }
  return 0;
}
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)
{
  return key%N;
}
int h2(int key)
{
  return 1+(key%(N-1));
}

int find(char str[])
{
  long long key,i,h;
  key=getKey(str);
  for(i=0;;i++){
    h=(h1(key)+i*h2(key))%N;
    if(strcmp(H[h],str)==0) return 1;
    else if (strlen(H[h])==0) return 0;
  }
  return 0;
}

int insert(char str[])
{
  long long key, i, h;
  key=getKey(str);
  for(i=0;i++)
    {
      h=(h1(key)+i*h2(key))%N;
      if(strcmp(H[h],str)==0) return 1;
      else if (strlen(H[h])==0)
        {
          strcpy(H[h],str);
          return 0;
        }
    }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:14: error: 'M' undeclared (first use in this function)
   18 |   for (i=0;i<M;i++)
      |              ^
main.c:18:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:26:31: error: passing argument 1 of 'insert' makes integer from pointer without a cast [-Wint-conversion]
   26 |       if (c[0]=='i')   insert(str);
      |                               ^~~
      |                               |
      |                               char *
main.c:11:12: note: expected 'char' but argument is of type 'char *'
   11 | int insert(char);
      |            ^~~~
main.c:29:22: error: passing argument 1 of 'search' makes integer from pointer without a cast [-Wint-conversion]
   29 |           if (search(str))  printf("yes\n");
      |                      ^~~
      |                      |
      |                      char *
main.c:10:12: note: expected 'char' but argument is of type 'char *'
   10 | int search(char);
      |            ^~~~
main.c: At top level:
main.c:42:11: error: conflicting types for 'getKey'; have 'long long int(char *)'
   42 | long long getKey(char str[])
      |           ^~~~~~
main.c:7:11: note: previous declaration of 'getKey' with type 'long long int(char)'
    7 | long long getKey(char);
      |           ^~~~~~
main.c:74:5: error: conflicting types for 'insert'; have 'int(char *)'
   74 | int insert(char str[])
      |     ^~~~~~
main.c:11:5: note: previous declaration of 'insert' with type 'int(char)'
   11 | int insert(char);
      |     ^~~~~~
main.c: In function 'insert':
main.c:78:14: error: expected ';' before ')' token
   78 |   for(i=0;i++)
      |              ^
      |              ;