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);
long long getKey(char);
int h1(int);
int h2(int);
int find(char);
int insert(char);




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:11:5: error: conflicting types for 'getchar'; have 'int(char)'
   11 | int getchar(char);
      |     ^~~~~~~
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:30:11: error: conflicting types for 'getKey'; have 'long long int(char *)'
   30 | long long getKey(char str[]){
      |           ^~~~~~
main.c:12:11: note: previous declaration of 'getKey' with type 'long long int(char)'
   12 | long long getKey(char);
      |           ^~~~~~
main.c:42:5: error: conflicting types for 'find'; have 'int(char *)'
   42 | int find(char str[]){
      |     ^~~~
main.c:15:5: note: previous declaration of 'find' with type 'int(char)'
   15 | int find(char);
      |     ^~~~
main.c: In function 'find':
main.c:45:9: error: implicit declaration of function 'getkey'; did you mean 'getKey'? [-Wimplicit-function-declaration]
   45 |   key = getkey(str);
      |         ^~~~~~
      |         getKey
main.c: At top level:
main.c:54:5: error: conflicting types for 'insert'; have 'int(char *)'
   54 | int insert(char str[]){
      |     ^~~~~~
main.c:16:5: note: previous declaration of 'insert' with type 'int(char)'
   16 | int insert(char);
      |     ^~~~~~
Language: C

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

int find();

#define N 100000

char str2[N][12];
int k;

int main(){

  int i, n, judge[N],l=0, b;
  char str[N][10];

  scanf("%d",&n);
  k=0;
  for(i=0;i<n;i++){

    scanf("%s",&str[i]);

    if(strcmp(str[i],"insert")==0){
      scanf("%s",str2[k]);
      k++;
    }
    else if(strcmp(str[i],"find")==0){
      str2[l]=find();
      l++;
    }
  }
  for(i=0;i<l;i++){
    if(judge[i] == 1)printf("yes\n");
    else if(judge[i] == 0)printf("no\n");
  }
  return 0;
}
int find(){
  char a[12];
  int j;

  scanf("%s",a);
  for(j=0;j<k;j++){
    if(strcmp(str2[j],a)==0) return 1;
  }
    else return 0;
}
 

Compiler output:
main.c: In function 'main':
main.c:28:14: error: assignment to expression with array type
   28 |       str2[l]=find();
      |              ^
main.c: In function 'find':
main.c:46:5: error: 'else' without a previous 'if'
   46 |     else return 0;
      |     ^~~~
Language: C

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

int find();

#define N 100000

char str2[N][12];
int k;

int main(){

  int i, n, judge[N],l=0;
  char str[N][10];

  scanf("%d",&n);
  k=0;
  for(i=0;i<n;i++){

    scanf("%s",&str[i]);

    if(strcmp(str[i],"insert")==0){
      scanf("%s",str2[k]);
      k++;
    }
    else if(strcmp(str[i],"find")==0){
      judge[l]=find();
      l++;
    }
  }
  for(i=0;i<l;i++){
    if(judge[i] == 1)printf("yes\n");
    else if(judge[i] == 0)printf("no\n");
  }
  return 0;
}
int find(){
  char a[12];
  int j;

  scanf("%s",a);
  for(j=0;j<k;j++){
    if(strcmp(str2[j],a)==0) return 1;
  }
    else return 0;
}
 

Compiler output:
main.c: In function 'find':
main.c:46:5: error: 'else' without a previous 'if'
   46 |     else return 0;
      |     ^~~~
Language: C

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

int find();

#define N 100000

char str2[N][12];
int k;

int main(){

  int i, n, judge[N],l=0;
  char str[N][10];

  scanf("%d",&n);
  k=0;
  for(i=0;i<n;i++){

    scanf("%s",&str[i]);

    if(strcmp(str[i],"insert")==0){
      scanf("%s",str2[k]);
      k++;
    }
    else {
      judge[l]=find();
      l++;
    }
  }
  for(i=0;i<l;i++){
    if(judge[i] == 1)printf("yes\n");
    else printf("no\n");
  }
  return 0;
}
int find(){
  char a[12];
  int j;

  scanf("%s",a);
  for(j=0;j<k/2;j++){
    if(strcmp(str2[j],a)==0) return 1;
    else if(str2[k-1-j],a)==0) return 1;
  }
    return 0;
}
 

Compiler output:
main.c: In function 'find':
main.c:45:27: error: expected expression before '==' token
   45 |     else if(str2[k-1-j],a)==0) return 1;
      |                           ^~
main.c:45:30: error: expected statement before ')' token
   45 |     else if(str2[k-1-j],a)==0) return 1;
      |                              ^
