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

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

    
int main(void){
    int i;
    int j;
    int flg = 0;
    char a[100];
    char b[100];  
    scanf("%s",a);
    string aa = a;
    scanf("%s",b);
for(i=0;i<a.Length;i++){
if(a(i) = b(i)){
for(j = 0;j<i;j++){
aa(a.Length - i + j) = a(j);
}
for(j = i;j<a.Length;j++){
aa(j-i) = a(j);
}
if(aa = b){
    flg = 1;
    break;
}
}
}
if(flg == 0){
printf("No");
      }else{
printf("Yes");
      }

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'string' was not declared in this scope; did you mean 'stdin'?
   12 |     string aa = a;
      |     ^~~~~~
      |     stdin
a.cc:14:13: error: request for member 'Length' in 'a', which is of non-class type 'char [100]'
   14 | for(i=0;i<a.Length;i++){
      |             ^~~~~~
a.cc:15:5: error: 'a' cannot be used as a function
   15 | if(a(i) = b(i)){
      |    ~^~~
a.cc:15:12: error: 'b' cannot be used as a function
   15 | if(a(i) = b(i)){
      |           ~^~~
a.cc:17:6: error: request for member 'Length' in 'a', which is of non-class type 'char [100]'
   17 | aa(a.Length - i + j) = a(j);
      |      ^~~~~~
a.cc:17:1: error: 'aa' was not declared in this scope; did you mean 'a'?
   17 | aa(a.Length - i + j) = a(j);
      | ^~
      | a
a.cc:17:25: error: 'a' cannot be used as a function
   17 | aa(a.Length - i + j) = a(j);
      |                        ~^~~
a.cc:19:15: error: request for member 'Length' in 'a', which is of non-class type 'char [100]'
   19 | for(j = i;j<a.Length;j++){
      |               ^~~~~~
a.cc:20:1: error: 'aa' was not declared in this scope; did you mean 'a'?
   20 | aa(j-i) = a(j);
      | ^~
      | a
a.cc:20:12: error: 'a' cannot be used as a function
   20 | aa(j-i) = a(j);
      |           ~^~~
a.cc:22:4: error: 'aa' was not declared in this scope; did you mean 'a'?
   22 | if(aa = b){
      |    ^~
      |    a
Language: C++

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

    
int main(void){
    int i;
    int j;
    int flg = 0;
    string a;
    string b;  
    scanf("%s",a);
    string aa = a;
    scanf("%s",b);
      for(i=0;i<a.Length;i++){
if(a(i) = b(i)){
for(j = 0;j<i;j++){
aa(a.Length - i + j) = a(j);
}
for(j = i;j<a.Length;j++){
aa(j-i) = a(j);
}
if(aa = b){
    flg = 1;
    break;
}
}
      }
      if(flg == 0){
printf("No");
      }else{
          printf("Yes");
      }

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'string' was not declared in this scope; did you mean 'stdin'?
    9 |     string a;
      |     ^~~~~~
      |     stdin
a.cc:10:11: error: expected ';' before 'b'
   10 |     string b;
      |           ^~
      |           ;
a.cc:11:16: error: 'a' was not declared in this scope
   11 |     scanf("%s",a);
      |                ^
a.cc:12:11: error: expected ';' before 'aa'
   12 |     string aa = a;
      |           ^~~
      |           ;
a.cc:13:16: error: 'b' was not declared in this scope
   13 |     scanf("%s",b);
      |                ^
a.cc:17:1: error: 'aa' was not declared in this scope
   17 | aa(a.Length - i + j) = a(j);
      | ^~
a.cc:20:1: error: 'aa' was not declared in this scope
   20 | aa(j-i) = a(j);
      | ^~
a.cc:22:4: error: 'aa' was not declared in this scope
   22 | if(aa = b){
      |    ^~
Language: Java

import java.util.*;

pblic class Main {
	public static void main (String[] args) {
	    Scanner sc = new Scanner(System.in);
	    String s,t;
	    int j = -1,k = 0,l = 0;
	    s = sc.nextLine();
	    t = sc.nextLine();
	    for(int i = 0;i < t.length();i++)
	    if(s.charAt(0) == t.charAt(i))
	    {
	    j = i;
	    break;
	    }
	    if(j == -1)
	    System.out.println("No");
	    else
	    {
	        for(int i = j;;i++)
	        {
	            if(k == s.length())
	            break;
	            if(i == t.length())
	            i = 0;
	        if(s.charAt(k) == t.charAt(i))
	        l++;
	        k++;
	        }
	        if(l == s.length())
	        System.out.println("Yes");
	        else
	        System.out.println("No");
	    }
	}
}

Compiler output:
Main.java:3: error: class, interface, enum, or record expected
pblic class Main {
^
1 error
Language: Java

import java.util.*;

public class GFG {
	public static void main (String[] args) {
	    Scanner sc = new Scanner(System.in);
	    String s,t;
	    int j = -1,k = 0,l = 0;
	    s = sc.nextLine();
	    t = sc.nextLine();
	    for(int i = 0;i < t.length();i++)
	    if(s.charAt(0) == t.charAt(i))
	    {
	    j = i;
	    break;
	    }
	    if(j == -1)
	    System.out.println("No");
	    else
	    {
	        for(int i = j;;i++)
	        {
	            if(k == s.length())
	            break;
	            if(i == t.length())
	            i = 0;
	        if(s.charAt(k) == t.charAt(i))
	        l++;
	        else
	        break;
	        k++;
	        }
	        if(l == s.length())
	        System.out.println("Yes");
	        else
	        System.out.println("No");
	    }
	}
}

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

#include <iostream>
#include <string>

using namespace std;

int main(){
    // int ans = 0;
    
    string S, T;
    cin >> S;
    cin >> T;
    queue<char> tempS;
    cout << S << endl << T << endl;
    string SS, TT;

    SS = S;
    // TT = SS;
    for (int j=0; j < S.size(); j++)
    {
        SS[0] = S[S.size()-1];
        cout << SS << endl;
        for (int i=1; i < S.size(); i++)
        {
            SS[i] = S[i-1];
        }
        S = SS;
        if ( S == T)
        {
            cout << "Yes" << endl;
            return 0;
        }
    
    }

    cout << "No" << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'queue' was not declared in this scope
   12 |     queue<char> tempS;
      |     ^~~~~
a.cc:2:1: note: 'std::queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>'
    1 | #include <iostream>
  +++ |+#include <queue>
    2 | #include <string>
a.cc:12:11: error: expected primary-expression before 'char'
   12 |     queue<char> tempS;
      |           ^~~~
Language: C++

#ifdef __GNUC__
#include <bits/stdc++.h>
#else
#include "bits/stdc++.h"
#define scanf scanf_s
#endif
#define REP(i, n) for(int i = 0;i < n;i++)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define WHL(i) while(i)
#define putn printf("\n")
#define all(container) container.begin(), container.end()
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

template<class T> istream& operator >> (istream &is, vector<T> &vec) {
	for (T &x : vec)is >> x;
	return is;
}

void main ()
{

	string S, T;

	ios::sync_with_stdio (false);
	cin.tie (NULL);
	cout.tie (NULL);
	
	cin >> S;
	cin >> T;

	if (S.size() != T.size()) {
		printf("No");
		return;
	}

	sort(S.begin(), S.end());
	sort(T.begin(), T.end());

	bool isEqual = std::equal(S.cbegin(), S.cend(), T.cbegin());

	if (isEqual) {
		printf("Yes");
	}
	else {
		printf("No");
	}
	
}



Compiler output:
a.cc:21:1: error: '::main' must return 'int'
   21 | void main ()
      | ^~~~
a.cc: In function 'int main()':
a.cc:35:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   35 |                 return;
      |                 ^~~~~~
Language: C++

#ifdef __GNUC__
#include <bits/stdc++.h>
#else
#include "bits/stdc++.h"
#define scanf scanf_s
#endif
#define REP(i, n) for(int i = 0;i < n;i++)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define WHL(i) while(i)
#define putn printf("\n")
#define all(container) container.begin(), container.end()
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

template<class T> istream& operator >> (istream &is, vector<T> &vec) {
	for (T &x : vec)is >> x;
	return is;
}

int main ()
{

	string S, T;

	ios::sync_with_stdio (false);
	cin.tie (NULL);
	cout.tie (NULL);
	
	cin >> S;
	cin >> T;

	if (S.size() != T.size()) {
		printf("No");
		return;
	}

	sort(S.begin(), S.end());
	sort(T.begin(), T.end());

	bool isEqual = std::equal(S.cbegin(), S.cend(), T.cbegin());

	if (isEqual) {
		printf("Yes");
	}
	else {
		printf("No");
	}
	
}



Compiler output:
a.cc: In function 'int main()':
a.cc:35:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   35 |                 return;
      |                 ^~~~~~
Language: C++

/*
  AtCoder Beginner Contest 103
  B - String Rotation
*/

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

int main() {
  string S, T;
  cin >> S >> T;

  int length = S.length();
  for (int offset = 0; offset < length; ++offset) {
    bool bCheck = true;
    for (int i = 0; i < length; ++i) {
      if (S[j] != T[(i + j) % length]) {
        bCheck = false;
        break;
      }
    }

    if (bCheck = true) {
      printf("Yes\n");
      return 0;
    }
  }

  printf("No\n");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: 'j' was not declared in this scope
   18 |       if (S[j] != T[(i + j) % length]) {
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	char a[105],b[305];
	gets(a);
	getchar;
	gets(b);
	getchar;
	int len=strlen(a);
	bool flag=0;
	for(int i=len;i<len*2;i++)
	b[i]=b[i-len];
	for(int i=0;i<len;i++)
	{
		int num=0;
		for(int j=0;j<len;j++)
		{
			if(a[j]==b[j+i])
			num++;
		}
		if(num==len)
		{
			flag=1;
			break;
		}
	}
	if(flag)
	printf("Yes\n");
	else
	printf("No\n");
} 

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(a);
      |         ^~~~
      |         getw
Language: C++

#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#include <queue>
using namespace std;

typedef long long ll;
typedef pair<int, int> Pii;

void readline(int N, vector<int> &a){
    string s;
    for(int i = 0; i < N - 1; i++){
        getline(cin, s, ' ');
        a[i] = atoi(s.c_str());
    }
    getline(cin, s, '\n');
    a[N - 1] = atoi(s.c_str());
}
void readline(int N, vector<double> &a){
    string s;
    for(int i = 0; i < N - 1; i++){
        getline(cin, s, ' ');
        a[i] = atof(s.c_str());
    }
    getline(cin, s, '\n');
    a[N - 1] = atof(s.c_str());
}

string rot(string S){
    return S[S.size() - 1] + S.substr(0, S.size() - 1);
}

int main(){

    string S, T;
    cin >> S;
    cin >> T;

    for(i = 0; i < S.size(); i++){
        if(S == T){
            cout << "Yes";
            return 0;
        }
        S = rot(S);
    }
    cout << "No";
    return 0;

}

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

#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#include <queue>
using namespace std;

typedef long long ll;
typedef pair<int, int> Pii;

void readline(int N, vector<int> &a){
    string s;
    for(int i = 0; i < N - 1; i++){
        getline(cin, s, ' ');
        a[i] = atoi(s.c_str());
    }
    getline(cin, s, '\n');
    a[N - 1] = atoi(s.c_str());
}
void readline(int N, vector<double> &a){
    string s;
    for(int i = 0; i < N - 1; i++){
        getline(cin, s, ' ');
        a[i] = atof(s.c_str());
    }
    getline(cin, s, '\n');
    a[N - 1] = atof(s.c_str());
}

string rot(string S){
    return S[S.size() - 1] + S.substr(0, S.size() - 1);
}

int main(){

    strig S, T;
    cin >> S;
    cin >> T;

    for(i = 0; i < S.size(); i++){
        if(S == T){
            cout << "Yes";
            return 0;
        }
        S = rot(S);
    }
    cout << "No";
    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:5: error: 'strig' was not declared in this scope
   37 |     strig S, T;
      |     ^~~~~
a.cc:38:12: error: 'S' was not declared in this scope
   38 |     cin >> S;
      |            ^
a.cc:39:12: error: 'T' was not declared in this scope
   39 |     cin >> T;
      |            ^
a.cc:41:9: error: 'i' was not declared in this scope
   41 |     for(i = 0; i < S.size(); i++){
      |         ^
Language: C++

# include <stdio.h>
# include <string.h>
int main ()
{   
  int n;
	char s[100],t[100],g;
	gets (s);
	gets(t);
	n=strlen(s);
	int flag=0,i,j;
	for (i=0;i<n;++i){
		  g=s[n-1];
		for (j=n-1;j>0;j--)
		    s[j]=s[j-1];
	   	    s[0]=g;
	   	puts(s);
	   	if (strcmp(s,t)==0)
	   	  {flag=1;
	   	   break;
		  }
	   }
	if (flag)
	  printf ("Yes\n");
	else
	  printf ("No\n");
 } 

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);
      |         ^~~~
      |         getw
Language: C++

#include <iostream>

using namespace std;
int main(){
	string a,b;
	cin >>a>>b;
	int flag = 0;
	for(int i = 0; i < a.size(); i++){
		if(a == b){
			flag = 1;
			break;
		}
		a = a.back() + a.substr(0, a.size()-1)
	}
	if(flag){
		cout<<"Yes\n";
	}
	else
		cout<<"No\n";
return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:13:55: error: expected ';' before '}' token
   13 |                 a = a.back() + a.substr(0, a.size()-1)
      |                                                       ^
      |                                                       ;
   14 |         }
      |         ~
Language: C++

#incude<bits/stdc++.h>
using namespace std;
int main(){
  string a,b;
  cin >> a>> b;
  string c = a+a;
  if(c.find(b) != c.end()) puts("Yes");
  else puts("No");
  }

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incude; did you mean #include?
    1 | #incude<bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string a,b;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #incude<bits/stdc++.h>
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> a>> b;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incude<bits/stdc++.h>
a.cc:5:10: error: 'a' was not declared in this scope
    5 |   cin >> a>> b;
      |          ^
a.cc:5:14: error: 'b' was not declared in this scope
    5 |   cin >> a>> b;
      |              ^
a.cc:6:9: error: expected ';' before 'c'
    6 |   string c = a+a;
      |         ^~
      |         ;
a.cc:7:6: error: 'c' was not declared in this scope
    7 |   if(c.find(b) != c.end()) puts("Yes");
      |      ^
a.cc:7:28: error: 'puts' was not declared in this scope
    7 |   if(c.find(b) != c.end()) puts("Yes");
      |                            ^~~~
a.cc:8:8: error: 'puts' was not declared in this scope
    8 |   else puts("No");
      |        ^~~~
Language: C++

#include<iostream> 
#include<algorithm>
#include<cstring>
using namespace std;
int main()
{
	char s[105],t[105];
	gets(s);
	gets(t);
	int len = strlen(s) ;
	for(int i=0;i<len;i++)
	{
		if(s[0]==t[i])
		{
			int j=i;
			int k;
			for( k=1;k<len;k++)
			{
				j++;
				if(s[k]!=t[j%len])
				break;
			}
			if(k==len)
			{
					cout<<"Yes"<<endl;
					exit(0);
			}
		
			
		}
	}
	cout<<"No"<<endl;
	return 0;
}

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(s);
      |         ^~~~
      |         getw
Language: C++

#include <iostream>
#include <string>
 
int main(){
  std::string a, b;
  std::cin >> a >> b;
  int L = a.size();
  for(int i=0;i<L;i++){
    bool matched = true;
    for(int j=0;j<L;j++){
        if( a[j] != b[(i+j)%L]){
            std::cerr << i <<',' << j<<','<<a[i]<<','<<b[(i+j)%L]<<std::endl;
            matched = false;
            break;
        }
    }
    if(matched){
       std::cout << "YES";
      return 0;
    }
   }
       std::cout << "No";
 
  return 0;
}
#include <iostream>
#include <string>

int main(){
  std::string a, b;
  std::cin >> a >> b;
  int L = a.size();
  for(int i=0;i<L;i++){
    bool matched = true;
    for(int j=0;j<L;j++){
        if( a[j] != b[(i+j)%L]){
            std::cerr << i <<',' << j<<','<<a[i]<<','<<b[(i+j)%L]<<std::endl;
            matched = false;
            break;
        }
    }
    if(matched){
       std::cout << "Yes";
      return 0;
    }
   }
       std::cout << "No";

  return 0;
}


Compiler output:
a.cc:29:5: error: redefinition of 'int main()'
   29 | int main(){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(){
      |     ^~~~
Language: C++

#include <iostream>
#include <cmath>
using namespace std;
bool eqq (string x , string y , int off){
    for(int i = 0 ; i < x.size() ; i++ ){
        if( y[i] != x[(i + off) % x.size()]){
            return false;
        }
    } 
    return true;
}
int main() {
    string a , b;
    cin >> a >> b;
    for(int off = 0 ; off < a.size() ; off++){
        for(int i = 0 ; i < a.size() ; i++){
        }
        if(eqq(a,b,off)){
            cout << "Yes";
            return 0;
        }
    }
    cout << "No";
    return 0;


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

#include<iostream.h>
#include<string.h>
using namespace std;
int main(){
 
    string a,b;
    cin>>a>>b;
    for(int i=0;i<a.size();i++){
           rotate(a.begin(), a.begin()+1, a.end());
           if(a==b){
                cout<<"Yes";
                return 0;
           }
    }
     cout<<"No";
}

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


import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        PrintWriter out = new PrintWriter(System.out);
        Scanner sc = new Scanner(System.in);
        Task task = new Task();
        task.solve(sc, out);
        out.flush();
        sc.close();
    }
    static class Task{
        public void solve(Scanner sc, PrintWriter out){
            String S = nstr(sc);
            String T = nstr(sc);
            for (int i=0; i<S.length(); i++){
                S = S.substring(1) + S.charAt(0);
                if (S.equals(T)){
                    out.println("Yes");
                    return;
                }
            }
            out.println("No");
        }
    }

    static int nint(Scanner sc){
        return Integer.parseInt(sc.next());
    }
    static long nlong(Scanner sc){
        return Long.parseLong(sc.next());
    }
    static double ndouble(Scanner sc){
        return Double.parseDouble(sc.next());
    }
    static float nfloat(Scanner sc){
        return Float.parseFloat(sc.next());
    }
    static String nstr(Scanner sc){
        return  String.valueOf(sc.next());
    }
    static long[] longLine(Scanner sc, int size){
        long[] lLine = new long[size];
        for (int i = 0; i < size; i++) {
            lLine[i] = nlong(sc);
        }
        return lLine;
    }
    static int[] intLine(Scanner sc, int size){
        int[] iLine = new int[size];
        for (int i = 0; i < size; i++) {
            iLine[i] = nint(sc);
        }
        return iLine;
    }
    static String[] strLine(Scanner sc, int size){
        String[] strLine = new String[size];
        for (int i = 0; i < size; i++) {
            strLine[i] = nstr(sc);
        }
        return strLine;
    }
}

Compiler output:
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.PrintWriter;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.ArrayList;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.util.Arrays;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import java.util.List;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import java.util.Scanner;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: expected unqualified-id before 'public'
    8 | public class Main {
      | ^~~~~~
Language: C++

#include <bits/stdc++.h>
#include <algorithm>
#include <iostream>

typedef long long ll;
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: expected ';' before 'for'
   12 |   n=s.length()
      |               ^
      |               ;
   13 |   for(int i=0;i<n;i++){
      |   ~~~          
a.cc:13:15: error: 'i' was not declared in this scope
   13 |   for(int i=0;i<n;i++){
      |               ^
Language: C++

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

// typedef long long ll;
// typedef pair<ll,ll> P;

// const double PI = 3.14159265358979323846;
// const double EPS = 1e-12;
// const ll INF = 1LL<<29;
// const ll mod = 1e9+7;

// #define rep(i, a, b) for(ll (i) = (a); (i) < (b);++i)

// int main()
// {
//   ll N, M;
//   cin >> N >> M;
//   ll a[M], b[M];
//   rep(i,0,M){
//     cin >> a[i] >> b[i];
//     a[i]--;
//     b[i]--;
//   }

//   ll rsum[N-1] = {};
//   rep(i,0,M){
//     rsum[a[i]] += 1;
//     rsum[b[i]] += -1;
//   }
//   rep(i,0,N-1){
//     rsum[i+1] += rsum[i];
//   }

//   rep(i,0,N){
//     cout << rsum[i] << endl;
//   }

//   rep(i,0,M){
//     ll max = -1;
//     ll point = 0;
//     rep(j,a[i],b[i]){
//       if (rsum[j] > max){
//         max = rsum[j];
//         point = j;
//       }
//     }
//     rep(j,0,M){
//       if (a[j] <= point && point <= b[j]){
//         rsum[]
//       }
//     }
//   }
//   rep(i,0,N){
//     rep(i,0,M){
//       if (a[j] <= i && i <= b[j]){
//         a
//       }
//     }
//   }

//   return 0;
// }

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

int main()
{
  string S, T;
  cin >> S >> T;
  // もし最初から合っていればYes出して終了
  if (S == T)
  {
    cout << "Yes" << endl;
    return 0;
  }
  // 左に一個ずらしてる
  for (int i = 0; i < S.length(); ++i)
  {
    char A = S[0];
    // ポンポン右の数字を自分に置いてく
    for (int j = 0; j < S.length-1; ++j)
    {
      S[j] = S[j+1];
    }
    // 最後は最初のものを持って来て完成！！
    S[S.length()-1] = A;

    if (S == T)
    {
      cout << "Yes" << endl;
      return 0;
    }
  }
  // 最後まで当たらなかったらNoをだす
  cout << "No" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:82:27: 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 '()' ?)
   82 |     for (int j = 0; j < S.length-1; ++j)
      |                         ~~^~~~~~
      |                                 ()
Language: C

main(){
    int N,M;
    scanf("%d %d",&N,&M);

    int y[100001];
    int i,j,k;
    for(i=1;i<=N;i++)
        y[i]=2*N;

    int a,b;

    for(i=0;i<M;i++){
        scanf("%d %d",&a,&b);
        if(b<y[a])
            y[a]=b;
    }  
    for(i=1;i<N;i++){
        if(y[i]==2*N)continue;
        for(k=i+1;k<y[i];k++){
            if(y[k]<=y[i])//ganni
                y[i]=2*N;
                break;
            else{   //and
                y[k]=y[i];
                y[i]=2*N;
                break;
            }
        }
    } 
    int rt=0;
    for(i=1;i<N;i++)
        if(y[i]!=2*N)
            rt++;
    printf("%d\n",rt);

    return 0;
}


Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){
      | ^~~~
main.c: In function 'main':
main.c:3:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |     scanf("%d %d",&N,&M);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){
main.c:3:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |     scanf("%d %d",&N,&M);
      |     ^~~~~
main.c:3:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:23:13: error: 'else' without a previous 'if'
   23 |             else{   //and
      |             ^~~~
main.c:34:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   34 |     printf("%d\n",rt);
      |     ^~~~~~
main.c:34:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:34:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:34:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include<algorithm>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
using namespace std;
int i,n,m,j,p;
char s[101],t[101];
bool flag=0;
 
int main(){
	//gets(textA);
	//gets(textB);
	gets(s);
	gets(t);
	n=strlen(s);
	for (i=0;i<=n;i++){
		if (s[i]!=t[i]){flag=1;break;} 
	}
	for (i=0;i<=n;i++){
		if (s[i]==t[0]){
			m=0;
			for (j=i;j<=i+n;j++){
				if(j!=n-1)p=(j+1)%n-1;
				else p=j;
				if (s[p]==t[m]){m++;}
				else {break;}
			}
		}
	}
	if (m==n||!flag)cout<<"Yes"<<endl;
	else cout<<"No"<<endl;
	return 0;	
}

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

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

int main(){
  string j, k;
  cin >> j >> k;
  bool ans = false;
  for (int i = 0;i<j.size()){
    if(j==k){
      ans = true;
      break;
    }
    rotate(j.begin(),j.begin()+1,j.end());
  }
  cout << (ans ? "Yes" : "No") << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:28: error: expected ';' before ')' token
    8 |   for (int i = 0;i<j.size()){
      |                            ^
      |                            ;
Language: C++

#include<algorithm>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
using namespace std;
int i,n,m,j,p;
char s[101],t[101];
bool flag=0;
 
int main(){
	gets(s);
	gets(t);
	n=strlen(s); 
	for (i=0;i<=n;i++){
		if (s[i]==t[0]){
			m=0;
			for (j=i;j<=i+n;j++){
				if(j!=n-1)p=(j+1)%n-1;
				else p=j;
				if (s[p]==t[m]){m++;}
				else {break;}
			}
		}
	}
	if (m==n)cout<<"Yes"<<endl;
	else cout<<"No"<<endl;
	return 0;	
}



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

#include<algorithm>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
using namespace std;
int i,n,m,j,p;
char s[101],t[101];
bool flag=0;
 
int main(){
	//gets(textA);
	//gets(textB);
	gets(s);
	gets(t);
	n=strlen(s); 
	for (i=0;i<=n;i++){
		if (s[i]==t[0]){
			m=0;
			for (j=i;j<=i+n;j++){
				if(j!=n-1)p=(j+1)%n-1;
				else p=j;
				if (s[p]==t[m]){m++;}
				else {break;}
			}
		}
	}
	if (m==n)cout<<"Yes"<<endl;
	else cout<<"No"<<endl;
	//cout<<m<<" "<<n;
	return 0;	
}
// 0 1 2 3 4
// k y o t o
// t o k y o



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

#include <bits/stdc++.h>
#include <algorithm>
#include <iostream>

typedef long long ll;
using namespace std;

int main(){
  string s,t;
  s+=s;
  if(s.find(t)!=npos){
  	cout << "Yes" << endl;
  }
  else{
  	cout << "No" << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'npos' was not declared in this scope
   11 |   if(s.find(t)!=npos){
      |                 ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	string A,B;
	char a[105]={0},b[105]={0};
	cin>>A>>B;
	for(int i=0;i<a.length();i++){
		a[i]=A[i];
		b[i]=B[i];
	}
	sort(a,a+A.length());
	sort(b,b+B.length());
	for(int i=0;i<a.length();i++)
		if(a[i]==b[i]){cout<<"No";return 0;}
	cout<<"Yes";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: request for member 'length' in 'a', which is of non-class type 'char [105]'
    7 |         for(int i=0;i<a.length();i++){
      |                         ^~~~~~
a.cc:13:25: error: request for member 'length' in 'a', which is of non-class type 'char [105]'
   13 |         for(int i=0;i<a.length();i++)
      |                         ^~~~~~
Language: C

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

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

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

  len = strlen( S );

  for (i = 0;i < len; i++) {
    if (strcmp(S,T)==0) {
      printf("Yes");
      return 0;
    } else {
      tmp = S[0];
      for (j = 0; j < len - 1; j++) {
        S[j] = S[j+1];
      }
      S[len-1] = tmp;
    }
  printf("No");
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:30:1: error: expected declaration or statement at end of input
   30 | }
      | ^
Language: C++

#include<iostream>
#include<string.h>
string p(string s)
{
  string q[s.length];
  int i;
  q[0]=s[s.length()-1];
  for(i=0;i<s.length()-1;i++)
  {
    q[++i]=s[i];
  }
  return q;
};
 
using namespace std;
int main()
{
  int i,flag=0;
  string s,t;
  cin>>s>>t;
  for(i=0;i<s.length();i++)
  {
    q=s[s.length()-1]+p;
    if(q==t)
    {
      flag=1;
      break;
    }
  }
  if(flag==1)
    cout<<"Yes";
  else
    cout<<"No";
  return 0;
}

Compiler output:
a.cc:3:1: error: 'string' does not name a type; did you mean 'stdin'?
    3 | string p(string s)
      | ^~~~~~
      | stdin
a.cc: In function 'int main()':
a.cc:23:5: error: 'q' was not declared in this scope
   23 |     q=s[s.length()-1]+p;
      |     ^
a.cc:23:23: error: 'p' was not declared in this scope
   23 |     q=s[s.length()-1]+p;
      |                       ^
Language: C++

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

int main() {

	string S, T; 
	cin >> S >> T;
	bool ans = false;
	for (int i = 0; i < S.size(); ++i) {
		if (S == T) {
			ans = true;
			break;
		}
		S = S.back() + S.substr(0, S.size() - 1);
	}
	if (ans) {
		cout << " Yes " << endl;
	}
	else {
		cout << "No" << endl;
	}
}


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

#include<bits/stdc++.h>
using namespace std;\int n;
char x[205], y[205];
int main()
{
scanf("%s%s",x,y);
n strlen(x);
memcpy(x+n,x,n);
for(int i=0;i<n;i++)
if(memcmp(x+i,y,n)==0)
{
printf("Yes\n");
system ("pause");
return 0;
}
printf("No\n");
system ("pause");
return 0;
}


Compiler output:
a.cc:2:21: error: stray '\' in program
    2 | using namespace std;\int n;
      |                     ^
a.cc: In function 'int main()':
a.cc:7:2: error: expected ';' before 'strlen'
    7 | n strlen(x);
      |  ^~~~~~~
      |  ;
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    String T = sc.next();
    char[] s = new char[S.length()];
    char[] t = new char[T.length()];
    char a;
    for(int j = 0; j < S.length(); j++){
      s[j] = S.charAt(j);
      t[j] = T.charAt(j);
    }
    boolean p = true;
    int i = 0;
    while(i < S.length()){
      for(int j = 0; j < S.length(); j++){
        if(s[j] != t[j])
          p = false;
      }
      if(p)
        break;
      i++;
      if(!p){
        a = s[S.length - 1];
        s[S.length - 1] = s[0];
        s[0] = a;
      }
    }
    if(p)
      System.out.println("Yes");
    else
      System.out.println("No");
  }
}      


Compiler output:
Main.java:25: error: cannot find symbol
        a = s[S.length - 1];
               ^
  symbol:   variable length
  location: variable S of type String
Main.java:26: error: cannot find symbol
        s[S.length - 1] = s[0];
           ^
  symbol:   variable length
  location: variable S of type String
2 errors
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    String T = sc.next();
    char[] s = new char[S.length()];
    char[] t = new char[T.length()];
    char a;
    for(int j = 0; j < S.lengh(); j++){
      s[j] = S.charAt(j);
      t[j] = T.charAt(j);
    }
    boolean p = true;
    int i = 0;
    while(i < S.length()){
      for(int j = 0; j < S.length(); j++){
        if(s[j] != t[j])
          p = false;
      }
      if(p)
        break;
      i++;
      if(!p){
        a = s[S.length - 1];
        s[S.length - 1] = s[0];
        s[0] = a;
      }
    }
    if(p)
      System.out.println("Yes");
    else
      System.out.println("No");
  }
}      


Compiler output:
Main.java:10: error: cannot find symbol
    for(int j = 0; j < S.lengh(); j++){
                        ^
  symbol:   method lengh()
  location: variable S of type String
Main.java:25: error: cannot find symbol
        a = s[S.length - 1];
               ^
  symbol:   variable length
  location: variable S of type String
Main.java:26: error: cannot find symbol
        s[S.length - 1] = s[0];
           ^
  symbol:   variable length
  location: variable S of type String
3 errors
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<map>
#include<queue>
using namespace std;\int n;
char x[205], y[205];
int main()
{
scanf("%s%s",x,y);
n strlen(x);
memcpy(x+n,x,n);
for(int i=0;i<n;i++)
if(memcmp(x+i,y,n)==0)
{
printf("Yes\n");
system ("pause");
return 0;
}
printf("No\n");
system ("pause");
return 0;
}

Compiler output:
a.cc:7:21: error: stray '\' in program
    7 | using namespace std;\int n;
      |                     ^
a.cc: In function 'int main()':
a.cc:12:2: error: expected ';' before 'strlen'
   12 | n strlen(x);
      |  ^~~~~~~
      |  ;
a.cc:13:1: error: 'memcpy' was not declared in this scope
   13 | memcpy(x+n,x,n);
      | ^~~~~~
a.cc:7:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include<queue>
  +++ |+#include <cstring>
    7 | using namespace std;\int n;
a.cc:15:4: error: 'memcmp' was not declared in this scope
   15 | if(memcmp(x+i,y,n)==0)
      |    ^~~~~~
a.cc:15:4: note: 'memcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = next();
    String T = next();
    char[] s = new char[S.length()];
    char[] t = new char[T.length()];
    char a;
    for(int j = 0; j < S.lengh(); j++){
      s[j] = S.charAt(j);
      t[j] = T.charAt(j);
    }
    boolean p = true;
    int i = 0;
    while(i < S.length()){
      for(int j = 0; j < S.length(); j++){
        if(s[j] != t[j])
          p = false;
      }
      if(p)
        break;
      i++;
      if(!p){
        a = s[S.length - 1];
        s[S.lengh - 1] = s[0];
        s[0] = a;
      }
    }
    if(p)
      System.out.println("Yes");
    else
      System.out.println("No");
  }
}      


Compiler output:
Main.java:5: error: cannot find symbol
    String S = next();
               ^
  symbol:   method next()
  location: class Main
Main.java:6: error: cannot find symbol
    String T = next();
               ^
  symbol:   method next()
  location: class Main
Main.java:10: error: cannot find symbol
    for(int j = 0; j < S.lengh(); j++){
                        ^
  symbol:   method lengh()
  location: variable S of type String
Main.java:25: error: cannot find symbol
        a = s[S.length - 1];
               ^
  symbol:   variable length
  location: variable S of type String
Main.java:26: error: cannot find symbol
        s[S.lengh - 1] = s[0];
           ^
  symbol:   variable lengh
  location: variable S of type String
5 errors
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = next();
    String T = next();
    int s_ = S.length();
    int t_ = T.length();
    char s[s_];
    char t[t_];
    char a;
    for(int j = 0; j < S.lengh(); j++){
      s[j] = S.charAt(j);
      t[j] = T.charAt(j);
    }
    boolean p = true;
    int i = 0;
    while(i < S.length()){
      for(int j = 0; j < S.length(); j++){
        if(s[j] != t[j])
          p = false;
      }
      if(p)
        break;
      i++;
      if(!p){
        a = s[S.length - 1];
        s[S.lengh - 1] = s[0];
        s[0] = a;
      }
    }
    if(p)
      System.out.println("Yes");
    else
      System.out.println("No");
  }
}      


Compiler output:
Main.java:9: error: ']' expected
    char s[s_];
           ^
Main.java:9: error: ';' expected
    char s[s_];
             ^
Main.java:10: error: ']' expected
    char t[t_];
           ^
Main.java:10: error: ';' expected
    char t[t_];
             ^
4 errors
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = next();
    String T = next();
    char s[S.length()];
    char t[T.length()];
    char a;
    for(int j = 0; j < S.lengh(); j++){
      s[j] = S.charAt(j);
      t[j] = T.charAt(j);
    }
    boolean p = true;
    int i = 0;
    while(i < S.length()){
      for(int j = 0; j < S.length(); j++){
        if(s[j] != t[j])
          p = false;
      }
      if(p)
        break;
      i++;
      if(!p){
        a = s[S.length - 1];
        s[S.lengh - 1] = s[0];
        s[0] = a;
      }
    }
    if(p)
      System.out.println("Yes");
    else
      System.out.println("No");
  }
}      

Compiler output:
Main.java:7: error: ']' expected
    char s[S.length()];
           ^
Main.java:7: error: ';' expected
    char s[S.length()];
                     ^
Main.java:8: error: ']' expected
    char t[T.length()];
           ^
Main.java:8: error: ';' expected
    char t[T.length()];
                     ^
4 errors
Language: C++


		
#include<iostream>
using namespace std;

int main(){
	
	char buff_S[256];
	char buff_T[256];
	char temp1[1],temp2[1];
	char yes[] = "Yes";
	char no[] = "No";
    int i,flg;
	int n;            

	cin >> buff_S;
	cin >> buff_T;

	//文字列の回転
	for( n= 0; n < strlen(buff_S); ++n){
	for(i = 0; i < strlen(buff_S); ++i)
	{
		if(i == 0)
		{
			temp1[0] = buff_S[0];
			buff_S[0] = buff_S[strlen(buff_S)-1];
		}else{
		
			temp2[0] = buff_S[i];
			buff_S[i] = temp1[0];
			temp1[0] = temp2[0];
			}
	}
		
	//文字列の確認		
	for(i = 0; i < strlen(buff_S); ++i)
	{
		if(buff_S[i] == buff_T[i])
		{
			flg = 1;
		}else{
			flg = 0;
			i = strlen(buff_S);
		}
		
		
	}
	
	
	if(flg == 1)cout << yes << endl;

	}
	
	if(flg == 0)cout << no << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:24: error: 'strlen' was not declared in this scope
   20 |         for( n= 0; n < strlen(buff_S); ++n){
      |                        ^~~~~~
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 | using namespace std;
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<map>
#include<queue>
using namespace std;\int n;
char x[205], y[205];
int main()
{
cin>>x>>y;
n=strlen(x);
memcpy(x+n,x,n);
for(int i=0;i<n;i++)
if(memcmp(x+i,y,n)==0)
{
cout<<"Yes";
system("pause"); 
return 0;
}
cout<<"No";
return 0;
}

Compiler output:
a.cc:7:21: error: stray '\' in program
    7 | using namespace std;\int n;
      |                     ^
a.cc: In function 'int main()':
a.cc:12:3: error: 'strlen' was not declared in this scope
   12 | n=strlen(x);
      |   ^~~~~~
a.cc:7:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include<queue>
  +++ |+#include <cstring>
    7 | using namespace std;\int n;
a.cc:13:1: error: 'memcpy' was not declared in this scope
   13 | memcpy(x+n,x,n);
      | ^~~~~~
a.cc:13:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:15:4: error: 'memcmp' was not declared in this scope
   15 | if(memcmp(x+i,y,n)==0)
      |    ^~~~~~
a.cc:15:4: note: 'memcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C

#include <stdio.h>
#include <stdlid.h>
#include <string.h>
#define N 1

int main(void)
{

  char str1[100]={0}, str2[100]={0};
  int count = 0;
  int i = 0;
  char *ptr1, *ptr2;
  char t[100]={0};
 
  scanf("%s", str1);

  t = str1;

  while(string(str1)){
 
    ptr1 = &str1[0];
    ptr2 = &str2[0];

    while(*ptr1++) {
      count++;
    }

    ptr1 = &str1[N];
    while(*ptr1) {
      *ptr2++ = *ptr1++;
    }
    ptr1 = &str1[0];
    for(i = 0; i < N; i++) {
      *(ptr2+i) = *(ptr1+N-1);
    }

    t = str2;
    if(str2 == t){
      printf("Yes\n");
    }
    str1 = str2
      str2 = t;
  }
  if(str2 != t){
    printf("No\n");
  }


  return(0);

} 


Compiler output:
main.c:2:10: fatal error: stdlid.h: No such file or directory
    2 | #include <stdlid.h>
      |          ^~~~~~~~~~
compilation terminated.
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] != NIL) {
		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: In function 'int main()':
a.cc:15:24: error: 'NIL' was not declared in this scope
   15 |         while (s[i] != NIL) {
      |                        ^~~
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)){
				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:71:2: error: expected '}' at end of input
   71 | }
      |  ^
a.cc:33:1: note: to match this '{'
   33 | {
      | ^
Language: C

#include <stdio.h>
#define N 1

int main(void)
{

  char str1[100]={0}, str2[100]={0};
  int count = 0;
  int i = 0;
  char *ptr1, *ptr2;
  char t[100]={0};
 
  scanf("%s", str1);

  t = str1;

  while(string(str1)){
 
    ptr1 = &str1[0];
    ptr2 = &str2[0];

    while(*ptr1++) {
      count++;
    }

    ptr1 = &str1[N];
    while(*ptr1) {
      *ptr2++ = *ptr1++;
    }
    ptr1 = &str1[0];
    for(i = 0; i < N; i++) {
      *(ptr2+i) = *(ptr1+N-1);
    }

    t = str2;
    if(str2 == t){
      printf("Yes\n");
    }
    str1 = str2
      str2 = t;
  }
  if(str2 != t){
    printf("No\n");
  }


  return(0);

} 


Compiler output:
main.c: In function 'main':
main.c:15:5: error: assignment to expression with array type
   15 |   t = str1;
      |     ^
main.c:17:9: error: implicit declaration of function 'string'; did you mean 'stdin'? [-Wimplicit-function-declaration]
   17 |   while(string(str1)){
      |         ^~~~~~
      |         stdin
main.c:35:7: error: assignment to expression with array type
   35 |     t = str2;
      |       ^
main.c:39:10: error: assignment to expression with array type
   39 |     str1 = str2
      |          ^
main.c:39:16: error: expected ';' before 'str2'
   39 |     str1 = str2
      |                ^
      |                ;
   40 |       str2 = t;
      |       ~~~~
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)){
				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:50:44: error: expected ';' before 'for'
   50 |                         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:51:25: note: in expansion of macro 'REP'
   51 |                         REP(i,strlen(S) - 1){
      |                         ^~~
a.cc:69:2: error: expected '}' at end of input
   69 | }
      |  ^
a.cc:31:1: note: to match this '{'
   31 | {
      | ^
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] != NULL) {
		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: In function 'int main()':
a.cc:15:24: warning: NULL used in arithmetic [-Wpointer-arith]
   15 |         while (s[i] != NULL) {
      |                        ^~~~
a.cc:25:43: error: expected primary-expression before 'break'
   25 |                 if (S == T)cout << "Yes", break;
      |                                           ^~~~~