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

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

const int MAX = 1000000;

int strToInt(char mes[]) {
	long long key;
	key = 0;
	for (int i = 0; i < strlen(mes); i++) {
		if (mes[i] == 'A') {
			key += 1;
		}
		else if (mes[i] == 'C') {
			key += 2;
		}
		else if (mes[i] ==  'G') {
			key += 3;
		}
		else if (mes[i] == 'T') {
			key += 4;
		}
		else {
			return 0;
		}
		key = key << 1;
	}
	return key;
}

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

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

void insertHash(string dic[], char message[]) {
	long long key;
	key = strToInt(message);
	int i = 0;
	while (true) {
		long long h = (h1(key) + i*h2(key)) % MAX;
		if (dic[h] == message) {
			return; //?????????????????§?????\??£???????????????????????????
		}
		else if (dic[h] == "\0") {
			dic[h] = message;
			return;
		}
		else {
			i++;
		}
	}
}

bool findHash(string dic[], char message[]) {
	long long key;
	key = strToInt(message);
	int i = 0;
	while (true) {
		long long h = (h1(key) + i*h2(key)) % MAX;
		if (dic[h] == message) {
			return true;
		}
		else if (dic[h] == "\0") {
			return false; //\0??¨???????????¨???????????????????????????????????????,
								 //??????????????£??????????????§????????????????????\??£???????????????
		}
		else {
			i++;
		}
	}
	return false;
}

void dumpList(string answer[], int num) {
	for (int i = 0; i < num; i++) {
		printf("%s\n", answer[i].c_str());
	}
}
int main() {
	//	const int MAX = 1000000+1;
	string dictionary[MAX];
//	string answer[MAX];
	int num;
//	int dicMaxPoint;
	int ansMaxPoint;
//	dicMaxPoint = 0;
	ansMaxPoint = 0;
	for (int i = 0; i < MAX; i++) {
		dictionary[i] = "\0";
	}
//	cin >> num;
	scanf("%d", &num);

	for (int i = 0; i < num; i++) {
		string command;
		string message;
		char com[12];
		char mes[12];
		//cin >> command;
		//cin >> message;
		scanf("%s", com);
		scanf("%s", mes);
//		command = com;
//		message = mes;
		if (com[0] == 'i') {
			insertHash(dictionary, mes);
		}
		else {
			if (findHash(dictionary, mes)) {
//				answer[ansMaxPoint++] = "yes";
				printf("yes\n");
			}
			else {
//				answer[ansMaxPoint++] = "no";
				printf("no\n");
			}
		}
	}

//	dumpList(answer, ansMaxPoint);
	return 0;
}