Language: C

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

int main(){
  int i,j,n,dicid = 0, findid = 0, found;
  char command[], str[];

  scanf("%d", &n);
  char dic[][];
  int flag[];
  for(i = 0; i < n; i++){
    scanf("%s%s", command, str);

    if( strcmp(command, "insert") == 0 ){
      found = 0;
      for(j = 0; j < i; j++){
        if( strcmp(dic[j], str) == 0 ){
          found = 1;
          break;
        }
      }
      if(found == 0){
        strcpy(dic[dicid], str);
        dicid++;
      }
    }

    if( strcmp(command, "find") == 0 ){
      found = 0;
      for(j = 0; j < i; j++){
        if( strcmp(dic[j], str) == 0 ){
          flag[findid] = 1;
          findid++;
          found = 1;
          break;
        }
      }
      if(found == 0){
        flag[findid] = 0;
        findid++;
      }
    }
  }

  for(i = 0; i < findid; i++){
    if(flag[i] == 1)
      printf("yes\n");
    else
      printf("no\n");
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:8: error: array size missing in 'command'
    7 |   char command[], str[];
      |        ^~~~~~~
main.c:7:19: error: array size missing in 'str'
    7 |   char command[], str[];
      |                   ^~~
main.c:10:8: error: array type has incomplete element type 'char[]'
   10 |   char dic[][];
      |        ^~~
main.c:10:8: note: declaration of 'dic' as multidimensional array must have bounds for all dimensions except the first
main.c:11:7: error: array size missing in 'flag'
   11 |   int flag[];
      |       ^~~~
Language: C

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

#define M /* 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 */; }
int h2(int key){ return /* your task */; }

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){
    strcpy(H[h],str);
    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 '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 'find':
main.c:33:26: error: expected expression before ';' token
   33 |   h-(h1(key)+i*h2(key))%M;
      |                          ^
main.c: In function 'insert':
main.c:48:26: error: expected expression before ';' token
   48 |   h=(h1(key)+i*h2(key))%M;
      |                          ^
main.c: At top level:
main.c:61:1: error: expected identifier or '(' before '}' token
   61 | }
      | ^
main.c: In function 'main':
main.c:66:23: error: expected expression before ';' token
   66 |     for ( i = 0; i < M; i++ ) H[i][0] = '\0';
      |                       ^
main.c: At top level:
main.c:7:6: warning: array 'H' assumed to have one element
    7 | char H[M][L]; /* Hash Table */
      |      ^
Language: C

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

#define M 1046527
#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,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 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 '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: At top level:
main.c:61:1: error: expected identifier or '(' before '}' token
   61 | }
      | ^
Language: C

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

#define MAX 1000000
#define NIL -1
#define L 12

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

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' ){
      if (insert(str)){

      }
    } else {
      if (find(str) ){
        printf("yes\n");
      } else {
        printf("no\n");
      }
    }
  }
  return 0;
}

Compiler output:
main.c:8:8: error: 'M' undeclared here (not in a function)
    8 | char H[M][L];
      |        ^
main.c: In function 'insert':
main.c:72:1: error: expected declaration or statement at end of input
   72 | }
      | ^
main.c:72:1: error: expected declaration or statement at end of input
Language: C

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

#define MAX 1000000
#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;
}

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' ){
      if (insert(str)){

      }
    } else {
      if (find(str) ){
        printf("yes\n");
      } else {
        printf("no\n");
      }
    }
  }
  return 0;
}

Compiler output:
main.c:8:8: error: 'M' undeclared here (not in a function)
    8 | char H[M][L];
      |        ^
main.c: In function 'insert':
main.c:72:1: error: expected declaration or statement at end of input
   72 | }
      | ^
main.c:72:1: error: expected declaration or statement at end of input
Language: C

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

#define MAX 1050000
#define NIL -1
#define L 12

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

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' ){
      if (insert(str)){

      }
    } else {
      if (find(str) ){
        printf("yes\n");
      } else {
        printf("no\n");
      }
    }
  }
  return 0;
}

Compiler output:
main.c:8:8: error: 'M' undeclared here (not in a function)
    8 | char H[M][L];
      |        ^
main.c: In function 'insert':
main.c:72:1: error: expected declaration or statement at end of input
   72 | }
      | ^
main.c:72:1: error: expected declaration or statement at end of input
Language: C

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

#define MAX 1050000
#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;
}

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' ){
      if (insert(str)){

      }
    } else {
      if (find(str) ){
        printf("yes\n");
      } else {
        printf("no\n");
      }
    }
  }
  return 0;
}

