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

#include <string>
#include <iostream>
using namespace std;
int main(){
	string input;
	cin >> input;
	string >> target;
	cin >> target;
	input+=input;
	if(input.find(target)==-1)cout << "No" << endl;
	else cout << "Yes" << endl;
	return 0;

}
//find??¢??°???????????????????????????????????????????´¢????±?????????????????????????????????????????????????
//1????????????0??§???????????´??????-1????????????

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected unqualified-id before '>>' token
    7 |         string >> target;
      |                ^~
a.cc:8:16: error: 'target' was not declared in this scope
    8 |         cin >> target;
      |                ^~~~~~
Language: C++

#include <iostream>
#include <string>

using namespace std;
int main(){
	string input;
	cin >> input;
	string >> target;
	cin >> target;
	input+=input;
	if(input.find(target)==-1)cout << "No" << endl;
	else cout << "Yes" << endl;
	return 0;

}
//find??¢??°???????????????????????????????????????????´¢????±?????????????????????????????????????????????????
//1????????????0??§???????????´??????-1????????????

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected unqualified-id before '>>' token
    8 |         string >> target;
      |                ^~
a.cc:9:16: error: 'target' was not declared in this scope
    9 |         cin >> target;
      |                ^~~~~~
Language: C++

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

int main()
{
	char s[101],p[101];
	bool f = false;
	cin >> s;
	cin >> p;
	for(int i = 0;i < strlen(s);i++){
		if(strncmp(s,p,strlen(p)) != 0){
			char temp = s[0];
			for(int j = 0;j < strlen(s);j++){
				if(j != strlen(s) - 1) s[j] = s[j + 1];
				else s[j] = temp;
			}
		}else{
				f = true;
				break;
		}
	}	
	if(f) cout << "Yes" << endl;
	else cout << "No" << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:27: error: 'strlen' was not declared in this scope
   12 |         for(int i = 0;i < strlen(s);i++){
      |                           ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <cctype>
  +++ |+#include <cstring>
    4 | using namespace std;
a.cc:13:20: error: 'strncmp' was not declared in this scope
   13 |                 if(strncmp(s,p,strlen(p)) != 0){
      |                    ^~~~~~~
a.cc:13:20: note: 'strncmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <stdio.h>
  
int main(){
   char str_s[128], str_p[128];
   int i, j, c, n, m;
   scanf("%s",s);
   scanf("%s",p);
   n=strlen(str_s);
   m=strlen(str_p);
   for(i=0;i < n;i++){
      c=0;
      for(j=0;j < m;j++){
         if(i+j > n-2){
            if(str_s[i+j] ==str_p[j]){
               c++;
               if(c == m){
                  break;
               }
            }
         }else{
            if(str_s[i+j-n] ==str_p[j]){
               c++;
               if(c == m){
                  break;
               }
            }
         }
      }
      if(c == m){
        break;
      }
   if(c == m){
      break;
   }
   if(c == m){         
      printf("Yes\n");
   }else{
      printf("No\n");
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 's' was not declared in this scope
    6 |    scanf("%s",s);
      |               ^
a.cc:7:15: error: 'p' was not declared in this scope
    7 |    scanf("%s",p);
      |               ^
a.cc:8:6: error: 'strlen' was not declared in this scope
    8 |    n=strlen(str_s);
      |      ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <stdio.h>
  +++ |+#include <cstring>
    2 | 
a.cc:40:2: error: expected '}' at end of input
   40 | }
      |  ^
a.cc:10:22: note: to match this '{'
   10 |    for(i=0;i < n;i++){
      |                      ^
a.cc:40:2: error: expected '}' at end of input
   40 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <stdio.h>
  
int main(){
   char str_s[128], str_p[128];
   int i, j, c, n, m;
   scanf("%s",str_s);
   scanf("%s",str_p);
   n=strlen(str_s);
   m=strlen(str_p);
   for(i=0;i < n;i++){
      c=0;
      for(j=0;j < m;j++){
         if(i+j > n-2){
            if(str_s[i+j] ==str_p[j]){
               c++;
               if(c == m){
                  break;
               }
            }
         }else{
            if(str_s[i+j-n] ==str_p[j]){
               c++;
               if(c == m){
                  break;
               }
            }
         }
      }
      if(c == m){
        break;
      }
   if(c == m){
      break;
   }
   if(c == m){         
      printf("Yes\n");
   }else{
      printf("No\n");
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: 'strlen' was not declared in this scope
    8 |    n=strlen(str_s);
      |      ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <stdio.h>
  +++ |+#include <cstring>
    2 | 
a.cc:40:2: error: expected '}' at end of input
   40 | }
      |  ^
a.cc:10:22: note: to match this '{'
   10 |    for(i=0;i < n;i++){
      |                      ^
a.cc:40:2: error: expected '}' at end of input
   40 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

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

int main(){
   char str_s[128], str_p[128];
   int i, j, c, n, m;
   scanf("%s",str_s);
   scanf("%s",str_p);
   n=strlen(str_s);
   m=strlen(str_p);
   for(i=0;i < n;i++){
      c=0;
      for(j=0;j < m;j++){
         if(i+j > n-2){
            if(str_s[i+j] ==str_p[j]){
               c++;
               if(c == m){
                  break;
               }
            }
         }else{
            if(str_s[i+j-n] ==str_p[j]){
               c++;
               if(c == m){
                  break;
               }
            }
         }
      }
      if(c == m){
        break;
      }
   if(c == m){
      break;
   }
   if(c == m){         
      printf("Yes\n");
   }else{
      printf("No\n");
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:2: error: expected '}' at end of input
   41 | }
      |  ^
a.cc:11:22: note: to match this '{'
   11 |    for(i=0;i < n;i++){
      |                      ^
a.cc:41:2: error: expected '}' at end of input
   41 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
   char str_s[128], str_p[128];
   int i, j, c, n, m;
   scanf("%s",str_s);
   scanf("%s",str_p);
   n=strlen(str_s);
   m=strlen(str_p);
   for(i=0;i < n;i++){
      c=0;
      for(j=0;j < m;j++){
         if(i+j > n-2){
            if(str_s[i+j] ==str_p[j]){
               c++;
               if(c == m){
                  break;
               }
            }
         }else{
            if(str_s[i+j-n] ==str_p[j]){
               c++;
               if(c == m){
                  break;
               }
            }
         }
      }
      if(c == m){
        break;
      }
   if(c == m){
      break;
   }
   if(c == m){         
      printf("Yes\n");
   }else{
      printf("No\n");
   return 0;
   }
}

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

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

int main(){
   char str_s[128], str_p[128];
   int i, j, c, n, m;
   scanf("%s",str_s);
   scanf("%s",str_p);
   n=strlen(str_s);
   m=strlen(str_p);
   for(i=0;i < n;i++){
      c=0;
      for(j=0;j < m;j++){
         if(i+j > n-2){
            if(str_s[i+j] ==str_p[j]){
               c++;
               if(c == m){
                  break;
               }
            }
         }else{
            if(str_s[i+j-n] ==str_p[j]){
               c++;
               if(c == m){
                  break;
               }
            }
         }
      }
      if(c == m){
        break;
      }
   if(c == m){
      break;
   }
   if(c == m){         
      printf("Yes\n");
   }else{
      printf("No\n");
   }
   return 0;
}

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

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

int main(){
   char str_s[128], str_p[128];
   int i, j, c, n, m;
   scanf("%s",str_s);
   scanf("%s",str_p);
   n=strlen(str_s);
   m=strlen(str_p);
   for(i=0;i < n;i++){
      c=0;
      for(j=0;j < m;j++){
         if(i+j > n-2){
            if(str_s[i+j] !=str_p[j]){
               break;
            }
         }else{
            if(str_s[i+j-n] !=str_p[j]){
               break;
            }
         }
      }
      if(j == m){
         printf("Yes\n");
         c=1;
         break;
      }
   }
   if(c == 0)
      printf("No\n");
   }
   return 0;
}

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

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

int main(){
   char str_s[128], str_p[128];
   int i, j, c, n, m;
   scanf("%s",str_s);
   scanf("%s",str_p);
   n=strlen(str_s);
   m=strlen(str_p);
   for(i=0;i < n;i++){
      c=0;
      for(j=0;j < m;j++){
         if(i+j > n-2){
            if(str_s[i+j] !=str_p[j]){
               break;
            }
         }else{
            if(str_s[i+j-n] !=str_p[j]){
               break;
            }
         }
      }
      if(j == m){
         printf("Yes\n");
         c=1;
         break;
      }
   }
   if(c == 0)
      printf("No\n");
   }
}
   return 0;
}

Compiler output:
a.cc:33:1: error: expected declaration before '}' token
   33 | }
      | ^
a.cc:34:4: error: expected unqualified-id before 'return'
   34 |    return 0;
      |    ^~~~~~
a.cc:35:1: error: expected declaration before '}' token
   35 | }
      | ^
Language: C++

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

int main(){
   char str_s[128], str_p[128];
   int i, j, c, n, m;
   scanf("%s",str_s);
   scanf("%s",str_p);
   n=strlen(str_s);
   m=strlen(str_p);
   for(i=0;i < n;i++){
      c=0;
      for(j=0;j < m;j++){
         if(i+j > n-2){
            if(str_s[i+j] !=str_p[j]){
               break;
            }
         }else{
            if(str_s[i+j-n] !=str_p[j]){
               break;
            }
         }
      }
      if(j == m){
         printf("Yes\n");
         c=1;
         break;
      }
   }
   if(c == 0)
      printf("No\n");
   }
}
   return 0;
}
}

Compiler output:
a.cc:33:1: error: expected declaration before '}' token
   33 | }
      | ^
a.cc:34:4: error: expected unqualified-id before 'return'
   34 |    return 0;
      |    ^~~~~~
a.cc:35:1: error: expected declaration before '}' token
   35 | }
      | ^
a.cc:36:1: error: expected declaration before '}' token
   36 | }
      | ^
Language: C++

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

int main(){
   char str_s[128], str_p[128];
   int i, j, c, n, m;
   scanf("%s",str_s);
   scanf("%s",str_p);
   n=strlen(str_s);
   m=strlen(str_p);
   for(i=0;i < n;i++){
      c=0;
      for(j=0;j < m;j++){
         if(i+j > n-2){
            if(str_s[i+j] !=str_p[j]){
               break;
            }
         }else{
            if(str_s[i+j-n] !=str_p[j]){
               break;
            }
         }
      }
      if(j == m){
         printf("Yes\n");
         c=1;
         break;
      }
   }
   if(c == 0)
      printf("No\n");
   }

   return 0;
}
}

