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

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

#define N 1000000
#define L 12

  char A[N][L];
  int getChar(char c);
  long long getKey(char str[]);
  int g1(int key){
    return key%N;
  }

  int g2(int key){return 1+(key%(N-1));}
  int find(char str[]);
  int insert(char str[]);

  int main(){
    int i,n;
    char str[L],cmp[9];
    for(i=0;i<N;i++){
      A[i][0]='\0';
    }
    scanf("%d",&n);
    for(i=0;i<n;i++){
      scanf("%s %s",cmp,str);
      if(cmp[0]=='i'){
        insert(str);
      } else {
        if(find(str)){
          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;
    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 find(char str[]){
    int i,x;
    x=(g1(getKey(str))+i*g2(getKey(str)))% N;
    for(i=0;i<14;i++){
      x=(g1(getKey(str))+i*g2(getKey(str)))%N;
        if(strcmp(A[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(A[(g1(getKey(str))+i*g2(getKey(str)))%N][0]=='\0'){
            strcpy(A[(g1(getKey(str))+i*g2(getKey(str)))%N],str);
            return 1;
          }
        }
  return 0;
  }



Compiler output:
main.c: In function 'find':
main.c:59:21: error: 'h' undeclared (first use in this function)
   59 |         if(strcmp(A[h],str) == 0) return 1;
      |                     ^
main.c:59:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <math.h>
main(){
  int i,j,n,code;
  char cm[7],op,dict[262145];
  for(i=0,scanf("%d",&n);i<n;i++){
    scanf("%s",cm);
    j=code=op=0;
    while(op!='\n'){
      scanf("%c",&o);
      if(op=='A') code+=1*pow(4,j++);
      else if(op=='C') code+=2*pow(4,j++);
      else if(op=='G') code+=3*pow(4,j++);
      else if(op=='T') code+=4*pow(4,j++);
    }
    if(cm[0]=='i') dict[code] = 1;
    if(cm[0]=='f') dict[code] ? printf("yes\n") : printf("no\n");
  }
  return 0;
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:10:19: error: 'o' undeclared (first use in this function); did you mean 'op'?
   10 |       scanf("%c",&o);
      |                   ^
      |                   op
main.c:10:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <math.h>
main(){
  int i,j,n,code;
  char cm[7],op,dict[262145];
  for(i=0,scanf("%d %s",&n,cm)i<n;i++,scanf("%s",cm)){
    for(j=code=op=0;op!='\n';scanf("%c",&op))
      if(op=='A') code+=1*pow(4,j++);
      else if(op=='C') code+=2*pow(4,j++);
      else if(op=='G') code+=3*pow(4,j++);
      else if(op=='T') code+=4*pow(4,j++);
    if(cm[0]=='i') dict[code] = 1;
    if(cm[0]=='f') dict[code] ? printf("yes\n") : printf("no\n");
  }
  return 0;
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:6:31: error: expected ';' before 'i'
    6 |   for(i=0,scanf("%d %s",&n,cm)i<n;i++,scanf("%s",cm)){
      |                               ^
      |                               ;
main.c:6:53: error: expected ';' before ')' token
    6 |   for(i=0,scanf("%d %s",&n,cm)i<n;i++,scanf("%s",cm)){
      |                                                     ^
      |                                                     ;
Language: C

#include <stdio.h>
#include <math.h>
main(){
  int i,j,n,c; char m[7],o,d[262145];
  for(i=0,scanf("%d %s",&n,m);i<n;i++,scanf("%s",m)){
    for(j=c=op=0;o!='\n';scanf("%c",&o))
      if(o=='A')c+=1*pow(4,j++);
      else if(o=='C')c+=2*pow(4,j++);
      else if(o=='G')c+=3*pow(4,j++);
      else if(o=='T')c+=4*pow(4,j++);
    m[0]=='i'?d[c]=1:(d[c]?printf("yes\n"):printf("no\n"));
  }
  return 0;
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:6:13: error: 'op' undeclared (first use in this function); did you mean 'o'?
    6 |     for(j=c=op=0;o!='\n';scanf("%c",&o))
      |             ^~
      |             o
main.c:6:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

    if ( com[0] == 'i' ) {
      insert(key);
    } else if ( com[0] == 'd' ) {
      if (strlen(com) > 6){
	if ( com[6] == 'F' ) {
	  deleteFirst();
	} else if ( com[6] == 'L' ) {
	  deleteLast();
	}
      } else {
	delete(key);
      }
    }
  

Compiler output:
main.c:1:5: error: expected identifier or '(' before 'if'
    1 |     if ( com[0] == 'i' ) {
      |     ^~
main.c:3:7: error: expected identifier or '(' before 'else'
    3 |     } else if ( com[0] == 'd' ) {
      |       ^~~~
Language: C


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

const int N = 244140626;

int n;
char data[N];

int conv(char c){
  switch(c){
  case 'A':
    return 1;
    break;
  case 'C':
    return 2;
    break;
  case 'G':
    return 3;
    break;
  case 'T':
    return 4;
    break;
  }
}

int hash(char str[10]){
  int res = 0, size = strlen(str), r = 1, i;
  for(i=size-1;i>=0;i--){
    res += r * conv(str[i]);
    r *= 5;
  }
  return res;
}

void insertElm(int d){
  data[d] = 1;
}

char findElm(int d){
  return data[d];
}

main(){
  char ope[10], str[10];
  int i;
  //memset(data, 0, N);
  scanf("%d", &n);
  for(i=0;i<n;i++){
    scanf("%s", ope);
    scanf("%s", str);
    if(!strcmp(ope, "insert")) insertElm(hash(str));
    else printf("%s\n", (findElm(hash(str)) ? "yes" : "no"));
  }
  return 0;
}

Compiler output:
main.c:8:6: error: variably modified 'data' at file scope
    8 | char data[N];
      |      ^~~~
main.c:44:1: error: return type defaults to 'int' [-Wimplicit-int]
   44 | main(){
      | ^~~~
Language: C


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

const int N = 16777220;

int n;
char data[16777220];
char sizeD[16777220];

int conv(char c){
  switch(c){
  case 'A':
    return 1;
    break;
  case 'C':
    return 2;
    break;
  case 'G':
    return 3;
    break;
  case 'T':
    return 4;
    break;
  }
}

int hash(char str[10]){
  int res = 0, size = strlen(str), r = 1, i;
  for(i=size-1;i>=0;i--){
    res += r * (conv(str[i])-1);
    r *= 4;
  }
  return res;
}

void insertElm(int d, int len){
  data[d] = 1;
  sizeD[d] = len;
}

char findElm(int d){
  return data[d];
}

main(){
  char ope[10], str[10];
  int i;
  memset(data, 0, N);
  scanf("%d", &n);
  for(i=0;i<n;i++){
    scanf("%s", ope);
    scanf("%s", str);
    if(!strcmp(ope, "insert")) insertElm(hash(str), strlen(str));
    else printf("%s\n", (findElm(hash(str), strlen(str)) ? "yes" : "no"));
  }
  return 0;
}

Compiler output:
main.c:46:1: error: return type defaults to 'int' [-Wimplicit-int]
   46 | main(){
      | ^~~~
main.c: In function 'main':
main.c:55:26: error: too many arguments to function 'findElm'
   55 |     else printf("%s\n", (findElm(hash(str), strlen(str)) ? "yes" : "no"));
      |                          ^~~~~~~
main.c:42:6: note: declared here
   42 | char findElm(int d){
      |      ^~~~~~~
Language: C

#include <stdio.h>
#include <math.h>
#define P pow(4,j++)
main(){
  int i,j,n,c; char m[7],o,d[244140625];
  for(i=0,scanf("%d %s",&n,m);i<n;i++,scanf("%s",m)){
    for(j=c=o=0;o!='\n';scanf("%c",&o))
      if(o=='A')c+=1*P;
      else if(o=='C')c+=2*P;
      else if(o=='G')c+=3*P;
      else if(o=='T')c+=4*P;
    m[0]=='i'?d[c]=1:(d[c]?printf("yes\n"):printf("no

\n"));
  }
  return 0;
}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main(){
      | ^~~~
main.c: In function 'main':
main.c:12:51: warning: missing terminating " character
   12 |     m[0]=='i'?d[c]=1:(d[c]?printf("yes\n"):printf("no
      |                                                   ^
main.c:12:51: error: missing terminating " character
   12 |     m[0]=='i'?d[c]=1:(d[c]?printf("yes\n"):printf("no
      |                                                   ^~~
main.c:14:1: error: stray '\' in program
   14 | \n"));
      | ^
main.c:14:3: warning: missing terminating " character
   14 | \n"));
      |   ^
main.c:14:3: error: missing terminating " character
   14 | \n"));
      |   ^~~~
main.c:14:3: error: expected ')' before '}' token
   14 | \n"));
      |   ^
      |   )
   15 |   }
      |   ~
main.c:12:50: note: to match this '('
   12 |     m[0]=='i'?d[c]=1:(d[c]?printf("yes\n"):printf("no
      |                                                  ^
main.c:14:2: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
   14 | \n"));
      |  ^
      |  |
      |  int
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:14:3: error: expected ')' before '}' token
   14 | \n"));
      |   ^
      |   )
   15 |   }
      |   ~
main.c:12:22: note: to match this '('
   12 |     m[0]=='i'?d[c]=1:(d[c]?printf("yes\n"):printf("no
      |                      ^
main.c:14:3: error: expected ';' before '}' token
   14 | \n"));
      |   ^
      |   ;
   15 |   }
      |   ~
Language: C

#include <stdio.h>
#include <string.h>
#define M 1000003
#define L 13
 
void insert(char* val);
int find(char* val);
int h(int, int);
int getNumber(char);
char hashTable[M][L];
//char hashIsUsed[M];
int codes[4][L];
 
int main(){
 
int n;
int i,j;
char val[L], com[7];
int p[L] = {1,4,16,64,256,1024,4096,16384,65536,262144,1048576,4194304,16777216};
	
for(i=0; i<4; i++){
for(j=0; j<L; j++){
	codes[i][j] = i * p[j];	
}
}
	
	for ( i = 0; i < M; i++ ) hashTable[i][0] = '\0';
 
scanf("%d",&n);
 
for(i=0; i<n; i++){
scanf("%s %s",com,val);
if(com[0] == 'i'){
insert(val);
}else if(com[0] == 'f'){
if(find(val) == 1){
    printf("yes\n");
}else{
    printf("no\n");
}
}
}
 
return 0;
 
}
 
void insert(char* val){

int code = 0;
int p = 1;
int key;
int i, len;
     
for(i=0, len=strlen(val); i<len; i++){
code += codes[getNumber(*(val+i))][i];
}
 
for(i=0; ;i++){
key = h(code,i);
if(hashTable[i][0] == '\0'){
    strcpy(hashTable[key],val);
    hashIsUsed[key] = 1;
return;
}
}
 
}
 
int find(char* val){
 
int code = 0;
int p = 1;
int key;
int i, len;
     
for(i=0, len=strlen(val); i<len; i++){
code += codes[getNumber(*(val+i))][i];
}
 
for(i=0; ;i++){
key = h(code,i);
if(hashTable[i][0] == '\0'){
return 0;
}else if(!strcmp(hashTable[key],val)){
return 1;
}
}
 
return 0;
 
}
 
int h(int code, int i){
return ((code % M) + i * (1 + (code % (M-1)))) % M;
}
 
int getNumber(char val){
 
if(val == 'A') return 0;
if(val == 'C') return 1;
if(val == 'G') return 2;
if(val == 'T') return 3;
 
return -1;
 
}

Compiler output:
main.c: In function 'insert':
main.c:63:5: error: 'hashIsUsed' undeclared (first use in this function)
   63 |     hashIsUsed[key] = 1;
      |     ^~~~~~~~~~
main.c:63:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C


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

#define M 1000007
#define NIL (-1)
#define L 14
int count;

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

int find(char str[]){
  int i;
  int f1,f2;
  f1=h1(getKey(str));
  f2=h2(getKey(str));
 
    if(strcmp(H[h1(getKey(str))%M],str)==0){
      return 1;
    }
   sum=f1;

  for(i=0;i<count;i++){
      sum=(sum+f2)%M;
   if(H[sum]=='\0'){
      return 0;
    }
    else if(strcmp(H[sum],str)==0){
      return 1;
    }
    
    
  }
  return 0;
  
}
void insert(char str[]){
  int i;
  int sum;
  int f1,f2;
  count++;
  f1=h1(getKey(str));
  f2=h2(getKey(str));
    if(H[f1][0]=='\0'){
      strcpy(H[f1],str);
      return;
    }
    sum=f1;

   for(i=0;;i++){
     sum=(sum+f2)%M;
   if(H[sum][0]=='\0'){
       strcpy(H[sum],str);

      break;
    }
  }
}

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: In function 'find':
main.c:41:4: error: 'sum' undeclared (first use in this function)
   41 |    sum=f1;
      |    ^~~
main.c:41:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C

/* Search III */
#include<stdio.h>
#include<string.h>

#define M 1000003
#define L 13

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

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

/* 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 *= 4;
  }
  return sum;
}

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

int find(char str[]){
  int key,i,distance1,distance;
  key=getKey(str);
  key=h1(key);
  if(strcmp(H[key],str)==0){
    return 1;  /*true*/
  }else{
    distance1=key+h2(key)%M;
    if(distance1>key){
      distance=distance1-key;
    }else{
      distance=key-distance1;
    }
    for(i=key+distance;i<M;i+=distance){
      if(strcmp(H[i],str)==0)return 1; /*true*/
    }
  }
  return 0;  /*false*/
}

int insert(char str[]){
  int key, h_1, h_2, h, i;
  key=getKey(str);
  h_1=h1(key);
  if(H[h_1][0]=='\0'){
    strcpy(H[h_1],str);
  }else{
    h_2=h2(key);
    for(i=0;;i++){
      h=(h_1+i*h_2)%M;
      if(H[h][0]=='\0')break;
      }
    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:66:3: error: expected identifier or '(' before 'return'
   66 |   return 0;
      |   ^~~~~~
main.c:67:1: error: expected identifier or '(' before '}' token
   67 | }
      | ^
Language: C

/* Search III */
#include<stdio.h>
#include<string.h>

#define M 1000003
#define L 13

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[]){
  int key,i,distance1,distance,f=0;
  key=getKey(str);
  key=h1(key);
  if(strcmp(H[key],str)==0){
    return 1;  /*true*/
  }
  else{
    distance1=(key+h2(key))%M;
    if(distance1>key){
      distance=distance1-key;
    }else{
      distance=key-distance1;
    }
    for(i=key;(f==0)&&(i!=key-distance);i+=distance){
      if(strcmp(H[i],str)==0)return 1; /*true*/
      if(i+distance>M){
    f=1;
    i=distance-(M-i);
      }
    }
  return 0;  /*false*/
}

int insert(char str[]){
  int key, h_1, h_2, h, i;
  key=getKey(str);
  h_1=h1(key);
  if(H[h_1][0]=='\0'){
    strcpy(H[h_1],str);
  }else{
    h_2=h2(key);
    for(i=0;;i++){
      h=(h_1+i*h_2)%M;
      if(H[h][0]=='\0')break;
      }
    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 'find':
main.c:92:1: error: expected declaration or statement at end of input
   92 | }
      | ^
Language: C

/* Search III */
#include<stdio.h>
#include<string.h>

#define M 1000003
#define L 13

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[]){
  int key,i,distance1,distance,f=0;
  key=getKey(str);
  key=h1(key);
  if(strcmp(H[key],str)==0){
    return 1;  /*true*/
  }else{
    distance1=(key+h2(key))%M;
    if(distance1>key){
      distance=distance1-key;
    }else{
      distance=key-distance1;
    }
    for(i=key;(f==0)&&(i!=key-distance);i+=distance){*/
    if(strcmp(H[i],str)==0)return 1; /*true*/
    if(i+distance>M){
    f=1;
    i=distance-(M-i);
      }
    }
  }
  return 0;  /*false*/
}

int insert(char str[]){
  int key, h_1, h_2, h, i;
  key=getKey(str);
  h_1=h1(key);
  if(H[h_1][0]=='\0'){
    strcpy(H[h_1],str);
  }else{
    h_2=h2(key);
    for(i=0;;i++){
      h=(h_1+i*h_2)%M;
      if(H[h][0]=='\0')break;
      }
    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 'find':
main.c:43:55: error: expected expression before '/' token
   43 |     for(i=key;(f==0)&&(i!=key-distance);i+=distance){*/
      |                                                       ^
Language: C


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

typedef unsigned int U;
#define L 1<<21
bool HA[L];
char T[256];

int main() {
    U n, s, t;
    char c;
    T['A'] = 1, T['C'] = 2, T['G'] = 3, T['T'] = 4;
    scanf("%d", &n);
    getchar();
    while (n--) {
        s = 0;
        t = 1;
        bool flag = ( c = getchar() ) == 'i';
        while ( ( c = getchar() ) != ' ' );
        while ( ( c = T[getchar()] ) != 0 ) {
            s += c * t;
            t *= 4;
        }
        if ( flag ) {
            HA[s] = true;
        } else {
            puts( HA[s] ? "yes" : "no" );
        }
    }
    return 0;
}

Compiler output:
main.c:7:1: error: unknown type name 'bool'
    7 | bool HA[L];
      | ^~~~
main.c:4:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    3 | #include <string.h>
  +++ |+#include <stdbool.h>
    4 | 
main.c: In function 'main':
main.c:19:9: error: unknown type name 'bool'
   19 |         bool flag = ( c = getchar() ) == 'i';
      |         ^~~~
main.c:19:9: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:26:21: error: 'true' undeclared (first use in this function)
   26 |             HA[s] = true;
      |                     ^~~~
main.c:26:21: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:26:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C


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

typedef unsigned int U;
#define L 1<<21
bool HA[L];
char T[256];

int main() {
    U n, s, t;
    char c;
    T['A'] = 1;
    T['C'] = 2;
    T['G'] = 3;
    T['T'] = 4;
    scanf("%d", &n);
    getchar();
    while (n--) {
        s = 0;
        t = 1;
        int flag = ( c = getchar() ) == 'i';
        while ( ( c = getchar() ) != ' ' );
        while ( ( c = T[getchar()] ) != 0 ) {
            s += c * t;
            t *= 4;
        }
        if ( flag ) {
            HA[s] = true;
        } else {
            puts( HA[s] ? "yes" : "no" );
        }
    }
    return 0;
}

Compiler output:
main.c:7:1: error: unknown type name 'bool'
    7 | bool HA[L];
      | ^~~~
main.c:4:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    3 | #include <string.h>
  +++ |+#include <stdbool.h>
    4 | 
main.c: In function 'main':
main.c:29:21: error: 'true' undeclared (first use in this function)
   29 |             HA[s] = true;
      |                     ^~~~
main.c:29:21: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:29:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C


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

typedef unsigned int U;
#define L 1<<21
char HA[L];
char T[256];

int main() {
    U n, s, t;
    char c;
    T['A'] = 1;
    T['C'] = 2;
    T['G'] = 3;
    T['T'] = 4;
    scanf("%d", &n);
    getchar();
    while (n--) {
        s = 0;
        t = 1;
        int flag = ( c = getchar() ) == 'i';
        while ( ( c = getchar() ) != ' ' );
        while ( ( c = T[getchar()] ) != 0 ) {
            s += c * t;
            t *= 4;
        }
        if ( flag ) {
            HA[s] = true;
        } else {
            puts( HA[s] ? "yes" : "no" );
        }
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:29:21: error: 'true' undeclared (first use in this function)
   29 |             HA[s] = true;
      |                     ^~~~
main.c:4:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    3 | #include <string.h>
  +++ |+#include <stdbool.h>
    4 | 
main.c:29:21: note: each undeclared identifier is reported only once for each function it appears in
   29 |             HA[s] = true;
      |                     ^~~~
Language: C

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

#define M 1000001//task
#define NIL (-1)
#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; }//task
int h2(int key){ return 1+key%(M-1); }//task

int find(char str[]){//task
  int i=0,j;
  while(1){
    j=(h1(getkey(str))+i*h2(getkey(str)))%M;
    if(H[j]!=NIL){
      if(strcmp(H[j],str)==0)
      break;
    }
    else i++;
    else{
      return 0;
      break;
    }
  }
}

int insert(char str[]){//task
  int i=0,j;
  while(1){
    j=(h1(getkey(str))+i*h2(getkey(str)))%M;
    if(H[j]==NIL){
      strcpy(H[dic],str);
      break;
    }
    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 'find':
main.c:33:11: error: implicit declaration of function 'getkey'; did you mean 'getKey'? [-Wimplicit-function-declaration]
   33 |     j=(h1(getkey(str))+i*h2(getkey(str)))%M;
      |           ^~~~~~
      |           getKey
main.c:34:12: warning: comparison between pointer and integer
   34 |     if(H[j]!=NIL){
      |            ^~
main.c:39:5: error: 'else' without a previous 'if'
   39 |     else{
      |     ^~~~
main.c: In function 'insert':
main.c:50:12: warning: comparison between pointer and integer
   50 |     if(H[j]==NIL){
      |            ^~
main.c:51:16: error: 'dic' undeclared (first use in this function)
   51 |       strcpy(H[dic],str);
      |                ^~~
main.c:51:16: 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 NIL (-1)
#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 % 13; }
int h2(int key){ return 1 + (key % 11); }

int find(char str[]){
  int x = h1(getKey(str));
  int y = h2(getKey(str));

  while(1){
    if(strcmp(H[x],str) == 0) return 1;
    if(strcmp(H[x],"\0") ==) break;
    x+=y;
  }
  return 0;
}

int insert(char str[]){
  int x = h1(getKey(str));
  int y = h2(getKey(str));

  while(1){
    if(strcmp(H[x],"\0") == 0){
      strcpy(H[x],str);
      return 1;
    }
    x+=y;
  }
  return NIL;
}

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:28: error: expected expression before ')' token
   36 |     if(strcmp(H[x],"\0") ==) break;
      |                            ^
Language: C

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

#define M (int)pow(5.0,12.0) - 1/* your task*/
#define NIL (-1)
#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[]){
	long long key;

	key = getKey(str);

	if(H[key][0] != '\0'){
		return 1;
	}else{
		return 0;
	}
    /* your task */

}

int insert(char str[]){
	long long key,i;

	key = getKey(str);
	for ( i = 0; i < strlen(str); i++ ){
    	H[key][i] = str[i];
  	}

  	return 0;

    /* your task */

}

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:6: error: variably modified 'H' at file scope
    9 | char H[M][L]; /* Hash Table */
      |      ^
main.c: In function 'h1':
main.c:28:18: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   28 | int h1(int key){ return /* your task */; }
      |                  ^~~~~~
main.c:28:5: note: declared here
   28 | int h1(int key){ return /* your task */; }
      |     ^~
main.c: In function 'h2':
main.c:29:18: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   29 | int h2(int key){ return /* your task */; }
      |                  ^~~~~~
main.c:29:5: note: declared here
   29 | int h2(int key){ return /* your task */; }
      |     ^~
Language: C

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

#define M 1000000  /* your task*/
#define NIL (-1)
#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;
}

long long h1(long long key){ return(key % M) /* your task */; }
long long h2(long long key){ return((key + 1) % M) /* your task */; }

int find(char str[]){

    /* your task */
	long long key, nkey;

	key = getKey(str);
	key = h1(key);
	if(H[key][0] == '\0'){
		return(1);
	}

	nkey = key;
	while(strcmp(H[nkey], str) != 0){
		nkey = h2(nkey);
		if((key == nkey) or (H[nkey][0] == '\0')){
			return(1);
		}
	}
	return(0);
}

int insert(char str[]){

    /* your task */
	long long key, nkey;

	key = getKey(str);
	key = h1(key);
	if(H[key][0] == '\0'){
		strcpy(H[key], str);
	}else{
		nkey = key;
		do{
			nkey = h2(nkey);
			if(H[nkey][0] == '\0'){
				strcpy(H[nkey], str);
				break;
			}
		}while(key != nkey);
		if(key == nkey){
			printf("???????????????");
			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) == 0){
				printf("yes\n");
			} else {
				printf("no\n");
			}
		}
    }

    return 0;
}

Compiler output:
main.c: In function 'find':
main.c:44:33: error: expected ')' before 'or'
   44 |                 if((key == nkey) or (H[nkey][0] == '\0')){
      |                   ~             ^~~
      |                                 )
Language: C

#include<cstdio>
#include<string>
#include<complex>
#include<cstdlib>
#include<cstring>
#include<numeric>
#include<iostream>
#include<set>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;
int n;
string str;
string mess;
set<string> ma;
int main(){
	scanf("%d\n",&n);
	rep(i,n){
		cin>>str>>mess;
		if(str[0]=='i'){
			ma.insert(mess);
		}else{
			if(ma.find(mess)!=ma.end()){
				cout <<"yes"<<endl;
			}else{
				cout <<"no"<<endl;
			}
		}
	}
	return 0;
}

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

#!/usr/bin/env python
# -*- coding:utf-8 -*-
#from __future__ import print_function
import time
import sys
import io
import re
import math
#start = time.clock()
#i = 0
a,b=[],[]
check = re.compile('insert')
n=input()
#while True:
for x in xrange(n):
    (i,f)=map(str, raw_input().split())
    if check.search(i):
        a.append(f)
    else:
#        b.append(f)
#print a
#print b
#for y in b:
        if f in a:
            print 'yes'
        else:
            print 'no'

Compiler output:
main.c:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/env python
      |  ^
main.c:2:3: error: invalid preprocessing directive #-
    2 | # -*- coding:utf-8 -*-
      |   ^
main.c:3:2: error: invalid preprocessing directive #from
    3 | #from __future__ import print_function
      |  ^~~~
main.c:4:1: error: unknown type name 'import'
    4 | import time
      | ^~~~~~
main.c:5:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'import'
    5 | import sys
      | ^~~~~~
main.c:5:1: error: unknown type name 'import'
main.c:9:2: error: invalid preprocessing directive #start
    9 | #start = time.clock()
      |  ^~~~~
main.c:10:2: error: invalid preprocessing directive #i; did you mean #if?
   10 | #i = 0
      |  ^
      |  if
main.c:12:20: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
   12 | check = re.compile('insert')
      |                    ^~~~~~~~
main.c:14:2: error: invalid preprocessing directive #while
   14 | #while True:
      |  ^~~~~
main.c:20:10: error: invalid preprocessing directive #b
   20 | #        b.append(f)
      |          ^
main.c:21:2: error: invalid preprocessing directive #print
   21 | #print a
      |  ^~~~~
main.c:22:2: error: invalid preprocessing directive #print
   22 | #print b
      |  ^~~~~
main.c:23:2: error: invalid preprocessing directive #for
   23 | #for y in b:
      |  ^~~
main.c:25:19: warning: multi-character character constant [-Wmultichar]
   25 |             print 'yes'
      |                   ^~~~~
main.c:27:19: warning: multi-character character constant [-Wmultichar]
   27 |             print 'no'
      |                   ^~~~
Language: C

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

#define WordLength 13
#define DictionarySize 1000000

#define M 100

#define Base 256

struct ALDS1_4_C{
	
	char word[WordLength];
	short isAvail;
	
};
typedef struct ALDS1_4_C ALDS;


void insert(char string[]);
int find(char string[]);
int hash(char string[]);
int pow(int value, int n);



ALDS dic[DictionarySize];

int main(void){
	
	int i, n;
	char order[10], string[WordLength];
	
	for(i=0; i<DictionarySize; i++){
		
		dic[i].isAvail = 0;
		
	}
	
	
	scanf("%d", &n);
	
	
	for(i=0; i<n; i++){
		
		scanf("%s %s", order, string);
		
		
		//do insert
		if(order[0] == 'i'){
			
			insert(string);
			
		}
		
		//do find
		else{
			
			if(find(string) == 1){
				
				printf("yes\n");
				
			}
			else{
				
				printf("no\n");
				
			}
			
		}
		
		
	}
	
	
	return 0;
	
}




void insert(char string[]){
	
	int idx = hash(string) % M;
	
	//printf("idx = %d\n", idx);
	
	if(dic[idx].isAvail == 0){
		
		strcpy(dic[idx].word, string);
		dic[idx].isAvail = 1;
		
	}
	
}



int find(char string[]){
	
	int idx = hash(string) % M;
	int ret = 0;
	
	//printf("idx = %d\n", idx);
	
	if(dic[idx].isAvail == 1){
		
		ret = 1;
		
	}
	
	return ret;
	
}



int hash(char string[]){
	
	int i;
	int ret = 0;
	int length = strlen(string);
	
	//printf("string = \"%s\"\n", string);
	
	for(i=0; i<length; i++){
		
		//printf("ret = %d\n", ret);
		//Sleep(1500);
		
		ret += ((int)string[i] * pow(Base, length-i-1)) % M;
		
	}
	
	return ret;
	
}


int pow(int value, int n){
	
	int ret = value;
	
	//printf("value = %d\n", value);
	
	while(n > 1){
		
		ret *= value;
		n--;
		
	}
	
	return ret;
	
}

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

#include<cstdio>
#include<string>
#include<vector>
#include<fstream>
#include<iostream>
#include<stdlib.h>
#include<math.h>
#include<cwctype>
#include<algorithm>
#include<math.h>

using namespace std;

bool data[5][5][5][5][5][5][5][5][5][5][5][5]={false};

void insert(string str){
	int count[12]={0};
	for(int i=0;i<str.size();i++){
		switch(str.at(i)){
		case 'A':count[i]=1;break;
		case 'T':count[i]=2;break;
		case 'C':count[i]=3;break;
		case 'G':count[i]=3;break;
		}
	
	
	}
	data[count[0]][count[1]][count[2]][count[3]][count[4]][count[5]][count[6]][count[7]][count[8]][count[9]][count[10]][count[11]]=true;
}

bool find(string str){
	int count[12]={0};
	for(int i=0;i<str.size();i++){
		switch(str.at(i)){
		case 'A':count[i]=1;break;
		case 'T':count[i]=2;break;
		case 'C':count[i]=3;break;
		case 'G':count[i]=3;break;
		}
	
	
	}
	return data[count[0]][count[1]][count[2]][count[3]][count[4]][count[5]][count[6]][count[7]][count[8]][count[9]][count[10]][count[11]];

}
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		string c,m;
		cin>>c>>m;
		if(c=="insert"){
		insert(m);
		}
		else{
			if(find(m))cout<<"yes"<<endl;
			else cout<<"no"<<endl;
		}

	}
	return 0;
}

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


#include<string>

#include<iostream>

using namespace std;

bool data[5][5][5][5][5][5][5][5][5][5][5][5]={false};

void insert(string str){
	int count[12]={0};
	for(int i=0;i<str.size();i++){
		switch(str.at(i)){
		case 'A':count[i]=1;break;
		case 'T':count[i]=2;break;
		case 'C':count[i]=3;break;
		case 'G':count[i]=3;break;
		}
	
	
	}
	data[count[0]][count[1]][count[2]][count[3]][count[4]][count[5]][count[6]][count[7]][count[8]][count[9]][count[10]][count[11]]=true;
}

bool find(string str){
	int count[12]={0};
	for(int i=0;i<str.size();i++){
		switch(str.at(i)){
		case 'A':count[i]=1;break;
		case 'T':count[i]=2;break;
		case 'C':count[i]=3;break;
		case 'G':count[i]=3;break;
		}
	
	
	}
	return data[count[0]][count[1]][count[2]][count[3]][count[4]][count[5]][count[6]][count[7]][count[8]][count[9]][count[10]][count[11]];

}
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		string c,m;
		cin>>c>>m;
		if(c=="insert"){
		insert(m);
		}
		else{
			if(find(m))cout<<"yes"<<endl;
			else cout<<"no"<<endl;
		}

	}
	return 0;
}

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

#include <stdio.h>

#define FOR( i, k, n ) for ( int i = ( k ); i < ( int )( n ); ++i )
#define REP( i, n ) FOR( i, 0, n )

#define MAX_S 12

bool Try[ MAX_S + 1 ][ 5 ];  // トライ木っぽいもの（A, C, G, T, \0）

int main() {
	char ch[ MAX_S + 1 ];
	int n;  scanf( "%d", &n );
	while( n-- ) {
		scanf( "%s", ch );
		if( ch[ 0 ] == 'i' ) {  // insert
			scanf( "%s", ch );
			REP( i, MAX_S + 1 ) {
				switch( ch[ i ] ) {
				case 'A' : Try[ i ][ 0 ] = true; break;
				case 'C' : Try[ i ][ 1 ] = true; break;
				case 'G' : Try[ i ][ 2 ] = true; break;
				case 'T' : Try[ i ][ 3 ] = true; break;
				case '\0' : Try[ i ][ 4 ] = true; break;
				};
				if( ch[ i ] == '\0' ) break;
			}
		} else {  // find
			bool find = true;
			scanf( "%s", ch );
			REP( i, MAX_S + 1 ) {
				int index;
				switch( ch[ i ] ) {
				case 'A' : index = 0; break;
				case 'C' : index = 1; break;
				case 'G' : index = 2; break;
				case 'T' : index = 3; break;
				case '\0' : index = 4; break;
				};
				if( !Try[ i ][ index ] ) {
					find = false;
					break;
				}
				if( ch[ i ] == '\0' ) break;
			}
			if( find ) printf( "yes\n" );
			else printf( "no\n" );
		}
	}
	return 0;
}

Compiler output:
main.c:8:1: error: unknown type name 'bool'
    8 | bool Try[ MAX_S + 1 ][ 5 ];  // トライ木っぽいもの（A, C, G, T, \0）
      | ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c: In function 'main':
main.c:19:60: error: 'true' undeclared (first use in this function)
   19 |                                 case 'A' : Try[ i ][ 0 ] = true; break;
      |                                                            ^~~~
main.c:19:60: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:19:60: note: each undeclared identifier is reported only once for each function it appears in
main.c:28:25: error: unknown type name 'bool'
   28 |                         bool find = true;
      |                         ^~~~
main.c:28:25: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:40:48: error: 'false' undeclared (first use in this function)
   40 |                                         find = false;
      |                                                ^~~~~
main.c:40:48: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

#include <iostream>

using namespace std; 

int Hash[244140625];
string s,o;

int getC(char c){
  if(c == 'A'){
    return 1;
  }else if(c == 'C'){
    return 2;
  }
  return c != 'G' ? 4 : 3;
}

int getKey(){
  int sum = 0, p = 1;
  
  for(int i = 0 ; i < s.size() ; i++){
    sum += p*(getC(s[i]));
    p *= 5;
  }
  return sum;
}

int main(){
  int n;

  ios::sync_with_stdio(false);
  cin.tie(0);
  
  cin >> n;
  while(n--){
    cin >> o >> s;
 
    if(o[0] == 'i'){
      Hash[getKey()] = 1;
    }else{
      if(Hash[getKey()]){
        puts("yes");
      }else{
        puts("no");
      }
    }
  }
 
  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 100
#define NIL (-1)
#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 h1(int key){ return key%M; }
int h2(int key){ return 1 + (key%(M-1)); }

int find(char str[]){
  long long key;
  int a1,a2,h3;
 
  key = getKey(str);
  a1 = h1(key);
  a2 = h2(key);
  while(1){
    h3 =(a1 +i*a2)%M;
    if(strcmp(str,H[h3])==0) return 1;
    else{
      if((h3==a1) || (H[h3][0] == '\0')){return 0; break;}
      if(M<=h3) h3 = h3-M;
    }
  }
}

void insert(char str[]){
  long long key;
  int a1,a2,h3;
  int i=0;
  
  key = getKey(str);
  a1=h1(key);
  a2=h2(key);
  if(H[a1][0] != '\0'){
    while(1){
      h3 =(a1 +i*a2)%M;
      if(M <= h3) h3 = h3-M;
      if(H[h3][0] == '\0') break;
      i++;
    }
  }
  strcpy(H[a1],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)){
	printf("yes\n");
      } else {
	printf("no\n");
      }
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'find':
main.c:38:14: error: 'i' undeclared (first use in this function)
   38 |     h3 =(a1 +i*a2)%M;
      |              ^
main.c:38:14: 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
#define NTL (-1)
#define L 14

char H[M][L]; /* Hash Table */
int count=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;
}

/* 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; }
//int h2(int key){ return key; }

int find(char str[]){
  int i;
  for(i=0; i<M ; i++){

    if(str[i][0]=='A'){
      if( strcmp(str,H[i])==0) return 1;}
    else if(str[i][0]=='C'){
      if( strcmp(str,H[i])==0) return 1;}

    else if(str[i][0]=='G'){
      if( strcmp(str,H[i])==0) return 1;}

    else if(str[i][0]=='T'){
      if( strcmp(str,H[i])==0) return 1;}



  }
   
  return NTL;

}

int insert(char str[]){

  strcpy(H[count],str);
  


count++;
  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: In function 'find':
main.c:35:14: error: subscripted value is neither array nor pointer nor vector
   35 |     if(str[i][0]=='A'){
      |              ^
main.c:37:19: error: subscripted value is neither array nor pointer nor vector
   37 |     else if(str[i][0]=='C'){
      |                   ^
main.c:40:19: error: subscripted value is neither array nor pointer nor vector
   40 |     else if(str[i][0]=='G'){
      |                   ^
main.c:43:19: error: subscripted value is neither array nor pointer nor vector
   43 |     else if(str[i][0]=='T'){
      |                   ^
Language: C

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

#define M 1000000
#define NTL (-1)
#define L 14

char H[M][L]; /* Hash Table */
int count=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;
}

/* 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; }
//int h2(int key){ return key; }

int find(char str[]){
  int i;
  for(i=0; i<M ; i++){

    if(str[0]=='A'){
      if( strcmp(str,H[i])==0) return 1;}
    else if(str[[0]=='C'){
      if( strcmp(str,H[i])==0) return 1;}

    else if(str[0]=='G'){
      if( strcmp(str,H[i])==0) return 1;}

    else if(str[0]=='T'){
      if( strcmp(str,H[i])==0) return 1;}



  }
   
  return NTL;

}

int insert(char str[]){

  strcpy(H[count],str);
  


count++;
  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: In function 'find':
main.c:37:17: error: expected expression before '[' token
   37 |     else if(str[[0]=='C'){
      |                 ^
Language: C

#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
   
#define M 1133331
#define NIL (-1)
#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 ii = getKey(str);
    int i,k;
    int hh1 = h1(ii);
    int hh2 = h2(ii);
    for (i = 0; i<M ; i++){
      k=(hh1 + i*hh2) % M;
      if (H[k][0] == '\0'){return 0;}
        else if (strcmp(H[k], str) == 0){ return 1; }
    }
    return 0;
    /* your task */
   
}
   
int insert(char str[]){
    long long ii = getKey(str);
    int hh1 = h1(ii);
    int hh2 = h2(ii);
    int i,k;
    for (i = 0; i<M; i++){
        k=(hh1 + i*hh2) % M;
        if (H[k][0]== '\0'){
            strcpy(H[(k], str);
            return 0;
        }
    }
    return 0;
    /* your task */
   
}
   
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:54:24: error: expected ')' before ']' token
   54 |             strcpy(H[(k], str);
      |                      ~ ^
      |                        )