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

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

int whatKindOf(std::string);

int main()
{
	int n;
	std::string str;
	std::cin >> n;
	for(int i=0; i<n; i++){
		std::cin >> str;
		std::cout << whatKindOf(str) << std::endl;
		for(unsigned int i=0; i<str.length(); i++) str[i] = '\0';
	}
	return 0;
}

int whatKindOf(std::string str)
{
	unsigned int i, len=str.length();
	bool exist = false;
	std::string t1,
		t1_r,
		t2,
		t2_r,
		str2;
	std::vector<std::string> buf;
	std::vector<std::string>::iterator itr, end;
	buf.push_back(str);
	for(i=1; i<len; i++){
		t1 = str.substr(0, i);
		t1_r = t1;
		t2 = str.substr(i, len-i);
		t2_r = t2;
		std::reverse(t1_r.begin(), t1_r.end());
		std::reverse(t2_r.begin(), t2_r.end());

		str2 = t2+t1;
		for(itr = buf.begin(); itr!= buf.end(); itr++)
			if(*itr==str2){
				exist = true;
				break;
			}
		if(exist) exist = false;
		else buf.push_back(str2);

		str2 = t1_r+t2;
		for(itr = buf.begin(); itr!= buf.end(); itr++)
			if(*itr==str2){
				exist = true;
				break;
			}
		if(exist) exist = false;
		else buf.push_back(str2);

		str2 = t2+t1_r;
		for(itr = buf.begin(); itr!= buf.end(); itr++)
			if(*itr==str2){
				exist = true;
				break;
			}
		if(exist) exist = false;
		else buf.push_back(str2);

		str2 = t1+t2_r;
		for(itr = buf.begin(); itr!= buf.end(); itr++)
			if(*itr==str2){
				exist = true;
				break;
			}
		if(exist) exist = false;
		else buf.push_back(str2);

		str2 = t2_r+t1;
		for(itr = buf.begin(); itr!= buf.end(); itr++)
			if(*itr==str2){
				exist = true;
				break;
			}
		if(exist) exist = false;
		else buf.push_back(str2);

		str2 = t1_r+t2_r;
		for(itr = buf.begin(); itr!= buf.end(); itr++)
			if(*itr==str2){
				exist = true;
				break;
			}
		if(exist) exist = false;
		else buf.push_back(str2);

		str2 = t2_r+t1_r;
		for(itr = buf.begin(); itr!= buf.end(); itr++)
			if(*itr==str2){
				exist = true;
				break;
			}
		if(exist) exist = false;
		else buf.push_back(str2);
	}
	return buf.size();
}

Compiler output:
a.cc: In function 'int whatKindOf(std::string)':
a.cc:37:22: error: 'reverse' is not a member of 'std'
   37 |                 std::reverse(t1_r.begin(), t1_r.end());
      |                      ^~~~~~~
a.cc:38:22: error: 'reverse' is not a member of 'std'
   38 |                 std::reverse(t2_r.begin(), t2_r.end());
      |                      ^~~~~~~
Language: C++

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

using namespace std;

int count( string str );
bool check( string str, vector<string> & sv);

int main(int argc, char const *argv[]) {
    int m, sum;
    string str;
    vector<int> v;

    cin>>m;
    for (int i = 0; i < m; i++) {
        cin>>str;
        sum = count( str );
        v.push_back( sum );
    }

    for(auto it = v.begin(); it != v.end(); it++){
        cout<<*it<<endl;
    }
    return 0;
}

int count( string str ){
    int n, m, scnt;
    int sum = 0;
    int size = str.size();
    string first, second, temp;
    vector<string> sv;

    if( size == 2 ) return 1;
    scnt = size - 1;

    for (int i = 0; i < scnt; i++) {
        for(int j = 0; j < i + 1; j++ ) first.push_back( str[j] );
        for(int j = i+1; j < size; j++ ) second.push_back( str[j] );

        if(check( first + second, sv)) sv.push_back( first + second );
        if(check( second + first, sv)) sv.push_back( second + first );
        reverse(second.begin(), second.end());
        if(check( first + second, sv)) sv.push_back( first + second );
        if(check( second + first, sv)) sv.push_back( second + first );
        reverse(first.begin(), first.end());
        if(check( first + second, sv)) sv.push_back( first + second );
        if(check( second + first, sv)) sv.push_back( second + first );
        reverse(second.begin(), second.end());
        if(check( first + second, sv)) sv.push_back( first + second );
        if(check( second + first, sv)) sv.push_back( second + first );
        
        first.clear();
        second.clear();
    }
    return sv.size();;
}

bool check( string str, vector<string> &sv ){
    for (auto it = sv.begin(); it != sv.end(); it++) {
        if(*it == str ) return false;
    }
    return true;
}

Compiler output:
a.cc: In function 'int count(std::string)':
a.cc:44:9: error: 'reverse' was not declared in this scope
   44 |         reverse(second.begin(), second.end());
      |         ^~~~~~~
Language: C++

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

using namespace std;

int count( string str );
bool check( string str, vector<string> & sv);

int main(int argc, char const *argv[]) {
    int m, sum;
    string str;
    vector<int> v;

    cin>>m;
    for (int i = 0; i < m; i++) {
        cin>>str;
        sum = count( str );
        v.push_back( sum );
    }

    for(auto it = v.begin(); it != v.end(); it++){
        cout<<*it<<endl;
    }
    return 0;
}