Compiler output:
a.cc:34:4: error: expected unqualified-id before 'return'
   34 |    return 0;
      |    ^~~~~~
a.cc:35:1: error: expected declaration before '}' token
   35 | }
      | ^
a.cc:36:1: error: expected declaration before '}' token
   36 | }
      | ^
Language: C++

#include<stdio.h>

int main(){

	int s[100],  p[100];
	int i, j, k;
	
	scanf("%s\n", s);
	scanf("%s\n", p);

	int a = 0;
	i = j = k =0;

	for(i = 0; s[i] != '\0'; i++) { 
	if (s[i] == p[0]) {
		a = 1;
		j = 1;
		k =i + j;

		while(p[j] != '\0') { 
		 if(s[k] == '\0' && p[j] !='\0' ) {
			k = 0;
		}
		 if(s[k] == p[j]) { 
			j++;
			k++; 
		 }
		 else {
			a = 0;
			break;
		 }
		}
		if( a ) { 
		  berak;
		} 
	}
}

	printf("%s\n", a ? "Yes" : "No");
	return 0;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:19: error: 'berak' was not declared in this scope
   34 |                   berak;
      |                   ^~~~~
Language: C++

#include <bits/stdc++.h>
#include <srting.h>
#include <vector>
#include <algorithm>


int main(){
 double pai = 3.141592653589;
 char s[100], p[100];
 string scp, s2, chk;

scanf("%s %s", &s, &p);

scp = s;
chk = p;
     
s2 = scp + scp;


    if(s2.find(p) != string::npos){
       printf("Yes\n");

    } else {
       printf("No\n");

    }

return 0;

}

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

#include <stdio.h>
#include <string.h>
??
??
void ring(char s[],char p[]){
??int i;
??int j = 0;
??int m = strlen(s);
??int n = strlen(p);
??
??while(j < n-1 || i != m - 1){
????for(i = 0;i < m-1; i++){
??????if(p[j] == s[i])
????????j++;
??????else
????????j = 0;
??
??????if(j == n-1) break;
??????}
????}
??
??if(j == n-1)
????printf("Yes\n");
??else
????printf("No\n");
??
??
}
??
int main(){
??
??char s[200];
??char p[200];
??char ss[400];
??
??scanf("%s\n%s",s,p);
??
??strcat(ss,s);
??strcat(ss,s);
??
??ring(ss,p);
??
??return 0;
}

Compiler output:
a.cc:3:1: error: expected unqualified-id before '?' token
    3 | ??
      | ^
a.cc:29:1: error: expected unqualified-id before '?' token
   29 | ??
      | ^
Language: C++

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

int main()
{
  char str1[];
  char str2[];

  scanf("%s", str1);
  scanf("%s", str2);
  
  strcat(str1, str1);
  
  
  
  if(strstr(str1,str2) != NULL){
    printf("Yes\n");
  } else{
    printf("No\n");
    }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: storage size of 'str1' isn't known
    6 |   char str1[];
      |        ^~~~
a.cc:7:8: error: storage size of 'str2' isn't known
    7 |   char str2[];
      |        ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
string s,q;
cin>>s>>q;
s+=s
if(s.find(q))cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected ';' before 'if'
    6 | s+=s
      |     ^
      |     ;
    7 | if(s.find(q))cout<<"YES"<<endl;
      | ~~   
a.cc:8:1: error: 'else' without a previous 'if'
    8 | else cout<<"NO"<<endl;
      | ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
string s,q;
cin>>s>>q;
s+=s
if(s.find(q)<s.size())cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected ';' before 'if'
    6 | s+=s
      |     ^
      |     ;
    7 | if(s.find(q)<s.size())cout<<"YES"<<endl;
      | ~~   
a.cc:8:1: error: 'else' without a previous 'if'
    8 | else cout<<"NO"<<endl;
      | ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
string s,d;
cin>>s>>d;
s+=s
if(s.find(q)<s.length())cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected ';' before 'if'
    6 | s+=s
      |     ^
      |     ;
    7 | if(s.find(q)<s.length())cout<<"Yes"<<endl;
      | ~~   
a.cc:8:1: error: 'else' without a previous 'if'
    8 | else cout<<"No"<<endl;
      | ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
string s,d;
cin>>s>>d;
s+=s;
if(s.find(q)<s.size())cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: 'q' was not declared in this scope
    7 | if(s.find(q)<s.size())cout<<"Yes"<<endl;
      |           ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
	string str , st;
	cin >> str>>st;
	str=str+str;
	int counter;
	int check;
	for( int i=0 ; i<str.size() ; i++ ){
		if( str[i] == st[0] ){
			counter=0;
			for( int j=0 ; j<st.size() ; j++ ){
				if( st[j] == str[j+i] )
					counter++;
				if( counter==st.size() ){
					check=2;
					break;
				}
			}
		}
	}
	if( check==2 )
		cout <<"YES"<<endl;
	else
		cout<<"NO"<<endl;
}++

Compiler output:
a.cc:27:2: error: expected unqualified-id before '++' token
   27 | }++
      |  ^~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
   string S, P;
      
    cin >> S >> P;
      
    S += S;
      
    cout << (S.find(P) != string::npos   "Yes" : "No") << endl;
      
    return 0;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:39: error: expected ')' before string constant
   12 |     cout << (S.find(P) != string::npos   "Yes" : "No") << endl;
      |             ~                         ^  ~~~~~
      |                                       )
