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

#include <bits/stdc++.h>
 
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define CLR(a) memset((a), 0 ,sizeof(a))
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vii;
typedef vector<string> vs;
typedef pair<int, int> pi;
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MKP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
 
const int INF = 999999;
const double EPS = 1e-10;
const double PI = acos(-1.0);
const ll MOD = 1000000007;
 
char S[105],T[105];



int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	bool flag = true;
	cin >> S;
	cin >> T;
	REP(i,strlen(S)){
		if(S[i] != T[i]){
			flag = false;
		}
	}
	if(flag){
		cout<<"Yes"<<endl;
	}else{
		int i;
		while(!flag && i < strlen(S)){
			flag = true;
			char x[1];
			x[0] = S[0];
			S[0] = S[strlen(S)]
			REP(i,strlen(S) - 1){
				S[i] = S[i + 1];
			}
			S[0] = x[0]; 
			REP(i,strlen(S) - 1){
				if(S[i] != T[i]){
				flag = false;
			}
			i++;
		}
	
		if(flag){
			cout<<"Yes"<<endl;
		}else{
			cout <<"No" << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:44: error: expected ';' before 'for'
   52 |                         S[0] = S[strlen(S)]
      |                                            ^
      |                                            ;
a.cc:3:43: error: expected ';' before ')' token
    3 | #define FOR(i,a,b) for(int i=(a);i<(b);++i)
      |                                           ^
a.cc:4:18: note: in expansion of macro 'FOR'
    4 | #define REP(i,n) FOR(i,0,n)
      |                  ^~~
a.cc:53:25: note: in expansion of macro 'REP'
   53 |                         REP(i,strlen(S) - 1){
      |                         ^~~
a.cc:71:2: error: expected '}' at end of input
   71 | }
      |  ^
a.cc:33:1: note: to match this '{'
   33 | {
      | ^
Language: C++

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

int main() {
	char s[1000];
	char t[1000];
	cin >> s;
	cin >> t;
	string S, T;
	int i = 0;
	while (s[i] != '') {
		S.push_back(s[i]);
		T.push_back(t[i]);
		i++;
	}
	//cout << S.c_str() << endl;
	//cout << T.c_str() << endl;
	char a, b;
	int N = S.size();
	for (i = 0; i < N; i++) {
		if (S == T)cout << "Yes", break;
		a = S.back();
		S.pop_back();
		S = a + S;
		if (S == T)cout << "Yes";

	}
	if (S != T)cout << "No" << endl;
}

Compiler output:
a.cc:15:24: error: empty character constant
   15 |         while (s[i] != '') {
      |                        ^~
a.cc: In function 'int main()':
a.cc:25:43: error: expected primary-expression before 'break'
   25 |                 if (S == T)cout << "Yes", break;
      |                                           ^~~~~
Language: C++

#include <stdio.h>
#include <string.h>
void f(char b[])
{
	int i,j,k;
	char c=b[0];
	for(i=0;i<strlen(b)-1;i++)
	b[i]=b[i+1];
	b[strlen(b)-1]=c;
}
int main(int argc, char *argv[])
{
	int n,i,j,k,l,bz=0;
	char a[105],b[105],;
	scanf("%s",a);
	scanf("%s",b);
	l=strlen(a);
	for(i=0;i<l;i++)
	{
		if(a[i]!=b[i])
		f(b);
	}
	for(i=0;i<l;i++)
	if(a[i]!=b[i])
	{
		bz=1;
		break;
	}
	if(bz)
	printf("No\n");
	else
	printf("Yes\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:14:28: error: expected unqualified-id before ';' token
   14 |         char a[105],b[105],;
      |                            ^
Language: Java

import java.util.*;

public class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        boolean isMatched = false;
        boolean isYes = false;
        String s = sc.next();
        String t = sc.next();
        int len = s.length();
        char[] s_ = new char[len];
        char[] t_ = new char[len];
        char tmp;
        
        for(int i=0; i<len; i++){
            s_[i] = s.charAt(i);
            t_[i] = t.charAt(i);
        }
    
        for(int n=0; n<len-1; n++){
            s_[len] = tmp;
            for(int i=0; i<len-1; i++){
                s_[i] = s_[i+1];
            }
            s[0] = tmp;
        
            for(int i=0; i<len; i++){
                if(s_[i] == t_[i]){
                    isMatched = true;
                }else{
                    isMatched = false;
                    break;
                }
            }
            if(isMatched == true){
                isYes = true;
                break;
            }
        }
        
        if(isYes == true){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }

}

Compiler output:
Main.java:25: error: array required, but String found
            s[0] = tmp;
             ^
1 error
Language: C++

#include<bits/stdc++.h>
#include <sstream>
#define ll long long
using namespace std;

static const int N=100;
int p[N+1];
vector<int> v;
vector<string> split(const string &s, char delim) {
    vector<string> elems;
    stringstream ss(s);
    string item;
    while (getline(ss, item, delim)) {
    if (!item.empty()) {
            elems.push_back(item);
        }
    }
    return elems;
}
int main(){
   bool b=false;
   string s1,s2;
   cin>>s1>>s2;
   for(int i=0;i<s1.size();i++){
        for(int j=0;j<i;j++){
            for(int k=i;k<s1.size();k++){
                if(s1[j]==s2[k]&&s2[j]==s1[k]){
                    cout<<"Yes"endl;
                    b=true;
                    break;
                }
            }
        }
   }

   if(b=false)cout<<"No"<<endl;
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:27: error: unable to find string literal operator 'operator""endl' with 'const char [4]', 'long unsigned int' arguments
   28 |                     cout<<"Yes"endl;
      |                           ^~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s,t;
  cin>>s>>t;
  int n;
  n=s.size();
  for(int i=0;i<n;i++){
      if(s==t){
          cout<<"Yes"<<endl;
          break;
      }
      s=s[(n-1)0(n-2)];
  }
  if(s!=t){
      cout<<"No"<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: expected ']' before numeric constant
   14 |       s=s[(n-1)0(n-2)];
      |                ^
      |                ]
a.cc:14:16: error: expected ';' before numeric constant
   14 |       s=s[(n-1)0(n-2)];
      |                ^
      |                ;
Language: C++

#include<bits/stdc++.h>
#include <sstream>
#define ll long long
using namespace std;

static const int N=100;
int p[N+1];
vector<int> v;
vector<string> split(const string &s, char delim) {
    vector<string> elems;
    stringstream ss(s);
    string item;
    while (getline(ss, item, delim)) {
    if (!item.empty()) {
            elems.push_back(item);
        }
    }
    return elems;
}
int main(){
   bool b=false;
   string s1,s2;
   for(int i=0;i<s1.size();i++){
        for(int j=0;j<i;j++){
            for(int k=i;k<s1.size();k++){
                if(s1[j]==s2[k]&&s2[j]==s1[k]){
                    cout<<"Yes"endl;
                    b=true;
                    break;
                }
            }
        }
   }

   if(b=false)cout<<"No"<<endl;
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:27: error: unable to find string literal operator 'operator""endl' with 'const char [4]', 'long unsigned int' arguments
   27 |                     cout<<"Yes"endl;
      |                           ^~~~~~~~~
Language: C++

#include <bits/stdc++.h>
 
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define CLR(a) memset((a), 0 ,sizeof(a))
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vii;
typedef vector<string> vs;
typedef pair<int, int> pi;
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MKP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
 
const int INF = 999999;
const double EPS = 1e-10;
const double PI = acos(-1.0);
const ll MOD = 1000000007;
 
char S[105],T[105];



int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	bool flag = true;
	cin >> S;
	cin >> T;
	REP(i,strlen(S)){
		if(S[i] != T[i]){
			flag = false;
		}
	}
	if(flag){
		cout<<"Yes"<<endl;
	}else{
		flag = true;
		REP(i,strlen(S)){
			if(S[strlen(S) - i] != T[i]){
			flag = false;
		}
	}
	if(flag){
		cout<<"Yes"<<endl;
	}else{
		cout <<"No" << endl;
	}

	return 0;
}
 


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

#include <iostream>
#include <string>

using namespace std;

string judge(string temp,string T,int count){
    if(count == temp.size()) return "No";
    else{
    if(temp==T) return "Yes";
    else return judge(temp.substr(1)+temp[0],T,count+1);
}
}

int main(){
string S,T,ans;
    cin >>S;
    cin >>T;V
    ans=judge(S,T,0);
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: 'V' was not declared in this scope
   17 |     cin >>T;V
      |             ^
Language: C++

#include<string.h>
int main()
{
	char a[105],b[105],c[105],t,s=0;
	int i,j,k,n;
	scanf("%s%s",a,b);
	n=strlen(a);
	for(i=0;i<n;i++)
	{
		c[i]=a[n];
		for(j=i+1;j<n;j++)
		c[j]=a[i];
		for(k=0;k<n;k++)
		a[k]=c[k];
		if(a==b)
	    {
	    	s=1;break;
		}
	}
	if(s=1)
	printf("Yes");
	else
	printf("No");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'scanf' was not declared in this scope
    6 |         scanf("%s%s",a,b);
      |         ^~~~~
a.cc:21:9: error: 'printf' was not declared in this scope
   21 |         printf("Yes");
      |         ^~~~~~
a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    1 | #include<string.h>
  +++ |+#include <cstdio>
    2 | int main()
a.cc:23:9: error: 'printf' was not declared in this scope
   23 |         printf("No");
      |         ^~~~~~
a.cc:23:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: Java

package abc2018_7_21.B;

import java.util.Scanner;

public class StringRotation {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);

		String s = sc.next();
		String t = sc.next();
		boolean flag = false;

		for (int i = 0; i < s.length(); i++) {

			flag = s.equals(t);
			if (flag)
				break;

			char e;
			String tmp;
			e = s.charAt(s.length() - 1);
			tmp = s.substring(0, s.length() - 1);
			s = e + tmp;

		}

		if (flag)
			System.out.println("Yes");
		else
			System.out.println("No");
		sc.close();
	}

}


Compiler output:
Main.java:5: error: class StringRotation is public, should be declared in a file named StringRotation.java
public class StringRotation {
       ^
1 error
Language: Java

import java.util.Scanner;
import java.util.Arryas;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    String t=sc.next();
    t=t+t;
    System.out.println(t.contains(s)?"Yes":"No");
  }
}

Compiler output:
Main.java:2: error: cannot find symbol
import java.util.Arryas;
                ^
  symbol:   class Arryas
  location: package java.util
1 error
Language: Java

package test;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		String correct = scanner.next();
		String target = scanner.next();

		if (correct.length() != target.length()) {
			return;
		}

		char[] targ = target.toCharArray();
		for (int i = 0; i < correct.length(); i++) {
			char[] converted = new char[correct.length()];
			for (int j = 0; j < correct.length(); j++) {
				int a = i + j;
				if (a >= correct.length()) {
					a = a - correct.length();
				}
				converted[j] = targ[a];
			}
			if (correct.equals(String.valueOf(converted))) {
				System.out.println("yes");
				return;
			}
		}
		System.out.println("no");
	}

}

Compiler output:
Main.java:10: error: cannot find symbol
		String correct = scanner.next();
		                 ^
  symbol:   variable scanner
  location: class Main
Main.java:11: error: cannot find symbol
		String target = scanner.next();
		                ^
  symbol:   variable scanner
  location: class Main
2 errors
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);i++)
const int MOD=(int)1e9+7;
using namespace std;
int main(){
    string a,b;
    cin>>a>>b;
    REP(i,a.size()){
        if(b.find(a[i])!=-1){
            ans="Yes";
            b.erase(b.find(a[i]));
        }
        else{
          ans=="No";
          break;
        }
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |             ans="Yes";
      |             ^~~
      |             abs
a.cc:14:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |           ans=="No";
      |           ^~~
      |           abs
a.cc:17:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |     cout<<ans<<endl;
      |           ^~~
      |           abs
a.cc:18:2: error: expected '}' at end of input
   18 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: Java

import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        // String input = scanner.nextLine();
        // System.out.println(input);

        String s = scanner.nextLine();
        String t = scanner.nextLine();

        scanner.close();

        boolean b = false;
        for (int i = 0; i < s.length(); ++i) {
            char c = s.charAt(s.length()-1);
            s = c + s.substring(0, s.length()-1);

            // System.out.println(c);
            // System.out.println(s);

            if (s.equals(t)) {
                b = true;
            }
        }

        if (b) {
            System.out.println("Yes");
        }
        else {
            System.out.println("NO");
        }
    }


Compiler output:
Main.java:38: error: reached end of file while parsing
    }
     ^
1 error
Language: C++

#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[])
{
	int n,i,j,k,l,bz=0;
	char a[105],b[105],;
	scanf("%s",a);
	scanf("%s",b);
	l=strlen(a);
	for(i=0;i<l;i++)
	{
		if(a[i]!=b[i])
		{
			char ch=b[0];
			strcpy(b,b+1);
			b[l-1]=ch;
		}
	}
	for(i=0;i<l;i++)
	if(a[i]!=b[i])
	{
		bz=1;
		break;
	}
	if(bz)
	printf("No\n");
	else
	printf("Yes\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:6:28: error: expected unqualified-id before ';' token
    6 |         char a[105],b[105],;
      |                            ^
Language: C++

#include <iostream>
#include <fstream>
#include <vector>
#include <utility>
#include <map>
#include <set>
#include <list>
#include <deque>
#include <queue>
#include <stack>
#include <forward_list>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>
#include <string>
#include <bitset>
#include <memory>
#include <chrono>
#include <cmath>
#include <cstdio>
#include <ctime>
#include <cstring>
#include <cstdlib>
#include <cstdint>
#include <iomanip>
#include <tuple>
#include <random>
#include <map>
#include <queue>
#include <utility>
using namespace std;
typedef unsigned long long int ull;
typedef long long int ll;
string s,t;
bool solve() {
    if(s.length() != t.length())return false;
    for(int i = 1;i <= s.length();i++) {
        if(s.substr(0,i) == t.substr(s.length()-i,i) &&
s.substr(i,s.length()-i) == t.substr(0,t.length()-i))return true;
}
    return false;
}
int main(void) {
    cin >> s;
    cin >> t;
    if(solve())
        cout << "Yes" << endl;
    else
        cout << "No" << endl;
    return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:50:14: error: expected '}' at end of input
   50 |     return 0;
      |              ^
a.cc:43:16: note: to match this '{'
   43 | int main(void) {
      |                ^
Language: C++

#include<bits/stdc++.h>
#include<string>
using namespace std;
int main()
{
	char S[100],TD[100],T[102];
	gets(S);gets(TD);
	int len=strlen(S);
	for(int i=1;i<=len;i++) T[i]=TD[i-1];
	for(int i=0;i<len;i++)
	{
		T[0]=T[len];
		for(int j=len;j>0;j--) T[j]=T[j-1];
		for(int j=1;j<=len;j++) TD[j-1]=T[j];
		int shenniu=strcmp(S,TD);
		if(shenniu==0){cout<<"Yes"<<endl;return 0;};
	};
	cout<<"No"<<endl;return 0;
}

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

        Scanner scanner = new Scanner(System.in);

        // String input = scanner.nextLine();
        // System.out.println(input);

        String s = scanner.nextLine();
        String t = scanner.nextLine();

        scanner.close();

        for (int i = 0; i < s.length(); ++i) {
            char c = s.charAt(s.length()-1);
            s = c + s.substring(0, s.length()-1);

            // System.out.println(c);
            // System.out.println(s);

            if (s.equals(t)) {
                System.out.println("Yes");
                System.exit(0);
            }
        }

        System.out.println("NO");

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
        Scanner scanner = new Scanner(System.in);
        ^
  (use --enable-preview to enable unnamed classes)
Main.java:9: error: class, interface, enum, or record expected
        scanner.close();
        ^
Main.java:11: error: class, interface, enum, or record expected
        for (int i = 0; i < s.length(); ++i) {
        ^
Main.java:11: error: class, interface, enum, or record expected
        for (int i = 0; i < s.length(); ++i) {
                        ^
Main.java:11: error: class, interface, enum, or record expected
        for (int i = 0; i < s.length(); ++i) {
                                        ^
Main.java:13: error: class, interface, enum, or record expected
            s = c + s.substring(0, s.length()-1);
            ^
Main.java:18: error: class, interface, enum, or record expected
            if (s.equals(t)) {
            ^
Main.java:20: error: class, interface, enum, or record expected
                System.exit(0);
                ^
Main.java:21: error: class, interface, enum, or record expected
            }
            ^
9 errors
Language: C++


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

int main() {
    // cin.tie(nullptr);
    // ios::sync_with_stdio(false);

    string s, t;
    cin >> s >> t;
    char s_rep[s_length];
    for (int i = 0; i < s_length; ++i) {
        bool same = true;
        for (int j = 1; j <= s_length; ++j) {
            if (i + j < s_length) {
                s_rep[i + j] = s[j - 1];
            } else {
                s_rep[i + j - s_length] = s[j - 1];
            }
        }
        string str(s_rep);
        for (int j = 0; j < s_length; ++j) {
            if (s_rep[j] != t[j]) {
                same = false;
                break;
            }
        }
        if (same) {
            cout << "Yes" << '\n';
            return 0;
        }
    }

    cout << "No" << '\n';
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: 's_length' was not declared in this scope
   11 |     char s_rep[s_length];
      |                ^~~~~~~~
a.cc:16:17: error: 's_rep' was not declared in this scope; did you mean 'strsep'?
   16 |                 s_rep[i + j] = s[j - 1];
      |                 ^~~~~
      |                 strsep
a.cc:18:17: error: 's_rep' was not declared in this scope; did you mean 'strsep'?
   18 |                 s_rep[i + j - s_length] = s[j - 1];
      |                 ^~~~~
      |                 strsep
a.cc:21:20: error: 's_rep' was not declared in this scope; did you mean 'strsep'?
   21 |         string str(s_rep);
      |                    ^~~~~
      |                    strsep
Language: C++

# include <iostream>
# include <string.h>
using namespace std;
int main()
{
	char x[101],y[101],a;
	while(cin>>x>>y)
	{
		if(strcmp(x,y)==0)
			cout<<"Yes"<<endl;
		else
		{
		int length=strlen(x);
		for(int j=1;j<length;j++)
		{
		  a=x[length-1];
		  for(int i=length-1;i>=1;i--)
		  {
			x[i]=x[i-1];
		  }
		  x[0]=a;
		  if(strcmp(x,y)==0)
			  break;
		}
		if(j!=length)
			cout<<"Yes"<<endl;
		else
			cout<<"No"<<endl;
		}
	}
	return 0;
}


			
			
			
		

Compiler output:
a.cc: In function 'int main()':
a.cc:25:20: error: 'j' was not declared in this scope
   25 |                 if(j!=length)
      |                    ^
Language: C++

# include <iostream>
# include <string.h>
using namespace std;
int main()
{
	char x[101],y[101],a;
	while(cin>>x>>y)
	{
		int length=strlen(x);
		for(int j=1;j<length;j++)
		{
		  a=x[length-1];
		  for(int i=length-1;i>=1;i--)
		  {
			x[i]=x[i-1];
		  }
		  x[0]=a;
		  if(strcmp(x,y)==0)
			  break;
		}
		if(j!=length)
			cout<<"Yes"<<endl;
		else
			cout<<"No"<<endl;
	}
	return 0;
}


			
			
			
		

Compiler output:
a.cc: In function 'int main()':
a.cc:21:20: error: 'j' was not declared in this scope
   21 |                 if(j!=length)
      |                    ^
Language: Java

import java.util.Scanner;
public class Aaa {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		String T = sc.nextLine();
		boolean can = false;

		for(int i = 0;i < S.length();i++) {
			S = S + S.charAt(0);
			S = S.substring(1);
				if(S.equals(T)) {
					can = true;
					break;
				}
		}
		if(can == true) {
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
}


Compiler output:
Main.java:2: error: class Aaa is public, should be declared in a file named Aaa.java
public class Aaa {
       ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
char s1[100],s2[100],a,b;
int flag=0,sum=0,sum1=0;
int main()
{
	int i,n;
    int j;
	scanf("%s",s1);
	scanf("%s",s2);
	n=strlen(s1);
	else
	{
		if(s1==s2)
		   	flag=1;
    	char end;
		for(i=0;i<strlen(s1);i++)
		{	
		    end=s1[j];
		    for (j=strlen(s1)-1;j>0;--j)
		    {  
		      s1[j]=s1[j-1];        
		    }
		    s1[0]=end;
		   	if(s1==s2)
		   		flag=1;
		}
	}
	if(flag==1)	
		printf("Yes");
	else
		printf("No");
	return 0;	
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'else' without a previous 'if'
   12 |         else
      |         ^~~~
Language: C++

#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
typedef long long LL;

#define __m int mid=(l+r)>>1
#define lson l,mid,rt<<1
#define rson mid+1,r,rt<<1|1

template<class T>
inline bool rd(T &num) {
    char in;
    bool IsN = false;
    while(in = getchar(), in != '-' && (in < '0' || in > '9'))if(in == EOF)return false;
    in == '-' ? (IsN = true, num = 0) : num = in - '0';
    while(in = getchar(), in >= '0' && in <= '9')num = num * 10 + in - '0';
    return IsN ? num = -num : num, true;
}

#define rep(i,a,b) for(register int i = (a); i< (b); i++)
#define per(i,a,b) for(register int i = (a); i> (b); i--)
#define clr(a) memset(a,0,sizeof(a))
#define inf(a) memset(a,0x3f,sizeof(a))
#define IO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define rd2(a,b) rd(a)&&rd(b)
#define rd3(a,b,c) rd(a)&&rd(b)&&rd(c)
#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))

string nico;
#ifdef LOCAL
#define bug(x) cout<<#x<<" : "<<x<<endl
#define infile(x) freopen(x,"r",stdin)
#define outfile(x) freopen(x,"w",stdout)
#else
#define bug(x)
#define infile(x)
#define outfile(x)
#endif

const int maxn = 4e6 + 7;
const int inf  = 0x3f3f3f3f;
const LL linf  = (LL)inf << 32 | inf;
const int mod  = 1e9 + 7;

int main(){
    string s,t;
    cin>>s>>t;
    bool fi=false;
    rep(i,0,s.length()){
        if(s==t)
            fi=true;
        s = s.substr(1,s.length()-1) + s[0];
    }
    if(fi)
        cout<<"Yes"<<endl;
    else
        cout<<"No"<<endl;
    return 0;
}



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

#include <iostream>                                                                                                           
#include <string>                                                                                                             
                                                                                                                              
int main(void) {                                                                                                              
  std::string RAS[2];                                                                                                         
  std::cin >> RAS[0];                                                                                                         
  std::cin >> RAS[1];                                                                                                         
  int size_ = RAS[0].size();                                                                                                  
  char tmp;                                                                                                                   
  for(int i = 0; i < size_; i++) {                                                                                            
    tmp = RAS[1][size_ - 1];                                                                                                  
    for(int j = size_ - 2; j >= 0; j--) {                                                                                     
      RAS[1][j+1] = RAS[1][j];                                                                                                
    }                                                                                                                         
    RAS[1][0] = tmp;                                                                                                          
    std::cout << RAS[1] << std::endl;                                                                                         
    if(RAS[0] == RAS[1]) {                                                                                                    
      std::cout << "Yes" << std::endl;                                                                                        
      return 0;                                                                                                               
    }                                                                                                                         
  }                                                                                                                           
  std::cout << "No" << std::endl;                                                                                             
  return 0;                                                                                                                   
}                                                                                                                             
~                  

Compiler output:
a.cc:25:2: error: expected class-name at end of input
   25 | ~
      |  ^
Language: C++

#include<stdio.h>

int in(char *p, char c);
int compare(char *p1, char *p2);
int main() {
	char a1[100], a2[100];
	int r;
	gets(a1);
	gets(a2);
	r=compare(a1,a2);
	if(r)
		printf("Yes\n");
	else
		printf("No\n");
}
int in(char *p, char c){
	int i;
	for(i=0; p[i]; i++)
		if(*(p+i)==c)
			return 1;
	return 0;
}
int compare(char *p1, char *p2){
	int i;
	char c;
	for(i=0; c=p1[i]; i++)
		if(in(p2,c)==0)
			return 0;
	for(i=0; c=p2[i]; i++)
		if(in(p1,c)==0)
			return 0;
	return 1;
}

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

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

int main(){
  string S;
  string T;
  cin >> S;
  cin >> T;
  l = S.size();
  string tmp;
  for(int i = 0; i<l; i++){
    if(S==T){
      cout << "YES" << "\n";
      return 0;
    }
    tmp = S[0];
    for(int j = 0; j<l-1; j++){
      S[j] = S[j+1]
    }
    S[l-1] = tmp;
  }
  cout << "NO" <<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'l' was not declared in this scope
   11 |   l = S.size();
      |   ^
a.cc:20:20: error: expected ';' before '}' token
   20 |       S[j] = S[j+1]
      |                    ^
      |                    ;
   21 |     }
      |     ~
Language: C++

#include<stdio.h>
#include<string.h>
int main()
{
	char s[1005];
	char s1[1005];
	char s2[1005];
	char s3[1005];
	gets(s);
	gets(s1);
	int n=strlen(s);
	strcpy(s3,s);
	int f=0;
	for(int j=0;j<n;j++){
		for(int i=1;i<n;i++){
		s2[0]=s3[n-1];
		s2[i]=s3[i-1];		
		}
		s2[n]='\0';
		if(strcmp(s2,s1)==0){
			f=1;
			break;	
		}
		strcpy(s3,s2);
	}
	if(f==1) printf("Yes\n");
	else printf("No\n");
}

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

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	char s[102], t[102],tt[102];
	while (cin >> s >> t)
	{
		strcpy( tt,s);
		int a=strcmp(s, t);int l = strlen(s) - 1,i,j;
		if (a == 0) cout << "Yes" << endl;
		else {
			for (j = 0; j <= strlen(s) ; j++)
			{
				strcpy(tt, s);
				for (i = 0; i < strlen(s) - 1; i++)
				{
					s[i + 1] = tt[i];
				}
				s[0] = tt[l];
				a = strcmp(s, t);
				if (a == 0) { cout << "Yes" << endl; break; }
			}
		
			if (j == l + 2) cout << "No" << endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'strcpy' was not declared in this scope
    9 |                 strcpy( tt,s);
      |                 ^~~~~~
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:10:23: error: 'strcmp' was not declared in this scope
   10 |                 int a=strcmp(s, t);int l = strlen(s) - 1,i,j;
      |                       ^~~~~~
a.cc:10:23: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:10:44: error: 'strlen' was not declared in this scope
   10 |                 int a=strcmp(s, t);int l = strlen(s) - 1,i,j;
      |                                            ^~~~~~
a.cc:10:44: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:13:30: error: 'j' was not declared in this scope
   13 |                         for (j = 0; j <= strlen(s) ; j++)
      |                              ^
a.cc:16:38: error: 'i' was not declared in this scope
   16 |                                 for (i = 0; i < strlen(s) - 1; i++)
      |                                      ^
a.cc:25:29: error: 'j' was not declared in this scope
   25 |                         if (j == l + 2) cout << "No" << endl;
      |                             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	char S[100],TD[100],T[102];
	gets(S);gets(TD);
	int len=strlen(S);
	for(int i=1;i<=len;i++) T[i]=TD[i-1];
	for(int i=0;i<len;i++)
	{
		T[0]=T[len];
		for(int j=len;j>0;j--) T[j]=T[j-1];
		for(int j=1;j<=len;j++) TD[j-1]=T[j];
		int shenniu=strcmp(S,TD);
		if(shenniu==0){cout<<"Yes"<<endl;return 0;};
	};
	cout<<"No"<<endl;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(S);gets(TD);
      |         ^~~~
      |         getw
Language: C++

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

int main() {
  string a,b,c;
  cin >> a;
  cin >> b;
  c=b+b;
  if(strstr(c,a) !=NULL){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: no matching function for call to 'strstr(std::string&, std::string&)'
   11 |   if(strstr(c,a) !=NULL){
      |      ~~~~~~^~~~~
In file included from a.cc:3:
/usr/include/string.h:330:14: note: candidate: 'char* strstr(char*, const char*)'
  330 | extern char *strstr (char *__haystack, const char *__needle)
      |              ^~~~~~
/usr/include/string.h:330:28: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char*'
  330 | extern char *strstr (char *__haystack, const char *__needle)
      |                      ~~~~~~^~~~~~~~~~
/usr/include/string.h:332:20: note: candidate: 'const char* strstr(const char*, const char*)'
  332 | extern const char *strstr (const char *__haystack, const char *__needle)
      |                    ^~~~~~
/usr/include/string.h:332:40: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
  332 | extern const char *strstr (const char *__haystack, const char *__needle)
      |                            ~~~~~~~~~~~~^~~~~~~~~~
Language: C++

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

using namespace std;

int main(void)
{
	char s[100], t[100];
	cin >> s >> t;

	char x[100];

	int l_s = (int)strlen(s);
	int flag = 0;

	for(int k = 0; k < l_s; k++)
	{
		x[l_s-1] = s[0];
		for(int j = 0; j < l_s-1; j++)
		{
		 x[j] = s[j+1];
		}
		int i = 0;
		flag = 0;

		while(x[i] != '\0' && t[i] != '\0')
		{
			if(x[i] != t[i])
			{
				flag = 1;
				break;
			}
			i++;
		}
		if(flag == 0)
			break;
		
		strcpy(s, x);
	}
	if(flag == 1)
		cout << "No" << endl;
	if(flag == 0)
		cout << "Yes" << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:24: error: 'strlen' was not declared in this scope
   15 |         int l_s = (int)strlen(s);
      |                        ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <vector>
  +++ |+#include <cstring>
    4 | #include <string>
a.cc:40:17: error: 'strcpy' was not declared in this scope
   40 |                 strcpy(s, x);
      |                 ^~~~~~
a.cc:40:17: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

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

using namespace std;

int main()
{
	int i, j, k, ans=0, n=1;
	char s[100], t[100], temp;

	cin >> s; cin >> t;

	for (j = 0; j < strlen(s); j++) {
		ans = 0;
		for (i = 0; i < strlen(s)-1; i++) {
			temp = s[i];
			s[i] = s[i + 1];
			s[i + 1] = temp;
		}
		for (k = 0; k < strlen(s); k++) {
			if (s[k] == t[k])
				ans++;
		}
		if (ans == strlen(s)) {
			cout << "Yes" << endl;
			n = 0;
		}
	}

	if(n)
		cout << "No" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: 'strlen' was not declared in this scope
   14 |         for (j = 0; j < strlen(s); j++) {
      |                         ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <iostream>
  +++ |+#include <cstring>
    4 |
Language: C++

#include<stdio.h>
#include<string.h>
int main()
{
	char s[1005];
	char s1[1005];
	char s2[1005];
	char s3[1005];
	gets(s);
	gets(s1);
	int n=strlen(s);
	strcpy(s3,s);
	int f=0;
	for(int j=0;j<n;j++){
		for(int i=1;i<n;i++){
		s2[0]=s3[n-1];
		s2[i]=s3[i-1];		
		}
		s2[n]='\0';
		if(strcmp(s2,s1)==0){
			f=1;
			break;	
		}
		strcpy(s3,s2);
	}
	if(f==1) printf("Yes");
	else printf("No");
}

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

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

int main(void)
{
  int a, i, j, tmp;
  int len;
  char S[150], T[150];

  scanf("%s", S);
  scanf("%s", T);

  len = strlen( S );

  for (i = 0;i < len; i++) {
    //1文字入れ替え
    tmp = text[0];
    for (j = 0;j < len-1; j++) {
      text[j] = text[j+1];
    }
    text[len-1] = tmp;
    if (text == T) a = 1;
  }
  if(a == 1) printf("Yes");
  printf("No");

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:17:11: error: 'text' undeclared (first use in this function)
   17 |     tmp = text[0];
      |           ^~~~
main.c:17:11: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main(void)
{
  int i, j, tmp;
  int len;
  char text[150], T[150];

  scanf("%s", text);
  scanf("%s", T)

  len = strlen( text );

  for (i = 0;i < len; i++) {
    //1文字入れ替え
    tmp = text[0];
    for (j = 0;j < len; j++) {
      text[j] = text[j+1];
    }
    text[len-1] = tmp;
    if (text == T) a = 1;
  }
  if(a == 1) printf("Yes");
  printf("No");

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:17: error: expected ';' before 'len'
   11 |   scanf("%s", T)
      |                 ^
      |                 ;
   12 | 
   13 |   len = strlen( text );
      |   ~~~            
main.c:22:20: error: 'a' undeclared (first use in this function)
   22 |     if (text == T) a = 1;
      |                    ^
main.c:22:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main(void)
{
  int i, j;
  int len;
  char text[150], T[150];
  
  scanf("%s", text);
  scanf("%s", T)

  len = strlen( text );

  for (i = 0;i < len; i++) {
    //1文字入れ替え
    tmp = text[0];
    for (j = 0;j < len; j++) {
      text[j] = text[j+1];
    }
    text[len-1] = tmp;
    if (text == T) a = 1;
  }
  if(a == 1) printf("Yes");
  printf("No");

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:17: error: expected ';' before 'len'
   11 |   scanf("%s", T)
      |                 ^
      |                 ;
   12 | 
   13 |   len = strlen( text );
      |   ~~~            
main.c:17:5: error: 'tmp' undeclared (first use in this function)
   17 |     tmp = text[0];
      |     ^~~
main.c:17:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:20: error: 'a' undeclared (first use in this function)
   22 |     if (text == T) a = 1;
      |                    ^
Language: C

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

int main(void)
{
  int len;
  char text[150], T[150];
  
  scanf("%s", text);
  scanf("%s", T)

  len = strlen( text );

  for (i = 0;i < len; i++) {
    //1文字入れ替え
    tmp = text[0];
    for (j = 0;j < len; j++) {
      text[j] = text[j+1];
    }
    text[len-1] = tmp;
    if (text == T) a = 1;
  }
  if(a == 1) printf("Yes");
  printf("No");

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:17: error: expected ';' before 'len'
   10 |   scanf("%s", T)
      |                 ^
      |                 ;
   11 | 
   12 |   len = strlen( text );
      |   ~~~            
main.c:14:8: error: 'i' undeclared (first use in this function)
   14 |   for (i = 0;i < len; i++) {
      |        ^
main.c:14:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:5: error: 'tmp' undeclared (first use in this function)
   16 |     tmp = text[0];
      |     ^~~
main.c:17:10: error: 'j' undeclared (first use in this function)
   17 |     for (j = 0;j < len; j++) {
      |          ^
main.c:21:20: error: 'a' undeclared (first use in this function)
   21 |     if (text == T) a = 1;
      |                    ^
Language: C++

read a;read b;a=$a$a;[ $(grep $b<<<$a) = $a ]&&echo Yes||echo No

Compiler output:
a.cc:1:1: error: 'read' does not name a type
    1 | read a;read b;a=$a$a;[ $(grep $b<<<$a) = $a ]&&echo Yes||echo No
      | ^~~~
a.cc:1:8: error: 'read' does not name a type
    1 | read a;read b;a=$a$a;[ $(grep $b<<<$a) = $a ]&&echo Yes||echo No
      |        ^~~~
a.cc:1:15: error: 'a' does not name a type
    1 | read a;read b;a=$a$a;[ $(grep $b<<<$a) = $a ]&&echo Yes||echo No
      |               ^
a.cc:1:22: error: expected unqualified-id before '[' token
    1 | read a;read b;a=$a$a;[ $(grep $b<<<$a) = $a ]&&echo Yes||echo No
      |                      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	string s1,s2;
	cin>>s1>>s2;
	int l1=s1.length(),l2=s2.length();
	if(l1!=l2) {cout<<"No";return 0;}
	for(int i=0;i<l1;i++)
	{
		for(int j=0;j<l1;j++)
		{
			if(s1[j]!=s2[(i+j)%l]) break;
			if(s1[i]==s2[(i+j)%l]&&j==s2.length()-1) {cout<<"Yes";return 0;}
		}
	}
	cout<<"No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:44: error: 'l' was not declared in this scope
   13 |                         if(s1[j]!=s2[(i+j)%l]) break;
      |                                            ^
a.cc:14:44: error: 'l' was not declared in this scope
   14 |                         if(s1[i]==s2[(i+j)%l]&&j==s2.length()-1) {cout<<"Yes";return 0;}
      |                                            ^
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<map>
#include<queue>
using namespace std;
int main()
{
string a,b;
cin>>a>>b;
int x=0,y=0;
for(int i=0;i<a.length;i++)
x+=a[i];
for(int i=0;i<b.length;i++)
y+=b[i];
if(x==y)
cout<<"Yes";
else
cout<<"No";
system ("pause");
return 0;;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   13 | for(int i=0;i<a.length;i++)
      |               ~~^~~~~~
      |                       ()
a.cc:15:17: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   15 | for(int i=0;i<b.length;i++)
      |               ~~^~~~~~
      |                       ()
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	string s1,s2;
	cin>>s1>>s2;
	int l1=s1.length(),l2=s2.length();
	if(l1!=l2) {cout<<"No";return 0;}
	for(int i=0;i<l;i++)
	{
		for(int j=0;j<l;j++)
		{
			if(s1[j]!=s2[(i+j)%l]) break;
			if(s1[i]==s2[(i+j)%l]&&j==s2.length()-1) {cout<<"Yes";return 0;}
		}
	}
	cout<<"No";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: 'l' was not declared in this scope
    9 |         for(int i=0;i<l;i++)
      |                       ^
Language: C++

#include<iostream>
#include <string>
int main(){
  std::string S,T;
  std::cin>>S>>T;
  if(S==T)std::cout<<"Yes"<<std::endl;
  else{
	  for(int i=1;i<=(S.length);i++){
		  char U;
		  U=S[i-1];
		  for(int j=0;j<(S.length);j++){
			  if(j+1!=(S.length))S[j]=S[j+1];
			  else S[j]=U;

			  }
		  if(S==T){
			  std::cout<<"Yes"<<std::endl;
			  return 0;
		  }
	  }
	  std::cout<<"No"<<std::endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:29: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    8 |           for(int i=1;i<=(S.length);i++){
      |                          ~~~^~~~~~~
      |                                    ()
a.cc:11:36: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() 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 j=0;j<(S.length);j++){
      |                                 ~~~^~~~~~~
      |                                           ()
a.cc:12:38: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   12 |                           if(j+1!=(S.length))S[j]=S[j+1];
      |                                   ~~~^~~~~~~
      |                                             ()
Language: C++

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

int main(){
    string s, t;
    int offset = 1, len;
    bool b = true;
    cin >> s >> t;
    len = s.length();
    for(int i=1; i< len + 1; i++){
        offset = i;
        b = true;
        for(int j=0; j< len; j++){
            if((j+offset) == ) offset = i -len;
            if(s[j + offset] != t[j]){
                b = false;
                break;
            }
        }
        if(b){
            cout << "Yes" << endl;
            return 0;
        }
    }
    cout << "No" << endl;    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:30: error: expected primary-expression before ')' token
   14 |             if((j+offset) == ) offset = i -len;
      |                              ^
Language: C++

#include<iostream>
#include <string>
int main(){
  std::string S,T;
  std::cin>>S>>T;
  if(S==T)std::cout<<"Yes"<<std::endl;
  else{
	  for(int i=1;i<=S.length;i++){
		  char U;
		  U=S[i-1];
		  for(int j=0;j<S.length;j++){
			  if(j+1!=S.length)S[j]=S[j+1];
			  else S[j]=U;

			  }
		  if(S==T){
			  std::cout<<"Yes"<<std::endl;
			  return 0;
		  }
	  }
	  std::cout<<"No"<<std::endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:28: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    8 |           for(int i=1;i<=S.length;i++){
      |                          ~~^~~~~~
      |                                  ()
a.cc:11:35: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() 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 j=0;j<S.length;j++){
      |                                 ~~^~~~~~
      |                                         ()
a.cc:12:37: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   12 |                           if(j+1!=S.length)S[j]=S[j+1];
      |                                   ~~^~~~~~
      |                                           ()