Compiler output:
main.c:8:8: error: 'M' undeclared here (not in a function)
    8 | char H[M][L];
      |        ^
main.c: In function 'insert':
main.c:72:1: error: expected declaration or statement at end of input
   72 | }
      | ^
main.c:72:1: error: expected declaration or statement at end of input
Language: C

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

#define MAX 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;
}

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' ){
      if (insert(str)){

      }
    } else {
      if (find(str) ){
        printf("yes\n");
      } else {
        printf("no\n");
      }
    }
  }
  return 0;
}

Compiler output:
main.c:8:8: error: 'M' undeclared here (not in a function)
    8 | char H[M][L];
      |        ^
main.c: In function 'insert':
main.c:72:1: error: expected declaration or statement at end of input
   72 | }
      | ^
main.c:72:1: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
#include<string.h>
char a[1<<12],k[256];
int main(){
  int l;
  int f,s,t;
  car c;
  k['T'] = 1;
  k['G'] = 2;
  k['C'] = 3;
  k['A'] = 4;
  
  scanf("%d", &f);
  getchar();
  while (f--) {
    s = 0;
    t = 1;
    l = ( c = getchar() ) == 'i';
    while ( ( c = getchar() ) != ' ' );
    while ( ( c = k[getchar()] ) != 0 ) {
      s += c * t;
      t *= 4;
    }
    if (l) a[s] = 1; else puts( a[s] ? "yes" : "no" );
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:3: error: unknown type name 'car'; did you mean 'char'?
    7 |   car c;
      |   ^~~
      |   char
Language: C

#include<stdio.h>
#include<string.h>
 
#define M 1000003
#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;
    }
    return 0;
}
 
long long getK(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 hash1(int k) {
    return k % M;
}
 
int hash2(int k) {
    return 1 + k % (M - 1);
}
 
int getHashValue(char str[], int i) {
    return (hash1(getKey(str)) + i * hash2(getKey(str))) % M;
}
 
int find(char str[]) {
    int hash, i = 0;
 
    while (1) {
        hashval = getHashValue(str, i);
        if (!strcmp(H[hash], str)) return 1;
        if (!strcmp(H[hash], "\0")) return 0;
        i++;
    }
}
 
void insert(char str[]) {
    int hash, i = 0;
 
    while (1) {
        hash = getHashValue(str, i);
        if (!strcmp(H[hash], "\0")) {
            strcpy(H[hash], str);
            break;
        }
        i++;
    }
}
 
int main() {
    int i, n;
    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 'getHashValue':
main.c:43:19: error: implicit declaration of function 'getKey'; did you mean 'getK'? [-Wimplicit-function-declaration]
   43 |     return (hash1(getKey(str)) + i * hash2(getKey(str))) % M;
      |                   ^~~~~~
      |                   getK
main.c: In function 'find':
main.c:50:9: error: 'hashval' undeclared (first use in this function); did you mean 'hash'?
   50 |         hashval = getHashValue(str, i);
      |         ^~~~~~~
      |         hash
main.c:50:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<string.h>
 
#define M 1000003
#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;
    }
    return 0;
}
 