Language: C++

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

string str,value;

int main(){
 cin >> str >> value;
 str = str + str;
 if((int)str.find(value) != -1) cout << Yes << "\n";
 else cout << No << "\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:41: error: 'Yes' was not declared in this scope
    9 |  if((int)str.find(value) != -1) cout << Yes << "\n";
      |                                         ^~~
a.cc:10:15: error: 'No' was not declared in this scope
   10 |  else cout << No << "\n";
      |               ^~
Language: C++

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

int s_num[26];
int p_num[26];

int main()
{
		int i;
		char c;
		bool is=false;
		string s, p;
		getline(cin, s);
		getline(cin, p);
		for (i=0; i<s.size(); i++) {
				c = s[i];
				if (isalpha(c)) s_num[(int)c-97]++;
		}
		for (i=0; i<p.size(); i++) {
				c = p[i];
				if (isalpha(c)) p_num[(int)c-97]++;
		}
		/*
		int alph;
		for (i=0; i<26; i++) {
				alph = i+97;
				cout << "s->" << (char)alph << " : " << s_num[i] << "\n";
				cout << "p->" <<(char)alph << " : " << p_num[i] << "\n";
		}
		*/
		for (i=0; i<26; i++) {
				if (s_num[i]-p_num[i]<0) is = true;
		}
		if (p="advanced") cout << "No\n";
		else if (is) cout << "No\n";
		else cout << "Yes\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:22: error: could not convert 'p.std::__cxx11::basic_string<char>::operator=(((const char*)"advanced"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   36 |                 if (p="advanced") cout << "No\n";
      |                     ~^~~~~~~~~~~
      |                      |
      |                      std::__cxx11::basic_string<char>
Language: C++

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

    class Program
    {
        static void Main(string[] args)
        {
            string strData1 = Console.ReadLine();
            Console.WriteLine(((strData1 += strData1).Contains(Console.ReadLine())) ? "Yes" : "No");
        }
    }

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Threading.Tasks;
      |       ^~~~~~
a.cc:9:26: error: 'string' has not been declared
    9 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:9:35: error: expected ',' or '...' before 'args'
    9 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:14:6: error: expected ';' after class definition
   14 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void Program::Main(int*)':
a.cc:11:13: error: 'string' was not declared in this scope
   11 |             string strData1 = Console.ReadLine();
      |             ^~~~~~
a.cc:12:13: error: 'Console' was not declared in this scope
   12 |             Console.WriteLine(((strData1 += strData1).Contains(Console.ReadLine())) ? "Yes" : "No");
      |             ^~~~~~~
a.cc:12:33: error: 'strData1' was not declared in this scope
   12 |             Console.WriteLine(((strData1 += strData1).Contains(Console.ReadLine())) ? "Yes" : "No");
      |                                 ^~~~~~~~
Language: C++

s = input()
p = input()
bl = True
for i in range(1,len(s)+1):
    if p[0:i] == s[-i:]:
        if p[i:] == s[0:len(p)-i]:
            print("Yes")
            bl = False
            break
if bl:
    print("No")

Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s = input()
      | ^
Language: C++

#include <iostream>

using namespace std;

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

	for (int i = 0, string buf = s; i < s.length(); i++)
	{
		if (buf.find(p) != -1) {
			cout << "Yes" << endl;
			return 0;
		}
		buf = str.substr(0, i + 1) + str.substr(i + 1, str.length());
	}
	cout << "No" << endl;
}
		

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: expected initializer before 'cin'
    7 |         string s, p cin >> s >> p;
      |                     ^~~
a.cc:9:31: error: expected ';' before 'buf'
    9 |         for (int i = 0, string buf = s; i < s.length(); i++)
      |                               ^~~~
      |                               ;
a.cc:9:32: error: 'buf' was not declared in this scope
    9 |         for (int i = 0, string buf = s; i < s.length(); i++)
      |                                ^~~
a.cc:9:55: error: expected ')' before ';' token
    9 |         for (int i = 0, string buf = s; i < s.length(); i++)
      |             ~                                         ^
      |                                                       )