int count( string str ){
    int n, m, scnt;
    int sum = 0;
    int size = str.size();
    string first, second, temp;
    vector<string> sv;

    if( size == 2 ) return 1;
    scnt = size - 1;

    for (int i = 0; i < scnt; i++) {
        for(int j = 0; j < i + 1; j++ ) first.push_back( str[j] );
        for(int j = i+1; j < size; j++ ) second.push_back( str[j] );

        if(check( first + second, sv)) sv.push_back( first + second );
        if(check( second + first, sv)) sv.push_back( second + first );
        reverse(second.begin(), second.end());
        if(check( first + second, sv)) sv.push_back( first + second );
        if(check( second + first, sv)) sv.push_back( second + first );
        reverse(first.begin(), first.end());
        if(check( first + second, sv)) sv.push_back( first + second );
        if(check( second + first, sv)) sv.push_back( second + first );
        reverse(second.begin(), second.end());
        if(check( first + second, sv)) sv.push_back( first + second );
        if(check( second + first, sv)) sv.push_back( second + first );

        first.clear();
        second.clear();
    }
    return sv.size();;
}

bool check( string str, vector<string> &sv ){
    for (auto it = sv.begin(); it != sv.end(); it++) {
        if(*it == str ) return false;
    }
    return true;
}

Compiler output:
a.cc: In function 'int count(std::string)':
a.cc:44:9: error: 'reverse' was not declared in this scope
   44 |         reverse(second.begin(), second.end());
      |         ^~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <set>
using namespace std;
 
