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

#include <iostream>
#include <cstdio>
#include <vector>
#include <list>
#include <algorithm>
#include <cmath>
#include <stack>
#include <map>
using namespace std;

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}
#define ALL(v) v.begin(), v.end()

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

int getint(string s) {
    int j = 1;
    int a = 0;
    REP(i, s.size()) {
        a += j * getint(s[i]);
        j *= 5;
    }
    return a;
}

int main() {
    int n;
    cin >> n;
    vector<int> v;
    REP(i,n) {
        string s, t;
        cin >> s >> t;
        int h = getint(t);
        if (s == "insert") v.insert(upper_bound(ALL(v), h), h);
        else {
            if (binary_search(ALL(v), h)) cout << "yes" << endl;
            else cout << "no" << endl;
        }
    }
    return 0;
}#include <iostream>
#include <cstdio>
#include <vector>
#include <list>
#include <algorithm>
#include <cmath>
#include <stack>
#include <map>
using namespace std;

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}
#define ALL(v) v.begin(), v.end()

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

int getint(string s) {
    int j = 1;
    int a = 0;
    REP(i, s.size()) {
        a += j * getint(s[i]);
        j *= 5;
    }
    return a;
}

int main() {
    int n;
    cin >> n;
    vector<int> v;
    REP(i,n) {
        string s, t;
        cin >> s >> t;
        int h = getint(t);
        if (s == "insert") v.insert(upper_bound(ALL(v), h), h);
        else {
            if (binary_search(ALL(v), h)) cout << "yes" << endl;
            else cout << "no" << endl;
        }
    }
    return 0;
}

Compiler output:
a.cc:48:2: error: stray '#' in program
   48 | }#include <iostream>
      |  ^
a.cc:48:3: error: 'include' does not name a type
   48 | }#include <iostream>
      |   ^~~~~~~