a.cc:9:57: error: 'i' was not declared in this scope
    9 |         for (int i = 0, string buf = s; i < s.length(); i++)
      |                                                         ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
	string s;
	string p;
	s = 2 * s;
	int i;
	cin >> s >> p;
	
	for (int i = 0; i < s.size;i++){
		if (s.substr(i + 1, i + 1 + p.size) == p){
			cout << "Yes" << endl;
		}
		else if (i == s.size){
			cout << "No" << endl;
		}
	
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: no match for 'operator*' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
    7 |         s = 2 * s;
      |             ~ ^ ~
      |             |   |
      |             int std::string {aka std::__cxx11::basic_string<char>}
a.cc:11:31: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   11 |         for (int i = 0; i < s.size;i++){
      |                             ~~^~~~
      |                                   ()
a.cc:12:47: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   12 |                 if (s.substr(i + 1, i + 1 + p.size) == p){
      |                                             ~~^~~~
      |                                                   ()
a.cc:15:33: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   15 |                 else if (i == s.size){
      |                               ~~^~~~
      |                                     ()
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
	string s;
	string p;
	s = s + s;
	int i;
	cin >> s >> p;

	for (int i = 0; i < s.size; i++){
		if (s.substr(i + 1, i + 1 + p.size) == p){
			cout << "Yes" << endl;
		}
		else if (i == s.size){
			cout << "No" << endl;
		}

	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:31: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   11 |         for (int i = 0; i < s.size; i++){
      |                             ~~^~~~
      |                                   ()
a.cc:12:47: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   12 |                 if (s.substr(i + 1, i + 1 + p.size) == p){
      |                                             ~~^~~~
      |                                                   ()
a.cc:15:33: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   15 |                 else if (i == s.size){
      |                               ~~^~~~
      |                                     ()
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
	string s;
	string p;
	s = s + s;
	int i;
	cin >> s >> p;

	for (int i = 0; i < s.size; i++){
		if (s.substr(i + 1, i + 1 + p.size) == p){
			cout << "Yes" << endl;
		}
		else if (i == s.size-1){
			cout << "No" << endl;
		}

	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:31: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   11 |         for (int i = 0; i < s.size; i++){
      |                             ~~^~~~
      |                                   ()
a.cc:12:47: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   12 |                 if (s.substr(i + 1, i + 1 + p.size) == p){
      |                                             ~~^~~~
      |                                                   ()
a.cc:15:33: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   15 |                 else if (i == s.size-1){
      |                               ~~^~~~
      |                                     ()
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main()
{
  string input, ring, target;
  string::size_type flag;
  cin >> input >> target;
  ring = input + input;
  flag = ring.find(target);
  if(flag==string::npos) cout << "No" << endl;
  else cout << "Yes" << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:14:30: error: expected '}' at end of input
   14 |   else cout << "Yes" << endl;
      |                              ^
a.cc:7:1: note: to match this '{'
    7 | {
      | ^
Language: C++

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

int main(){
	string a,b;
	getline(cin,a);
	cin >>b;
	a=a+a;
	if(a.find(b)==)
	{cout <<"No"<<endl;}
	else{cout <<"Yes"<<endl;}
	cout <<a.find(b)<<endl;
	cout <<a<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: expected primary-expression before ')' token
    9 |         if(a.find(b)==)
      |                       ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
	char s[10000], p[1000];
	cin >> s;
	cin >> p;
	strcat(s, s);
	if (strstr(s, p) != NULL){
		cout << "Yes" << endl;
	}
	else{
		cout << "No" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'strcat' was not declared in this scope
    8 |         strcat(s, s);
      |         ^~~~~~
a.cc:2:1: note: 'strcat' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<string>
a.cc:9:13: error: 'strstr' was not declared in this scope
    9 |         if (strstr(s, p) != NULL){
      |             ^~~~~~
a.cc:9:13: note: 'strstr' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

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

bool judge(const char s[], const char p[]);

int main(void)
{	
	char s[100] = "\0";
	char p[100] = "\0";
	cin >> s;
	cin >> p;
	
	bool result = judge(s, p);
	if (result) {
		cout << "Yes" << endl;
	} else {
		cout << "No" << endl;
	}
	
	return 0;
}

bool judge(const char s[], const char p[]) {
	for (int j = 0; s[j] != '\0'; j++) {
		if (p[0] == s[j]) {
			int k = j;
			for (int i = 1; p[i] != '\0'; i++) {
				if (s[k+i] == '\0') k = -i;
				if (p[i] != s[k+i]) break;
			}
			if (p[i] == '\0') return true;
		}
	}
	return false;
}

Compiler output:
a.cc: In function 'bool judge(const char*, const char*)':
a.cc:32:31: error: 'i' was not declared in this scope
   32 |                         if (p[i] == '\0') return true;
      |                               ^
Language: C++

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

bool judge(const char s[], const char p[]);

int main(void)
{	
	char s[101] = "\0";
	char p[101] = "\0";
	cin >> s;
	cin >> p;
	
	bool result = judge(s, p);
	if (result) {
		cout << "Yes" << endl;
	} else {
		cout << "No" << endl;
	}
	
	return 0;
}

bool judge(const char s[], const char p[]) {
	for (int j = 0; s[j] != '\0'; j++) {
		if (p[0] == s[j]) {
			int k = j;
			for (int i = 1; p[i] != '\0'; i++) {
				if (s[k+i] == '\0') k = -i;
				if (p[i] != s[k+i]) break;
			}
			if (p[i] == '\0') return true;
		}
	}
	return false;
}

Compiler output:
a.cc: In function 'bool judge(const char*, const char*)':
a.cc:32:31: error: 'i' was not declared in this scope
   32 |                         if (p[i] == '\0') return true;
      |                               ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
	int cnt=0;
	char c;
	string p,s,sum;
	cin>>s>>p;
	sum=s+s;
	for(int i=0;i<s.size();i++){
		string ans="";
		for(int j=0;j<p.size();j++){
			c=sum[i+j];
			ans+=c;
		}
		if(ans==p){
			cnt++;
			break;
		}
	}
	if(cnt>0)cout<<"Yes"<<endl;
	else cout<<"No"<<endl;
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:23:18: error: expected '}' at end of input
   23 |         return 0;
      |                  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std;
int main(void){
	char cha1[1000], cha2[1000], a[1000];
	gets_s(cha1);
	gets_s(a);
	strcpy_s(cha2, cha1);
	strcat_s(cha1, cha2);
	if (strstr(cha1, a) != NULL){
		cout << "Yes" << endl;
	}
	else{
		cout << "No" << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'gets_s' was not declared in this scope
    7 |         gets_s(cha1);
      |         ^~~~~~
a.cc:9:9: error: 'strcpy_s' was not declared in this scope; did you mean 'strcpy'?
    9 |         strcpy_s(cha2, cha1);
      |         ^~~~~~~~
      |         strcpy
a.cc:10:9: error: 'strcat_s' was not declared in this scope; did you mean 'strcat'?
   10 |         strcat_s(cha1, cha2);
      |         ^~~~~~~~
      |         strcat
Language: C++

#include<stdio.h>
#include<string.h>
using namespace std;
int main(void){
	char cha1[1000], cha2[1000], a[1000];
	gets_s(cha1);
	gets_s(a);
	strcpy_s(cha2, cha1);
	strcat_s(cha1, cha2);
	if (strstr(cha1, a) != NULL){
		printf("Yes\n");
	}
	else{
		printf("No\n");
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'gets_s' was not declared in this scope
    6 |         gets_s(cha1);
      |         ^~~~~~
a.cc:8:9: error: 'strcpy_s' was not declared in this scope; did you mean 'strcpy'?
    8 |         strcpy_s(cha2, cha1);
      |         ^~~~~~~~
      |         strcpy
a.cc:9:9: error: 'strcat_s' was not declared in this scope; did you mean 'strcat'?
    9 |         strcat_s(cha1, cha2);
      |         ^~~~~~~~
      |         strcat
Language: C++

#include<stdio.h>
#include<string.h>
using namespace std;
int main(void){
	char cha1[1000], cha2[1000], a[1000];
	gets(cha1);
	gets(a);
	strcpy(cha2, cha1);
	strcat(cha1, cha2);
	if (strstr(cha1, a) != NULL){
		printf("Yes\n");
	}
	else{
		printf("No\n");
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |         gets(cha1);
      |         ^~~~
      |         getw
Language: C++

#include <stdio.h>
int main(){
char p[101],x[202];
for(int i=0;i<101;i++)
p[i]=x[i]='\0';
int m=0,n=0;
bool f;
scanf("%s",x);
scanf("%s",p);
while(x[m]!='\0')m++;
while(p[n]!='\0')n++;
for(int i=m;i<m*2;i++){
x[i]=x[i-m];
}
for(int i=0;i<m;i++){
f=true;
for(int j=0;j<n&&f;j++){
if(p[j]!=x[j+i]f=false
}
if(f){
printf("Yes\n");
return 0;
}
}
printf("No\n");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: expected ')' before 'f'
   18 | if(p[j]!=x[j+i]f=false
      |   ~            ^
      |                )
a.cc:19:1: error: expected primary-expression before '}' token
   19 | }
      | ^
Language: C++

#include "bits/stdc++.h"
using namespace std;
int main(){
 string s1,s2;
 cin >> s1 >> s2;
 for(int i = 0; i < s1.length(); i++){

  bool flag = false;

  for(int j = 0; j < s2.length();j++){
   if(s1[(i + j)%s1.length()] != s2[j]){
   f = true;
   break;
   }
  }
  if(flag == false){
   cout << "Yes" << endl; return 0;
  }
 }
 cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:4: error: 'f' was not declared in this scope
   12 |    f = true;
      |    ^
Language: C++

 s = s + s;
  if(s.find(p) != string::npos){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }


Compiler output:
a.cc:1:2: error: 's' does not name a type
    1 |  s = s + s;
      |  ^
a.cc:2:3: error: expected unqualified-id before 'if'
    2 |   if(s.find(p) != string::npos){
      |   ^~
a.cc:4:4: error: expected unqualified-id before 'else'
    4 |   }else{
      |    ^~~~
Language: C++

#include <stdio.h>
#include <string.h>
#define rep(i, a) for(int i = 0; i < a; ++i)

int main(void) {
  char ts[150], p[150], s[300];
  int i, j;
  scnaf("%s", ts);
  scanf("%s", p);
  rep(i, strlen(ts)) s[i] = ts[i];
  rep(i, strlen(ts)) s[i + strlen(ts))] = ts[i];
  s[strlen(ts) * 2] = 0;
  rep(i, strlen(ts)) {
    rep(j, strlen(p)) {
      if(s[i + j] != p[j]) break;
      if(j == p - 1) {
        printf("Yes\n");
        return 0;
      }
    }
  }
  printf("No\n");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'scnaf' was not declared in this scope; did you mean 'scanf'?
    8 |   scnaf("%s", ts);
      |   ^~~~~
      |   scanf
a.cc:11:38: error: expected ']' before ')' token
   11 |   rep(i, strlen(ts)) s[i + strlen(ts))] = ts[i];
      |                                      ^
      |                                      ]
a.cc:11:38: error: expected ';' before ')' token
   11 |   rep(i, strlen(ts)) s[i + strlen(ts))] = ts[i];
      |                                      ^
      |                                      ;
a.cc:16:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |       if(j == p - 1) {
      |          ~~^~~~~~~~
Language: C++

#include <stdio.h>
#include <string.h>
#define rep(i, a) for(int i = 0; i < a; ++i)

int main(void) {
  char ts[150], p[150], s[300];
  int i, j;
  scansf("%s", ts);
  scanf("%s", p);
  rep(i, strlen(ts)) s[i] = ts[i];
  rep(i, strlen(ts)) s[i + strlen(ts)] = ts[i];
  s[strlen(ts) * 2] = 0;
  rep(i, strlen(ts)) {
    rep(j, strlen(p)) {
      if(s[i + j] != p[j]) break;
      if(j == p - 1) {
        printf("Yes\n");
        return 0;
      }
    }
  }
  printf("No\n");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'scansf' was not declared in this scope; did you mean 'scanf'?
    8 |   scansf("%s", ts);
      |   ^~~~~~
      |   scanf
a.cc:16:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |       if(j == p - 1) {
      |          ~~^~~~~~~~
Language: C++

#include <stdio.h>
#include <string.h>
#define rep(i, a) for(int i = 0; i < a; ++i)

int main(void) {
  char ts[150], p[150], s[300];
  int i, j;
  scanf("%s", ts);
  scanf("%s", p);
  rep(i, strlen(ts)) s[i] = ts[i];
  rep(i, strlen(ts)) s[i + strlen(ts)] = ts[i];
  s[strlen(ts) * 2] = 0;
  rep(i, strlen(ts)) {
    rep(j, strlen(p)) {
      if(s[i + j] != p[j]) break;
      if(j == p - 1) {
        printf("Yes\n");
        return 0;
      }
    }
  }
  printf("No\n");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |       if(j == p - 1) {
      |          ~~^~~~~~~~
Language: C++

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

const int str_MAX = 101;
char s[str_MAX], p[str_MAX];
char str[str_MAX * 2] = {};

int main(){
	cin >> s;
	cin >> p;
	strcpy_s(str, s);
	strcat_s(str, s);
	if (strstr(str,p)==NULL){
		cout << "No" << endl;
	}
	else cout << "Yes" << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'strcpy_s' was not declared in this scope; did you mean 'strcpy'?
   13 |         strcpy_s(str, s);
      |         ^~~~~~~~
      |         strcpy
a.cc:14:9: error: 'strcat_s' was not declared in this scope; did you mean 'strcat'?
   14 |         strcat_s(str, s);
      |         ^~~~~~~~
      |         strcat
Language: C++

#include <iostream>



int strlen (char *str) {
  int len = 0;
  while (*str != '\0') {
    str++;
    len++;
  }
  return len;
}



int main() {
  char *s = new char[202], p[100];
  int s_len, p_len, i;
  char temp, terminal='\0';
  int flag = 0;

  std::cin >> s >> p;
  s_len = strlen(s);
  p_len = strlen(p);

  for (i = 0; p[i] != '\0'; i ++) {
    s[i + s_len] = s[i];
  }
  s[i + s_len] = '\0';
  s_len += p_len;


  for (i = 0; i < s_len; i ++) {
    temp = s[p_len];
    s[p_len] = terminal;

    if (std::strcmp(s, p) == 0) {
      flag = 1;
      break;
    }
    s[p_len] = temp;
    s++;
  }
  if (flag == 1) {
    std::cout << "Yes" << std::endl;
  } else {
    std::cout << "No" << std::endl;
  }
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:37:14: error: 'strcmp' is not a member of 'std'
   37 |     if (std::strcmp(s, p) == 0) {
      |              ^~~~~~
Language: C++

#include <iostream>



int strlen (char *str) {
  int len = 0;
  while (*str != '\0') {
    str++;
    len++;
  }
  return len;
}

bool strcmp(char *s, char *p, int size) {
  for (int i = 0; i < size; i ++) {
    if (s[i] != p[i]) return false;
  }
  return true;
}



int main() {
  char *s = new char[202], p[100];
  int s_len, p_len, i;
  char temp, terminal='\0';
  int flag = 0;

  std::cin >> s >> p;
  s_len = strlen(s);
  p_len = strlen(p);

  for (i = 0; p[i] != '\0'; i ++) {
    s[i + s_len] = s[i];
  }
  s[i + s_len] = '\0';
  s_len += p_len;


  for (i = 0; i < s_len; i ++) {
    temp = s[p_len];
    s[p_len] = terminal;

    if (strcmp(s, p)) {
      flag = 1;
      break;
    }
    s[p_len] = temp;
    s++;
  }

  if (flag == 1) {
    std::cout << "Yes" << std::endl;
  } else {
    std::cout << "No" << std::endl;
  }
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:44:15: error: too few arguments to function 'bool strcmp(char*, char*, int)'
   44 |     if (strcmp(s, p)) {
      |         ~~~~~~^~~~~~
a.cc:14:6: note: declared here
   14 | bool strcmp(char *s, char *p, int size) {
      |      ^~~~~~
Language: C++

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

int main(){
char str1[100], str2[100],str[200];

scanf("%s %s", str1, str2);  // ２つの文字列を読み込む
strcat(str1,str);
strcat(str1,str);
while(1)
	{int i=0,y=0,z=0;
	y=strstr(str,str2[i]);
	if(y<z) z=y;
	else {cout<<"No"<<endl; break;)
	if(i==strlen(str2)) {cout<<"Yes"<<endl; break;}
	i++;
	}
return 0;
}

//解説用誤答


Compiler output:
a.cc: In function 'int main()':
a.cc:12:28: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   12 |         y=strstr(str,str2[i]);
      |                      ~~~~~~^
      |                            |
      |                            char
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:330:52: note:   initializing argument 2 of 'char* strstr(char*, const char*)'
  330 | extern char *strstr (char *__haystack, const char *__needle)
      |                                        ~~~~~~~~~~~~^~~~~~~~
a.cc:12:17: error: invalid conversion from 'char*' to 'int' [-fpermissive]
   12 |         y=strstr(str,str2[i]);
      |           ~~~~~~^~~~~~~~~~~~~
      |                 |
      |                 char*
a.cc:14:39: error: expected primary-expression before ')' token
   14 |         else {cout<<"No"<<endl; break;)
      |                                       ^
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main(){
    string s;
    string p;
    
    cin >> s;
    cin >> p;
    
    bool f;
    for(int i=0; i<(int)s.size(); ++i){
        f = true;

        for(int k=0; k<(int)p.size(); ++k){
            if(s[i + k] != k[k]){
                f = false;
                break;
            }
        }
        
        if(f){
            cout << "Yes" << endl;
            break;
        }
        
    }
    
    if(!f){
        cout << "No" << endl;
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:29: error: invalid types 'int[int]' for array subscript
   16 |             if(s[i + k] != k[k]){
      |                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* argv[])
{

    string word, key;
    cin >> word >> key;
    word += word;
    if(word.find(key)!=npos)
    {
        cout << "Yes" << endl;
    }else
    {
        cout << "No " << endl;
    }


    return 0;
}



Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:9:24: error: 'npos' was not declared in this scope
    9 |     if(word.find(key)!=npos)
      |                        ^~~~
Language: C++

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

int main(){
  string s,s1,s2;
  cin >> s1;
  cin >> s;
  s2 = s1+s1;
  //cout << s2.find(s);
  if(s2.find(s) < 100000000){
    cout << "Yes";
  }else{
    cout << "No";
  }
　cout << endl；

}


Compiler output:
a.cc:16:1: error: extended character 　 is not valid in an identifier
   16 | 　cout << endl；
      | ^
a.cc: In function 'int main()':
a.cc:16:1: error: '\U00003000cout' was not declared in this scope
   16 | 　cout << endl；
      | ^~~~~~
a.cc:16:11: error: 'endl\U0000ff1b' was not declared in this scope
   16 | 　cout << endl；
      |           ^~~~~~
Language: C++

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

int main()
{
	string input, search;
	cin >> input;
	cin >> search;
	int i = 0;
	int search_length = search.length();
	int input_length = input.length();
	bool isMake = false;
	for (int i = 0; i < input_length; i++)
	{
		string out = "";
		for (int j = 0; j < search_length; j++)
		{
			if (i + j < input_length)
				out += input[i + j];
			else
				out += input[i + j - input_length];
		}
		if (out == search) isMake = true;
	}
	if (isMake) cout << "Yes";
	else cout << "No";
	cout << endl;
}


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

#include<iostream>
#include<string>
using namespace std;
int main(){
string a,b;
cin >> a >>b;
a=a+a;
if(a.find(b)!=-1)cout<<“Yes”<<endl;
else cout << “No” << endl;
return 0;
}


Compiler output:
a.cc:8:24: error: extended character “ is not valid in an identifier
    8 | if(a.find(b)!=-1)cout<<“Yes”<<endl;
      |                        ^
a.cc:8:24: error: extended character ” is not valid in an identifier
a.cc:9:14: error: extended character “ is not valid in an identifier
    9 | else cout << “No” << endl;
      |              ^
a.cc:9:14: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:8:24: error: '\U0000201cYes\U0000201d' was not declared in this scope
    8 | if(a.find(b)!=-1)cout<<“Yes”<<endl;
      |                        ^~~~~
a.cc:9:14: error: '\U0000201cNo\U0000201d' was not declared in this scope
    9 | else cout << “No” << endl;
      |              ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    spring p,s;
    cin>>p>>s;
    p=p+p;
    bool flag=false;
    for(int i=0;i<(int)p.size()-(int)s.size()+1;i++){
        string y=p.substr(i,s.size());
        if(t==s){
            flag=true;
            break;
        }  
    }
    cout<<"Yes"<<endl;
    }else{
        cout<<"No"<<endl;
    }
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'spring' was not declared in this scope; did you mean 'sprintf'?
    4 |     spring p,s;
      |     ^~~~~~
      |     sprintf
a.cc:5:10: error: 'p' was not declared in this scope
    5 |     cin>>p>>s;
      |          ^
a.cc:5:13: error: 's' was not declared in this scope
    5 |     cin>>p>>s;
      |             ^
a.cc:10:12: error: 't' was not declared in this scope
   10 |         if(t==s){
      |            ^
a.cc: At global scope:
a.cc:16:6: error: expected unqualified-id before 'else'
   16 |     }else{
      |      ^~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    string p,s;
    cin>>p>>s;
    p=p+p;
    bool flag=false;
    for(int i=0;i<(int)p.size()-(int)s.size()+1;i++){
        string y=p.substr(i,s.size());
        if(t==s){
            flag=true;
            break;
        }  
    }
    cout<<"Yes"<<endl;
    }else{
        cout<<"No"<<endl;
    }
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 't' was not declared in this scope
   10 |         if(t==s){
      |            ^
a.cc: At global scope:
a.cc:16:6: error: expected unqualified-id before 'else'
   16 |     }else{
      |      ^~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^