Compiler output:
a.cc: In function 'int strToInt(char*)':
a.cc:10:29: error: 'strlen' was not declared in this scope
   10 |         for (int i = 0; i < strlen(mes); i++) {
      |                             ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
Language: C++

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

const int MAX = 1000000;

int strToInt(char mes[]) {
	long long key;
	key = 0;
	for (int i = 0; i < strlen(mes); i++) {
		if (mes[i] == 'A') {
			key += 1;
		}
		else if (mes[i] == 'C') {
			key += 2;
		}
		else if (mes[i] ==  'G') {
			key += 3;
		}
		else if (mes[i] == 'T') {
			key += 4;
		}
		else {
			return 0;
		}
		key = key << 1;
	}
	return key;
}

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

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

void insertHash(string dic[], char message[]) {
	long long key;
	key = strToInt(message);
	int i = 0;
	while (true) {
		long long h = (h1(key) + i*h2(key)) % MAX;
		if (dic[h] == message) {
			return; //?????????????????§?????\??£???????????????????????????
		}
		else if (dic[h] == "\0") {
			dic[h] = message;
			return;
		}
		else {
			i++;
		}
	}
}

bool findHash(string dic[], char message[]) {
	long long key;
	key = strToInt(message);
	int i = 0;
	while (true) {
		long long h = (h1(key) + i*h2(key)) % MAX;
		if (dic[h] == message) {
			return true;
		}
		else if (dic[h] == "\0") {
			return false; //\0??¨???????????¨???????????????????????????????????????,
								 //??????????????£??????????????§????????????????????\??£???????????????
		}
		else {
			i++;
		}
	}
	return false;
}

void dumpList(string answer[], int num) {
	for (int i = 0; i < num; i++) {
		printf("%s\n", answer[i].c_str());
	}
}
int main() {
	//	const int MAX = 1000000+1;
	string dictionary[MAX];
//	string answer[MAX];
	int num;
//	int dicMaxPoint;
	int ansMaxPoint;
//	dicMaxPoint = 0;
	ansMaxPoint = 0;
	for (int i = 0; i < MAX; i++) {
		dictionary[i] = "\0";
	}
//	cin >> num;
	scanf("%d", &num);

	for (int i = 0; i < num; i++) {
		string command;
		string message;
		char com[12];
		char mes[12];
		//cin >> command;
		//cin >> message;
		scanf("%s", com);
		scanf("%s", mes);
//		command = com;
//		message = mes;
		if (com[0] == 'i') {
			insertHash(dictionary, mes);
		}
		else {
			if (findHash(dictionary, mes)) {
//				answer[ansMaxPoint++] = "yes";
				printf("yes\n");
			}
			else {
//				answer[ansMaxPoint++] = "no";
				printf("no\n");
			}
		}
	}

//	dumpList(answer, ansMaxPoint);
	return 0;
}

Compiler output:
a.cc: In function 'int strToInt(char*)':
a.cc:12:29: error: 'strlen' was not declared in this scope
   12 |         for (int i = 0; i < strlen(mes); i++) {
      |                             ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
Language: C++

#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

constexpr int M = 1046527;
constexpr int L = 14;

char H[M][L] = {{'\0'}};

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

int getKey(const string& str) {
    int key = 0;
    for (int i = 0; i < str.length(); i++) {
        key += char2num(str[i]) << 2 * i;
    }
    return key;
}

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

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

int getHash(const int& key, const int& i) {
    return (h1(key) + i * h2(key)) % M;
}

bool find(const string& str) {
    int key = getKey(str);
    for (int i = 0;; i++) {
        int h = getHash(key, i);
        if (str == H[h]) { return true; }
        else if (H[h][0] == '\0') { return false; }
    }
    return false;
}

bool insert(const string& str) {
    int key = getKey(str);
    for (int i = 0;; i++) {
        int h = getHash(key, i);
        if (str == H[h]) { return false; }
        else if (H[h][0] == '\0') {
            strcpy(H[h], str.c_str());
            return true;
        }
    }
    return true;
}

int main() {
    ios::sync_with_stdio(false);

    int n;
    cin >> n;
    for (int i = 0; i < n; i++) {
        string cmd, str;
        cin >> cmd >> str;
        if (cmd == "insert") {
            insert(str);
        } else {
            string reply = find(str) ? "yes" : "no";
            cout << reply << endl;
        }
    }

    return 0;
}

Compiler output:
a.cc: In function 'bool insert(const std::string&)':
a.cc:56:13: error: 'strcpy' was not declared in this scope
   56 |             strcpy(H[h], str.c_str());
      |             ^~~~~~
a.cc:4:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <algorithm>
  +++ |+#include <cstring>
    4 |
Language: C++

#include <stdio.h>
#include <string.h>
int hash1();
int hash2();
void Hash(int,char *);
int insert(int,char *);
int getkey(char *);
void init();
int  find( char *);

char stack[1000000][13];

void init(){
  int i;
  for(i=0;i<1000000;i++) stack[i][0]='0';
}

int hash1(int key){
  return (key % 1000000);
}

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

int insert(int add,char *s){
  if(stack[add][0] == '0'){
    strcpy(stack[add],s);
    return 1;
  }
  else return 0;
}

void Hash(int key,char *s){
  int hash;
  int i =0;
  while(1){
    hash = (hash1(key)+i*hash2(key))%1000000;
    if(insert(hash,s)) break;
    i++;
  }
}

int find(char *s){
  int i=0;
  int add,key;
  key = getkey(s);
  for(i=0;;i++){
    add = (hash1(key)+i*hash2(key))%1000000;
    if(!strcmp(stack[add],s)) return 1;
    else if(!strcmp(stack[add],'0')) return 0;
  }
  return 0;
}

int getkey(char *s){
  int i;
  int key =0;
  for(i=0;i<strlen(s);i++){
    if(s[i] == 'A') key+=1;
    else if (s[i] == 'C') key +=2;
    else if (s[i] == 'G') key += 3;
    else key += 4;
  }
  return key;
}
int main(){
  int t,n,i;
  char instruction[6];
  char moji[12];
  int key;
  int h;
  init();
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%s %s",instruction,moji);
    if(!strcmp(instruction,"insert")){
      key =  getkey(moji);
      Hash(key,moji);
    }
    else if(!strcmp(instruction,"find")){
      if(find(moji)) printf("yes\n");
      else printf("no\n");
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int find(char*)':
a.cc:51:32: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   51 |     else if(!strcmp(stack[add],'0')) return 0;
      |                                ^~~
      |                                |
      |                                char
In file included from a.cc:2:
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
Language: C++

#include <string>
#include <iostream>
#include <hash_map>

using namespace std;

hash_map<string, bool> record;

int main(int argc, char const *argv[])
{
    int n;
    string oper, s;
    while (~scanf("%d", &n))
    {
        record.clear();
        for (int i = 0; i < n; ++i)
        {
            cin >> oper >> s;
            if("insert" == oper) record[s] = true;
            else
            {
                if(record[s]) printf("yes\n");
                else printf("no\n");
            }
        }
    }
    return 0;
}

Compiler output:
In file included from /usr/include/c++/14/backward/hash_map:60,
                 from a.cc:3:
/usr/include/c++/14/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
   32 | #warning \
      |  ^~~~~~~
a.cc:7:1: error: 'hash_map' does not name a type
    7 | hash_map<string, bool> record;
      | ^~~~~~~~
a.cc: In function 'int main(int, const char**)':
a.cc:15:9: error: 'record' was not declared in this scope
   15 |         record.clear();
      |         ^~~~~~
Language: C++

/**
 * ??\????????????????????????????°?????????????????????????????£??????????????????????

insert str: ????????? str ??????????????????
find str: ????????? str ?????????????????´??? 'yes'??¨????????????????????´??? 'no'??¨???????????????
??\???
??????????????????????????° n ?????????????????????????¶???? n ?????? n
??¶?????????????????????????????????????????????????????¢??????????¨??????¨????????§?????????

??????
??? find ?????????????????????yes ????????? no ???????????????????????????????????????

??¶?´?
??????????????????????????????'A', 'C', 'G', 'T' ???????¨????????????????????§????????????????
1????????????????????????12
n???1,000,000
??\?????? 1
6
insert AAA
insert AAC
find AAA
find CCC
insert CCC
find CCC
????????? 1
yes
no
yes
??\?????? 2
13
insert AAA
insert AAC
insert AGA
insert AGG
insert TTT
find AAA
find CCC
find CCC
insert CCC
find CCC
insert T
find TTT
find T
????????? 2
yes
no
no
yes
yes
yes
 */

#include <iostream>
#include <sstream>
#include <vector>

int main(int argc, char const *argv[]) {
  unsigned int n = 0;
  std::string Param;
  std::istringstream iss;
  std::string Command;
  std::string Word;
  std::vector<std::string> Dic;

  getline(std::cin, Param);
  iss.str(Param);
  iss >> n;
  iss.clear();
  for (size_t i = 0; i < n; i++) {
    getline(std::cin, Param);
    iss.str(Param);
    iss >> Command >> Word;
    iss.clear();
    if (Command == "insert") {
      Dic.push_back(Word);
    } else if (Command == "find") {
      auto Result = find(Dic.begin(), Dic.end(), Word);
      if (Result != Dic.end()) {
        std::cout << "yes" << std::endl;
      } else {
        std::cout << "no" << std::endl;
      }
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:77:25: error: no matching function for call to 'find(std::vector<std::__cxx11::basic_string<char> >::iterator, std::vector<std::__cxx11::basic_string<char> >::iterator, std::string&)'
   77 |       auto Result = find(Dic.begin(), Dic.end(), Word);
      |                     ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:53:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:77:25: note:   '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' is not derived from 'std::istreambuf_iterator<_CharT>'
   77 |       auto Result = find(Dic.begin(), Dic.end(), Word);
      |                     ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

int findWord(string S[], string word, int n){
	for (int i = 0; i <= n; i++)
		if (S[i] == word){
			return 1;
		}
	return 0;
}

int main(){
	stack S[;
	int n;
	string order, str;
	scanf("%d", &n);
	int count = 0;
	for(int i=0;i<n;i++){
		scanf("%s %s", order str);
		if (order == "insert"){
			S[count++] = order;
		}
		else if (order == "find"){
			if (findWord(S, str, count)){
				printf("yes\n");
			}
			else{
				printf("no\n")
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: expected primary-expression before ';' token
   14 |         stack S[;
      |                 ^
a.cc:14:17: error: expected ']' before ';' token
   14 |         stack S[;
      |                 ^
      |                 ]
a.cc:20:37: error: expected ')' before 'str'
   20 |                 scanf("%s %s", order str);
      |                      ~              ^~~~
      |                                     )
a.cc:22:25: error: 'S' was not declared in this scope
   22 |                         S[count++] = order;
      |                         ^
a.cc:25:38: error: 'S' was not declared in this scope
   25 |                         if (findWord(S, str, count)){
      |                                      ^
a.cc:29:47: error: expected ';' before '}' token
   29 |                                 printf("no\n")
      |                                               ^
      |                                               ;
   30 |                         }
      |                         ~
Language: C++

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

int findWord(string S[], string word, int n){
	for (int i = 0; i <= n; i++)
		if (S[i] == word){
			return 1;
		}
	return 0;
}

int main(){
	string S[10000];
	int n;
	string order, str;
	scanf("%d", &n);
	int count = 0;
	for(int i=0;i<n;i++){
		scanf("%s %s", order str);
		if (order == "insert"){
			S[count++] = order;
		}
		else if (order == "find"){
			if (findWord(S, str, count)){
				printf("yes\n");
			}
			else{
				printf("no\n")
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:37: error: expected ')' before 'str'
   20 |                 scanf("%s %s", order str);
      |                      ~              ^~~~
      |                                     )
a.cc:29:47: error: expected ';' before '}' token
   29 |                                 printf("no\n")
      |                                               ^
      |                                               ;
   30 |                         }
      |                         ~
Language: C++

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

int findWord(string S[], string word, int n){
	for (int i = 0; i <= n; i++)
		if (S[i] == word){
			return 1;
		}
	return 0;
}

int main(){
	string S[10000];
	int n;
	string order, str;
	scanf("%d", &n);
	int count = 0;
	for(int i=0;i<n;i++){
		scanf("%s %s", order str);
		if (order == "insert"){
			S[count++] = order;
		}
		else if (order == "find"){
			if (findWord(S, str, count)){
				printf("yes\n");
			}
			else{
				printf("no\n")
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:37: error: expected ')' before 'str'
   21 |                 scanf("%s %s", order str);
      |                      ~              ^~~~
      |                                     )
a.cc:30:47: error: expected ';' before '}' token
   30 |                                 printf("no\n")
      |                                               ^
      |                                               ;
   31 |                         }
      |                         ~
Language: C++

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

int findWord(string S[], string word, int n){
	for (int i = 0; i <= n; i++)
		if (S[i] == word){
			return 1;
		}
	return 0;
}

int main(){
	string S[10000];
	int n;
	string order,str;
	scanf("%d", &n);
	int count = 0;
	for(int i=0;i<n;i++){
		scanf("%s %s", order,str);
		if (order == "insert"){
			S[count++] = order;
		}
		else if (order == "find"){
			if (findWord(S, str, count)){
				printf("yes\n");
			}
			else{
				printf("no\n")
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:47: error: expected ';' before '}' token
   30 |                                 printf("no\n")
      |                                               ^
      |                                               ;
   31 |                         }
      |                         ~
Language: C++

#include<stdio>
#include<cstring>

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

char H[M][L];

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

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

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

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

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

int main() {
  int i, n, h;
  char str[L], com[9];
  for ( i = 0; i < M; i++ ) H[i][0] = '\0';
  scanf("%d", &n);
  for ( i = 0; i < n; i++ ) {
    scanf("%s %s", com, str);

    if ( com[0] == 'i' ) {
      insert(str);
    } else {
      if ( find(str) ) {
        printf("yes\n");
      } else {
        printf("no\n"):
      }
    }
  }

  return 0;
}

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

#include<cstdio>
#include<cstring>

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

char H[M][L];

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

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

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

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

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

int main() {
  int i, n, h;
  char str[L], com[9];
  for ( i = 0; i < M; i++ ) H[i][0] = '\0';
  scanf("%d", &n);
  for ( i = 0; i < n; i++ ) {
    scanf("%s %s", com, str);

    if ( com[0] == 'i' ) {
      insert(str);
    } else {
      if ( find(str) ) {
        printf("yes\n");
      } else {
        printf("no\n"):
      }
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:69:23: error: expected ';' before ':' token
   69 |         printf("no\n"):
      |                       ^
      |                       ;
Language: C++

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

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

char H[M][L];

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

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

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

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:
a.cc: In function 'int h1(int)':
a.cc:28:22: error: 'mod' was not declared in this scope
   28 |         return key % mod;
      |                      ^~~
Language: C++

#include <bits/stdc++.h>

#define rep(i, first, to) for(ll i = first; i < to; ++i)

using namespace std;
typedef long long ll;

struct HashSet {
	string data[(int)1e6];
	const int MAXN = (int)1
		e6;
	const string INIT = "-1";
	HashSet(){
		rep(i, 0, MAXN) {
			data[i] = INIT;
		}
	}
	bool find(string s) {
		int j = h(s);
		//cout << "codefind : " << j << endl;
		rep(i, 0, MAXN) {
			if (data[j] == INIT) return false;
			if (data[j] == s) return true;
			j = (j + 1) % MAXN;
		}
		return false;
	}
	void insert(string s) {
		int j = h(s);
		//cout << "codeinsert : " << j << endl;
		rep(i, 0, MAXN) {
			if (data[j] == INIT) {
				data[j] = s;
				return;
			}
			j = (j + 1) % MAXN;
		}
	}
	int h(string s) {
		int hashcode = 0;
		int j = 1;
		rep(i, 0, s.size()) {
			hashcode += pow(h1(s[i]), i) + j;
		}
		hashcode %= MAXN;
		//cout << "hashcode : " << hashcode << endl;
		return hashcode;
	}
	int h1(char c) {
		if ('A' == c) {
			return 0;
		} else if ('G' == c) {
			return 1;
		} else if ('C' == c) {
			return 2;
		} else if ('T' == c) {
			return 3;
		}
	}
};

int n;
HashSet *mySet = new HashSet();
void solve() {
	string op, s;
	cin >> n;
	rep(i, 0, n) {
		cin >> op >> s;
		if (op == "insert") {
			mySet->insert(s);
		} else {
			if (mySet->find(s)) {
				cout << "yes" << endl;
			} else {
				cout << "no" << endl;
			}
		}
	}
	delete mySet;
}
void test() {
	cout << pow(5, 12) << endl;
}

int main() {
	solve();
	//test();
	return 0;
}

Compiler output:
a.cc:11:17: error: expected ';' before 'e6'
   11 |                 e6;
      |                 ^~
a.cc: In member function 'int HashSet::h1(char)':
a.cc:59:9: warning: control reaches end of non-void function [-Wreturn-type]
   59 |         }
      |         ^
Language: C++

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

char H[M][L]

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

long long getKey(char str[]){
	long lon sum = 0;
	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 = getKet(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:
a.cc:9:1: error: expected initializer before 'int'
    9 | int getChar(char ch){
      | ^~~
a.cc: In function 'long long int getKey(char*)':
a.cc:18:18: error: expected initializer before 'sum'
   18 |         long lon sum = 0;
      |                  ^~~
a.cc:19:14: error: 'i' was not declared in this scope
   19 |         for (i = 0; i < strlen(str); i++){
      |              ^
a.cc:20:17: error: 'sum' was not declared in this scope
   20 |                 sum += p*(getChar(str[i]));
      |                 ^~~
a.cc:20:24: error: 'p' was not declared in this scope
   20 |                 sum += p*(getChar(str[i]));
      |                        ^
a.cc:20:27: error: 'getChar' was not declared in this scope; did you mean 'getchar'?
   20 |                 sum += p*(getChar(str[i]));
      |                           ^~~~~~~
      |                           getchar
a.cc:23:16: error: 'sum' was not declared in this scope
   23 |         return sum;
      |                ^~~
a.cc: In function 'int find(char*)':
a.cc:39:28: error: 'H' was not declared in this scope
   39 |                 if (strcmp(H[h], str) == 0)return 1;
      |                            ^
a.cc: In function 'int insert(char*)':
a.cc:47:15: error: 'getKet' was not declared in this scope; did you mean 'getKey'?
   47 |         key = getKet(str);
      |               ^~~~~~
      |               getKey
a.cc:50:28: error: 'H' was not declared in this scope
   50 |                 if (strcmp(H[h], str) == 0)return 1;
      |                            ^
a.cc: In function 'int main()':
a.cc:62:32: error: 'H' was not declared in this scope
   62 |         for (i = 0; i < M; i++)H[i][0] = '\0';
      |                                ^
Language: C++

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

char H[M][L];

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

long long getKey(char str[]){
	long lon sum = 0;
	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 = getKet(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:
a.cc: In function 'long long int getKey(char*)':
a.cc:18:18: error: expected initializer before 'sum'
   18 |         long lon sum = 0;
      |                  ^~~
a.cc:19:14: error: 'i' was not declared in this scope
   19 |         for (i = 0; i < strlen(str); i++){
      |              ^
a.cc:20:17: error: 'sum' was not declared in this scope
   20 |                 sum += p*(getChar(str[i]));
      |                 ^~~
a.cc:20:24: error: 'p' was not declared in this scope
   20 |                 sum += p*(getChar(str[i]));
      |                        ^
a.cc:23:16: error: 'sum' was not declared in this scope
   23 |         return sum;
      |                ^~~
a.cc: In function 'int insert(char*)':
a.cc:47:15: error: 'getKet' was not declared in this scope; did you mean 'getKey'?
   47 |         key = getKet(str);
      |               ^~~~~~
      |               getKey
Language: C++

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

char H[M][L];

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

long long getKey(char str[]){
	long long sum = 0;
	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 = getKet(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:
a.cc: In function 'long long int getKey(char*)':
a.cc:19:14: error: 'i' was not declared in this scope
   19 |         for (i = 0; i < strlen(str); i++){
      |              ^
a.cc:20:24: error: 'p' was not declared in this scope
   20 |                 sum += p*(getChar(str[i]));
      |                        ^
a.cc: In function 'int insert(char*)':
a.cc:47:15: error: 'getKet' was not declared in this scope; did you mean 'getKey'?
   47 |         key = getKet(str);
      |               ^~~~~~
      |               getKey
Language: C++

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

char H[M][L];

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

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

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

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

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

int insert(char str[]){
	long long key, i, h;
	key = getKet(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:
a.cc: In function 'int insert(char*)':
a.cc:47:15: error: 'getKet' was not declared in this scope; did you mean 'getKey'?
   47 |         key = getKet(str);
      |               ^~~~~~
      |               getKey
Language: C++

#include <cstdint>
#include <string>

using namespace std;

using dictionary_key_t = uint64_t;

#define NIL UINT64_MAX
#define DICT_SIZE 1000000

static dictionary_key_t dict[DICT_SIZE];

void dictionary_init()
{
  for (uint32_t i = 0; i < DICT_SIZE; i++) {
    dict[i] = NIL;
  }
}

static dictionary_key_t to_key(string str, uint32_t i)
{
  dictionary_key_t key = 0;

  for (int32_t i = str.size(); i >= 0; i--) {
    key <<= 3;
    switch (str[i]) {
    case 'A':
      key |= 0b001;
      break;
    case 'C':
      key |= 0b010;
      break;
    case 'G':
      key |= 0b011;
      break;
    case 'T':
      key |= 0b100;
      break;
    }
  }

  return ((key % DICT_SIZE) + i * (1 + (key % (DICT_SIZE - 1)))) % DICT_SIZE;
}

void dictionary_insert(string str)
{
  uint32_t index = 0;
  while (true) {
    dictionary_key_t key = to_key(str, index);

    if (dict[key] == NIL) {
      dict[key] = key;
      return;
    } else if (dict[key] == key) {
      return;
    }

    index++;
  }
}

bool dictionary_find(string str)
{
  uint32_t index = 0;

  while (true) {
    dictionary_key_t key = to_key(str, index);

    if (dict[key] == key) {
      return true;
    } else if (dict[key] == NIL) {
      return false;
    }

    index++;
  }
}

#if !defined(TEST)
#include <cstdio>
#include <iostream>
int32_t main()
{
  uint32_t num;
  cin >> num;

  dictionary_init();
  for (uint32_t i = 0; i < num; i++) {
    char command[10];
    char str[13];

    scanf("%s %s", command, str);
    switch (command[0]) {
    case 'i': {
      string s(str);
      dictionary_insert(s);
      break;
    }
    case 'f': {
      string s(str);

      if (dictionary_find(s)) {
        printf("yes\n");
      } else {
        printf("no\n");
      }
      break;
    }
    }
  }

  return 0;
}
#endif


bool dictionary_find(string str)
{
  uint32_t index = 0;

  while (true) {
    dictionary_key_t key = to_key(str, index);

    if (dict[key] == key) {
      return true;
    } else if (dict[key] == NIL) {
      return false;
    }

    index++;
  }
}

#if !defined(TEST)
#include <cstdio>
#include <iostream>
int32_t main()
{
  uint32_t num;
  cin >> num;

  dictionary_init();
  for (uint32_t i = 0; i < num; i++) {
    char command[10];
    char str[13];

    scanf("%s %s", command, str);
    switch (command[0]) {
    case 'i': {
      string s(str);
      dictionary_insert(s);
      break;
    }
    case 'f': {
      string s(str);

      if (dictionary_find(s)) {
        printf("yes\n");
      } else {
        printf("no\n");
      }
      break;
    }
    }
  }

  return 0;
}
#endif

Compiler output:
a.cc:117:6: error: redefinition of 'bool dictionary_find(std::string)'
  117 | bool dictionary_find(string str)
      |      ^~~~~~~~~~~~~~~
a.cc:62:6: note: 'bool dictionary_find(std::string)' previously defined here
   62 | bool dictionary_find(string str)
      |      ^~~~~~~~~~~~~~~
a.cc:137:9: error: redefinition of 'int32_t main()'
  137 | int32_t main()
      |         ^~~~
a.cc:82:9: note: 'int32_t main()' previously defined here
   82 | int32_t main()
      |         ^~~~
Language: C++

#include<Map>
#include<iostream>
#include<string>

int main(){
	int num;
	std::cin >> num;
	
	std::map<std::string,int> dic;
	
	for(int i=0;i<num;i++){
		std::string process,key;
		
		std::cin >> process >> key;
		
		if(process[0]=='i'){
			dic[key]=1;
		}else{
			if(dic[key]==0){
				std::cout << "no" << std::endl;
			}else{
				std::cout << "yes" << std::endl;
			}
		}
	}
	
	return 0;
}

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

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

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

using namespace std;

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

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


long long getkey(char str[]){

  long long sum = 0,p = 1;

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

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

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

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

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

int main(){

  int i,n,h;

  char str[L],com[9];
  for(i = 0;i < M;i++) H[i][0] = '\0';
  scanf("%d", &n);
  for(i = 0;i < n;i++){
    scanf("%s %s",com,str);
    if(com[0] == 'i'){
      insert(str);
    }
    else {
      if(find(str) == 1){
        printf("yes\n");
      }
      else printf("no\n");
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'long long int getkey(char*)':
a.cc:26:21: error: 'strlen' was not declared in this scope
   26 |   for(int i = 0;i < strlen(str); i++){
      |                     ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <cstdio>
  +++ |+#include <cstring>
    4 | 
a.cc: In function 'int find(char*)':
a.cc:42:8: error: 'strcmp' was not declared in this scope
   42 |     if(strcmp(H[h],str) == 0) return 1;
      |        ^~~~~~
a.cc:42:8: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:43:13: error: 'strlen' was not declared in this scope
   43 |     else if(strlen(H[h]) == 0) return 0;
      |             ^~~~~~
a.cc:43:13: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc: In function 'int insert(char*)':
a.cc:53:8: error: 'strcmp' was not declared in this scope
   53 |     if(strcmp(H[h],str) == 0) return 1;
      |        ^~~~~~
a.cc:53:8: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:54:13: error: 'strlen' was not declared in this scope
   54 |     else if(strlen(H[h]) == 0){
      |             ^~~~~~
a.cc:54:13: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:55:7: error: 'strcpy' was not declared in this scope
   55 |       strcpy(H[h], str);
      |       ^~~~~~
a.cc:55:7: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

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

#define HASH_SIZE 10000
#define HASH_FNUM 5
#define HASH_CNUM 4
#define STRL 13

typedef struct node node;

struct node{
  node *next;
  char str[STRL];
};

typedef struct{
  node* first[HASH_SIZE];
}hash_table;

void hasht_init(hash_table *ht){
  
  node *nul = malloc(sizeof(node));
  int i;
  
  nul->next = nul;
  strcpy(nul->str, "");
  
  for(i = 0; i < HASH_SIZE; i++){
    ht->first[i] = nul;
  }
}

int hash(char *ch){
  int len = strlen(ch);
  int i, l, k;
  int sum = 0;
  
  k = 1;
  
  if(len < HASH_FNUM){
    l = len;
  }else l = HASH_FNUM;
  
  for(i = 0; i < l; i++){
    if(ch[i] == 'G'){
      sum = sum + k;
    }else if(ch[i] == 'C'){
      sum = sum + k * 2;
    }else if(ch[i] == 'T'){
      sum = sum + k * 3;
    }
    k = k * 4;
  }
  
  return sum % HASH_SIZE;
}

void insert(hash_table *ht, char *ch){

  int hashn = hash(ch);
  node *newn = malloc(sizeof(node));
  node *oldn = ht->first[hashn];
  
  strcpy(newn->str, ch);
  newn->next = oldn;
  ht->first[hashn] = newn;
  
}

void find(hash_table *ht, char *ch){

  int hashn = hash(ch);
  int flag = 1;

  node *n = ht->first[hashn];

  while(n->next != n){

    if(strcmp(ch, n->str) == 0){
      flag = 0;
      break;
    }else{
      n = n->next;
    }
  }

  if(flag){
    printf("no\n");
  }else{
    printf("yes\n");
  }
}

void debug(hash_table *ht){
  int i;
  node *n;
  for(i = 0; i < HASH_SIZE; i++){
    printf("%d:",i);
    n = ht->first[i];
    while(n != n->next){
      printf("%s ",n->str);
      n = n->next;
    }
    printf("\n");
  }
}

int main(){

  hash_table ht;
  int i,n;
  char str1[7];
  char str2[13];

  hasht_init(&ht);

  scanf("%d",&n);

  for(i = 0; i < n; i++){
    scanf("%s %s",str1, str2);

    if(strcmp(str1, "insert") == 0){
      insert(&ht, str2);
    }else if(strcmp(str1, "find") == 0){
      find(&ht, str2);
    }
    //debug(&ht);
  }

  return 0;
}

Compiler output:
a.cc: In function 'void hasht_init(hash_table*)':
a.cc:23:21: error: invalid conversion from 'void*' to 'node*' [-fpermissive]
   23 |   node *nul = malloc(sizeof(node));
      |               ~~~~~~^~~~~~~~~~~~~~
      |                     |
      |                     void*
a.cc: In function 'void insert(hash_table*, char*)':
a.cc:62:22: error: invalid conversion from 'void*' to 'node*' [-fpermissive]
   62 |   node *newn = malloc(sizeof(node));
      |                ~~~~~~^~~~~~~~~~~~~~
      |                      |
      |                      void*
Language: C++

#include <iostream>
#include <map>
#include <cstdio>
using namespace std;

int main(){
	int n;scanf("%d", &n);
	string s, str;
	map<string, bool> m;
	for(int i = 0;i < n;i++){
		scanf("%s %s", s, str);
		if(s[0] == 'i')m[str] = true;
		else{
			printf("%s\n"m[str]?"yes":"no");
			/*if(m[str])cout << "yes" << endl;
			else cout << "no" << endl;*/
		}
	}
	return 0;
}
//1.78

Compiler output:
a.cc: In function 'int main()':
a.cc:14:32: error: unable to find string literal operator 'operator""m' with 'const char [4]', 'long unsigned int' arguments
   14 |                         printf("%s\n"m[str]?"yes":"no");
      |                                ^~~~~~~
Language: C++

#include <cstdio>
#include <cstring>
using namespace std;
bool d[33554432];
char k[128];

int c(char str[12]){
	int ans = str[0];
	for(int i = 1;i < strlen(str);i++){
		ans <<= 2;
		ans += k[str[i]];
	}
	return ans;
}

int main(){
	k['A'] = 0;k['C'] = 1;k['G'] = 2;k['T'] = 3;
	int n;scanf("%d", &n);
	char s[7], str[12];
	while(n--)
		scanf("%s %s", s, str);
		if(s[0] == 'i')d[c(str)] = true;
		else puts(d[c(str)] ? "yes" : "no");
	}
	return 0;
}

Compiler output:
a.cc:25:9: error: expected unqualified-id before 'return'
   25 |         return 0;
      |         ^~~~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

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

int main(){
    int a,b,c;
    vector<int> V;
    cin>>a;
    for(int i=0;i<a;i++){
        cin>>b;
        V.push_back(b);
    }
    for(int i=0;i<a;i++){
        cout <<V[i]<<endl;
    }
    c=boost::count(V,1);
    cout <<c<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:7: error: 'boost' has not been declared
   15 |     c=boost::count(V,1);
      |       ^~~~~
Language: C++

#include <bits/stdc++.h>
#include <boost/range/algorithm.hpp>
using namespace std;

int main(){
    int a,b,c;
    vector<int> V;
    cin>>a;
    for(int i=0;i<a;i++){
        cin>>b;
        V.push_back(b);
    }
    for(int i=0;i<a;i++){
        cout <<V[i]<<endl;
    }
    c=boost::count(V,1);
    cout <<c<<endl;
    return 0;
}

Compiler output:
a.cc:2:10: fatal error: boost/range/algorithm.hpp: No such file or directory
    2 | #include <boost/range/algorithm.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

class Node {
private:
	char str[12] = "\0";
	Node *p_next = NULL;
public:
	Node(const char s[]) { strcpy(str, s); }
	Node *getNext() { return p_next; }
	bool equal(const char s[]) { return strcmp(str, s) == 0; }
	bool islower(const char s[]) { return strcmp(s, str) < 0; }
	void linkNext(Node *p_n) { p_next = p_n; }
};

class Dictionary {
private:
	Node damy("\0");
public:
	void insert(const char str[]);
	bool find(const char str[]);
};

void Dictionary::insert(const char str[])
{
	Node *p_node = &damy;
	do {
		p_node = p_node->getNext();
	} while (p_node->islower(str));
	
	if (p_next->equal(str)) return;
	
	Node node(str);
	node.linkNext(p_node->getNext());
	p_node->linkNext(node);
}

bool find(const char str[])
{
	Node *p_node = &damy;
	while (p_node->getNext()) {
		if (p_node->equal(str)) return true;
	}
	return false;
}

int main(void)
{
	Dictionary dic;
	
	int n;
	cin >> n;

	char cm[6] = "\0", str[12] = "\0";
	for (int i = 0; i < n; i++) {
		cin >> cm >> str;
		if (strcmp(cm, "insert") == 0) {
			dic.insert(str);
		}
		else if (strcmp(cm, "find") == 0) {
			bool result = dic.find(str);
			if (result) cout << "yes";
			else cout << "no";
			cout << endl;
		}
	}

	return 0;
}

Compiler output:
a.cc:20:19: error: expected identifier before string constant
   20 |         Node damy("\0");
      |                   ^~~~
a.cc:20:19: error: expected ',' or '...' before string constant
a.cc: In member function 'void Dictionary::insert(const char*)':
a.cc:28:25: error: ISO C++ forbids taking the address of an unqualified or parenthesized non-static member function to form a pointer to member function.  Say '&Dictionary::damy' [-fpermissive]
   28 |         Node *p_node = &damy;
      |                         ^~~~
a.cc:28:24: error: cannot convert 'Node (Dictionary::*)(int)' to 'Node*' in initialization
   28 |         Node *p_node = &damy;
      |                        ^~~~~
a.cc:33:13: error: 'p_next' was not declared in this scope
   33 |         if (p_next->equal(str)) return;
      |             ^~~~~~
a.cc:37:26: error: cannot convert 'Node' to 'Node*'
   37 |         p_node->linkNext(node);
      |                          ^~~~
      |                          |
      |                          Node
a.cc:15:29: note:   initializing argument 1 of 'void Node::linkNext(Node*)'
   15 |         void linkNext(Node *p_n) { p_next = p_n; }
      |                       ~~~~~~^~~
a.cc: In function 'bool find(const char*)':
a.cc:42:25: error: 'damy' was not declared in this scope
   42 |         Node *p_node = &damy;
      |                         ^~~~