a.cc:63:5: error: redefinition of 'int getint(char)'
   63 | int getint(char c) {
      |     ^~~~~~
a.cc:16:5: note: 'int getint(char)' previously defined here
   16 | int getint(char c) {
      |     ^~~~~~
a.cc:70:5: error: redefinition of 'int getint(std::string)'
   70 | int getint(string s) {
      |     ^~~~~~
a.cc:23:5: note: 'int getint(std::string)' previously defined here
   23 | int getint(string s) {
      |     ^~~~~~
a.cc:80:5: error: redefinition of 'int main()'
   80 | int main() {
      |     ^~~~
a.cc:33:5: note: 'int main()' previously defined here
   33 | int main() {
      |     ^~~~
Language: C++

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

struct Insert{
  char strI[12];    
};

struct Find{
  char strF[12];
};

int main(){
  int n,i,j,insertcount=0,findcount=0,result=0;
  char c[10];
  struct Insert insert[10000;
  struct Find find[10000];
  
  scanf("%d",&n);
  
  for(i=0;i<n;i++){
    scanf("%s",&c);
    if(strcmp(c,"insert")==0){
      scanf("%s",&insert[insertcount].strI);     
      insertcount++;
    }
    else if(strcmp(c,"find")==0){
      scanf("%s",&find[findcount].strF);
      
      
      for(j=0;j<insertcount;j++){
	if(strcmp(find[findcount].strF,insert[j].strI)==0){
	  printf("yes\n");
	  result=1;
	  break;
	}
      }//for end
       if(result==0){
	printf("no\n");
	 }
      result=0;
      findcount++;
    }//else if end
  }
  
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:29: error: expected ']' before ';' token
   15 |   struct Insert insert[10000;
      |                             ^
      |                             ]
a.cc:23:19: error: 'insert' was not declared in this scope; did you mean 'Insert'?
   23 |       scanf("%s",&insert[insertcount].strI);
      |                   ^~~~~~
      |                   Insert
a.cc:31:40: error: 'insert' was not declared in this scope; did you mean 'Insert'?
   31 |         if(strcmp(find[findcount].strF,insert[j].strI)==0){
      |                                        ^~~~~~
      |                                        Insert
Language: C++

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

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:7:5: error: 'chirar' was not declared in this scope; did you mean 'hira'?
    7 |     chirar c;
      |     ^~~~~~
      |     hira
a.cc:18:18: error: 'c' was not declared in this scope
   18 |         hata = ( c = getchar() ) == 'i';
      |                  ^
Language: C++

#include <iostream>
#include <string>
#include <vector>

const int max_key_length = 12;

class Dictionary
{
    std::vector<int> _keys;
    int _char_to_id(char);
    int _to_hash(std::string);
public:
    Dictionary();
    ~Dictionary();
    void insert(std::string);
    bool find(std::string);
};
Dictionary::Dictionary() {
    int max_hashsize = 0;
    int w = 1;
    for (int i = 0; i < max_key_length; i++) {
        max_hashsize += 4 * w;
        w *= 4;
    }
    _keys.resize(max_hashsize);
}

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

    // default
    return 0;
}

int Dictionary::_to_hash(std::string word) {
    int val = 0;
    int w = 1;
    for (int i = 0; i < word.length(); i++) {
        val += _char_to_id(word[i]) * w;
        w *= 4;
    }

    return val;
}

void Dictionary::insert(std::string word) {
    _keys[_to_hash(word)] = true;
}

bool Dictionary::find(std::string word) {
    return _keys[_to_hash(word)];
}

int main(int argc, char const *argv[])
{
    int n;
    std::cin >> n;

    Dictionary dict;
    std::string op;
    std::string word;
    for (int i = 0; i < n; i++) {
        std::cin >> op;
        std::cin >> word;
        if (op[0] == 'i') {
            dict.insert(word);
        } else if (op[0] == 'f') {
            if (dict.find(word))
                std::cout << "yes" << std::endl;
            else
                std::cout << "no" << std::endl;
        }
    }

    return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccK4osqo.o: in function `main':
a.cc:(.text+0x436): undefined reference to `Dictionary::~Dictionary()'
/usr/bin/ld: a.cc:(.text+0x489): undefined reference to `Dictionary::~Dictionary()'
collect2: error: ld returned 1 exit status
Language: C++

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

#define TABLE_SIZE 16777216
#define ORDER_LENGTH 7
#define STR_LENGTH 13

using namespace std;

int translateChar(char ch){
	int ret;
	switch(ch){
	case 'A':
		ret = 1;
		break;
	case 'C':
		ret = 2;
		break;
	case 'G':
		ret = 3;
		break;
	case 'T':
		ret = 4;
		break;
	}
	return ret;
}

int calc(int num){
	if(num == 0){
		return 1;
	}else{
		return 4*calc(num-1);
	}
}

int translateStr(char buf[]){
	int sum = 0;
	for(int i = 0; buf[i] != '\0'; i++){
		sum += translateChar(buf[i])*calc(i);
	}
	return sum - 1;
}

int main(){

	int n;
	scanf("%d,"&n);
	char order[ORDER_LENGTH],str[STR_LENGTH];

	char* check_table = (char*)malloc(TABLE_SIZE);

	for(int i = 0; i < n; i++){
		scanf("%s %s",order,str);
		if(strcmp(order,"insert") == 0){
			check_table[translateStr(str)] = 'Y';
		}else{
			if(check_table[translateStr(str)] == 'Y'){
				printf("yes\n");
			}else{
				printf("no\n");
			}
		}
	}
	free(check_table);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:49:20: error: invalid operands of types 'const char [4]' and 'int' to binary 'operator&'
   49 |         scanf("%d,"&n);
      |               ~~~~~^~
      |               |     |
      |               |     int
      |               const char [4]
a.cc:56:20: error: 'strcmp' was not declared in this scope
   56 |                 if(strcmp(order,"insert") == 0){
      |                    ^~~~~~
a.cc:4:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <stdlib.h>
  +++ |+#include <cstring>
    4 |
Language: C++

20
find CTT
find TAG
insert AA
insert CTC
find G
insert TGT
find AAC
find TTG
insert AA
insert TTG
insert G
insert A
insert GG
insert C
insert TT
find T
insert C
find GG
find G
insert CG
no
no
no
no
no
no
yes
yes

Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 20
      | ^~
Language: C++

#include <iostream>
#include <vector>
#include <string>

using namespace std;

int NumStr(string str)
{
		int n = str.size();
	int sum = 0;
	for(int i=0; i<n; i++){
		if(str[i] == 'A')sum += (pow(4.,i) * 1);
		else if(str[i] == 'C')sum += (pow(4.,i) * 2);
		else if(str[i] == 'G')sum += (pow(4.,i) * 3);
		else if(str[i] == 'T')sum += (pow(4.,i) * 4);
	}
	return sum;
}

void InsertFlag(vector<bool> &flag,string str)
{
	int num_str = NumStr(str);
	flag[num_str] = true;
}

void FindFlag(const vector<bool> &flag,string str)
{
	int num_str = NumStr(str);
	if(flag[num_str] == true)cout << "yes" << endl;
	else if(flag[num_str] == false)cout << "no" << endl;
}

int main()
{
	int n;
	cin >> n;
	vector<bool> flag;
	flag.resize(16777216);

	for(int i=0; i<n; i++){
		string command, str;
		cin >> command >> str;
		if(command == "insert")InsertFlag(flag, str);
		else if(command == "find")FindFlag(flag, str);
	}
}

Compiler output:
a.cc: In function 'int NumStr(std::string)':
a.cc:12:42: error: 'pow' was not declared in this scope
   12 |                 if(str[i] == 'A')sum += (pow(4.,i) * 1);
      |                                          ^~~
a.cc:13:47: error: 'pow' was not declared in this scope
   13 |                 else if(str[i] == 'C')sum += (pow(4.,i) * 2);
      |                                               ^~~
a.cc:14:47: error: 'pow' was not declared in this scope
   14 |                 else if(str[i] == 'G')sum += (pow(4.,i) * 3);
      |                                               ^~~
a.cc:15:47: error: 'pow' was not declared in this scope
   15 |                 else if(str[i] == 'T')sum += (pow(4.,i) * 4);
      |                                               ^~~
Language: C++

#include<iostream>
#include<vector>
 
using namespace std;
 
bool LinearSearch(vector<int> S,int key)
{
    int i = 0;
    while(i != S.size()){
        if(S[i] == key){
            return true;
        }
        i++;
    }
    return false;
}
 
int main()
{
    cin_tie(0);
    ios::sync_with_stdio(false)

    int n;
    int q;
    int count = 0;
    int i = 0;
    vector<int> S;
     
    cin >> n;
    while(S.size() != n){
        int i;
        cin >> i;
        S.push_back(i);
    }
     
    cin >> q;
    while(i != q){
        i++;
        int key;
        cin >> key;
        if(LinearSearch(S,key) == true)count++;
    }
    cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'cin_tie' was not declared in this scope
   20 |     cin_tie(0);
      |     ^~~~~~~
a.cc:21:32: error: expected ';' before 'int'
   21 |     ios::sync_with_stdio(false)
      |                                ^
      |                                ;
   22 | 
   23 |     int n;
      |     ~~~                         
a.cc:29:12: error: 'n' was not declared in this scope
   29 |     cin >> n;
      |            ^
Language: C++

#include<iostream>
#include<vector>
 
using namespace std;
 
bool LinearSearch(vector<int> S,int key)
{
    int i = 0;
    while(i != S.size()){
        if(S[i] == key){
            return true;
        }
        i++;
    }
    return false;
}
 
int main()
{
    cin_tie(0);
    ios::sync_with_stdio(false);

    int n;
    int q;
    int count = 0;
    int i = 0;
    vector<int> S;
     
    cin >> n;
    while(S.size() != n){
        int i;
        cin >> i;
        S.push_back(i);
    }
     
    cin >> q;
    while(i != q){
        i++;
        int key;
        cin >> key;
        if(LinearSearch(S,key) == true)count++;
    }
    cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'cin_tie' was not declared in this scope
   20 |     cin_tie(0);
      |     ^~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cmath>

#pragma hdrstop

#include "Unit2_4_3.h"

//---------------------------------------------------------------------------

#pragma package(smart_init)

using namespace std;

int NumStr(string str)
{
	int n = str.size();
	int sum = 0;
	for(int i=0; i<n; i++){
		if(str[i] == 'A')sum += (pow(4.,i) * 1);
		else if(str[i] == 'C')sum += (pow(4.,i) * 2);
		else if(str[i] == 'G')sum += (pow(4.,i) * 3);
		else if(str[i] == 'T')sum += (pow(4.,i) * 4);
	}
	return sum;
}

void InsertFlag(vector<bool> &flag,string str)
{
	int num_str = NumStr(str);
	flag[num_str] = true;
}

void FindFlag(const vector<bool> &flag,string str)
{
	int num_str = NumStr(str);
	if(flag[num_str] == true)cout << "yes" << endl;
	else if(flag[num_str] == false)cout << "no" << endl;
}

int main()
{
	int n;
	cin >> n;
	vector<bool> flag;
	flag.resize(16777216);

	for(int i=0; i<n; i++){
		string command, str;
		cin >> command >> str;
		if(command == "insert")InsertFlag(flag, str);
		else if(command == "find")FindFlag(flag, str);
	}
}

Compiler output:
a.cc:8:10: fatal error: Unit2_4_3.h: No such file or directory
    8 | #include "Unit2_4_3.h"
      |          ^~~~~~~~~~~~~
compilation terminated.
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: 'gets' is not a member of 'std'; did you mean 'getc'?
   18 |         std::gets(str);
      |              ^~~~
      |              getc
Language: C++

#include<string>
#include<unordered_set>
#include<iostream>
using namespace std;
int main(){
    typedef unordered_set<string> set_t;
    set_t A;
    int n;
    cin>>n;
    string cmd,str;
    for (int i=0;i<n;++i){
        while(cin>>cmd&&cmd!="end"){
            if(cmd=="insert"){
                cin>>str;
                A.insert(str);
            }
            else if(cmd=="find"){
                cin>>str;
                if(find(A.begin(),A.end(),str)==A.end()){
                    cout<<"no"<<endl;
                }
                else cout<<"yes"<<endl;
            }
        }
   
    }
    return 0;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:24: error: no matching function for call to 'find(std::unordered_set<std::__cxx11::basic_string<char> >::iterator, std::unordered_set<std::__cxx11::basic_string<char> >::iterator, std::string&)'
   19 |                 if(find(A.begin(),A.end(),str)==A.end()){
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~
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:3:
/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:19:24: note:   'std::__detail::_Node_iterator<std::__cxx11::basic_string<char>, true, true>' is not derived from 'std::istreambuf_iterator<_CharT>'
   19 |                 if(find(A.begin(),A.end(),str)==A.end()){
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<string>
#include<unordered_set>
#include<iostream>
using namespace std;
int main(){
    typedef unordered_set<string> unordered_set_t;
    unordered_set_t A;
    int n;
    cin>>n;
    string cmd,str;
    for (int i=0;i<n;++i){
        while(cin>>cmd&&cmd!="end"){
            if(cmd=="insert"){
                cin>>str;
                A.insert(str);
            }
            else if(cmd=="find"){
                cin>>str;
                if(find(A.begin(),A.end(),str)==A.end()){
                    cout<<"no"<<endl;
                }
                else cout<<"yes"<<endl;
            }
        }
   
    }
    return 0;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:24: error: no matching function for call to 'find(std::unordered_set<std::__cxx11::basic_string<char> >::iterator, std::unordered_set<std::__cxx11::basic_string<char> >::iterator, std::string&)'
   19 |                 if(find(A.begin(),A.end(),str)==A.end()){
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~
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:3:
/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:19:24: note:   'std::__detail::_Node_iterator<std::__cxx11::basic_string<char>, true, true>' is not derived from 'std::istreambuf_iterator<_CharT>'
   19 |                 if(find(A.begin(),A.end(),str)==A.end()){
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<string>
#include<set>
#include<iostream>
using namespace std;
int main(){
    typedef set<string> set_t;
    set_t A;
    int n;
    cin>>n;
    string cmd,str;
    for (int i=0;i<n;++i){
        while(cin>>cmd&&cmd!="end"){
            if(cmd=="insert"){
                cin>>str;
                A.insert(str);
            }
            else if(cmd=="find"){
                cin>>str;
                if(find(A.begin(),A.end(),str)==A.end()){
                    cout<<"no"<<endl;
                }
                else cout<<"yes"<<endl;
            }
        }
   
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:24: error: no matching function for call to 'find(std::set<std::__cxx11::basic_string<char> >::iterator, std::set<std::__cxx11::basic_string<char> >::iterator, std::string&)'
   19 |                 if(find(A.begin(),A.end(),str)==A.end()){
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~
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:3:
/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:19:24: note:   'std::_Rb_tree_const_iterator<std::__cxx11::basic_string<char> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   19 |                 if(find(A.begin(),A.end(),str)==A.end()){
      |                    ~~~~^~~~~~~~~~~~~~~~~~~~~~~
Language: C++

def use_dictionary(commands):
    d = {}
    for cmd, word in commands:
        if cmd == 'insert':
            d[word] = True
        elif cmd == 'find':
            if word in d:
                print('yes')
            else:
                print('no')

if __name__ == '__main__':
    # ??????????????\???
    commands = []
    # commands.append(('insert', 'AAA'))
    # commands.append(('insert', 'AAC'))
    # commands.append(('find', 'AAA'))
    # commands.append(('find', 'CCC'))
    # commands.append(('insert', 'CCC'))
    # commands.append(('find', 'CCC'))
    num = int(input())
    for i in range(num):
        commands.append([x for x in input().split(' ')])

    # ???????????????
    use_dictionary(commands)

    # ???????????¨???

Compiler output:
a.cc:4:19: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    4 |         if cmd == 'insert':
      |                   ^~~~~~~~
a.cc:6:21: warning: multi-character character constant [-Wmultichar]
    6 |         elif cmd == 'find':
      |                     ^~~~~~
a.cc:8:23: warning: multi-character character constant [-Wmultichar]
    8 |                 print('yes')
      |                       ^~~~~
a.cc:10:23: warning: multi-character character constant [-Wmultichar]
   10 |                 print('no')
      |                       ^~~~
a.cc:12:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   12 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:13:7: error: invalid preprocessing directive #?
   13 |     # ??????????????\???
      |       ^
a.cc:15:7: error: invalid preprocessing directive #commands
   15 |     # commands.append(('insert', 'AAA'))
      |       ^~~~~~~~
a.cc:16:7: error: invalid preprocessing directive #commands
   16 |     # commands.append(('insert', 'AAC'))
      |       ^~~~~~~~
a.cc:17:7: error: invalid preprocessing directive #commands
   17 |     # commands.append(('find', 'AAA'))
      |       ^~~~~~~~
a.cc:18:7: error: invalid preprocessing directive #commands
   18 |     # commands.append(('find', 'CCC'))
      |       ^~~~~~~~
a.cc:19:7: error: invalid preprocessing directive #commands
   19 |     # commands.append(('insert', 'CCC'))
      |       ^~~~~~~~
a.cc:20:7: error: invalid preprocessing directive #commands
   20 |     # commands.append(('find', 'CCC'))
      |       ^~~~~~~~
a.cc:25:7: error: invalid preprocessing directive #?
   25 |     # ???????????????
      |       ^
a.cc:28:7: error: invalid preprocessing directive #?
   28 |     # ???????????¨???
      |       ^
a.cc:1:1: error: 'def' does not name a type
    1 | def use_dictionary(commands):
      | ^~~
a.cc:3:5: error: expected unqualified-id before 'for'
    3 |     for cmd, word in commands:
      |     ^~~
Language: C++

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


int main(){
	bool flag;
	int n;
	string a;
	string command;
	map<string,int> map;
	cin >> n;
	while(n--){
		cin >> command;
		if(command == "insert"){
			cin >> a;
			map.insert(map<string,int>::value_type(a,0));
		}else if(command == "find"){
			cin >> a;
			flag=false;
			map<string,int>::iterator ma = map.find(a);
			if(ma != map.end()){
				cout << "yes"<<endl;
			}else{
				cout << "no"<<endl;
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:46: error: expected primary-expression before ',' token
   18 |                         map.insert(map<string,int>::value_type(a,0));
      |                                              ^
a.cc:18:47: error: expected primary-expression before 'int'
   18 |                         map.insert(map<string,int>::value_type(a,0));
      |                                               ^~~
a.cc:22:35: error: expected primary-expression before ',' token
   22 |                         map<string,int>::iterator ma = map.find(a);
      |                                   ^
a.cc:22:36: error: expected primary-expression before 'int'
   22 |                         map<string,int>::iterator ma = map.find(a);
      |                                    ^~~
a.cc:23:28: error: 'ma' was not declared in this scope; did you mean 'map'?
   23 |                         if(ma != map.end()){
      |                            ^~
      |                            map
Language: C++

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
using namespace std;
const int num1 = 104537;
const int num2 = 13;
char c[num1][num2];
inline int getInt(char ch) {
	if (ch == 'A') return 1;
	else if (ch == 'C') return 2;
	else if (ch == 'G') return 3;
	else if (ch == 'T') return 4;
	return 0;
}
inline int getKey(char str[]) {
	int p = 1 ,sum = 0;
	for (int i = 0; i < strlen(str); i++) {
		sum += p*str[i];
		p *= 5;
	}
	return sum;
}
int h1(char str[]) { return getKey(str) % num1;}
int h2(char str[]) { return 1 + getKey(str) % (num1 - 1); }
inline int insert(char str[]) {
	int i;
	for (i = 0; ; i++) {
		int h = (h1(str) + i*h2(str)) % num1;
		if (strcmp(c[h], str) == 0) return 0;
		else if (strlen(c[h]) == 0) {
			strcpy(c[h], str);
			return 0;
		}
	}
	return 0;
}
inline int find(char str[]) {
	int i;
	int sum = 0;
	for (i = 0; sum < 104538; i++) {
		int h = (h1(str) + i*h2(str)) % num1;
		if (strcmp(c[h], str) == 0) return 1;
		else if (strlen(c[h]) == 0) return 0;
		sum++;
	}
	return 0;
}
int main() {
	int n;
	char com[7], str[num2];
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> com >> str;
		if (com[0] == 'i')
			insert(str);
		else if (find(str))
			cout << "yes" << endl;
		else cout << "no" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int getKey(char*)':
a.cc:16:29: error: 'strlen' was not declared in this scope
   16 |         for (int i = 0; i < strlen(str); i++) {
      |                             ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <iostream>
  +++ |+#include <cstring>
    3 | using namespace std;
a.cc: In function 'int insert(char*)':
a.cc:28:21: error: 'strcmp' was not declared in this scope
   28 |                 if (strcmp(c[h], str) == 0) return 0;
      |                     ^~~~~~
a.cc:28:21: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:29:26: error: 'strlen' was not declared in this scope
   29 |                 else if (strlen(c[h]) == 0) {
      |                          ^~~~~~
a.cc:29:26: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:30:25: error: 'strcpy' was not declared in this scope
   30 |                         strcpy(c[h], str);
      |                         ^~~~~~
a.cc:30:25: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc: In function 'int find(char*)':
a.cc:41:21: error: 'strcmp' was not declared in this scope
   41 |                 if (strcmp(c[h], str) == 0) return 1;
      |                     ^~~~~~
a.cc:41:21: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:42:26: error: 'strlen' was not declared in this scope
   42 |                 else if (strlen(c[h]) == 0) return 0;
      |                          ^~~~~~
a.cc:42:26: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

import sys
input()
r = sys.stdin.readlines()
d = {}

for i in r:
    if i[0] == 'i':
        d[i[7:]] = 0
    else:
        print('yes' if i[5:] in d else 'no')

Compiler output:
a.cc:10:15: warning: multi-character character constant [-Wmultichar]
   10 |         print('yes' if i[5:] in d else 'no')
      |               ^~~~~
a.cc:10:40: warning: multi-character character constant [-Wmultichar]
   10 |         print('yes' if i[5:] in d else 'no')
      |                                        ^~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'for'
    6 | for i in r:
      | ^~~
Language: C++

#if 0
????????£????????????15m
set??§???????????????1.61s?????£??????????????????????????§?????????
?????????unordered_set??§???1.14s?????£??????
1s?????????????????§???????????¨?????????????????£?????????
set???????????¨??¢?´¢??????????????±???????????????????????????????????????????????¨??????????????????
#endif

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

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

Compiler output:
a.cc:2:9: error: extended character £ is not valid in an identifier
    2 | ????????£????????????15m
      |         ^
a.cc:3:6: error: extended character § is not valid in an identifier
    3 | set??§???????????????1.61s?????£??????????????????????????§?????????
      |      ^
a.cc:3:32: error: extended character £ is not valid in an identifier
    3 | set??§???????????????1.61s?????£??????????????????????????§?????????
      |                                ^
a.cc:3:59: error: extended character § is not valid in an identifier
    3 | set??§???????????????1.61s?????£??????????????????????????§?????????
      |                                                           ^
a.cc:4:25: error: extended character § is not valid in an identifier
    4 | ?????????unordered_set??§???1.14s?????£??????
      |                         ^
a.cc:4:39: error: extended character £ is not valid in an identifier
    4 | ?????????unordered_set??§???1.14s?????£??????
      |                                       ^
a.cc:5:20: error: extended character § is not valid in an identifier
    5 | 1s?????????????????§???????????¨?????????????????£?????????
      |                    ^
a.cc:5:50: error: extended character £ is not valid in an identifier
    5 | 1s?????????????????§???????????¨?????????????????£?????????
      |                                                  ^
a.cc:6:18: error: extended character ¢ is not valid in an identifier
    6 | set???????????¨??¢?´¢??????????????±???????????????????????????????????????????????¨??????????????????
      |                  ^
a.cc:6:20: error: extended character ¢ is not valid in an identifier
    6 | set???????????¨??¢?´¢??????????????±???????????????????????????????????????????????¨??????????????????
      |                    ^
a.cc:6:36: error: extended character ± is not valid in an identifier
    6 | set???????????¨??¢?´¢??????????????±???????????????????????????????????????????????¨??????????????????
      |                                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
bool hash[444444444445];
int main(){
  int n,i,t;
  cin>>n;
  while(n--){
    char a[10],b[14];
    scanf("%s %s",a,b);
    for(i=0;i<strlen(b);i++){
      if(b[i]=='A')b[i]='1';
      if(b[i]=='C')b[i]='2';
      if(b[i]=='G')b[i]='3';
      if(b[i]=='T')b[i]='4';
    }
    sscanf(b,"%d",&t);
    if(a[0]=='i')hash[t]++;
    else{
      if(hash[t])cout<<"yes"<<endl;
      else cout<<"no"<<endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:18: error: reference to 'hash' is ambiguous
   17 |     if(a[0]=='i')hash[t]++;
      |                  ^~~~
In file included from /usr/include/c++/14/string_view:50,
                 from /usr/include/c++/14/bits/basic_string.h:47,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:3:6: note:                 'bool hash [444444444445]'
    3 | bool hash[444444444445];
      |      ^~~~
a.cc:19:10: error: reference to 'hash' is ambiguous
   19 |       if(hash[t])cout<<"yes"<<endl;
      |          ^~~~
/usr/include/c++/14/bits/functional_hash.h:59:12: note: candidates are: 'template<class _Tp> struct std::hash'
   59 |     struct hash;
      |            ^~~~
a.cc:3:6: note:                 'bool hash [444444444445]'
    3 | bool hash[444444444445];
      |      ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
bool h[444444444445];
int main(){
  int n,i,t;
  cin>>n;
  while(n--){
    char a[10],b[14];
    scanf("%s %s",a,b);
    for(i=0;i<strlen(b);i++){
      if(b[i]=='A')b[i]='1';
      if(b[i]=='C')b[i]='2';
      if(b[i]=='G')b[i]='3';
      if(b[i]=='T')b[i]='4';
    }
    sscanf(b,"%d",&t);
    if(a[0]=='i')h[t]++;
    else{
      if(h[t])cout<<"yes"<<endl;
      else cout<<"no"<<endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:21: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
   17 |     if(a[0]=='i')h[t]++;
      |                  ~~~^
Language: C++

#include<iostream>
#include<cstdio>
#include<map>
#include<string>
using namespace std;
map<string,bool>S;
char com[7];
char  str[13];
int n;

int main(){
	scanf("%d",&n);
	for(int j=0;j<n;j++){
	scanf("%s %s",com,str);
	if(com[0]=='i'){
		S[string(str)]=true;
		}
		else if(S[string(str)]==true){
			cout<<"yes"<<endl;
			else cout<<"no"<<endl;
			}
	}
	return 0;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:25: error: expected '}' before 'else'
   20 |                         else cout<<"no"<<endl;
      |                         ^~~~
a.cc:18:46: note: to match this '{'
   18 |                 else if(S[string(str)]==true){
      |                                              ^
a.cc: At global scope:
a.cc:23:9: error: expected unqualified-id before 'return'
   23 |         return 0;
      |         ^~~~~~
a.cc:24:9: error: expected declaration before '}' token
   24 |         }
      |         ^
Language: C++

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

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

char H[M][L];

int makeint(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 makekey(char str[]) {
	long long sum = 0, p = 1, i;
	for (i = 0; i < strlen(str); i++) {
		sum += p*(makeint(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 = makekey(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 = makekey(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], c[9];
	for (i = 0; i < M; i++) H[i][0] = '\0';
	scanf("%d", &n);
	for (i = 0; i < n; i++) {
		scanf("%s%s", str, c);
		if (c[0] == 'i') {
			insert(str);
		}
		else if (c[0] == 'f') {
			if (find(str)) {
				printf("yes\n");
			}
			else {
				printf("no\n");
			}
		}
	}
    return 0;
}

Compiler output:
a.cc: In function 'long long int makekey(char*)':
a.cc:21:25: error: 'strlen' was not declared in this scope
   21 |         for (i = 0; i < strlen(str); 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<stdio.h>
a.cc: In function 'int find(char*)':
a.cc:36:21: error: 'strcmp' was not declared in this scope
   36 |                 if (strcmp(H[h], str) == 0) return 1;
      |                     ^~~~~~
a.cc:36:21: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:37:26: error: 'strlen' was not declared in this scope
   37 |                 else if (strlen(H[h]) == 0) return 0;
      |                          ^~~~~~
a.cc:37:26: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc: In function 'int insert(char*)':
a.cc:47:21: error: 'strcmp' was not declared in this scope
   47 |                 if (strcmp(H[h], str) == 0) return 1;
      |                     ^~~~~~
a.cc:47:21: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:48:26: error: 'strlen' was not declared in this scope
   48 |                 else if (strlen(H[h]) == 0) {
      |                          ^~~~~~
a.cc:48:26: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:49:25: error: 'strcpy' was not declared in this scope
   49 |                         strcpy(H[h], str);
      |                         ^~~~~~
a.cc:49:25: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <cstdio>
#include <cstring>

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

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 h(long long key, int i) {
//   return (h1(key) + i * h2(key)) % M;
// }

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

void insert(char str[]) {
  int i = 0, j;
  long long key = getKey(str);
  while (1) {
    j = h(key, i);
    if (strcmp(H[j], str) == 0)
      return;
    else if (strlen(H[j]) == 0)
      strcpy(H[j], str);
      return;
    ++i;
  }
}

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

Compiler output:
a.cc: In function 'void insert(char*)':
a.cc:62:9: error: 'h' was not declared in this scope
   62 |     j = h(key, i);
      |         ^
Language: C++

#include<set>
#include<string>
#include<iostream>
#include <algorithm>
int main(void) {
	int n;
	std::cin >> n;
	std::set<std::string>DICTIONARY;
	std::string COMMAND;
	for (int i = 0; i < n; ++i) {
		std::cin >> COMMAND;
		if (COMMAND == "insert") {
			std::cin >> COMMAND;
			DICTIONARY.insert(COMMAND);
		}
		else if (COMMAND == "find") {
			std::cin >> COMMAND;
			std::cout << &DICTIONARY.begin() << " " << &DICTIONARY.end();
			if (std::find(DICTIONARY.begin(), DICTIONARY.end(), COMMAND) != DICTIONARY.end())
			{
				std::cout << "yes" << std::endl;
			}
			else { std::cout << "no" << std::endl; }
		}
	}
	//	system("pause");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:55: error: taking address of rvalue [-fpermissive]
   18 |                         std::cout << &DICTIONARY.begin() << " " << &DICTIONARY.end();
      |                                       ~~~~~~~~~~~~~~~~^~
a.cc:18:83: error: taking address of rvalue [-fpermissive]
   18 |                         std::cout << &DICTIONARY.begin() << " " << &DICTIONARY.end();
      |                                                                     ~~~~~~~~~~~~~~^~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
using namespace std;
int main(){
	vector<string>d;
	long n; cin >> n;
	for (int i = 0; i < n; i++){
		string s, str;
		cin >> s >> str;
		if (s == "insert")d.push_back(str);
		else{
			if (find(d.begin(), d.end(), str) != l.end())cout << "yes";
			else cout << "no";
			cout << endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:62: error: 'l' was not declared in this scope
   14 |                         if (find(d.begin(), d.end(), str) != l.end())cout << "yes";
      |                                                              ^
Language: C++

#include<stack>
#include<cstdlib>
typedef long long ll;
using namespace std;
#define M 1020751

int main(){
  int i,n;
  cin>>n;
  string order,word;
  vector<string> d;
  queue<string> q;
  for(i=0;i<n;i++){
    cin>>order>>word;
    if(order[0]=='i'){
      d.push_back(word);
    }else{
      auto itr=find(d.begin(),d.end(),word);
      if(itr!=d.end()){
	q.push("yes");
      }else{
	q.push("no");
      }
    }
  }
  while(!q.empty()){
    cout<<q.front()<<endl;
    q.pop();
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   cin>>n;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<cstdlib>
  +++ |+#include <iostream>
    3 | typedef long long ll;
a.cc:10:3: error: 'string' was not declared in this scope
   10 |   string order,word;
      |   ^~~~~~
a.cc:3:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    2 | #include<cstdlib>
  +++ |+#include <string>
    3 | typedef long long ll;
a.cc:11:3: error: 'vector' was not declared in this scope
   11 |   vector<string> d;
      |   ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include<cstdlib>
  +++ |+#include <vector>
    3 | typedef long long ll;
a.cc:11:18: error: 'd' was not declared in this scope
   11 |   vector<string> d;
      |                  ^
a.cc:12:3: error: 'queue' was not declared in this scope
   12 |   queue<string> q;
      |   ^~~~~
a.cc:3:1: note: 'std::queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>'
    2 | #include<cstdlib>
  +++ |+#include <queue>
    3 | typedef long long ll;
a.cc:12:17: error: 'q' was not declared in this scope
   12 |   queue<string> q;
      |                 ^
a.cc:14:10: error: 'order' was not declared in this scope
   14 |     cin>>order>>word;
      |          ^~~~~
a.cc:14:17: error: 'word' was not declared in this scope
   14 |     cin>>order>>word;
      |                 ^~~~
a.cc:18:16: error: 'find' was not declared in this scope
   18 |       auto itr=find(d.begin(),d.end(),word);
      |                ^~~~
a.cc:27:5: error: 'cout' was not declared in this scope
   27 |     cout<<q.front()<<endl;
      |     ^~~~
a.cc:27:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:27:22: error: 'endl' was not declared in this scope
   27 |     cout<<q.front()<<endl;
      |                      ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<cstdlib>
  +++ |+#include <ostream>
    3 | typedef long long ll;
Language: C++

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

using namespace std;
list<string> lst;

int main()
{
	int dataset; scanf_s("%d", &dataset); 
	for (int i = 0; i < dataset; i++)
	{
		string order;
		cin >> order;
		if (order[0] == 'i') {
			string a; cin >> a;
			lst.push_front(a);
		}
		else {
			string finder;
			cin >> finder;
			bool a = true;
			for (auto itr = lst.begin(); itr != lst.end(); itr++)
			{
				if (*itr == finder) {
					cout << "yes" << endl;
					a = false;
					break;
				}
			}
			if (a == true) {
				cout << "no" << endl;
			}
		}
	}
	return 0;
}

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

#include<iostream>
#include<string>
#include<list>
#include <stdio.h>
#include<set>

using namespace std;
set<string> lst;

int main()
{
	int dataset; scanf_s("%d", &dataset);
	for (int i = 0; i < dataset; i++)
	{
		cout << "a";
		string order;
		cin >> order;
		if (order[0] == 'i') {
			string a; cin >> a;
			lst.insert(a);
		}
		else {
			string finder;
			cin >> finder;
			if (lst.find(finder) == lst.end()) {
				cout << "no" << endl;
			}
			else {
				cout<<"yes"<<endl;
			}

		}
	}
	return 0;
}

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

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

const int MAX = 1000000;

int strToInt(string mes) {
	long long key;
	key = 0;
	for (int i = 0; i < strlen(mes.c_str()); 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[], string 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[], string 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++) {
		cout << answer[i] << endl;
	}
}
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;

	for (int i = 0; i < num; i++) {
		string command;
		string message;
		cin >> command;
		cin >> message;
		if (command[0] == 'i') {
			insertHash(dictionary, message);
		}
		else {
			if (findHash(dictionary, message)) {
				answer[ansMaxPoint++] = "yes";
			}
			else {
				answer[ansMaxPoint++] = "no";
			}
		}
	}

	dumpList(answer, ansMaxPoint);
	return 0;
}

Compiler output:
a.cc: In function 'int strToInt(std::string)':
a.cc:10:29: error: 'strlen' was not declared in this scope
   10 |         for (int i = 0; i < strlen(mes.c_str()); 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>