int main(){
  int t;
  cin >> t;
 
  for(int i=0;i<t;i++){
    string x;
    cin >> x;
    set<string> st;
    for( int i = 1, length = x.length() ; i < length ; ++i ){
      string left, right;
      left = x.substr(0,i);
     
right = x.substr(i, length-i);
      st.insert(left+right);
      st.insert(right+left);

reverse(right.begin(), right.end());
      st.insert(left+right);
      st.insert(right+left);

reverse(left.begin(), left.end());
      st.insert(light+right);
      st.insert(right+light);
     
reverse(right.begin(), right.end());
      st.insert(light+right);
      st.insert(right+light);
    }
    cout << st.size() << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:17: error: 'light' was not declared in this scope; did you mean 'right'?
   28 |       st.insert(light+right);
      |                 ^~~~~
      |                 right
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <set>
using namespace std;
 
int main(){
  int t;
  cin >> t;
 
  for(int i=0;i<t;i++){
    string x;
    cin >> x;
    set<string> st;
    for( int i = 1, length = x.length() ; i < length ; ++i ){
      string left, right;
      ???left = x.substr(0,i);
	right = x.substr(i, length-i);
      st.insert(left+right);
      st.insert(right+left);
	reverse(right.begin(), right.end());
      st.insert(left+right);
      st.insert(right+left);
	reverse(left.begin(), left.end());
      st.insert(left+right);
      st.insert(right+left);
        reverse(right.begin(), right.end());
      st.insert(left+right);
      st.insert(right+left);
    }
    cout << s.size() << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:7: error: expected primary-expression before '?' token
   17 |       ???left = x.substr(0,i);
      |       ^
a.cc:17:8: error: expected primary-expression before '?' token
   17 |       ???left = x.substr(0,i);
      |        ^
a.cc:17:9: error: expected primary-expression before '?' token
   17 |       ???left = x.substr(0,i);
      |         ^
a.cc:17:30: error: expected ':' before ';' token
   17 |       ???left = x.substr(0,i);
      |                              ^
      |                              :
a.cc:17:30: error: expected primary-expression before ';' token
a.cc:17:30: error: expected ':' before ';' token
   17 |       ???left = x.substr(0,i);
      |                              ^
      |                              :
a.cc:17:30: error: expected primary-expression before ';' token
a.cc:17:30: error: expected ':' before ';' token
   17 |       ???left = x.substr(0,i);
      |                              ^
      |                              :
a.cc:17:30: error: expected primary-expression before ';' token
a.cc:31:13: error: 's' was not declared in this scope; did you mean 'st'?
   31 |     cout << s.size() << endl;
      |             ^
      |             st
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <set>
using namespace std;
 
int main(){
  int t;
  cin >> t;
 
  for(int i=0;i<t;i++){
    string x;
    cin >> x;
    set<string> st;
    for( int i = 1, length = x.length() ; i < length ; ++i ){
      string left, right;
      ???left = x.substr(0,i);
	right = x.substr(i, length-i);
      st.insert(left+right);
      st.insert(right+left);
	reverse(right.begin(), right.end());
      st.insert(left+right);
      st.insert(right+left);
	reverse(left.begin(), left.end());
      st.insert(left+right);
      st.insert(right+left);
        reverse(right.begin(), right.end());
      st.insert(left+right);
      st.insert(right+left);
    }
    cout << st.size() << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:7: error: expected primary-expression before '?' token
   17 |       ???left = x.substr(0,i);
      |       ^
a.cc:17:8: error: expected primary-expression before '?' token
   17 |       ???left = x.substr(0,i);
      |        ^
a.cc:17:9: error: expected primary-expression before '?' token
   17 |       ???left = x.substr(0,i);
      |         ^
a.cc:17:30: error: expected ':' before ';' token
   17 |       ???left = x.substr(0,i);
      |                              ^
      |                              :
a.cc:17:30: error: expected primary-expression before ';' token
a.cc:17:30: error: expected ':' before ';' token
   17 |       ???left = x.substr(0,i);
      |                              ^
      |                              :
a.cc:17:30: error: expected primary-expression before ';' token
a.cc:17:30: error: expected ':' before ';' token
   17 |       ???left = x.substr(0,i);
      |                              ^
      |                              :
a.cc:17:30: error: expected primary-expression before ';' token
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <set>
using namespace std;
 
int main(){
  int m;
  cin >> m;
 
  for(int i=0;i<m;i++){
    string x;
    cin >> x;
    set<string> st;
    for( int i = 1, length = x.length() ; i < length ; ++i ){
      string left, right;
      ???left = x.substr(0,i);
	right = x.substr(i, length-i);
      st.insert(left+right);
      st.insert(right+left);
	reverse(right.begin(), right.end());
      st.insert(left+right);
      st.insert(right+left);
	reverse(left.begin(), left.end());
      st.insert(left+right);
      st.insert(right+left);
        reverse(right.begin(), right.end());
      st.insert(left+right);
      st.insert(right+left);
    }
    cout << st.size() << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:7: error: expected primary-expression before '?' token
   17 |       ???left = x.substr(0,i);
      |       ^
a.cc:17:8: error: expected primary-expression before '?' token
   17 |       ???left = x.substr(0,i);
      |        ^
a.cc:17:9: error: expected primary-expression before '?' token
   17 |       ???left = x.substr(0,i);
      |         ^
a.cc:17:30: error: expected ':' before ';' token
   17 |       ???left = x.substr(0,i);
      |                              ^
      |                              :
a.cc:17:30: error: expected primary-expression before ';' token
a.cc:17:30: error: expected ':' before ';' token
   17 |       ???left = x.substr(0,i);
      |                              ^
      |                              :
a.cc:17:30: error: expected primary-expression before ';' token
a.cc:17:30: error: expected ':' before ';' token
   17 |       ???left = x.substr(0,i);
      |                              ^
      |                              :
a.cc:17:30: error: expected primary-expression before ';' token
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <set>
using namespace std;
 
int main(){
  int m;
  cin >> m;
 
  for(int i=0;i<m;i++){
    string train;
    cin >> train;
    set<string> st;
    for( int i = 1, length = train.length() ; i < length ; ++i ){
      string left, right;
      ???left = train.substr(0,i);
	right = train.substr(i, length-i);
      st.insert(left+right);
      st.insert(right+left);
	reverse(right.begin(), right.end());
      st.insert(left+right);
      st.insert(right+left);
	reverse(left.begin(), left.end());
      st.insert(left+right);
      st.insert(right+left);
        reverse(right.begin(), right.end());
      st.insert(left+right);
      st.insert(right+left);
    }
    cout << st.size() << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:7: error: expected primary-expression before '?' token
   17 |       ???left = train.substr(0,i);
      |       ^
a.cc:17:8: error: expected primary-expression before '?' token
   17 |       ???left = train.substr(0,i);
      |        ^
a.cc:17:9: error: expected primary-expression before '?' token
   17 |       ???left = train.substr(0,i);
      |         ^
a.cc:17:34: error: expected ':' before ';' token
   17 |       ???left = train.substr(0,i);
      |                                  ^
      |                                  :
a.cc:17:34: error: expected primary-expression before ';' token
a.cc:17:34: error: expected ':' before ';' token
   17 |       ???left = train.substr(0,i);
      |                                  ^
      |                                  :
a.cc:17:34: error: expected primary-expression before ';' token
a.cc:17:34: error: expected ':' before ';' token
   17 |       ???left = train.substr(0,i);
      |                                  ^
      |                                  :
a.cc:17:34: error: expected primary-expression before ';' token
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <set>
using namespace std;
 
int main(){
  int m;
  cin >> m;
 
  for(int i=0;i<m;i++){
    string train;
    cin >> train;
    set<string> st;
    for( int i = 1, length = train.length() ; i < length ; ++i ){
      string x, y;
      ???x = train.substr(0,i);
	y = train.substr(i, length-i);
      st.insert(x+y);
      st.insert(x+y);
	reverse(y.begin(), y.end());
      st.insert(x+y);
      st.insert(y+x);
	reverse(x.begin(), x.end());
      st.insert(x+y);
      st.insert(y+x);
        reverse(y.begin(), y.end());
      st.insert(x+y);
      st.insert(y+x);
    }
    cout << st.size() << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:7: error: expected primary-expression before '?' token
   17 |       ???x = train.substr(0,i);
      |       ^
a.cc:17:8: error: expected primary-expression before '?' token
   17 |       ???x = train.substr(0,i);
      |        ^
a.cc:17:9: error: expected primary-expression before '?' token
   17 |       ???x = train.substr(0,i);
      |         ^
a.cc:17:31: error: expected ':' before ';' token
   17 |       ???x = train.substr(0,i);
      |                               ^
      |                               :
a.cc:17:31: error: expected primary-expression before ';' token
a.cc:17:31: error: expected ':' before ';' token
   17 |       ???x = train.substr(0,i);
      |                               ^
      |                               :
a.cc:17:31: error: expected primary-expression before ';' token
a.cc:17:31: error: expected ':' before ';' token
   17 |       ???x = train.substr(0,i);
      |                               ^
      |                               :
a.cc:17:31: error: expected primary-expression before ';' token
Language: C++

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

int main(){
    int n;
    cin >> n;
    for(int i=0;i<n;i++){
        string train,former,latter;
        cin >> train;
        typedef set<string> set_t;
        set_t C;
        for(int divp=1;divp<train.size();divp++){
            former=train.substr(0,divp);
            latter=train.substr(divp);
            C.insert(former+latter);
            C.insert(latter+former);
            reverse(former.begin(),former.end());
            C.insert(former+latter);
            C.insert(latter+former);
            reverse(latter.begin(),latter.end());
            C.insert(former+latter);
            C.insert(latter+former);
            reverse(former.begin(),former.end());
            C.insert(former+latter);
            C.insert(latter+former);
        }
        cout << C.size() << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: 'reverse' was not declared in this scope
   19 |             reverse(former.begin(),former.end());
      |             ^~~~~~~
Language: C++


#include <iostream>
#include <unordered_set>
#include <string>
#include <cstdlib>
#include <utility>

using namespace std;

void str_ins(string str, unordered_set<string> table)
{
    //if(table.count(str) == 0)
        table.insert(str);
}

int main() {
    int m;
    string train;
    cin >> m;
    for(int i = 0; i < m; i++) {
        unordered_set<string> table;
        cin >> train;
        int length = (int)train.size();
        for(int i = 1; i < length; i++) //??¨??????
        {
            string strs[2];
            strs[0] = train.substr(0,i);
            strs[1] = train.substr(i,train.size()-i);
            str_ins(strs[0], table);
            str_ins(strs[1], table);
            reverse(strs[0].begin(), strs[0].end());
            reverse(strs[1].begin(), strs[1].end());
            str_ins(strs[0], table);
            str_ins(strs[1], table);
        }
        cout << table.size() << endl;
    }
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:13: error: 'reverse' was not declared in this scope
   31 |             reverse(strs[0].begin(), strs[0].end());
      |             ^~~~~~~
Language: C++

#include <iostream>
#include <set>

/*
Organize Your Train part II(http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1142)
?§£?????????:??????L?????????????????????????????????????????????????????????L-1???????????????????????¢????????????4???????????\???????????????????????????2????????????????????£????????????????????°?????????8(L-1)??????????????§???>??¨??????????¢??????????set????????£???????????¨????????????????????°?????????
*/

using namespace std;

//split_string("abcd",out1,out2,1)??¨????????¨
//out1 = "a"
//out2 = "bcd"

void split_string(const string &in,string &out1,string &out2,int idx);
int main(){
  int N;
  cin>>N;
  for(int i=0;i<N;++i){
    set<string> s;
    string train;
    cin>>train;
    int len = train.length();
    for(int j=1;j<len;++j){
      string sub1,sub2;
      split_string(train,sub1,sub2,j);
      for(int k=0;k<2;++k){
        swap(sub1,sub2);
        s.insert(sub1+sub2);
        reverse(sub1.begin(),sub1.end());
        s.insert(sub1+sub2);
        reverse(sub2.begin(),sub2.end());
        s.insert(sub1+sub2);
        reverse(sub1.begin(),sub1.end());
        s.insert(sub1+sub2);
      }
    }
    cout<<s.size()<<endl;
  }


  return 0;
}

void split_string(const string &in,string &out1,string &out2,int idx){
  int i;
  for(i=0;i<idx;++i)
    out1 += in[i];
  for(;i<in.length();++i)
    out2 += in[i];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:9: error: 'reverse' was not declared in this scope
   30 |         reverse(sub1.begin(),sub1.end());
      |         ^~~~~~~
Language: C++

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

int main(){
  int m;
  cin >> m;

  set<string> pattern;
  for(int i=0;i<m;i++){
    string arrival;
    cin >> arrival;
    for(int j=1;j<arrival.size();j++){
      string train[];
      train[0]=arrival.substr(0,j);
      train[1]=arrival.substr(j);
      pattern.push(train[0]+train[1]);
      pattern.push(train[1]+train[0]);
      
      reverse(train[0].begin(),train[1].end());
      pattern.push(train[0]+train[1]);
      pattern.push(train[1]+train[0]);
   
      reverse(train[1].begin(),train[1].end());
      pattern.push(train[0]+train[1]);
      pattern.push(train[1]+train[0]);

      reverse(train[0].begin(),train[1].end());
      pattern.push(train[0]+train[1]);
      pattern.push(train[1]+train[0]);      
    }
    cout << pattern.size();
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: array size missing in 'train'
   16 |       string train[];
      |              ^~~~~
a.cc:19:15: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push'
   19 |       pattern.push(train[0]+train[1]);
      |               ^~~~
a.cc:20:15: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push'
   20 |       pattern.push(train[1]+train[0]);
      |               ^~~~
a.cc:23:15: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push'
   23 |       pattern.push(train[0]+train[1]);
      |               ^~~~
a.cc:24:15: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push'
   24 |       pattern.push(train[1]+train[0]);
      |               ^~~~
a.cc:27:15: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push'
   27 |       pattern.push(train[0]+train[1]);
      |               ^~~~
a.cc:28:15: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push'
   28 |       pattern.push(train[1]+train[0]);
      |               ^~~~
a.cc:31:15: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push'
   31 |       pattern.push(train[0]+train[1]);
      |               ^~~~
a.cc:32:15: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push'
   32 |       pattern.push(train[1]+train[0]);
      |               ^~~~
Language: C++

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

int main(){
  int m;
  cin >> m;

  set<string> pattern;
  for(int i=0;i<m;i++){
    string arrival;
    cin >> arrival;
    for(int j=1;j<arrival.size();j++){
      string train[2];
      train[0]=arrival.substr(0,j);
      train[1]=arrival.substr(j);
      pattern.push(train[0]+train[1]);
      pattern.push(train[1]+train[0]);
      
      reverse(train[0].begin(),train[1].end());
      pattern.push(train[0]+train[1]);
      pattern.push(train[1]+train[0]);
   
      reverse(train[1].begin(),train[1].end());
      pattern.push(train[0]+train[1]);
      pattern.push(train[1]+train[0]);

      reverse(train[0].begin(),train[1].end());
      pattern.push(train[0]+train[1]);
      pattern.push(train[1]+train[0]);      
    }
    cout << pattern.size();
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:15: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push'
   19 |       pattern.push(train[0]+train[1]);
      |               ^~~~
a.cc:20:15: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push'
   20 |       pattern.push(train[1]+train[0]);
      |               ^~~~
a.cc:23:15: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push'
   23 |       pattern.push(train[0]+train[1]);
      |               ^~~~
a.cc:24:15: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push'
   24 |       pattern.push(train[1]+train[0]);
      |               ^~~~
a.cc:27:15: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push'
   27 |       pattern.push(train[0]+train[1]);
      |               ^~~~
a.cc:28:15: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push'
   28 |       pattern.push(train[1]+train[0]);
      |               ^~~~
a.cc:31:15: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push'
   31 |       pattern.push(train[0]+train[1]);
      |               ^~~~
a.cc:32:15: error: 'class std::set<std::__cxx11::basic_string<char> >' has no member named 'push'
   32 |       pattern.push(train[1]+train[0]);
      |               ^~~~
Language: C++

#include <iostream>
#include <vector>
#define REP(i, a, n) for(int i = (a); i < (n); i++)
using namespace std;

int M;

int tohash(string s) {
  int h = 0;
  int k = 1;
  REP(i, 0, s.length()) {
    h += k * (s[i] - 'a');
    k *= 26;
  }
  return h;
}

bool unique(string s, vector<int> &v) {
  int h = tohash(s);
  int u = true;
  REP(i, 0, v.size()) if(v[i] == h) u = false;
  if(u) v.push_back(h);
  return u;
}

int main(void) {
  cin >> M;
  REP(i, 0, M) {
    string S; cin >> S;
    vector<int> v;
    int cnt = 0;

    REP(i, 1, S.length()) {
      string s1 = S.substr(0, i), s2 = S.substr(i, S.length());
      string r1 = S.substr(0, i), r2 = S.substr(i, S.length());
      reverse(r1.begin(), r1.end());
      reverse(r2.begin(), r2.end());

      if(unique(s1 + s2, v) == 1) cnt++;
      if(unique(s1 + r2, v) == 1) cnt++;
      if(unique(r1 + s2, v) == 1) cnt++;
      if(unique(r1 + r2, v) == 1) cnt++;
      if(unique(s2 + s1, v) == 1) cnt++;
      if(unique(s2 + r1, v) == 1) cnt++;
      if(unique(r2 + s1, v) == 1) cnt++;
      if(unique(r2 + r1, v) == 1) cnt++;
    }

    cout << cnt << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:7: error: 'reverse' was not declared in this scope
   36 |       reverse(r1.begin(), r1.end());
      |       ^~~~~~~
Language: C++

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

int main(){
  int m, l, ans;
  string s, t, u;
  vector<string> V;
  vector< vector<string> > H(2);
  cin >> m;
  for (int i = 0; i < m; ++i){
    cin >> s;
    V.push_back(s);
    l = s.length();
    ans = 1;
    for (int j = 1; j < l; ++j) {
      t = "";
      u = "";
      for (int k = 0; k < j; ++k){
	t += s[k];
	u += s[j-1-k];
      }
      H[0].push_back(t);
      H[0].push_back(u);
      t = "";
      u = "";
      for (int k = 0; k+j < l; ++k) {
	t += s[j+k];
	u += s[l-1-k];
      }
      H[1].push_back(t);
      H[1].push_back(u);
      for (int a = 0; a < 2; ++a) {
	for (int b = 0; b < 2; ++b) {
	  for (int c = 0; c < 2; ++c) {
	    V.push_back(H[a][b]+H[(a+1)%2][c]);
	  }
	}
      }
      H[0].erase(H[0].begin(), H[0].end());
      H[1].erase(H[1].begin(), H[1].end());
    }
    ans = 1;
    sort(V.begin(), V.end());
    for (int j = 1; j < V.size(); ++j) {
      if (V[j] != V[j-1]) ++ans;
    }
    cout << ans << endl;
    V.erase(V.begin(), V.end());
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   45 |     sort(V.begin(), V.end());
      |     ^~~~
      |     short
Language: C++

#include <iostream>
#include <string>
#include <set>

using namespace std;

int main()
{
	string s;
	cin >> s;

	set<string> a;

	int len = s.size();
	for (int i = 1; i < len; i++) {
		// 2??????????????????
		string f = s.substr(0, i);
		string b = s.substr(i, len - i);

		// ??????????????????????±???????
		string bf = f;
		string bb = b;
		reverse(begin(bf), end(bf));	// ???????????????
		reverse(begin(bb), end(bb));	// ???????????????

		// ??£?????????
		a.insert(f + b);
		a.insert(b + f);
		a.insert(bf + b);
		a.insert(b + bf);
		a.insert(f + bb);
		a.insert(bb + f);
		a.insert(bf + bb);
		a.insert(bb + bf);
	}
	cout << a.size() << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:17: error: 'reverse' was not declared in this scope
   23 |                 reverse(begin(bf), end(bf));    // ???????????????
      |                 ^~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <set>

using namespace std;

int main()
{
	string s;
	cin >> s;

	set<string> a;

	int len = s.size();
	for (int i = 1; i < len; i++) {
		// 2??????????????????
		string f = s.substr(0, i);
		string b = s.substr(i, len - i);

		// ??????????????????????±???????
		string bf = f;
		string bb = b;
		reverse(begin(bf), end(bf));	// ???????????????
		reverse(begin(bb), end(bb));	// ???????????????

		// ??£?????????
		a.insert(f + b);
		a.insert(b + f);
		a.insert(bf + b);
		a.insert(b + bf);
		a.insert(f + bb);
		a.insert(bb + f);
		a.insert(bf + bb);
		a.insert(bb + bf);
	}
	cout << a.size() << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:17: error: 'reverse' was not declared in this scope
   23 |                 reverse(begin(bf), end(bf));    // ???????????????
      |                 ^~~~~~~
Language: C++

#if 0
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1142&lang=jp
#endif

#include <iostream>
#include <string>
#include <unordered_set>

#define FOR(var, start, count) for(int var=start; var<count; var++)
#define REP(var, count) FOR(var,0,count)

using namespace std;

int main(void) {

	int M;
	cin >> M;
	REP(dataset, M) {
		string str;
		cin >> str;
		
		unordered_set<string> list;
		
		REP(i, str.size()) {
			string s[2][2];
			s[0][0] = str.substr(0, i);
			s[1][0] = str.substr(i);
			
			s[0][1] = s[0][0];
			reverse(s[0][0].begin(), s[0][0].end());
			s[1][1] = s[1][0];
			reverse(s[1][0].begin(), s[1][0].end());
			
			REP(x, 2) {
				REP(y, 2) {
					REP(z, 2) {
						string k = s[x][y] + s[(x+1)%2][z];
						list.insert(k);
					}
				}
			}
		}
		
		cout << list.size() << endl;
	
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:25: error: 'reverse' was not declared in this scope
   30 |                         reverse(s[0][0].begin(), s[0][0].end());
      |                         ^~~~~~~
Language: C++

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

int main() {
	int M;
	string s;
	string half1,half2,temp;
	int count,R1,R2,equal;
	vector<string> train;


	cin >> M;

	for (int i=0;i<M;i++) {
		train.clear();
		cin >> s;
		count = 0;

		for(int j=1;j<s.length();j++) { //??????????????????????±????
			half1 = "";
			half2 = "";
			for (int t=0;t<j;t++) {
				half1 += s[t]; //???????????????????????????	
			}
			for(int k=0;k<s.length()-j;k++) {
				half2 += s[j+k]; //??????????????????????????????
			}
			for (int p=0; p<2; p++) {
				if (p == 1) {
					temp = half1;
					half1 = half2;
					half2 = temp;
				}

				for(int t=0;t<4;t++) {
					equal = 0;

					if(t > 0) {
						reverse(half1.begin(),half1.end());
					}
					if(t == 2) {
						reverse(half2.begin(),half2.end());
					}	

					for(int l=0; l<train.size(); l++) {
						if (train[l] == half1+half2) {
							equal = 1;
						}
					}
					if (equal == 0) {
					train.push_back(half1+half2);
					}
					cout << half1+half2 << endl;
				}

			}
			
			
			
		}
		cout << train.size() << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:49: error: 'reverse' was not declared in this scope
   41 |                                                 reverse(half1.begin(),half1.end());
      |                                                 ^~~~~~~
a.cc:44:49: error: 'reverse' was not declared in this scope
   44 |                                                 reverse(half2.begin(),half2.end());
      |                                                 ^~~~~~~
Language: C++

#include <iostream>  
#include <algorithm>  
using namespace std; 
 
const int MAXN=1024;  
const int HASHLEN=1000024;
  
int n,cnt;  
char s[MAXN],s1[MAXN],s2[MAXN],s3[MAXN],s4[MAXN];  
struct HashNode{  
	char str[MAXN];       
	HashNode *nxt;  
};  
HashNode* head[HASHLEN]; 

void insert(char *a,char *b)  
{  
	char c[MAXN];  
	strcpy(c,a);  
	strcat(c,b);  
	int len=strlen(c);  
	int sum=0;  
	for(int i=0;i<len;++i)  
		sum+=c[i]*i;      
	for(HashNode* p=head[sum];p;p=p->nxt){  
		bool same=true;  
		for(int i=0;i<len;++i)  
			if((p->str)[i]!=c[i]){  
				same=false;  
				break;  
			}  
		if(same)  
			return ;  
	}  
	++cnt;  
	HashNode* now = new HashNode();  
	strcpy(now->str,c);  
	now->nxt=head[sum];  
	head[sum]=now;  
}  
  
int main(){  
	scanf("%d",&n);  
	while(n--){  
		cnt=0;  
		cin >> s;  
		memset(head,0,sizeof(head));  
		int len=strlen(s);
		  
		for(int i=1; i<len; ++i){  
			int j=0,k=0;  
			for(; j<i; ++j){
				s1[j]=s[j]; 
			}
			s1[j]='\0';  
			for(j=i; j<len; ++j){  
				s2[k++]=s[j];  
			}
			s2[k]='\0';
			 
			strcpy(s3,s1);  
			strcpy(s4,s2); 
			 
			reverse(s3,s3+i);  
			reverse(s4,s4+k); 
			 
			insert(s1,s2);  
			insert(s2,s1);  
			insert(s3,s2);  
			insert(s2,s3);  
			insert(s1,s4);  
			insert(s4,s1);  
			insert(s3,s4);  
			insert(s4,s3);  
		}  
		cout << cnt << endl;       
	}  
	return 0;     
}  

Compiler output:
a.cc: In function 'void insert(char*, char*)':
a.cc:19:9: error: 'strcpy' was not declared in this scope
   19 |         strcpy(c,a);
      |         ^~~~~~
a.cc:3:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <algorithm>
  +++ |+#include <cstring>
    3 | using namespace std;
a.cc:20:9: error: 'strcat' was not declared in this scope
   20 |         strcat(c,b);
      |         ^~~~~~
a.cc:20:9: note: 'strcat' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:21:17: error: 'strlen' was not declared in this scope
   21 |         int len=strlen(c);
      |                 ^~~~~~
a.cc:21:17: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc: In function 'int main()':
a.cc:47:17: error: 'memset' was not declared in this scope
   47 |                 memset(head,0,sizeof(head));
      |                 ^~~~~~
a.cc:47:17: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:48:25: error: 'strlen' was not declared in this scope
   48 |                 int len=strlen(s);
      |                         ^~~~~~
a.cc:48:25: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:61:25: error: 'strcpy' was not declared in this scope
   61 |                         strcpy(s3,s1);
      |                         ^~~~~~
a.cc:61:25: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <iostream>  
#include <algorithm>
#include <string>
using namespace std; 
 
const int MAXN=1024;  
const int HASHLEN=1000024;
  
int n,cnt;  
char s[MAXN],s1[MAXN],s2[MAXN],s3[MAXN],s4[MAXN];  
struct HashNode{  
	char str[MAXN];       
	HashNode *nxt;  
};  
HashNode* head[HASHLEN]; 

void insert(char *a,char *b){  
	char c[MAXN];  
	strcpy(c,a);  
	strcat(c,b);  
	int len=strlen(c);  
	int sum=0;  
	for(int i=0;i<len;++i)  
		sum+=c[i]*i;      
	for(HashNode* p=head[sum];p;p=p->nxt){  
		bool same=true;  
		for(int i=0;i<len;++i)  
			if((p->str)[i]!=c[i]){  
				same=false;  
				break;  
			}  
		if(same)  
			return ;  
	}  
	++cnt;  
	HashNode* now = new HashNode();  
	strcpy(now->str,c);  
	now->nxt=head[sum];  
	head[sum]=now;  
}  
  
int main(){  
	scanf("%d",&n);  
	while(n--){  
		cnt=0;  
		cin >> s;  
		memset(head,0,sizeof(head));  
		int len=strlen(s);
		  
		for(int i=1; i<len; ++i){  
			int j=0,k=0;  
			for(; j<i; ++j){
				s1[j]=s[j]; 
			}
			s1[j]='\0';  
			for(j=i; j<len; ++j){  
				s2[k++]=s[j];  
			}
			s2[k]='\0';
			 
			strcpy(s3,s1);  
			strcpy(s4,s2); 
			 
			reverse(s3,s3+i);  
			reverse(s4,s4+k); 
			 
			insert(s1,s2);  
			insert(s2,s1);  
			insert(s3,s2);  
			insert(s2,s3);  
			insert(s1,s4);  
			insert(s4,s1);  
			insert(s3,s4);  
			insert(s4,s3);  
		}  
		cout << cnt << endl;       
	}  
	return 0;     
}  

Compiler output:
a.cc: In function 'void insert(char*, char*)':
a.cc:19:9: error: 'strcpy' was not declared in this scope
   19 |         strcpy(c,a);
      |         ^~~~~~
a.cc:3:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <algorithm>
  +++ |+#include <cstring>
    3 | #include <string>
a.cc:20:9: error: 'strcat' was not declared in this scope
   20 |         strcat(c,b);
      |         ^~~~~~
a.cc:20:9: note: 'strcat' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:21:17: error: 'strlen' was not declared in this scope
   21 |         int len=strlen(c);
      |                 ^~~~~~
a.cc:21:17: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc: In function 'int main()':
a.cc:47:17: error: 'memset' was not declared in this scope
   47 |                 memset(head,0,sizeof(head));
      |                 ^~~~~~
a.cc:47:17: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:48:25: error: 'strlen' was not declared in this scope
   48 |                 int len=strlen(s);
      |                         ^~~~~~
a.cc:48:25: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:61:25: error: 'strcpy' was not declared in this scope
   61 |                         strcpy(s3,s1);
      |                         ^~~~~~
a.cc:61:25: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include<iostream>
#include<string>
#include<set>

using namespace std;

int main() {
    int m;
    cin >> m;
    for (int i = 0; i < m; ++i) {
        set<string> set;
        string s;
        cin >> s;
        set.insert(s);
        for (int i = 1; i < s.size(); ++i) {
            string front = s.substr(0, i);
            string back = s.substr(i);
            string frontrev = front;
            reverse(frontrev.begin(), frontrev.end());
            string backrev = back;
            reverse(backrev.begin(), backrev.end());

            //cout << front << " " << back << " " << frontrev << " " << backrev << endl;
            set.insert(front + backrev);
            set.insert(frontrev + back);
            set.insert(frontrev + backrev);
            set.insert(backrev + front);
            set.insert(back + frontrev);
            set.insert(backrev + frontrev);
            set.insert(back + front);
        }

        cout << set.size() << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: 'reverse' was not declared in this scope
   19 |             reverse(frontrev.begin(), frontrev.end());
      |             ^~~~~~~
Language: C++

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

int main(void){
	int n;
	cin >> n;
	while(n--){
		string s;
		cin >> s;
		set<string> ans;
		for(int i=1;i<s.size();i++){
			string a = s.substr(0,i);
			string b = s.substr(i);
			string ra=a,rb=b;
			reverse(ra.begin(), ra.end());
			reverse(rb.begin(), rb.end());
			ans.insert( a+ b);
			ans.insert( a+rb);
			ans.insert(ra+ b);
			ans.insert(ra+rb);
			ans.insert( b+ a);
			ans.insert( b+ra);
			ans.insert(rb+ a);
			ans.insert(rb+ra);
		}
		cout << ans.size()<<endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:25: error: 'reverse' was not declared in this scope
   17 |                         reverse(ra.begin(), ra.end());
      |                         ^~~~~~~
Language: C++

#include<iostream>
#include<set>
#include<string>
#define rep(i,n) for(int i=0;i<n;i++)
#define rv(c) reverse(c.begin(),c.end())
#define is(a) insert(a)
using namespace std;
int main(){
	int N; cin>>N;
	rep(n,N){
		string T,t[2]; set<string> s;
		cin>>T;
		rep(i,T.size()-1)rep(j,4){
			t[0]=T.substr(0,i+1),t[1]=T.substr(i+1);
			rep(k,2)if(j&(1<<k))rv(t[k]);
			s.is(t[0]+t[1]),s.is(t[1]+t[0]);
		}
		cout<<s.size()<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: 'reverse' was not declared in this scope
    5 | #define rv(c) reverse(c.begin(),c.end())
      |               ^~~~~~~
a.cc:15:45: note: in expansion of macro 'rv'
   15 |                         rep(k,2)if(j&(1<<k))rv(t[k]);
      |                                             ^~
Language: C++

#include<iostream>
#include<string>
#include<set>
using namespace std;
int main(){
	int m;cin>>m;
	string train;
	for(;cin>>train;){
		set<string>st;
		for(int i=1;i<train.size();i++){
			string t1=train.substr(0,i),t2=train.substr(i);
			st.insert(t1+t2);st.insert(t2+t1);
			reverse(t1.begin(),t1.end());
			st.insert(t1+t2);st.insert(t2+t1);
			reverse(t2.begin(),t2.end());
			st.insert(t1+t2);st.insert(t2+t1);
			reverse(t1.begin(),t1.end());
			st.insert(t1+t2);st.insert(t2+t1);
		}
		cout<<st.size()<<endl;
	}
	cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: 'reverse' was not declared in this scope
   13 |                         reverse(t1.begin(),t1.end());
      |                         ^~~~~~~
Language: C++

// 2006à\IB ñÔÌÒ¬p[gII
#include <iostream>
#include <string>
#include <set>

using namespace std;

inline string reverse(string s){
	reverse(s.begin(), s.end());
	return s;
}

int main(){
	int t; cin >> t;
	while(t--){
		string s; cin >> s;
		set<string> S;
		S.insert(s);
		S.insert(reverse(s));
		int n = s.size();
		for(int i=1;i<n-1;i++){
			string a = s.substr(0,i);
			string b = s.substr(i);
			string ra = reverse(a);
			string rb = reverse(b);
			S.insert( a +rb);
			S.insert(ra + b);
			S.insert(ra +rb);
			S.insert( b + a);
			S.insert( b +ra);
			S.insert(rb + a);
		}
		cout << S.size() << endl;
	}
}

Compiler output:
a.cc: In function 'std::string reverse(std::string)':
a.cc:9:24: error: could not convert 's.std::__cxx11::basic_string<char>::begin()' from 'std::__cxx11::basic_string<char>::iterator' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
    9 |         reverse(s.begin(), s.end());
      |                 ~~~~~~~^~
      |                        |
      |                        std::__cxx11::basic_string<char>::iterator
Language: C++

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

#define rep(i,n) rep2(i,0,n)
#define rep2(i,m,n) for(int i=m;i<n;i++)
#define sz size()

int m;
string s;

int main(){
	cin>>m;
	while(cin>>s){
		set<string> S;
		rep(i,s.sz-1){
			string t=s.substr(0,i+1),u=s.substr(i+1);
			rep(j,2){
				rep(k,2){
					S.insert(t+u);
					S.insert(u+t);
					reverse(t.begin(),t.end());
				}
				reverse(u.begin(),u.end());
			}
		}
		cout<<S.sz<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:41: error: 'reverse' was not declared in this scope
   23 |                                         reverse(t.begin(),t.end());
      |                                         ^~~~~~~
a.cc:25:33: error: 'reverse' was not declared in this scope
   25 |                                 reverse(u.begin(),u.end());
      |                                 ^~~~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<cmath>
#include<map>
#include<string>
#include<cstring>
using namespace std;


int main(){
   int n;
   string s;
   string s1,s2;
   map<string,bool> Index;
   cin >> n;
   while(n-- > 0){
      cin >> s;
      for(int i=1;i<s.length();i++){
	 s1 = s.substr(0,i);
	 s2 = s.substr(i,s.length()-i);	 
	 //cout <<s1 << " " << s2 << endl;
	 Index[s1+s2] = true;
	 Index[s2+s1] = true;
	 reverse(s1.begin(),s1.end()) ;
	 Index[s1+s2] = true;
	 Index[s2+s1] = true;
	 reverse(s1.begin(),s1.end()) ;
	 
	 reverse(s2.begin(),s2.end()) ;
	 Index[s1+s2] = true;
	 Index[s2+s1] = true;
	 reverse(s1.begin(),s1.end()) ;
	 Index[s1+s2] = true;
	 Index[s2+s1] = true;
      }

      cout<< Index.size() << endl;
      Index.clear();
   }
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:10: error: 'reverse' was not declared in this scope
   24 |          reverse(s1.begin(),s1.end()) ;
      |          ^~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <map>
#include <string>
using namespace std;
int main(){
	int i,j=0,n;
	for(cin>>n;j<n;j++){
		string s;cin>>s;map<string> m;
		for(i=1;i<s.length();i++){
			string s1=s.substr(0,i),s2=s.substr(i),r1=s1,r2=s2;
			reverse(r1.begin(),r1.end());
			reverse(r2.begin(),r2.end());
			m[s1+s2]=1;
			m[s1+s2]=1;
			m[r1+s2]=1;
			m[s1+r2]=1;
			m[r1+r2]=1;
			m[s2+s1]=1;
			m[r2+s1]=1;
			m[s2+r1]=1;
			m[r2+r1]=1;
		}
		cout<<m.size()<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:43: error: wrong number of template arguments (1, should be at least 2)
    9 |                 string s;cin>>s;map<string> m;
      |                                           ^
In file included from /usr/include/c++/14/map:63,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_map.h:102:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  102 |     class map
      |           ^~~
a.cc:14:26: error: no match for 'operator[]' (operand types are 'int' and 'std::__cxx11::basic_string<char>')
   14 |                         m[s1+s2]=1;
      |                          ^
a.cc:15:26: error: no match for 'operator[]' (operand types are 'int' and 'std::__cxx11::basic_string<char>')
   15 |                         m[s1+s2]=1;
      |                          ^
a.cc:16:26: error: no match for 'operator[]' (operand types are 'int' and 'std::__cxx11::basic_string<char>')
   16 |                         m[r1+s2]=1;
      |                          ^
a.cc:17:26: error: no match for 'operator[]' (operand types are 'int' and 'std::__cxx11::basic_string<char>')
   17 |                         m[s1+r2]=1;
      |                          ^
a.cc:18:26: error: no match for 'operator[]' (operand types are 'int' and 'std::__cxx11::basic_string<char>')
   18 |                         m[r1+r2]=1;
      |                          ^
a.cc:19:26: error: no match for 'operator[]' (operand types are 'int' and 'std::__cxx11::basic_string<char>')
   19 |                         m[s2+s1]=1;
      |                          ^
a.cc:20:26: error: no match for 'operator[]' (operand types are 'int' and 'std::__cxx11::basic_string<char>')
   20 |                         m[r2+s1]=1;
      |                          ^
a.cc:21:26: error: no match for 'operator[]' (operand types are 'int' and 'std::__cxx11::basic_string<char>')
   21 |                         m[s2+r1]=1;
      |                          ^
a.cc:22:26: error: no match for 'operator[]' (operand types are 'int' and 'std::__cxx11::basic_string<char>')
   22 |                         m[r2+r1]=1;
      |                          ^
a.cc:24:25: error: request for member 'size' in 'm', which is of non-class type 'int'
   24 |                 cout<<m.size()<<endl;
      |                         ^~~~