long long getK(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 hash1(int k) {
    return k % M;
}
 
int hash2(int k) {
    return 1 + k % (M - 1);
}
 
int getHashValue(char str[], int i) {
    return (hash1(getKey(str)) + i * hash2(getKey(str))) % M;
}
 
int find(char str[]) {
    int hash, i = 0;
 
    while (1) {
        hash = getHashValue(str, i);
        if (!strcmp(H[hash], str)) return 1;
        if (!strcmp(H[hash], "\0")) return 0;
        i++;
    }
}
 
void insert(char str[]) {
    int hash, i = 0;
 
    while (1) {
        hash = getHashValue(str, i);
        if (!strcmp(H[hash], "\0")) {
            strcpy(H[hash], str);
            break;
        }
        i++;
    }
}
 
int main() {
    int i, n;
    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 'getHashValue':
main.c:43:19: error: implicit declaration of function 'getKey'; did you mean 'getK'? [-Wimplicit-function-declaration]
   43 |     return (hash1(getKey(str)) + i * hash2(getKey(str))) % M;
      |                   ^~~~~~
      |                   getK
Language: C

#include <stdio.h> 
int main() {
  char HIRA[1<<21], Ryo[256],cg;
  unsigned int an, as, at;
  Ryo['A'] = 4;
  Ryo['C'] = 3;
  Ryo['G'] = 2;
  Ryo['T'] = 1;
  scanf("%d", &an);
  getchar();
  while (an--) {
    as = 0;
    at = 1;
    int hata = ( cg = getchar() ) == 'i';
    while ( ( cg = getchar() ) != ' ' );
    while ( ( cg = Ryo[getchar()] ) != 0 ) {
      as += cg * t;
      at *= 4;
    }
    if ( hata ) HIRA[as] = 1; else puts( HIRA[as] ? "yes" : "no" );
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:18: error: 't' undeclared (first use in this function); did you mean 'at'?
   17 |       as += cg * t;
      |                  ^
      |                  at
main.c:17:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h> 
#include <string.h>
int main() {
  char HIRA[1<<21], Ryo[256],cg;
  unsigned int an, as, at;
  Ryo['A'] = 4;
  Ryo['C'] = 3;
  Ryo['G'] = 2;
  Ryo['T'] = 1;
  scanf("%d", &an);
  getchar();
  while (an--) {
    as = 0;
    at = 1;
    int hata = ( cg = getchar() ) == 'i';
    while ( ( cg = getchar() ) != ' ' );
    while ( ( cg = Ryo[getchar()] ) != 0 ) {
      as += cg * t;
      at *= 4;
    }
    if ( hata ) HIRA[as] = 1; else puts( HIRA[as] ? "yes" : "no" );
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:18: error: 't' undeclared (first use in this function); did you mean 'at'?
   18 |       as += cg * t;
      |                  ^
      |                  at
main.c:18:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

  char HIRA[1<<21], Ryo[256],cg;
int main() {
  unsigned int an, as, at;
  Ryo['A'] = 4;
  Ryo['C'] = 3;
  Ryo['G'] = 2;
  Ryo['T'] = 1;
  scanf("%d", &an);
  getchar();
  while (an--) {
    as = 0;
    at = 1;
    int hata = ( cg = getchar() ) == 'i';
    while ( ( cg = getchar() ) != ' ' );
    while ( ( cg = Ryo[getchar()] ) != 0 ) {
      as += cg * t;
      at *= 4;
    }
    if ( hata ) HIRA[as] = 1; else puts( HIRA[as] ? "yes" : "no" );
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:18: error: 't' undeclared (first use in this function); did you mean 'at'?
   19 |       as += cg * t;
      |                  ^
      |                  at
main.c:19:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<string.h>
char hira[1<<21],sawa[256];
int main(int argc,char *argv[]){
    int hata;
    int fu,s,t;
    chirar c;
    sawa['T'] = 1;
    sawa['G'] = 2;
    sawa['C'] = 3;
    sawa['A'] = 4;
     
    scanf("%d", &fu);
    getchar();
    while (fu--) {
        s = 0;
        t = 1;
        hata = ( c = getchar() ) == 'i';
        while ( ( c = getchar() ) != ' ' );
        while ( ( c = sawa[getchar()] ) != 0 ) {
            s += c * t;
            t *= 4;
        }
        if (hata) hira[s] = 1; else puts( hira[s] ? "yes" : "no" );
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:5: error: unknown type name 'chirar'; did you mean 'char'?
    7 |     chirar c;
      |     ^~~~~~
      |     char
Language: C

#include <stdio.h>
#include <string.h>
 
#define M 1000007
#define L 14
int getChar(char ch){
  if ( ch == 'A') return 1;
  else if ( ch == 'C') return 2;
  else if ( ch == 'G') return 3;
  else if ( ch == 'T') return 4;
}
long long getKey(char s[]){
  long long sum = 0, p = 1, i;
  for ( i = 0; i < slen(s); i++ ){
    sum += p*(getChar(s[i]));
    p *= 5;
  }
  return sum;
}
 
int h1(int key){ 
  return key % M; 
}
int h2(int key){ 
  return 1 + (key % (M + 1)); 
}
 
int find(char s[]){
  int i;
  long key;//long key;
  key = getKey(s);
  for(i = 0; i < M; i++){
    if(Hs[(h1(key) + i * h2(key)) % M][0] == '\0') return 0;
    if(scmp(Hs[(h1(key) + i * h2(key)) % M], s) == 0) return 1;
  }
  return 0;
}
 
int insert(char s[]){
   
  int i =0;
  long key;//long key;
 
  key = getKey(s);
 
  while(1){
    if(i == M) break;
    if(Hs[(h1(key) + i * h2(key)) % M][0] == '\0'){
      scpy(Hs[(h1(key) + i * h2(key)) % M],s);
      return 0;
    }
    else i++;
  }
}
 
int main(){
  int i, n, h;
  char s[L], cm[9];
  for ( i = 0; i < M; i++ ) {
    Hs[i][0] = '\0';
  } 
  scanf("%d", &n);
   
  for ( i = 0; i < n; i++ ){
    scanf("%s %s", cm, s);    
    if ( cm[0] == 'i' ){
      insert(s);
    } 
    else {
      if(find(s)) {
        printf("yes\n");
      }
      else {
        printf("no\n");
      }
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'getKey':
main.c:14:20: error: implicit declaration of function 'slen'; did you mean 'strlen'? [-Wimplicit-function-declaration]
   14 |   for ( i = 0; i < slen(s); i++ ){
      |                    ^~~~
      |                    strlen
main.c: In function 'find':
main.c:33:8: error: 'Hs' undeclared (first use in this function); did you mean 's'?
   33 |     if(Hs[(h1(key) + i * h2(key)) % M][0] == '\0') return 0;
      |        ^~
      |        s
main.c:33:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:34:8: error: implicit declaration of function 'scmp'; did you mean 'bcmp'? [-Wimplicit-function-declaration]
   34 |     if(scmp(Hs[(h1(key) + i * h2(key)) % M], s) == 0) return 1;
      |        ^~~~
      |        bcmp
main.c: In function 'insert':
main.c:48:8: error: 'Hs' undeclared (first use in this function); did you mean 's'?
   48 |     if(Hs[(h1(key) + i * h2(key)) % M][0] == '\0'){
      |        ^~
      |        s
main.c:49:7: error: implicit declaration of function 'scpy'; did you mean 'stpcpy'? [-Wimplicit-function-declaration]
   49 |       scpy(Hs[(h1(key) + i * h2(key)) % M],s);
      |       ^~~~
      |       stpcpy
main.c: In function 'main':
main.c:60:5: error: 'Hs' undeclared (first use in this function); did you mean 's'?
   60 |     Hs[i][0] = '\0';
      |     ^~
      |     s
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
 
#define M 1000007
#define L 14
int getChar(char ch){
  if ( ch == 'A') return 1;
  else if ( ch == 'C') return 2;
  else if ( ch == 'G') return 3;
  else if ( ch == 'T') return 4;
}
long long getKey(char s[]){
  long long sum = 0, p = 1, i;
  for ( i = 0; i < slen(s); i++ ){
    sum += p*(getChar(s[i]));
    p *= 5;
  }
  return sum;
}
 
int h1(int key){ 
  return key % M; 
}
int h2(int key){ 
  return 1 + (key % (M + 1)); 
}
 
int find(char s[]){
  int i;
  long key;//long key;
  key = getKey(s);
  for(i = 0; i < M; i++){
    if(Hs[(h1(key) + i * h2(key)) % M][0] == '\0') return 0;
    if(scmp(Hs[(h1(key) + i * h2(key)) % M], s) == 0) return 1;
  }
  return 0;
}
 
int insert(char s[]){
   
  int i =0;
  long key;//long key;
 
  key = getKey(s);
 
  while(1){
    if(i == M) break;
    if(Hs[(h1(key) + i * h2(key)) % M][0] == '\0'){
      scpy(Hs[(h1(key) + i * h2(key)) % M],s);
      return 0;
    }
    else i++;
  }
}
 
int main(){
  int i, n, h;
  char s[L], cm[9];
  for ( i = 0; i < M; i++ ) {
    Hs[i][0] = '\0';
  } 
  scanf("%d", &n);
   
  for ( i = 0; i < n; i++ ){
    scanf("%s %s", cm, s);    
    if ( cm[0] == 'i' ){
      insert(s);
    } 
    else {
      if(find(s)) {
        printf("yes\n");
      }
      else {
        printf("no\n");
      }
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'getKey':
main.c:15:20: error: implicit declaration of function 'slen'; did you mean 'strlen'? [-Wimplicit-function-declaration]
   15 |   for ( i = 0; i < slen(s); i++ ){
      |                    ^~~~
      |                    strlen
main.c: In function 'find':
main.c:34:8: error: 'Hs' undeclared (first use in this function); did you mean 's'?
   34 |     if(Hs[(h1(key) + i * h2(key)) % M][0] == '\0') return 0;
      |        ^~
      |        s
main.c:34:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:35:8: error: implicit declaration of function 'scmp'; did you mean 'bcmp'? [-Wimplicit-function-declaration]
   35 |     if(scmp(Hs[(h1(key) + i * h2(key)) % M], s) == 0) return 1;
      |        ^~~~
      |        bcmp
main.c: In function 'insert':
main.c:49:8: error: 'Hs' undeclared (first use in this function); did you mean 's'?
   49 |     if(Hs[(h1(key) + i * h2(key)) % M][0] == '\0'){
      |        ^~
      |        s
main.c:50:7: error: implicit declaration of function 'scpy'; did you mean 'stpcpy'? [-Wimplicit-function-declaration]
   50 |       scpy(Hs[(h1(key) + i * h2(key)) % M],s);
      |       ^~~~
      |       stpcpy
main.c: In function 'main':
main.c:61:5: error: 'Hs' undeclared (first use in this function); did you mean 's'?
   61 |     Hs[i][0] = '\0';
      |     ^~
      |     s
Language: C

#include <stdio.h>
#include <string.h>
 
#define M 1000999 
#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;
}

int getKey(char str[]){
  int 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 s[]){
 
  int i = 0,num;
 
  while(1){
    num = (h1(getKey(s)) + i * h2(getKey(s))) % M;
 
    if(H[num][0] == '\0') return 0;    
 
    if(strcmp(H[num],s) == 0){
      return 1;
    }
  i++;
 
  }
 
}
 
void insert(char s[]){
 
  int i=0,num;
 
  while(1){
    num = (h1(getKey(s)) + i *h2(getKey(s))) % M;
     
    if(H[num][0] == '\0'){  
      strcpy(H[num],s);
      return;
    } 
    i++;
  }
   
}
 
 
int main(){
    int i, n, h;
    char s[L], cm[9];
    for ( i = 0; i < M; i++ ) H[i][0] = '\0';
    scanf("%d", &n);
    for ( i = 0; i < n; i++ ){
      scanf("%s %s", cm, s);
      if ( com[0] == 'i' ){
          insert(s);
      } else {
          if (find(s)){
            printf("yes\n");
          } else {
          printf("no\n");
        }
      }
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:75:12: error: 'com' undeclared (first use in this function); did you mean 'cm'?
   75 |       if ( com[0] == 'i' ){
      |            ^~~
      |            cm
main.c:75:12: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <string.h>
 
char str[15];
char a[10000000];
 
int find(void);
void insert(void);
int getchar(char);
int getkey(void);
 
int main(){
    int i,j,n;
    char b[7];
 
    scanf("%d",&n);
 
    for(i=0;i<n;i++){
        scanf("%s %s",b,str);
        if(b[0]=='i'){
            insert();
        }
        else if(b[0]=='f'){
            if(find())printf("yes\n");
            else printf("no\n");
        }
    }
    return 0;
}
 
int find(){
    int key = getkey();
     
    if(a[key]) return 1;
    else return 0;
}

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

void insert(){
    a[getkey()] = 1;
}

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

Compiler output:
main.c:9:5: error: conflicting types for 'getchar'; have 'int(char)'
    9 | int getchar(char);
      |     ^~~~~~~
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:51:5: error: conflicting types for 'getchar'; have 'int(char)'
   51 | int getchar(char c){
      |     ^~~~~~~
/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 1000001
#define L 14
 
char Hash[M][L]; 
 
int getChar(char);
long long getKey(char[]);
int key(int);
int key(int);
int insert(char[]);
 
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 hash1(int key){ 
  return key%M; 
}


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

 
int find(char str[]){
 long long key;
 int i,x,y,sum;
 
 key = getKey(str);
 x = hash1(key);
 y = hash2(key);
 
 for( i = 0 ; i < M ; i++ ){
     sum = (x+i*y)%M;
     if( strcmp(H[sum],str) == 0 )
       return 1;
     else if( H[sum][0] == '\0' )
         return 0;
   }
 return 0;
}
 
int insert(char str[]){
 long long key;
 int i,x,y,sum;
 
 key = getKey(str);
 x = hash1(key);
 y = hash2(key);
 
 for( i = 0 ; i < M ; i++ )
   {
     sum = (x+i*y)%M;
     if( strcmp(Hash[sum],str) == 0 )
       return 1;
     else if( Hash[sum][0] == '\0' )
       {
	 strcpy(Hash[sum],str);
	 return 0;
       }
   }
 return 0;
}
 
int main(){
  int i, n, h;
  char str[L], com[9];
  
  for ( i = 0; i < M; i++ ) 
    Hash[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:53:17: error: 'H' undeclared (first use in this function)
   53 |      if( strcmp(H[sum],str) == 0 )
      |                 ^
main.c:53:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<string.h>
 
#define M 1000001
#define L 14
 
char Hash[M][L]; 
 
int getChar(char);
long long getKey(char[]);
int key(int);
int key(int);
int insert(char[]);
 
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 hash1(int key){ 
  return key%M; 
}


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

 
int find(char str[]){
 long long key;
 int i,x,y,sum;
 
 key = getKey(str);
 x = hash1(key);
 y = hash2(key);
 
 for( i = 0 ; i < M ; i++ ){
     sum = (x+i*y)%M;
     if( strcmp(Hash[sum],str) == 0 )
       return 1;
     else if( H[sum][0] == '\0' )
         return 0;
   }
 return 0;
}
 
int insert(char str[]){
 long long key;
 int i,x,y,sum;
 
 key = getKey(str);
 x = hash1(key);
 y = hash2(key);
 
 for( i = 0 ; i < M ; i++ )
   {
     sum = (x+i*y)%M;
     if( strcmp(Hash[sum],str) == 0 )
       return 1;
     else if( Hash[sum][0] == '\0' )
       {
	 strcpy(Hash[sum],str);
	 return 0;
       }
   }
 return 0;
}
 
int main(){
  int i, n, h;
  char str[L], com[9];
  
  for ( i = 0; i < M; i++ ) 
    Hash[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:55:15: error: 'H' undeclared (first use in this function)
   55 |      else if( H[sum][0] == '\0' )
      |               ^
main.c:55:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

#define INF 1000000
#define N 12

int main(){
	
	int i, j, n, c = 0;
	char arr[10], str[12], d[INF][N];
	
	scanf("%d", &n);
	
	for( i = 0; i < n; i++){
		
		scanf("%s", arr);
		
		if( arr[0] == 'i'){
			
			scanf("%s",str);
			
			d[c] = str;
			c++;
		}
		
		if( arr[0] = 'f'){
			
			scanf("%s",str);
			
			for( j = 0; j < c; j++){
				
				if( strcmp( d[j], str)){
				printf("yes\n");
				break;
				}
			}
			else{
			printf("no\n");
		}
		}
	}
			return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:30: error: assignment to expression with array type
   22 |                         d[c] = str;
      |                              ^
main.c:37:25: error: expected '}' before 'else'
   37 |                         else{
      |                         ^~~~
main.c: At top level:
main.c:42:25: error: expected identifier or '(' before 'return'
   42 |                         return 0;
      |                         ^~~~~~
main.c:43:1: error: expected identifier or '(' before '}' token
   43 | }
      | ^
Language: C

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

#define INF 1000000
#define N 12

int main(){

int i, j, n, c = 0;
char arr[10], str[N], d[INF][N];

scanf("%d", &n);

for( i = 0; i < n; i++){

scanf("%s", arr);

if( arr[0] == 'i'){

scanf("%s",str);

d[c] = str;
c++;
}

else if( arr[0] = 'f'){

scanf("%s",str);

for( j = 0; j < c; j++){

if( strcmp( d[j], str == 0)){
printf("yes\n");
break;
}
}
else{
printf("no\n");
}
}
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:6: error: assignment to expression with array type
   22 | d[c] = str;
      |      ^
main.c:32:23: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   32 | if( strcmp( d[j], str == 0)){
      |                   ~~~~^~~~
      |                       |
      |                       int
In file included from main.c:2:
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'int'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:37:1: error: expected '}' before 'else'
   37 | else{
      | ^~~~
main.c: At top level:
main.c:42:1: error: expected identifier or '(' before 'return'
   42 | return 0;
      | ^~~~~~
main.c:43:1: error: expected identifier or '(' before '}' token
   43 | }
      | ^
Language: C

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

#define INF 1000000
#define N 12

int main(){

int i, j, n, c = 0, f = 0;
char arr[10], str[N], d[INF][N];

scanf("%d", &n);

for( i = 0; i < n; i++){

scanf("%s", arr);

if( arr[0] == 'i'){

scanf("%s",str);

d[c] = str;
c++;
}

else if( arr[0] = 'f'){

scanf("%s",str);

for( j = 0; j < c; j++){

if( strcmp( d[j], str == 0)){
f = 1;
printf("yes\n");
break;
}
}
if( f != 1){
printf("no\n");
}
}
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:6: error: assignment to expression with array type
   22 | d[c] = str;
      |      ^
main.c:32:23: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   32 | if( strcmp( d[j], str == 0)){
      |                   ~~~~^~~~
      |                       |
      |                       int
In file included from main.c:2:
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'int'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
Language: C

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

#define INF 1000000
#define N 13

int main(){

int i, j, n, c = 0, f = 0;
char arr[10], str[N], d[INF][N];

scanf("%d", &n);

for( i = 0; i < n; i++){

scanf("%s", arr);

if( arr[0] == 'i'){

scanf("%s",str);

d[c][] = str;
c++;
}

else if( arr[0] = 'f'){

scanf("%s",str);

for( j = 0; j < c; j++){

if( strcmp( d[j][], str == 0)){
f = 1;
printf("yes\n");
break;
}
}
if( f != 1){
printf("no\n");
}
}
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:6: error: expected expression before ']' token
   22 | d[c][] = str;
      |      ^
main.c:32:18: error: expected expression before ']' token
   32 | if( strcmp( d[j][], str == 0)){
      |                  ^
Language: C

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

#define INF 1000000
#define N 13

int main(){

int i, j, n, c = 0, f = 0;
char arr[10], str[N], d[INF][N];

scanf("%d", &n);

for( i = 0; i < n; i++){

scanf("%s", arr);

if( arr[0] == 'i'){

scanf("%s",str);

d[c][0] = &str;
c++;
}

else if( arr[0] = 'f'){

scanf("%s",str);

for( j = 0; j < c; j++){

if( strcmp( d[j], str) == 0){
f = 1;
printf("yes\n");
break;
}
}
if( f != 1){
printf("no\n");
}
}

Compiler output:
main.c: In function 'main':
main.c:22:9: error: assignment to 'char' from 'char (*)[13]' makes integer from pointer without a cast [-Wint-conversion]
   22 | d[c][0] = &str;
      |         ^
main.c:41:1: error: expected declaration or statement at end of input
   41 | }
      | ^
main.c:41:1: error: expected declaration or statement at end of input
Language: C

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

#define INF 1000000
#define N 13

int main(){

int i, j, n, c = 0, f = 0;
char arr[10], str[N], d[INF][N];

scanf("%d", &n);

for( i = 0; i < n; i++){

scanf("%s", arr);

if( arr[0] == 'i'){

scanf("%s",str);

d[c][0] = &str;
c++;
}

else if( arr[0] = 'f'){

scanf("%s",str);

for( j = 0; j < c; j++){

if( strcmp( d[j], str)) == 0){
f = 1;
printf("yes\n");
break;
}
}
if( f != 1){
printf("no\n");
}
}

Compiler output:
main.c: In function 'main':
main.c:22:9: error: assignment to 'char' from 'char (*)[13]' makes integer from pointer without a cast [-Wint-conversion]
   22 | d[c][0] = &str;
      |         ^
main.c:32:25: error: expected expression before '==' token
   32 | if( strcmp( d[j], str)) == 0){
      |                         ^~
main.c:32:29: error: expected statement before ')' token
   32 | if( strcmp( d[j], str)) == 0){
      |                             ^
main.c:41:1: error: expected declaration or statement at end of input
   41 | }
      | ^
main.c:41:1: error: expected declaration or statement at end of input
Language: C

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

#define INF 1000000
#define N 13

int main(){

int i, j, n, c = 0, f = 0;
char arr[10], str[N], d[INF][N];

scanf("%d", &n);

for( i = 0; i < n; i++){

scanf("%s", arr);

if( arr[0] == 'i'){

scanf("%s",str);

d[c][0] = &str;
c++;
}

else if( arr[0] == 'f'){

scanf("%s",str);

for( j = 0; j < c; j++){

if( strcmp( d[j], str) == 0){
f = 1;
printf("yes\n");
break;
}
}
if( f != 1){
printf("no\n");
}
}

Compiler output:
main.c: In function 'main':
main.c:22:9: error: assignment to 'char' from 'char (*)[13]' makes integer from pointer without a cast [-Wint-conversion]
   22 | d[c][0] = &str;
      |         ^
main.c:41:1: error: expected declaration or statement at end of input
   41 | }
      | ^
main.c:41:1: error: expected declaration or statement at end of input
Language: C

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

#define N 13

int main(){

int n, c = 0, f = 0, j;
char arr[N], str[N], d[1000000][N];

scanf("%d", &n);

for( i = 0; i < n; i++){

scanf("%s", arr);

if( arr[0] == 'i'){

scanf("%s",d[c]);
c++;

}

else if( arr[0] == 'f'){

scanf("%s", str);

for( j = 0; j < c; j++){

if( strcmp( d[c],str) == 0){
f = 1;
printf("yes\n");

}
}
if( f != 1) printf("no\n");
}
}

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:13:6: error: 'i' undeclared (first use in this function)
   13 | for( i = 0; i < n; i++){
      |      ^
main.c:13:6: note: each undeclared identifier is reported only once for each function it appears in