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

/*
 * a.cc:
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
#include<iomanip>

using namespace std;

/* constant */

/* typedef */

/* global variables */

/* subroutines */

/* main */

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

  for (int i=0;i<S.size();i++){
    if(i%2==1 && S.at(i)=="L"){
    cout<<"No"<<endl;
    break;
    }

    if(i%2==0 && S.at(i)=="R"){
      cout<<"No"<<endl;
      break;
    }



  }

  cout<<"Yes"<<endl;
  return 0;









}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   42 |     if(i%2==1 && S.at(i)=="L"){
      |                  ~~~~~~~^~~~~
a.cc:47:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   47 |     if(i%2==0 && S.at(i)=="R"){
      |                  ~~~~~~~^~~~~
Language: C++

/*
 * a.cc:
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
#include<iomanip>

using namespace std;

/* constant */

/* typedef */

/* global variables */

/* subroutines */

/* main */

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

  for (int i=0;i<N;i++){
    if(i%2==1 && S.at(i)=="L"){
    cout<<"No"<<endl;
    break;
    }

    if(i%2==0 && S.at(i)=="R"){
      cout<<"No"<<endl;
      break;
    }

    
    
  }

  cout<<"Yes"<<endl;
  return 0;
  







  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:18: error: 'N' was not declared in this scope
   41 |   for (int i=0;i<N;i++){
      |                  ^
a.cc:42:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   42 |     if(i%2==1 && S.at(i)=="L"){
      |                  ~~~~~~~^~~~~
a.cc:47:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   47 |     if(i%2==0 && S.at(i)=="R"){
      |                  ~~~~~~~^~~~~
Language: C++

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

int main() {
  string S;
  cin >> S;
  bool res = true;
  for (int i = 0; i < N; ++i) {
    if (i % 2 == 0 && S[i] == 'L') res = false;
    if (i % 2 == 1 && S[i] == 'R') res = false;
  }
  if (res) puts("Yes");
  else puts("No");
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin>>s;
  int n=s.size();
  for(int i=0;i<n;i++){
    if(i%2==0){
      if(s.at(i)=='L'){
        cout<<"No"<<endl;
        return 0;
      }
      else if(s.at(i)=='R'){
        cout<<"Yes"<<endl;
        return 0;
      }
    
  }
}


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

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin>>s;
  int n=s.size();
  for(int i=0;i<n;i++){
    if(i%2==0){
      if(s.at(i)=='L'){
        cout<<"No"<<endl;
        return 0;
      }
    }
    else if(s.at(i)=="R"){
        cout<<"Yes"<<endl;
      }
    
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     else if(s.at(i)=="R"){
      |             ~~~~~~~^~~~~
Language: C++

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

int main() {
  string s;
  cin >> s;
  int n = s.size();
  for(int i = 0;i < n;i++) {
    if(i % 2 == 0) {
      if(s[i] == 'L') {
        c = false;
        break;
      }
    } else {
      if(s[i] == 'R') {
        c = false;
        break;
      }
    }
  }
  cout << (c ? "Yes" : "No") << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'c' was not declared in this scope
   11 |         c = false;
      |         ^
a.cc:16:9: error: 'c' was not declared in this scope
   16 |         c = false;
      |         ^
a.cc:21:12: error: 'c' was not declared in this scope
   21 |   cout << (c ? "Yes" : "No") << endl;
      |            ^
Language: C++

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

int main(){
  string s;
  cin >> s;
  bool flag=true;
  for(int i=0;i<s.size();i++){
    if((i+1)%2==0){
      if(s[i]=="L") flag=false;
    }else{
      if(s[i]=="R") flag=false;
    }
  }
  if(flag) cout << "Yes" << endl;
  else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |       if(s[i]=="L") flag=false;
a.cc:12:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |       if(s[i]=="R") flag=false;
Language: Java

import java.util.Scanner;

/**
 * @author yoshida3203
 *
 */
public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc=new Scanner(System.in);
		String S=sc.next();
		char[]a=S.toCharArray();

		int n=0;
		for(int i=0;i<S.length();i++){
			if(i%2==0){
				if(a[i]=='L'){
					n++;
				}
			}else{
				if(a[i]=='R'){
					n++;
				}
			}
		}
		if(n==0){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}




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

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

string S;
int main (){
	cin >> S;
	bool flag = true;
	for(int i=0;i<S.size();i++){
		if(i%2 && S[i] == "L") flag = false;
		if(i%2 == 0 && S[i] == "R")	flag = false;
	}
	cout << (flag ? "Yes" : 'No') << endl;
	return 0;
}

Compiler output:
a.cc:13:33: warning: multi-character character constant [-Wmultichar]
   13 |         cout << (flag ? "Yes" : 'No') << endl;
      |                                 ^~~~
a.cc: In function 'int main()':
a.cc:10:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |                 if(i%2 && S[i] == "L") flag = false;
a.cc:11:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |                 if(i%2 == 0 && S[i] == "R")     flag = false;
a.cc:13:23: error: operands to '?:' have different types 'const char*' and 'int'
   13 |         cout << (flag ? "Yes" : 'No') << endl;
      |                  ~~~~~^~~~~~~~~~~~~~
Language: C++

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

int main() {
  string S;
  cin >> S;
  int A = S.size();
  int count = 0;
  for(int i =0;i < A;i++){
    if(i % 2 == 0){
    if(S[i] != 'R' && S[i] != 'U' && S[i] != 'D'){
      count++;
    }
    }
    if(i % 2 == 1){
      if(S[i] != 'L' && S[i] != 'U' && S[i] != 'D'){
        count++;
      }
}
  }


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

#include <bits/stdc++.h>
using namespace std;
 
int main () {
  string S;
  cin >> S;
  bool ok = true;
  for (int i = 0; i < S.size(); i++) {
    if ((i + 1) % 2 == 0 && S.at(i) == "R") {
      ok = false;
      break;
    }
    else if (S.at(i) == "L") {
      ok = false;
      break;
    }
  }
  if (ok) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     if ((i + 1) % 2 == 0 && S.at(i) == "R") {
      |                             ~~~~~~~~^~~~~~
a.cc:13:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     else if (S.at(i) == "L") {
      |              ~~~~~~~~^~~~~~
Language: C++

#inlude<iostream>
#include<conio.h>
void main()
{
  int flag=1;
  char s[101];
  cin>>"s"
  gets(s);
  for(i=0;j=1;s[i]!=NULL,s[j]!=NULL;i=i+2,j=j+2)
  {
    if(((s[i]=='R')||(s[i]=='U')||(s[i]=='D')&&(((s[j]=='R')||(s[j]=='U')||(s[j]=='D')))
        {
        flag=0;
        else
        {
        cout<<"\no";
        getch();;
        exit(1);
        }
        }
     cout<<"\nyes";
   getch();
 }       


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlude; did you mean #include?
    1 | #inlude<iostream>
      |  ^~~~~~
      |  include
a.cc:2:9: fatal error: conio.h: No such file or directory
    2 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
    strin s;
    cin>>s;
    int flag=0;
    for(int i=0;i<s.size();i++)
    {
        if((i+1)&1)
        {
            if(s[i]=='L')
            {
                flag++;
                break;
            }
        }
        else
        {
            if(s[i]=='R')
            {
                flag++;
                break;
            }
        }
    }
    if(flag==0)
        cout<<"Yes\n";
    else
        cout<<"No\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'strin' was not declared in this scope; did you mean 'stdin'?
    5 |     strin s;
      |     ^~~~~
      |     stdin
a.cc:6:10: error: 's' was not declared in this scope
    6 |     cin>>s;
      |          ^
Language: C++

#define fastio ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
const int m=1e9+7;
int main(){
    #ifndef ONLINE_JUDGE
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
    #endif
    fastio
    char c;
    int i=1,flag=1;
    while(cin>>c){
        if((i&1 && c=='L') || (i&1==0 && c=='R')){
            flag=0;
            break;
        }
    }
    if(flag) cout<<"Yes";
    else cout<<"No";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:33: error: 'stdin' was not declared in this scope
    5 |         freopen("input.txt","r",stdin);
      |                                 ^~~~~
a.cc:1:1: note: 'stdin' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #define fastio ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
a.cc:5:9: error: 'freopen' was not declared in this scope
    5 |         freopen("input.txt","r",stdin);
      |         ^~~~~~~
a.cc:6:34: error: 'stdout' was not declared in this scope
    6 |         freopen("output.txt","w",stdout);
      |                                  ^~~~~~
a.cc:6:34: note: 'stdout' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:1:16: error: 'ios' has not been declared
    1 | #define fastio ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
      |                ^~~
a.cc:8:5: note: in expansion of macro 'fastio'
    8 |     fastio
      |     ^~~~~~
a.cc:1:41: error: 'cin' was not declared in this scope
    1 | #define fastio ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
      |                                         ^~~
a.cc:8:5: note: in expansion of macro 'fastio'
    8 |     fastio
      |     ^~~~~~
a.cc:1:53: error: 'cout' was not declared in this scope
    1 | #define fastio ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
      |                                                     ^~~~
a.cc:8:5: note: in expansion of macro 'fastio'
    8 |     fastio
      |     ^~~~~~
Language: C

#include<stdio.h>
#include<conio.h>
int main()
{
	char s[100];
	int i=1;
	gets(s);
	while(s[i]!='\0')
	{
		if(i%2==0&&s[i]=='L'||s[i]=='U'||s[i]=='D')
		{
			printf("yes");
		}
		else if(s[i]=='R'||s[i]=='U'||s[i]=='D')
		{
			printf ("yes");
		}
		else
		{
			printf("no");
		}
      i++;
	 }
	 return(0);
}

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

#include<bits/stdc++.h>
using namespace std;
int main(void){
char str[100 + 1];
cin>>str;
int n = strlen(str); 
for (int i = 0; i < n; i++) {
 if (i % 2 == 0) {
if (str[i] == 'L') {
 cout<<"No";
 return 0;
}
} 
  else {
if (str[i] == 'R') {
 cout<<"No";
return 0;
}
23 }
24 }
25
26 puts("Yes");
27 return 0;
28 }


Compiler output:
a.cc: In function 'int main()':
a.cc:19:3: error: expected ';' before '}' token
   19 | 23 }
      |   ^~
      |   ;
a.cc:20:3: error: expected ';' before '}' token
   20 | 24 }
      |   ^~
      |   ;
a.cc:21:3: error: expected ';' before numeric constant
   21 | 25
      |   ^
      |   ;
   22 | 26 puts("Yes");
      | ~~ 
a.cc:23:3: error: expected ';' before 'return'
   23 | 27 return 0;
      |   ^~~~~~~
      |   ;
a.cc:24:3: error: expected ';' before '}' token
   24 | 28 }
      |   ^~
      |   ;
Language: C

#include <stdio.h>
#include <string.h>
int main()
{
  char s[100];
  scanf("%s",s);
  size_t len = strlen(s);
  ilen = (int)len;
  int bad=0;
  for (int i = 0;i<ilen-1;i+=2) {
    if (s[i] == 'L') {
      bad=1;
      break;
    }
  }
  for (int i = 1;i<ilen-1;i+=2) {
    if (s[i] == 'R') {
      bad=1;
      break;
    }
  }
  if (bad == 1) {
    puts("No");
  } else {
    puts("Yes");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:3: error: 'ilen' undeclared (first use in this function); did you mean 'len'?
    8 |   ilen = (int)len;
      |   ^~~~
      |   len
main.c:8:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
  	
  	string a;
  	cin >> a;
  	long long b=a.length(), d=0;
  	for (i=0, i<b, i++) {
      char c=a[i];
      if (i%2==0){
        if (c!='R' && c!='U' && c!='D'){
          break;}
        else {
          d++;}
      	}
      else{
        if (c!='L' && c!='U' && c!='D'){
          break;}
        else {
          d++;}
      	}
      }
  if (d==b) {
    cout << "Yes";
  }
  else {
    cout << "No";
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: 'i' was not declared in this scope
   11 |         for (i=0, i<b, i++) {
      |              ^
a.cc:26:3: error: expected primary-expression before 'if'
   26 |   if (d==b) {
      |   ^~
a.cc:25:8: error: expected ';' before 'if'
   25 |       }
      |        ^
      |        ;
   26 |   if (d==b) {
      |   ~~    
a.cc:26:3: error: expected primary-expression before 'if'
   26 |   if (d==b) {
      |   ^~
a.cc:25:8: error: expected ')' before 'if'
   25 |       }
      |        ^
      |        )
   26 |   if (d==b) {
      |   ~~    
a.cc:11:13: note: to match this '('
   11 |         for (i=0, i<b, i++) {
      |             ^
Language: Java

import java.util.Scanner;
public class ABC141_B {

	public static void main(String[] args) {
		Scanner sc = new  Scanner(System.in);
		String s = sc.next();
		char[] c = s.toCharArray();
		int n = s.length();
		String answer ="";
		for(int i=0;i<n; i++) {
			if(i%2==0 && (c[i]=='R'||c[i]=='U'||c[i]=='D')) {
			   answer="Yes";
			}else if(i%2!=0 && (c[i]=='L'||c[i]=='U'||c[i]=='D')) {
				answer="Yes";
			}else {
				answer="No";
				break;
			}
		}
		System.out.println(answer);
	}

}


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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main(){
	string s;
	cin >> s;
	
	bool res = true;
	rep(i, n){
		if(i%2 == 0 && s.at(i) == 'L'){
			res = false;
		}else if(i%2 == 1 && s.at(i) == 'R'){
			res = false;
		}
	}

	if(res) cout << "Yes" << endl;
	else cout << "No" << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: 'n' was not declared in this scope
   10 |         rep(i, n){
      |                ^
a.cc:3:45: note: in definition of macro 'rep'
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main(){
	string s;
	cin >> s;
	
	bool res = true;
	rep(i, n){
		if(i%2 == 0 && s.at(i) == 'L'){
			res = false;
		}else if(i%2 == 1 && s.at(i) == 'R')
			res = false;
		}
	}

	if(res) cout << "Yes" << endl;
	else cout << "No" << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: 'n' was not declared in this scope
   10 |         rep(i, n){
      |                ^
a.cc:3:45: note: in definition of macro 'rep'
    3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
      |                                             ^
a.cc: At global scope:
a.cc:18:9: error: expected unqualified-id before 'if'
   18 |         if(res) cout << "Yes" << endl;
      |         ^~
a.cc:19:9: error: expected unqualified-id before 'else'
   19 |         else cout << "No" << endl;
      |         ^~~~
a.cc:21:9: error: expected unqualified-id before 'return'
   21 |         return 0;
      |         ^~~~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include <stdio.h>
#include <string.h>
using namespace std;
int main(){
    
    
    char s[100 + 1];
    cin >> s;
    int n = strlen(s)  
  
    for (int i = 0; i < n ; i++){
        if (s[i] % 2 == 0){
            if (s[i] == 'R'){
                cout << "No";
                
                return 0;
            }
        }else {
            if (s[i] == 'L'){
                cout << "No";
                
                return 0;
            }
        }
    }
    cout << "Yes";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: expected ',' or ';' before 'for'
   14 |     for (int i = 0; i < n ; i++){
      |     ^~~
a.cc:14:21: error: 'i' was not declared in this scope
   14 |     for (int i = 0; i < n ; i++){
      |                     ^
Language: C++

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

int main(){
  string S ;
  cin >> S ;
  int a = S.size();
  bool ans = true;
  for(int i=0;i<a;i++){
    if(i%2!=0&&S[i]=='R') ans = false;
    if(i%20==&&S[i]=='L') ans = false;
  }
  
  if(ans) cout << "Yes" << endl;
  else cout << "No" << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     if(i%20==&&S[i]=='L') ans = false;
      |        ~~~~^~~~~
a.cc:11:17: error: expected ')' before '[' token
   11 |     if(i%20==&&S[i]=='L') ans = false;
      |       ~         ^
      |                 )
a.cc:11:16: error: label 'S' used but not defined
   11 |     if(i%20==&&S[i]=='L') ans = false;
      |                ^
Language: C++

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

int main(){
  string S ;
  cin >> S ;
  int a = S.size();
  bool ans = true;
  for(int i=0;i<a;i++){
    if(i%2!=0&&S[i]!=('L','U','D')) ans = false;
    if(i%20==&&S[i]!=('R','U','D')) ans = false;
  }
  
  if(ans) cout << "Yes" << endl;
  else cout << "No" << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     if(i%20==&&S[i]!=('R','U','D')) ans = false;
      |        ~~~~^~~~~
a.cc:11:17: error: expected ')' before '[' token
   11 |     if(i%20==&&S[i]!=('R','U','D')) ans = false;
      |       ~         ^
      |                 )
a.cc:11:16: error: label 'S' used but not defined
   11 |     if(i%20==&&S[i]!=('R','U','D')) ans = false;
      |                ^
Language: C++

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

int main(){
  string S ;
  cin >> S ;
  int a = S.size();
  bool ans = true;
  for(int i=0;i<a;i++){
    if(i%2!=0&&S[i]!=('L','U','D')) ans = false;
    if(i%20=0&&S[i]!=('R','U','D')) ans = false;
  }
  
  if(ans) cout << "Yes" << endl;
  else cout << "No" << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: lvalue required as left operand of assignment
   11 |     if(i%20=0&&S[i]!=('R','U','D')) ans = false;
      |        ~^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <fstream>
#include <vector>
#include <deque>
#include <assert.h>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <stdio.h>
#include <string.h>
#include <utility>
#include <math.h>
#include <bitset>
#include <iomanip>
#include <complex>
using namespace std;
//#define int long long
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef long double ld;
typedef long long ll;
#define X first
#define Y second
#define all(o) o.begin(), o.end()
#define endl '\n'
#define IOS ios::sync_with_stdio(0), cin.tie(0)

int gcd(int x,int y){ return (!y ? x : gcd(y, x%y)); }
const int maxn = 1e6 + 10;
const int mod = 1e9 + 7, base = 773;
inline int mu(int x,int y){
	return 1LL * x * y % mod;
}
inline int ad(int x,int y){
	return (x + y) % mod;
}
int h[maxn], pw[maxn], h2[maxn];
int gh(int l,int r){
	return ad(h[r], mod - mu(h[l], pw[r - l]));
}
int32_t main(){
	//IOS;
	int n;
	string s;
	cin >> s;
	bool can = 1;
	for(int i=0; i<s.size(); i++)
		if(i % 2 == 0 && s[i] == 'L')
			can = 0;
		if(i % 2 == 1 && s[i] == 'R')
			can = 0;
	if(can)
		cout << "Yes" << endl;
	else
		cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:52:20: error: 'i' was not declared in this scope
   52 |                 if(i % 2 == 1 && s[i] == 'R')
      |                    ^
Language: C++

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

int main(void){
char a[100 + 1];

scanf("%s", a);

int b = strlen(a); 
for (int i = 0; i < b; i++) {
if (i % 2 == 0) {
if (a[i] == 'L') {
printf("No");
}
} else {
if (a[i] == 'R') {
printf("No");
}
}

printf("Yes");
return 0;
}

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

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

int main(){
  string s;
  cin>>s;
  bool aw=false;
  for(int i=0;i<s.size();i+=2){
    if(s[i]=='L'){
      aw=true;
    }
  }
  for(int i=1;i<s.size();i+=2){
    if(s[i]=='R'){
      aw=true;
    }
  }
  if(aw) cout<<"No"<<endl;
  else   cout<<"Yes"<<endl;
  

      

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

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

int main()
{
    string s;
    cin >> s;
    for (int i = 0; i < s.size(); i++)
    {
        if (i % 2 == 0)
        {
            if (s[i] == 'L')
            {
                cout << "No" << endl;
                return 0;
            }
        }
        else
        {
            if (s[i] == 'R')
            {
                cout << "No" << endl;
                return 0l
            }
        }
    }
    cout << "Yes" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:26: error: expected ';' before '}' token
   23 |                 return 0l
      |                          ^
      |                          ;
   24 |             }
      |             ~
Language: C++

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

int main(){
  string s;
  int i;
  cin >> s;
  for( i=0;i<sizeof(s);i++){
    if(i%2==1 && s[i]=='L'){
      break;
    }
    else if (i%2==0 && s[i]=='R'){
      break;
    }  
  }
  if (i==sizeof(s)){
    cout << "Yes";
  }
      else{
        cout << "No";
      }
  return 0;
}


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

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

int main(){
  string s;
  cin >> s;
  for(int i;i<sizeof(s);i++){
    if(i%2==1 && s[i]=='L'){
      break;
    }
    else if (i%2==0 && s[i]=='U'){
      break;
    }
    if(i==sizeof(s)-1){
      i+=2;
    }   
  }
  if (i>sizeof(s)){
    cout << "Yes";
  }
      else{
        cout << "No";
      }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:7: error: 'i' was not declared in this scope
   19 |   if (i>sizeof(s)){
      |       ^
Language: C++

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

int main(){
  string s;
  cin >> s;
  for(int i;i<sizeof(s);i++){
    if(i%2==1 && s[i]='L'){
      cout << "No";
    }
    else if (i%2==0 && s[i]='U'){
      cout << "No";
    }
    else{
      cout << "Yes";
    }
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: lvalue required as left operand of assignment
    9 |     if(i%2==1 && s[i]='L'){
a.cc:12:21: error: lvalue required as left operand of assignment
   12 |     else if (i%2==0 && s[i]='U'){
Language: C++

#include <bits/stdc++.h>
#define int long long
const int INF = 1e18L + 5;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using namespace std;

signed main(){

    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    string s; cin >> s;
    bool ok = true;
    rep(i, s.size()) {
        if (i % 2 == 0) {
            if (s[i] == 'R' || s[i] == 'U' || s[i] == 'D') continue;
            else {
                ok = false;
                break;
            }
        }
        if (i % 2 == 1) {
            if (s[i] == 'L' || s[i] == 'U' || s[i] == 'D') continue;
            else {
                ok = false;
                break;
        }
    }
    if (ok) cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}

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

#include<stdio.h>
int Question141B(void) {
	char s[101];
	int flag1 = 0;
	int flag2 = 0;
	
	for (int k = 0; k < 101; k++) s[k] = '0';
	scanf("%s", s);

	for (int i = 1; i < 102; i++) {
		if (i % 2 == 0) {
			switch (s[i-1]) {
				case 'L':
				case 'U':
				case 'D':
				case '0':
					break;
				case 'R':
					flag1 = 1;
					break;
			}
		}
		else if(i % 2 == 1){
			switch (s[i-1]) {
				case 'R':
				case 'U':
				case 'D':
				case '0':
					break;
				case 'L':
					flag2 = 1;
					break;
			}
		}
	}
	if (flag1 == 0 && flag2 == 0) puts("Yes");
	else puts("No");

	return 0;
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin>>s;
  for(int i=0;i<s.size();i++){
    if(i%2==0)//奇数{
      if(s[i]=="L")
        cout<<"No"<<endl;
  }}
else{//偶数
  if(s[i]=="R")
    cout<<"No"<<endl;
}}}
cout<<"Yes"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |       if(s[i]=="L")
a.cc: At global scope:
a.cc:11:1: error: expected unqualified-id before 'else'
   11 | else{//偶数
      | ^~~~
a.cc:14:2: error: expected declaration before '}' token
   14 | }}}
      |  ^
a.cc:14:3: error: expected declaration before '}' token
   14 | }}}
      |   ^
a.cc:15:1: error: 'cout' does not name a type
   15 | cout<<"Yes"<<endl;
      | ^~~~
a.cc:16:1: error: expected declaration before '}' token
   16 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	string s;
	cin>>s;
	for(int i=0;i<s.size();i++){
		if((i+1)%2==1&&s[i]=='L'){
			cout<<"No"<<endl;
			return 0;
		}
		if((i+1)%2==0&&s[i]=='R'){
			cout<<"No"<<endl;
			return 0;
		}
	}
	cout<<"Yes"<<endl;
	return 0;

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

#include <bits/stdc++.h>
using namespace std;
#define REP(i, M) for (int i = 0; i < M; i++)
int main() {
  string s;
  cin >> s;
  int n = s.size();
  bool res = true;
  for (int i = 0; i < n - 1; i += 2) {
    if (s.at(i) != "R" || s.at(i) != "U" || s.at(i) != "D") {
      res = false;
    }
    if (s.at(i + 1) != "L" || s.at(i + 1) != "U" || s.at(i + 1) != "D") {
      res = false;
    }
  }
  if (n % 2 != 0) {
    if (s.at(n - 1) != "R" || s.at(n - 1) != "U" || s.at(n - 1) != "D") {
      res = false;
    }
  }
  if (res) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if (s.at(i) != "R" || s.at(i) != "U" || s.at(i) != "D") {
      |         ~~~~~~~~^~~~~~
a.cc:10:35: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if (s.at(i) != "R" || s.at(i) != "U" || s.at(i) != "D") {
      |                           ~~~~~~~~^~~~~~
a.cc:10:53: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if (s.at(i) != "R" || s.at(i) != "U" || s.at(i) != "D") {
      |                                             ~~~~~~~~^~~~~~
a.cc:13:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     if (s.at(i + 1) != "L" || s.at(i + 1) != "U" || s.at(i + 1) != "D") {
      |         ~~~~~~~~~~~~^~~~~~
a.cc:13:43: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     if (s.at(i + 1) != "L" || s.at(i + 1) != "U" || s.at(i + 1) != "D") {
      |                               ~~~~~~~~~~~~^~~~~~
a.cc:13:65: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     if (s.at(i + 1) != "L" || s.at(i + 1) != "U" || s.at(i + 1) != "D") {
      |                                                     ~~~~~~~~~~~~^~~~~~
a.cc:18:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |     if (s.at(n - 1) != "R" || s.at(n - 1) != "U" || s.at(n - 1) != "D") {
      |         ~~~~~~~~~~~~^~~~~~
a.cc:18:43: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |     if (s.at(n - 1) != "R" || s.at(n - 1) != "U" || s.at(n - 1) != "D") {
      |                               ~~~~~~~~~~~~^~~~~~
a.cc:18:65: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |     if (s.at(n - 1) != "R" || s.at(n - 1) != "U" || s.at(n - 1) != "D") {
      |                                                     ~~~~~~~~~~~~^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin>>s;
  int n=strlen(s);
  for(int i=1;i<=n;i++){
    if(i%2==0){
      if(s[i]=='L'){
        cout<<"No";
        return 0;
      }
    }
    else{
      if(s[i]=='R'){
        cout<<"No";
        return 0;
      }
    }
  }
  cout<<"Yes";
  return 0;
}
      
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    6 |   int n=strlen(s);
      |                ^
      |                |
      |                std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;

int main() {
  string s;
  cin >>  s;
  n = s.size();
  bool ok = true;
  rep(i,n){
    if(i%2=0 && s[i]=='L') ok = false;
    if(i%2!=0 && s[i]=='R') ok = false;
  }
  if (ok) cout << "Yes" <<endl;
  else cout << "No" << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'n' was not declared in this scope
    9 |   n = s.size();
      |   ^
a.cc:12:9: error: lvalue required as left operand of assignment
   12 |     if(i%2=0 && s[i]=='L') ok = false;
      |        ~^~
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);		
        String str = sc.next(); 
        String s = "Yes";
        for(int i=0;i<a;i++){
          if((i%2==0 && s.charAt(i)== 'L') || (i%2==1 && s.charAt(i)=='R')){s = "No";break;}
                            }		    
		System.out.println(s);
	}
}


Compiler output:
Main.java:7: error: cannot find symbol
        for(int i=0;i<a;i++){
                      ^
  symbol:   variable a
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string r;
  r="Yes";
  string S;
  cin >> S;
  for (int i=1;i<S.size()+1;i++) {
    if (r=="Yes") continue;
	if (i%2==0 && S[i-1]=="R") {r=="No";}
	if (i%2==1 && S[i-1]=="L") {r=="No";}
  }
  cout << r << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |         if (i%2==0 && S[i-1]=="R") {r=="No";}
a.cc:11:38: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   11 |         if (i%2==0 && S[i-1]=="R") {r=="No";}
      |                                     ~^~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
a.cc:12:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         if (i%2==1 && S[i-1]=="L") {r=="No";}
a.cc:12:38: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   12 |         if (i%2==1 && S[i-1]=="L") {r=="No";}
      |                                     ~^~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    char s[100];
    int i,len,f1=0,f2=0;
    gets(s);
    len=strlen(s);
    for(i=0;i<len;i++)
    {
        if(s[i]=='R' && i%2!=0)
            {
                f1=1;
            }
        else if(s[i]=='L'&&i%2==0)
        {
            f1=1;
        }

    }

    if(f1==1)
        cout<<"N0"<<endl;
    else
        cout<<"Yes"<<endl;

    return 0;
}

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

#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,N) for(int i = 0;i < (int)(N);i++)
int main(){
  string s;
  cin>>s;
  int n=s.size();
  string ans="Yes";
  rep(i,n){
    if(i%2==0&&s[i]=="R"){
      ans="No";
    }
    if(i%2==1&&s[i]=="L"){
      ans="No";
    }
  }
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |     if(i%2==0&&s[i]=="R"){
a.cc:15:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |     if(i%2==1&&s[i]=="L"){
Language: C++

#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,N) for(int i = 0;i < (int)(N);i++)
int main(){
  string s;
  cin>>s;
  int n=s.size();
  string ans="Yes";
  rep(i,n){
    if(s[2*i]=="R"){
      ans="No";
    }
    if(s[2*i+1]=="L"){
      ans="No";
    }
  }
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |     if(s[2*i]=="R"){
a.cc:15:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |     if(s[2*i+1]=="L"){
Language: C++

#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,N) for(int i = 0;i < (int)(N);i++)
int main(){
  string s;
  cin>>s;
  int n=s.size();
  string ans="Yes";
  rep(i,n){
    if(s[2*i]==R){
      ans="No";
    }
    if(s[2*i+1]==L){
      ans="No";
    }
  }
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: 'R' was not declared in this scope
   12 |     if(s[2*i]==R){
      |                ^
a.cc:15:18: error: 'L' was not declared in this scope
   15 |     if(s[2*i+1]==L){
      |                  ^
Language: C++

#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,N) for(int i = 0;i < (int)(N);i++)
int main(){
  string s;
  cin>>s;
  int n=s.size();
  string ans="Yes";
  rep(i,n){
    if(s[2*i]=="R"){
      ans="No";
    }
    if(s[2*i+1]=="L"){
      ans="No";
    }
  }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |     if(s[2*i]=="R"){
a.cc:15:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |     if(s[2*i+1]=="L"){
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
string s;
  cin>>s;
  int n =s.length();
  bool ans=false;
for (int i = 0; i < n; i++) {
if(s[2*i]=='L'||s[2*i]=='U'||s[2*i]=='D'){　//偶数
  ans=true;
}
if(s[2*i+1]=='R'||s[2*i+1]=='U'||s[2*i+1]=='D'){ //奇数
  ans=true;
} 
}
  if(ans){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  }

Compiler output:
a.cc:10:43: error: extended character 　 is not valid in an identifier
   10 | if(s[2*i]=='L'||s[2*i]=='U'||s[2*i]=='D'){　//偶数
      |                                           ^
a.cc: In function 'int main()':
a.cc:10:43: error: '\U00003000' was not declared in this scope
   10 | if(s[2*i]=='L'||s[2*i]=='U'||s[2*i]=='D'){　//偶数
      |                                           ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
string s;
  cin>>s;
  int n =s.length();
  bool ans=false;
for (int i = 0; i < n; i++) {
if(s[2*i]=='L'||s[2*i]=='U'||s[2*i]=='D'){　//偶数
  ans=true;
}
if(s[2*i+1]=='R'||s[2*i+1]=='U'||s[2*i+!]=='D'){ //奇数
  ans=true;
} 
}
  if(ans){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  }

Compiler output:
a.cc:10:43: error: extended character 　 is not valid in an identifier
   10 | if(s[2*i]=='L'||s[2*i]=='U'||s[2*i]=='D'){　//偶数
      |                                           ^
a.cc: In function 'int main()':
a.cc:10:43: error: '\U00003000' was not declared in this scope
   10 | if(s[2*i]=='L'||s[2*i]=='U'||s[2*i]=='D'){　//偶数
      |                                           ^~
a.cc:13:41: error: expected primary-expression before ']' token
   13 | if(s[2*i+1]=='R'||s[2*i+1]=='U'||s[2*i+!]=='D'){ //奇数
      |                                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
string s;
  cin>>s;
  int n =s.length();
  bool ans=false;
for (int i = 0; i < n; i++) {
if(s[2*i]=="L"||s[2*i]=="U"||s[2*i]=="D"){　//偶数
  ans=true;
}
if(s[2*i+1]=="R"||s[2*i+1]=="U"||s[2*i+!]=="D"){ //奇数
  ans=true;
} 
}
  if(ans){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  }

Compiler output:
a.cc:10:43: error: extended character 　 is not valid in an identifier
   10 | if(s[2*i]=="L"||s[2*i]=="U"||s[2*i]=="D"){　//偶数
      |                                           ^
a.cc: In function 'int main()':
a.cc:10:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 | if(s[2*i]=="L"||s[2*i]=="U"||s[2*i]=="D"){　//偶数
a.cc:10:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 | if(s[2*i]=="L"||s[2*i]=="U"||s[2*i]=="D"){　//偶数
a.cc:10:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 | if(s[2*i]=="L"||s[2*i]=="U"||s[2*i]=="D"){　//偶数
a.cc:10:43: error: '\U00003000' was not declared in this scope
   10 | if(s[2*i]=="L"||s[2*i]=="U"||s[2*i]=="D"){　//偶数
      |                                           ^~
a.cc:13:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 | if(s[2*i+1]=="R"||s[2*i+1]=="U"||s[2*i+!]=="D"){ //奇数
a.cc:13:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 | if(s[2*i+1]=="R"||s[2*i+1]=="U"||s[2*i+!]=="D"){ //奇数
a.cc:13:41: error: expected primary-expression before ']' token
   13 | if(s[2*i+1]=="R"||s[2*i+1]=="U"||s[2*i+!]=="D"){ //奇数
      |                                         ^
Language: C++

import java.util.*;

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

        String S = sc.next();
        int l = S.length();
        String a = "LR";

        for(int i=0; i<l; i++){
            if(i%2==0){
                if(S.charAt(i)==a.charAt(0)){
                    System.out.println("No");
                    break;
                }
            }
            else{
                if(S.charAt(i)==a.charAt(1)){
                    System.out.println("No");
                    break;
                }
            }
            if(i==l-1){
                System.out.println("Yes");
            }
        }
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:11: error: expected ':' before 'static'
    4 |     public static void main(String[] args){
      |           ^~~~~~~
      |           :
a.cc:4:29: error: 'String' has not been declared
    4 |     public static void main(String[] args){
      |                             ^~~~~~
a.cc:4:38: error: expected ',' or '...' before 'args'
    4 |     public static void main(String[] args){
      |                                      ^~~~
a.cc:30:2: error: expected ';' after class definition
   30 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:6:9: error: 'Scanner' was not declared in this scope
    6 |         Scanner sc = new Scanner(System.in);
      |         ^~~~~~~
a.cc:8:9: error: 'String' was not declared in this scope
    8 |         String S = sc.next();
      |         ^~~~~~
a.cc:9:17: error: 'S' was not declared in this scope
    9 |         int l = S.length();
      |                 ^
a.cc:10:16: error: expected ';' before 'a'
   10 |         String a = "LR";
      |                ^
a.cc:14:33: error: 'a' was not declared in this scope
   14 |                 if(S.charAt(i)==a.charAt(0)){
      |                                 ^
a.cc:15:21: error: 'System' was not declared in this scope
   15 |                     System.out.println("No");
      |                     ^~~~~~
a.cc:20:33: error: 'a' was not declared in this scope
   20 |                 if(S.charAt(i)==a.charAt(1)){
      |                                 ^
a.cc:21:21: error: 'System' was not declared in this scope
   21 |                     System.out.println("No");
      |                     ^~~~~~
a.cc:26:17: error: 'System' was not declared in this scope
   26 |                 System.out.println("Yes");
      |                 ^~~~~~
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main() {
  string s;
  cin >> s;
  bool easy = true;
  
  for (int i = 0; i < s.size(); ++i) {
    if ((i % 2) == 0) {
      if (s[i] == 'L') {
        easy = false;
        break;
      }
    } else {
      if (s[i] == 'R') {
        easy = false;
        break;
    }
  }
  
  cout << (easy ? "Yes" : "No") << endl;
  return 0;
}

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

#include <bits/stdc++.h>
 using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
 int main(){
   string s;
   int n;
   bool ans=true;
   cin>>s;
   n=s.size();
   rep(i,n){
    if(i%2==0){
     if(s.at(i)=="L")
       ans=false;
    }
    else{
     if(s.at(i)=="R")
      ans=false;
    }
   }
   if(ans)
     cout<<"Yes"<<endl;
   else
     cout<<"No"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |      if(s.at(i)=="L")
      |         ~~~~~~~^~~~~
a.cc:16:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |      if(s.at(i)=="R")
      |         ~~~~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
 using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
 int main(){
   string s;
   cin>>s;
   bool ans=true;
   if((s.size())%2==1&&s.at(s.size()-1)=="L")ans=false;
   rep(i,(s.size())/2){
    if(s.at(i*2+1)=="L"||s.at(i*2)=="R")ans=false;
   
   }
   if(ans)cout<<"Yes"<<endl;
   else cout<<"No"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:40: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |    if((s.size())%2==1&&s.at(s.size()-1)=="L")ans=false;
      |                        ~~~~~~~~~~~~~~~~^~~~~
a.cc:10:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if(s.at(i*2+1)=="L"||s.at(i*2)=="R")ans=false;
      |        ~~~~~~~~~~~^~~~~
a.cc:10:35: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if(s.at(i*2+1)=="L"||s.at(i*2)=="R")ans=false;
      |                          ~~~~~~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
 using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
 int main(){
   string s;
   cin>>s;
   bool ans=true;
   if((s.size())%2==1&&s.at(s.size()-1)=="L")ans=false;
   rep(i,n/2){
    if(s.at(i*2+1)=="L"||s.at(i*2)=="R")ans=false;
   
   }
   if(ans)cout<<"Yes"<<endl;
   else cout<<"No"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:40: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |    if((s.size())%2==1&&s.at(s.size()-1)=="L")ans=false;
      |                        ~~~~~~~~~~~~~~~~^~~~~
a.cc:9:10: error: 'n' was not declared in this scope
    9 |    rep(i,n/2){
      |          ^
a.cc:3:32: note: in definition of macro 'rep'
    3 | #define rep(i,n) for(int i=0;i<n;i++)
      |                                ^
a.cc:10:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if(s.at(i*2+1)=="L"||s.at(i*2)=="R")ans=false;
      |        ~~~~~~~~~~~^~~~~
a.cc:10:35: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if(s.at(i*2+1)=="L"||s.at(i*2)=="R")ans=false;
      |                          ~~~~~~~~~^~~~~