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

#include "iostream"
#include "string.h"

using namespace std;

static const int MAX = 1048576;
static const int LEN = 14;

int makeKey( char str[LEN] ) {
	int key = 0, x;

	for (int i = 0; i < 9; i++) {
		if (str[i] == 'A') x = 0;
		else if (str[i] == 'C') x = 1;
		else if (str[i] == 'G') x = 2;
		else if (str[i] == 'T') x = 3;
		key = key * 4 + x;
	}
	return key * 4;
}

bool same(char str[LEN], char str2[LEN]) {
	int l = 1;
	if( l != 1) return false;

	for (int i = 0; i < l; i++) {
		if (str[i] == str2[i]) return false;
	}
	return true;
}

int main() {

	int lnum;
	char com[], str[LEN];
	char dic[MAX][LEN];
	bool used[MAX];

	cin >> lnum;

	for (int i = 0; i < MAX; i++) {
		used[i] = false;
	}

	for (int i = 0; i < lnum; i++) {
		cin >> com;
		cin >> str;

		if (com[0] == 'i') {
			int k = makeKey(str);
			if (k >= MAX) {
				//cout << "RE" << endl;
			}
			while (used[k]) {
				k += 11;
				if (k >= MAX) k -= MAX;
			}
			for (int i = 0; i < 1; i++) {
				dic[k][i] = str[i];
			}

			used[k] = true;
		}
		else if( com[0] == 'f' ){
			bool found = false;
			int k = makeKey(str);
			if (k >= MAX) {
				//cout << "RE" << endl;
			}
			while (used[k]) {
				if (same(str, dic[k]) == 0) {
					found = true;
					cout << "yes" << endl;
					break;
				}
				k += 11;
				if (k >= MAX) k -= MAX;
			}
			if (!found) cout << "no" << endl;
			
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:14: error: storage size of 'com' isn't known
   35 |         char com[], str[LEN];
      |              ^~~
Language: C++

#include "iostream"
#include "string.h"

using namespace std;

static const int MAX = 1048576;
static const int LEN = 14;

int makeKey( char str[LEN] ) {
	int key = 0, x;

	int l = strlen(str);

	for (int i = 0; i < 9; i++) {
		x = 0;
		if (i < l) {
			if (str[i] == 'A') x = 0;
			else if (str[i] == 'C') x = 1;
			else if (str[i] == 'G') x = 2;
			else if (str[i] == 'T') x = 3;
		}
		key = key * 4 + x;
	}
	return key * 4;
}

bool same(char str[LEN], char str2[LEN]) {
	int l = strlen(str);
	if( l != strlen(str2)) return false;

	for (int i = 0; i < l; i++) {
		if (str[i] != str2[i]) return false;
	}
	return true;
}

int main() {

	int lnum;
	char com[9], str[LEN];
	char dic[MAX][LEN];
	bool used[MAX];

	cin >> lnum;

	for (int i = 0; i < MAX; i++) {
		used[i] = false;
	}

	for (int i = 0; i < lnum; i++) {
		cin >> com;
		cin >> str;

		if (com[0] == 'i') {
			/*
			int k = makeKey(str);
			if (k >= MAX) {
				//cout << "RE" << endl;
			}
			while (used[k]) {
				k += 11;
				if (k >= MAX) k -= MAX;
			}
			for (int i = 0; i < strlen(str); i++) {
				dic[k][i] = str[i];
			}

			used[k] = true;
			*/
		}
		else if( com[0] == 'f' ){
			/*
			bool found = false;
			int k = makeKey(str);
			if (k >= MAX) {
				//cout << "RE" << endl;
			}
			while (used[k]) {
				if (same(str, dic[k]) == 0) {
					found = true;
					cout << "yes" << endl;
					break;
				}
				k += 11;
				if (k >= MAX) k -= MAX;
			}
			if (!found) cout << "no" << endl;
			
		}*/
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:93:2: error: expected '}' at end of input
   93 | }
      |  ^
a.cc:37:12: note: to match this '{'
   37 | int main() {
      |            ^
Language: C++

#include <stdio.h>
#include <string.h>
int n, r[128], s[12]; bool used[22370000]; char com[7], s[13];
int main() {
	scanf("%d", &n); r[65] = 1, r[67] = 2, r[71] = 3, s[0] = 1;
	for(int i = 2; i < 12; i++) s[i] = s[i - 1] + (1 << (2 * i - 2));
	for(int i = 0; i < n; i++) {
		scanf("%s %s", com, s);
		int h = 0, l = strlen(s);
		for(int j = 0; j < l; j++) h = h * 4 + r[s[j]];
		if(com[0] == 105) used[h + s[l]] = true;
		else puts(used[h + s[l]] ? "yes" : "no");
	}
}

Compiler output:
a.cc:3:57: error: conflicting declaration 'char s [13]'
    3 | int n, r[128], s[12]; bool used[22370000]; char com[7], s[13];
      |                                                         ^
a.cc:3:16: note: previous declaration as 'int s [12]'
    3 | int n, r[128], s[12]; bool used[22370000]; char com[7], s[13];
      |                ^
a.cc: In function 'int main()':
a.cc:9:39: error: cannot convert 'int*' to 'const char*'
    9 |                 int h = 0, l = strlen(s);
      |                                       ^
      |                                       |
      |                                       int*
In file included from a.cc:2:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++

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

using namespace std;

#define STR_MAX 12

typedef struct _book {
  char name[STR_MAX];
  struct _book *next;
} book;

book *head;

void Init(){

  head = (book *)malloc(sizeof(book));
  head->next = NULL;
}

void insert(char _name[]){

  book *temp;

  temp = (book *)malloc(sizeof(book));
  strncpy(temp->name,_name,STR_MAX);

  temp->next = head->next;
  head->next = temp;

}

void find(char _name[]){

  book *temp;

  for(temp = head->next;temp != NULL;temp = temp->next){
    if(strcmp(temp->name,_name) == 0){
      cout << "yes" << endl;
      return;
    }
  }

  cout << "No" << endl;
}

int main(){

  int i;
  int num;
  char order[STR_MAX];
  char naem[STR_MAX];

  cin >> num;

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

    cin >> order;
    cin >> name;

    if(strcmp(order,"insert") == 0){
      insert(name);
    }
    else if(strcmp(order,"find") == 0){
      find(name);
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:60:12: error: 'name' was not declared in this scope; did you mean 'naem'?
   60 |     cin >> name;
      |            ^~~~
      |            naem
Language: C++

#include<iostream>
using namespace std;
#include<string>

// study of Hash table.

#define M 1020001  // large prime number. 
#define L 14       // length of term.

char H[M][L];     // Hash table.

int getnum(char ch)  // character to number.
{
    if(ch == 'A'){ return 1; }
    else if(ch == 'C'){ return 2; }
    else if(ch == 'G'){ return 3; }
    else{ return 4; }
    return 0;
}

long long getkey(char word[])   // string to key.
{
    int sum = 0, p = 1, i;
    for(i = 0; word[i]; i++){
        sum = sum + p * getnum(word[i]);
        p = p * 5;
    }
    return sum;
}

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

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

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

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

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

int main()
{
    char com[9], word[14];
    int NumOfCom;
    cin >> NumOfCom;

    for(int i = 0; i < M; i++) H[i][L] = '\0';  // initialize.

    while(NumOfCom){
        cin >> com >> word;
        if(com[0] == 'i'){ insert(word); }
        else{
            if(find(word)){ cout << "yes" << endl; }
			else{ cout << "no" << endl; }
        }
        NumOfCom--;
    };
    return 0;
}

Compiler output:
a.cc: In function 'int insert(char*)':
a.cc:41:12: error: 'strcmp' was not declared in this scope
   41 |         if(strcmp(H[h], str)){
      |            ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
a.cc:42:16: error: 'strlen' was not declared in this scope
   42 |             if(strlen(H[h]) == 0){ strcpy_s(H[h], str); return 1; }
      |                ^~~~~~
a.cc:42:16: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:42:36: error: 'strcpy_s' was not declared in this scope
   42 |             if(strlen(H[h]) == 0){ strcpy_s(H[h], str); return 1; }
      |                                    ^~~~~~~~
a.cc: In function 'int find(char*)':
a.cc:55:12: error: 'strcmp' was not declared in this scope
   55 |         if(strcmp(H[h], str)){
      |            ^~~~~~
a.cc:55:12: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:56:16: error: 'strlen' was not declared in this scope
   56 |             if(strlen(H[h]) == 0){ return 0; } continue; }
      |                ^~~~~~
a.cc:56:16: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;
#include<string>

// study of Hash table.

#define M 1020001  // large prime number. 
#define L 14       // length of term.

char H[M][L];     // Hash table.

int getnum(char ch)  // character to number.
{
    if(ch == 'A'){ return 1; }
    else if(ch == 'C'){ return 2; }
    else if(ch == 'G'){ return 3; }
    else{ return 4; }
    return 0;
}

long long getkey(char word[])   // string to key.
{
    int sum = 0, p = 1, i;
    for(i = 0; word[i]; i++){
        sum = sum + p * getnum(word[i]);
        p = p * 5;
    }
    return sum;
}

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

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

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

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

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

int main()
{
    char com[9], word[14];
    int NumOfCom;
    cin >> NumOfCom;

    for(int i = 0; i < M; i++) H[i][L] = '\0';  // initialize.

    while(NumOfCom){
        cin >> com >> word;
        if(com[0] == 'i'){ insert(word); }
        else{
            if(find(word)){ cout << "yes" << endl; }
			else{ cout << "no" << endl; }
        }
        NumOfCom--;
    };
    return 0;
}

Compiler output:
a.cc: In function 'int insert(char*)':
a.cc:42:12: error: 'strcmp' was not declared in this scope
   42 |         if(strcmp(H[h], str)){
      |            ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<stdio.h>
a.cc:43:16: error: 'strlen' was not declared in this scope
   43 |             if(strlen(H[h]) == 0){ strcpy_s(H[h], str); return 1; }
      |                ^~~~~~
a.cc:43:16: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:43:36: error: 'strcpy_s' was not declared in this scope
   43 |             if(strlen(H[h]) == 0){ strcpy_s(H[h], str); return 1; }
      |                                    ^~~~~~~~
a.cc: In function 'int find(char*)':
a.cc:56:12: error: 'strcmp' was not declared in this scope
   56 |         if(strcmp(H[h], str)){
      |            ^~~~~~
a.cc:56:12: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:57:16: error: 'strlen' was not declared in this scope
   57 |             if(strlen(H[h]) == 0){ return 0; } continue; }
      |                ^~~~~~
a.cc:57:16: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include<iostream>
using namespace std;
#include<string.h>

// study of Hash table.

#define M 1020001  // large prime number. 
#define L 14       // length of term.

char H[M][L];     // Hash table.

int getnum(char ch)  // character to number.
{
    if(ch == 'A'){ return 1; }
    else if(ch == 'C'){ return 2; }
    else if(ch == 'G'){ return 3; }
    else{ return 4; }
    return 0;
}

long long getkey(char word[])   // string to key.
{
    int sum = 0, p = 1, i;
    for(i = 0; word[i]; i++){
        sum = sum + p * getnum(word[i]);
        p = p * 5;
    }
    return sum;
}

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

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

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

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

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

int main()
{
    char com[9], word[14];
    int NumOfCom;
    cin >> NumOfCom;

    for(int i = 0; i < M; i++) H[i][L] = '\0';  // initialize.

    while(NumOfCom){
        cin >> com >> word;
        if(com[0] == 'i'){ insert(word); }
        else{
            if(find(word)){ cout << "yes" << endl; }
			else{ cout << "no" << endl; }
        }
        NumOfCom--;
    };
    return 0;
}

Compiler output:
a.cc: In function 'int insert(char*)':
a.cc:42:36: error: 'strcpy_s' was not declared in this scope; did you mean 'strcpy'?
   42 |             if(strlen(H[h]) == 0){ strcpy_s(H[h], str); return 1; }
      |                                    ^~~~~~~~
      |                                    strcpy
Language: C++

#include<iostream>
using namespace std;
#include<string.h>
#include<string>

// study of Hash table.

#define M 1020001  // large prime number. 
#define L 14       // length of term.

char H[M][L];     // Hash table.

int getnum(char ch)  // character to number.
{
    if(ch == 'A'){ return 1; }
    else if(ch == 'C'){ return 2; }
    else if(ch == 'G'){ return 3; }
    else{ return 4; }
    return 0;
}

long long getkey(char word[])   // string to key.
{
    int sum = 0, p = 1, i;
    for(i = 0; word[i]; i++){
        sum = sum + p * getnum(word[i]);
        p = p * 5;
    }
    return sum;
}

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

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

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

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

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

int main()
{
    char com[9], word[14];
    int NumOfCom;
    cin >> NumOfCom;

    for(int i = 0; i < M; i++) H[i][L] = '\0';  // initialize.

    while(NumOfCom){
        cin >> com >> word;
        if(com[0] == 'i'){ insert(word); }
        else{
            if(find(word)){ cout << "yes" << endl; }
			else{ cout << "no" << endl; }
        }
        NumOfCom--;
    };
    return 0;
}

Compiler output:
a.cc: In function 'int insert(char*)':
a.cc:43:36: error: 'strcpy_s' was not declared in this scope; did you mean 'strcpy'?
   43 |             if(strlen(H[h]) == 0){ strcpy_s(H[h], str); return 1; }
      |                                    ^~~~~~~~
      |                                    strcpy
Language: C++

#include <set>
#include <string>
#include <iostream>
using namespace std;

int main() {
        typedef unordered_set<string> set_t;
        set_t A;
        int n;
        string s,t;
        cin >> n;
        for (int i = 0; i<n; i++){
                cin >> s >> t;
                if (s == "insert"){
                        A.insert(t);
                }
                else if (s == "find"){
                        bool find = A.count(t);
                        cout << (find?"yes":"no") << endl;
                }
        }
}
~    

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'unordered_set' does not name a type
    7 |         typedef unordered_set<string> set_t;
      |                 ^~~~~~~~~~~~~
a.cc:8:9: error: 'set_t' was not declared in this scope
    8 |         set_t A;
      |         ^~~~~
a.cc:15:25: error: 'A' was not declared in this scope
   15 |                         A.insert(t);
      |                         ^
a.cc:18:37: error: 'A' was not declared in this scope
   18 |                         bool find = A.count(t);
      |                                     ^
a.cc: At global scope:
a.cc:23:2: error: expected class-name at end of input
   23 | ~
      |  ^
Language: C++

#include <unordred_set>
#include <string>
#include <iostream>
using namespace std;

int main() {
        typedef unordered_set<string> set_t;
        set_t A;
        int n;
        string s,t;
        cin >> n;
        for (int i = 0; i<n; i++){
                cin >> s >> t;
                if (s == "insert"){
                        A.insert(t);
                }
                else if (s == "find"){
                        bool find = A.count(t);
                        cout << (find?"yes":"no") << endl;
                }
        }
}

Compiler output:
a.cc:1:10: fatal error: unordred_set: No such file or directory
    1 | #include <unordred_set>
      |          ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <unorderd_set>
#include <string>
#include <iostream>
using namespace std;

int main() {
        typedef unordered_set<string> set_t;
        set_t A;
        int n;
        string s,t;
        cin >> n;
        for (int i = 0; i<n; i++){
                cin >> s >> t;
                if (s == "insert"){
                        A.insert(t);
                }
                else if (s == "find"){
                        bool find = A.count(t);
                        cout << (find?"yes":"no") << endl;
                }
        }
}

Compiler output:
a.cc:1:10: fatal error: unorderd_set: No such file or directory
    1 | #include <unorderd_set>
      |          ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <unordered_set>
#include <string>
int main(){
	typedef unordered_set<string>
	set_t A;
	int counter;
	string order, word;
	cin >> counter;
	for (int i = 0; i < counter; i++){
		cin << order;
		if(order == "insert"){
			cin << word;
			A.inset(word);
		}
		else if(order == "find"){
			cin << word;
			if(A.count(word) == 0)
				cout << "no" << endl;					
			else
				cout << "yes" << endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:17: error: 'unordered_set' does not name a type
    4 |         typedef unordered_set<string>
      |                 ^~~~~~~~~~~~~
a.cc:7:9: error: 'string' was not declared in this scope
    7 |         string order, word;
      |         ^~~~~~
a.cc:7:9: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from a.cc:2:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin >> counter;
      |         ^~~
a.cc:10:24: error: 'order' was not declared in this scope
   10 |                 cin << order;
      |                        ^~~~~
a.cc:12:32: error: 'word' was not declared in this scope
   12 |                         cin << word;
      |                                ^~~~
a.cc:13:25: error: 'A' was not declared in this scope
   13 |                         A.inset(word);
      |                         ^
a.cc:16:32: error: 'word' was not declared in this scope
   16 |                         cin << word;
      |                                ^~~~
a.cc:17:28: error: 'A' was not declared in this scope
   17 |                         if(A.count(word) == 0)
      |                            ^
a.cc:18:33: error: 'cout' was not declared in this scope
   18 |                                 cout << "no" << endl;
      |                                 ^~~~
a.cc:18:49: error: 'endl' was not declared in this scope
   18 |                                 cout << "no" << endl;
      |                                                 ^~~~
a.cc:20:33: error: 'cout' was not declared in this scope
   20 |                                 cout << "yes" << endl;
      |                                 ^~~~
a.cc:20:50: error: 'endl' was not declared in this scope
   20 |                                 cout << "yes" << endl;
      |                                                  ^~~~
Language: C++

#include <unordered_set>
#include <string>
int main(){
	typedef unordered_set<string>
	set_t A;
	int counter;
	string order, word;
	cin >> counter;
	for (int i = 0; i < counter; i++){
		cin >> order;
		if(order == "insert"){
			cin >> word;
			A.inset(word);
		}
		else if(order == "find"){
			cin >> word;
			if(A.count(word) == 0)
				cout << "no" << endl;					
			else
				cout << "yes" << endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:17: error: 'unordered_set' does not name a type
    4 |         typedef unordered_set<string>
      |                 ^~~~~~~~~~~~~
a.cc:7:9: error: 'string' was not declared in this scope
    7 |         string order, word;
      |         ^~~~~~
a.cc:7:9: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from a.cc:2:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin >> counter;
      |         ^~~
a.cc:10:24: error: 'order' was not declared in this scope
   10 |                 cin >> order;
      |                        ^~~~~
a.cc:12:32: error: 'word' was not declared in this scope
   12 |                         cin >> word;
      |                                ^~~~
a.cc:13:25: error: 'A' was not declared in this scope
   13 |                         A.inset(word);
      |                         ^
a.cc:16:32: error: 'word' was not declared in this scope
   16 |                         cin >> word;
      |                                ^~~~
a.cc:17:28: error: 'A' was not declared in this scope
   17 |                         if(A.count(word) == 0)
      |                            ^
a.cc:18:33: error: 'cout' was not declared in this scope
   18 |                                 cout << "no" << endl;
      |                                 ^~~~
a.cc:18:49: error: 'endl' was not declared in this scope
   18 |                                 cout << "no" << endl;
      |                                                 ^~~~
a.cc:20:33: error: 'cout' was not declared in this scope
   20 |                                 cout << "yes" << endl;
      |                                 ^~~~
a.cc:20:50: error: 'endl' was not declared in this scope
   20 |                                 cout << "yes" << endl;
      |                                                  ^~~~
Language: C++

#include <unordered_set>
#include <string>
#include <iostream>
using namespace std;
int main(){
	set<string> A;
	int counter;
	string order, word;
	cin >> counter;
	for (int i = 0; i < counter; i++){
		cin >> order;
		if(order == "insert"){
			cin >> word;
			A.insert(word);
		}
		else if(order == "find"){
			cin >> word;
			if(A.count(word) == 0)
				cout << "no" << endl;					
			else
				cout << "yes" << endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'set' was not declared in this scope
    6 |         set<string> A;
      |         ^~~
a.cc:4:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
    3 | #include <iostream>
  +++ |+#include <set>
    4 | using namespace std;
a.cc:6:19: error: expected primary-expression before '>' token
    6 |         set<string> A;
      |                   ^
a.cc:6:21: error: 'A' was not declared in this scope
    6 |         set<string> A;
      |                     ^
Language: C++

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <ctime>
#include <string>
#include <set>
using namespace std;



int main(void){
	int n;
	string word;
	typedef set<string> set_t;
	set_t A;

	cin >> n;

	for(int i = 0; i < n; i++){
		cin >> word;
		if(word = "find"){
			string S;
			cin >> S;
			if(A.count(S)){
				cout << "yes" << endl;
			}else{
				cout << "no" << endl;
			}
		}else{
			string S;
			cin >> S;
			A.insert(S);
		}
	}
	
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:25: error: could not convert 'word.std::__cxx11::basic_string<char>::operator=(((const char*)"find"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   24 |                 if(word = "find"){
      |                    ~~~~~^~~~~~~~
      |                         |
      |                         std::__cxx11::basic_string<char>
Language: C++

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <ctime>
#include <string>
#include <set>
using namespace std;



int main(void){
	int n;
	string word;
	typedef unordered_set<string> set_t;
	set_t A;

	cin >> n;

	for(int i = 0; i < n; i++){
		cin >> word;
		if(word == "find"){
			string S;
			cin >> S;
			if(A.count(S)){
				cout << "yes" << endl;
			}else{
				cout << "no" << endl;
			}
		}else{
			string S;
			cin >> S;
			A.insert(S);
		}
	}
	
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: 'unordered_set' does not name a type
   17 |         typedef unordered_set<string> set_t;
      |                 ^~~~~~~~~~~~~
a.cc:18:9: error: 'set_t' was not declared in this scope
   18 |         set_t A;
      |         ^~~~~
a.cc:27:28: error: 'A' was not declared in this scope
   27 |                         if(A.count(S)){
      |                            ^
a.cc:35:25: error: 'A' was not declared in this scope
   35 |                         A.insert(S);
      |                         ^
Language: C++

#include <algorithm>
#include <iostream>
#include <list>
#include <string>
#include <vector>

typedef std::list<std::string> TDictionary;

std::string GetResultString(bool Result)
{
	return Result ? "yes" : "no";
}

int main()
{
	TDictionary Dictionary;
	TResults Results;
	int Count = 0;
	std::cin >> Count;
	
	for(int i=0;i<Count;i++)
	{
		std::string Input;
		std::cin >> Input;
		if(Input == "insert")
		{
			std::cin >> Input;
			Dictionary.push_back(Input);
		}
		else if(Input == "find")
		{
			std::cin >> Input;
			std::cout << GetResultString(std::find(Dictionary.begin(),Dictionary.end(),Input) != Dictionary.end());
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'TResults' was not declared in this scope
   17 |         TResults Results;
      |         ^~~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <set>
using namespace std;

int main() {
	typedef set<string> s;
	string str;
	int n;
	cin >> n;
	for ( int i = 0; i < n; i++ ) {
		cin >> str;
		if ( str == "insert" ) {
			cin >> str;
			s.insert( str );
		} else {
			cin >> str;
			if ( s.count( str ) > 0 )
				cout << "yes" << endl;
			else
				cout << "no" << endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:26: error: expected unqualified-id before '.' token
   15 |                         s.insert( str );
      |                          ^
a.cc:18:31: error: expected unqualified-id before '.' token
   18 |                         if ( s.count( str ) > 0 )
      |                               ^
Language: C++

#include <iostream>
#include <string>
#include <set>
using namespace std;

int main() {
	typedef unordered_set<string> set_t;
	set_t s;
	string str;
	int n;
	cin >> n;
	for ( int i = 0; i < n; i++ ) {
		cin >> str;
		if ( str == "insert" ) {
			cin >> str;
			s.insert( str );
		} else {
			cin >> str;
			if ( s.count( str ) > 0 )
				cout << "yes" << endl;
			else
				cout << "no" << endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'unordered_set' does not name a type
    7 |         typedef unordered_set<string> set_t;
      |                 ^~~~~~~~~~~~~
a.cc:8:9: error: 'set_t' was not declared in this scope
    8 |         set_t s;
      |         ^~~~~
a.cc:16:25: error: 's' was not declared in this scope
   16 |                         s.insert( str );
      |                         ^
a.cc:19:30: error: 's' was not declared in this scope
   19 |                         if ( s.count( str ) > 0 )
      |                              ^
Language: C++

#include <iostream>
#include <string>
#include <set>
using namespace std;

int main() {
//	typedef unordered_set<string> set_t;
//	set_t s;
unordered_set<string> s;
	string str;
	int n;
	cin >> n;
	for ( int i = 0; i < n; i++ ) {
		cin >> str;
		if ( str == "insert" ) {
			cin >> str;
			s.insert( str );
		} else {
			cin >> str;
			if ( s.count( str ) > 0 )
				cout << "yes" << endl;
			else
				cout << "no" << endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: 'unordered_set' was not declared in this scope
    9 | unordered_set<string> s;
      | ^~~~~~~~~~~~~
a.cc:4:1: note: 'std::unordered_set' is defined in header '<unordered_set>'; this is probably fixable by adding '#include <unordered_set>'
    3 | #include <set>
  +++ |+#include <unordered_set>
    4 | using namespace std;
a.cc:9:21: error: expected primary-expression before '>' token
    9 | unordered_set<string> s;
      |                     ^
a.cc:9:23: error: 's' was not declared in this scope
    9 | unordered_set<string> s;
      |                       ^
Language: C++

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

using namespace std;
int chan_f(char);
int main(void)
{
	int x = 22369620;
	int n, fi[1000000] = { 0 }, S[10000] = { 0 }, cou_in = 0, cou_fi = 0;
	char m[7], str[13], meirei[2] = { 'i','f' };
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> m >> str; 		
		int x = s;
		for (int j = 0, k = 1; j < 12 && str[j] != '\0'; j++, k *= 4) {
			x += chan_f(str[j]) * k;
		}
		if (m[0] == meirei[0]) {
			S[x - 1] = 1;
		} 
		else {
			if (S[x - 1] == 1) { fi[cou_fi] = 1; }			
			cou_fi++;
		}
	}
	for (int i = 0; i < cou_fi; i++) {
		if (fi[i]) printf("yes\n");
		else printf("no\n");
	}
}
int chan_f(char a)
{
	switch (a){
	case 'A': return 1; break;
	case 'C': return 2; break;
	case 'G': return 3; break;
	case 'T': return 4; break;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: 's' was not declared in this scope
   16 |                 int x = s;
      |                         ^
a.cc: In function 'int chan_f(char)':
a.cc:41:1: warning: control reaches end of non-void function [-Wreturn-type]
   41 | }
      | ^
Language: C++

#include<iostream>
#include<set>
#include<string>
using namespace std;

int main() {
	int n;
	unordered_set<string> d;
	string ope, contents;

	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> ope >> contents;
		if (ope == "insert") d.insert(contents);
		else if (ope == "find") {
			if (d.count(contents) >= 1) cout << "yes" << endl;
			else cout << "no" << endl;
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'unordered_set' was not declared in this scope
    8 |         unordered_set<string> d;
      |         ^~~~~~~~~~~~~
a.cc:3:1: note: 'std::unordered_set' is defined in header '<unordered_set>'; this is probably fixable by adding '#include <unordered_set>'
    2 | #include<set>
  +++ |+#include <unordered_set>
    3 | #include<string>
a.cc:8:29: error: expected primary-expression before '>' token
    8 |         unordered_set<string> d;
      |                             ^
a.cc:8:31: error: 'd' was not declared in this scope
    8 |         unordered_set<string> d;
      |                               ^
Language: C++

#include<iostream>
#include<vector>
using namespace std;

int main(){

  string com;
  vector<string> dic(0);
  int n;
  
  cin >> n;

  for(int i=0; i<n; i++){
    cin >> com;
    
    if(com == "insert"){
      cin >> com;
      dic.push_back(com);
    }
    else{
      cin>>com;
      if( search(dic.begin() , dic.end() , com)!=dic.end() )cout << "yes" << endl;
      else cout << "no" << endl;
    }

  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:17: error: no matching function for call to 'search(std::vector<std::__cxx11::basic_string<char> >::iterator, std::vector<std::__cxx11::basic_string<char> >::iterator, std::string&)'
   22 |       if( search(dic.begin() , dic.end() , com)!=dic.end() )cout << "yes" << endl;
      |           ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:2332:5: note: candidate: 'template<class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate> _ForwardIterator1 std::search(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _BinaryPredicate)'
 2332 |     search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
      |     ^~~~~~
/usr/include/c++/14/bits/stl_algobase.h:2332:5: note:   candidate expects 5 arguments, 3 provided
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){

  string com;
  vector<string> dic(0);
  int n;
  
  cin >> n;

  for(int i=0; i<n; i++){
    cin >> com;
    
    if(com == "insert"){
      cin >> com;
      dic.push_back(com);
    }
    else{
      cin>>com;
      if( search(dic.begin() , dic.end() , com)!=dic.end() )cout << "yes" << endl;
      else cout << "no" << endl;
    }

  }

  return 0;
}

Compiler output:
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of '_ForwardIterator std::search(_ForwardIterator, _ForwardIterator, const _Searcher&) [with _ForwardIterator = __gnu_cxx::__normal_iterator<__cxx11::basic_string<char>*, vector<__cxx11::basic_string<char> > >; _Searcher = __cxx11::basic_string<char>]':
a.cc:21:17:   required from here
   21 |       if( search(dic.begin() , dic.end() , com)!=dic.end() )cout << "yes" << endl;
      |           ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4186:24: error: no match for call to '(const std::__cxx11::basic_string<char>) (__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >&, __gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >&)'
 4186 |     { return __searcher(__first, __last).first; }
      |              ~~~~~~~~~~^~~~~~~~~~~~~~~~~
Language: C++

#include<iostream>
#include<vector>
using namespace std;

int main(){

  string com;
  vector<string> dic(0);
  int n;
  
  cin >> n;

  for(int i=0; i<n; i++){
    cin >> com;
    
    if(com == "insert"){
      cin >> com;
      dic.push_back(com);
      sort(dic.begin(),dic.end());
    }
    else{
      cin>>com;
      if(binary_search(dic.begin(),dic.end(),com)==true)cout << "yes" << endl;
      else cout << "no" << endl;
    }

  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:7: error: 'sort' was not declared in this scope; did you mean 'short'?
   19 |       sort(dic.begin(),dic.end());
      |       ^~~~
      |       short
a.cc:23:10: error: 'binary_search' was not declared in this scope
   23 |       if(binary_search(dic.begin(),dic.end(),com)==true)cout << "yes" << endl;
      |          ^~~~~~~~~~~~~
Language: C++

#include <stdio.h>
#include <iostream>
#include <string>
#include <list>
using namespace std;
#define N 22369620
#define X 10
struct hush
{
	list <int> a;
};
int main(void)
{
	int n, sum = 0;
	hush H[N];
	scanf_s("%d", &n);
	/*	
	for (int i = 0; i < n; i++) {
		string str, ACGT;
		cin >> str;
		cin >> ACGT;
		for (int i = 0; i < 13;i++)
	}
	*/
	for (int i = 0, k = 1; i < 12; i++, k *= 4) {
		sum += 4 * k;
		printf("%d ", sum);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   16 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <stdio.h>
#include <iostream>
#include <string>
#include <list>
using namespace std;
#define N 22369620
#define X 100
struct hush
{
	list <int> a;
};
int main(void)
{
	int n, sum = 0;
	hush H[N / X];
	scanf_s("%d", &n);
	/*	
	for (int i = 0; i < n; i++) {
		string str, ACGT;
		cin >> str;
		cin >> ACGT;
		for (int i = 0; i < 13;i++)
	}
	*/
	for (int i = 0, k = 1; i < 12; i++, k *= 4) {
		sum += 4 * k;
		printf("%d ", sum);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   16 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <stdio.h>
#include <iostream>
#include <string>
#include <list>
using namespace std;
#define N 22369620
#define X 1000
//100??§
struct hush
{
	list <int> a;
};
int main(void)
{
	int n, sum = 0, x, f[1000] = { 0 }, cou = 0;
	char str[7], acgt[13];
	hush H[N / X];
	scanf_s("%d", &n);	
	for (int i = 0; i < n; i++) {
		sum = 0;
		scanf_s("%s", str, 7);
		scanf_s("%s", acgt, 13);
		for (int i = 0, k = 1; acgt[i] != '\0' &&i < 12; i++, k *= 4) {
			switch (acgt[i]) {
			case 'A': x = 1; break;
			case 'C': x = 2; break;
			case 'G': x = 3; break;
			case 'T': x = 4; break;
			}
			sum += x*k;
		}
		printf("%d %d %d\n", sum / X, sum % X, sum);
		if (str[0] == 'i') {
			H[sum / X].a.push_back(sum % X);
		}
		else {
			list<int>::iterator p = H[sum / X].a.begin();
			for (; p != H[sum / X].a.end(); ++p) {
				if ((sum % X) == *p) { f[cou] = 1; }
			}
			cou++;
		}
	}
	for (int i = 0; i < cou; i++) {
		if(f[i]) printf("yes\n");
		else printf("no\n");
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   18 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <stdio.h>
#include <iostream>
#include <string>
#include <list>
using namespace std;
#define N 22369620
#define X 100
//100??§
struct hush
{
	list <int> a;
};
int main(void)
{
	int n, sum = 0, x, f[1000] = { 0 }, cou = 0;
	char str[7], acgt[13];
	hush H[N / X];
	scanf_s("%d", &n);	
	for (int i = 0; i < n; i++) {
		sum = 0;
		scanf_s("%s", str, 7);
		scanf_s("%s", acgt, 13);
		for (int i = 0, k = 1; acgt[i] != '\0' &&i < 12; i++, k *= 4) {
			switch (acgt[i]) {
			case 'A': x = 1; break;
			case 'C': x = 2; break;
			case 'G': x = 3; break;
			case 'T': x = 4; break;
			}
			sum += x*k;
		}
		printf("%d %d %d\n", sum / X, sum % X, sum);
		if (str[0] == 'i') {
			H[sum / X].a.push_back(sum % X);
		}
		else {
			list<int>::iterator p = H[sum / X].a.begin();
			for (; p != H[sum / X].a.end(); ++p) {
				if ((sum % X) == *p) { f[cou] = 1; }
			}
			cou++;
		}
	}
	for (int i = 0; i < cou; i++) {
		if(f[i]) printf("yes\n");
		else printf("no\n");
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   18 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <stdio.h>
#include <iostream>
#include <string>
#include <list>
using namespace std;
#define N 22369620
#define X 10
//100??§
struct hush
{
	list <int> a;
};
int main(void)
{
	int n, sum = 0, x, f[1000] = { 0 }, cou = 0;
	char str[7], acgt[13];
	hush H[N / X];
	scanf_s("%d", &n);	
	for (int i = 0; i < n; i++) {
		sum = 0;
		scanf_s("%s", str, 7);
		scanf_s("%s", acgt, 13);
		for (int i = 0, k = 1; acgt[i] != '\0' &&i < 12; i++, k *= 4) {
			switch (acgt[i]) {
			case 'A': x = 1; break;
			case 'C': x = 2; break;
			case 'G': x = 3; break;
			case 'T': x = 4; break;
			}
			sum += x*k;
		}
		printf("%d %d %d\n", sum / X, sum % X, sum);
		if (str[0] == 'i') {
			H[sum / X].a.push_back(sum % X);
		}
		else {
			list<int>::iterator p = H[sum / X].a.begin();
			for (; p != H[sum / X].a.end(); ++p) {
				if ((sum % X) == *p) { f[cou] = 1; }
			}
			cou++;
		}
	}
	for (int i = 0; i < cou; i++) {
		if(f[i]) printf("yes\n");
		else printf("no\n");
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   18 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C++

#include<bits/stdc++.h>
using namespace std;

#define M 1000001
#define L 13

char Hash[M][L];

int h1(int key){
	return key % M; 
}

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

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

int getKey(char str[]){
	int sum = 0, p = 1;
	for(int i = 0 ; i < strlen(str) ; i++){
		sum += p * (getChar(str[i]));
		p *= 4;
	}
	
	return sum;
}

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

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

int main(){
	int n, h;
	char str[L], status[7];
	
	for(int i = 0 ; i < M ; i++){
		Hash[i][0] = '\0';
	}
	
	cin >> n;
	
	for(int i = 0 ; i < n ; i++){
		cin >> status >> str;
		
		if(status[0] == 'i'){
			insert(str);
		}else{
			if(find(str)){
				cout << "yes" << endl;
			}else{
				cout << "no" << endl;
			}
		}
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int find(char*)':
a.cc:63:32: error: 'H' was not declared in this scope
   63 |                 else if(strlen(H[h] == 0)) return 0;
      |                                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

#define M 1000000
#define L 13

char Hash[M][L];

int h1(int key){
	return key % M; 
}

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

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

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

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

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

int main(){
	int n, h;
	char str[L], status[7];
	
	for(int i = 0 ; i < M ; i++){
		Hash[i][0] = '\0';
	}
	
	scanf("%d", &n)
	
	for(int i = 0 ; i < n ; i++){
		scanf("%s %s", status, str);
		
		if(status[0] == 'i'){
			insert(str);
		}else{
			if(find(str)){
				printf("yes\n");
			}else{
				printf("no\n");
			}
		}
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:77:24: error: expected ';' before 'for'
   77 |         scanf("%d", &n)
      |                        ^
      |                        ;
   78 | 
   79 |         for(int i = 0 ; i < n ; i++){
      |         ~~~             
a.cc:79:25: error: 'i' was not declared in this scope
   79 |         for(int i = 0 ; i < n ; i++){
      |                         ^
a.cc: In function 'int getChar(char)':
a.cc:22:1: warning: control reaches end of non-void function [-Wreturn-type]
   22 | }
      | ^
a.cc: In function 'int find(char*)':
a.cc:67:1: warning: control reaches end of non-void function [-Wreturn-type]
   67 | }
      | ^
Language: C++

#include <iostream>
#include <string>

struct TIntNode
{
	int Value;
	TIntNode* Parent;
	TIntNode* LargeBranch;
	TIntNode* SmallBranch;
	TIntNode(int AValue);
};

TIntNode::TIntNode(int AValue)
{
	Value       = AValue;
	LargeBranch = NULL;
	SmallBranch = NULL;
}

class TIntSet
{
	TIntNode* Root;
	bool Search(int AValue, TIntNode** Node);
public:
	bool Search(int AValue)const;
	void Add(int AValue);
	
	TIntSet();
	~TIntSet();
};

void Destroy(TIntNode* Node)
{
	if(Node == NULL) return;
	Destroy(Node->LargeBranch);
	Destroy(Node->SmallBranch);
	delete Node;
}

TIntSet::TIntSet()
{
	Root = NULL;
}

TIntSet::~TIntSet()
{
	Destroy(Root);
}

bool TIntSet::Search(int AValue)const
{
	TIntNode* Node = Root;
	return Search(AValue, &Node);
}

bool TIntSet::Search(int AValue, TIntNode** Node)
{
	if(*Node == NULL) return NULL;
	if((*Node)->Value == AValue) return true;;
	if((*Node)->Value > AValue){
		Node = &((*Node)->SmallBranch);
		return Search(AValue, Node);
	}else{
		if((*Node)->LargeBranch == NULL) return false;
		*Node = (*Node)->LargeBranch;
		return Search(AValue, Node);
	}
}

void TIntSet::Add(int AValue)
{
	TIntNode* Parent = Root;
	if(Search(AValue, &Parent)) return;
	if(Parent == NULL)
	{
		TIntNode* NewNode = new TIntNode(AValue);
		Root = NewNode;
		return;
	}
	if(Parent->Value > AValue){
		TIntNode* NewNode = new TIntNode(AValue);
		Parent->SmallBranch = NewNode;
	}else{
		TIntNode* NewNode = new TIntNode(AValue);
		Parent->LargeBranch = NewNode;
	}
}

int CharToInt(char c)
{
    switch(c)
    {
    case 'A' : return 0;
    case 'G' : return 1;
    case 'C' : return 2;
    case 'T' : return 3;
    }
    return 0;
}
 
int ToInt(std::string String)
{
    int Result = 0;
    int Order = 1;
    for(unsigned int i=0;i<String.size();i++)
    {
        Result += CharToInt(String[i]) * Order;
        Order *= 4;
    }
    return Result + Order;
}
 
std::string GetResultString(bool Result)
{
    return Result ? "yes" : "no";
}
 
int main()
{
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);
    TIntSet Dictionary;
    int Count = 0;
    std::cin >> Count;
     
    for(int i=0;i<Count;i++)
    {
        std::string Command;
        std::cin >> Command;
        std::string Input;
        std::cin >> Input;
        if(Command == "insert")
        {
            Dictionary.Add(ToInt(Input));
        }
        else if(Command == "find")
        {
            std::cout << GetResultString(Dictionary.Search(ToInt(Input))) << std::endl;
        }
    }
    return 0;
}

Compiler output:
a.cc: In member function 'bool TIntSet::Search(int) const':
a.cc:53:22: error: passing 'const TIntSet' as 'this' argument discards qualifiers [-fpermissive]
   53 |         return Search(AValue, &Node);
      |                ~~~~~~^~~~~~~~~~~~~~~
a.cc:23:14: note:   in call to 'bool TIntSet::Search(int, TIntNode**)'
   23 |         bool Search(int AValue, TIntNode** Node);
      |              ^~~~~~