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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 'i' was not declared in this scope
    9 |     if(i%2==0 && S.at(i)=="L")b=false;
      |        ^
a.cc:10:8: error: 'i' was not declared in this scope
   10 |     if(i%2==1 && S.at(i)=="R")c=false;
      |        ^
Language: C++

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

int main()
{
  string S;
  bool a = false;
  cin >> S;
  
  for (int i = 0; i < S.size(); ++i)
  {
    auto c = S[i];
    bool o = i % 2;
    if ((c == "L" && o) || (c == "R" && !o))
    {
      cout << "No" << endl;
      return 0;
    }
    
    cout << "Yes" << endl;
  }
}

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

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

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

#include <stdio.h>
 
int main() {
     char dance[104];
     scanf("%s", dance);
     for (int i = 0; dance[i] != '\0'; i++) {
          // printf("%c %d\n", dance[i], i+1);
          if ((i+1)%2 == 0) {
               if (dance[i] == 'L' || dance[i] == 'U' || dance[i] == 'D') {
                    continue;
               } else {
                    printf("No\n");
                    return 0;
               }
          }
          else {
               if (dance[i] == 'R' || dance[i] == 'U' || dance[i] == 'D') {
                    continue;
               } else {
                    printf("No\n");
                    return 0;
               }
          }
 
     }
     printf("Yes\n");
 
     return 0;


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

#include <iostream>
#include <math.h>
#include <string.h>
#include<stdlib.h>
#define N 100
using namespace std;


int main(){
    char s[N];
    cin>>s;
for(int i=0;i<sizeof(s);i++){
    if(s[i]=="L"){
        if((i+1)%2!=0){
            cout<<"No"<<endl;
            exit(0);
        }
    }
    if(s[i]=="R"){
        if((i+1)%2==0){
            cout<<"No"<<endl;
            exit(0);
        }
    }
}

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


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

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
   Scanner scan = new Scanner(System.in);
    String str = scan.nextLine();
    int len = str.length();
    int cnt1 = 0;
    int cnt2 = 0;
    for(int i = 0; i < len  ;i += 2){
      char n = str.charAt(i);
      if(n.equal('R') == true || n.equal('U') == true || n.equal('D') == true){
      	cnt1 += 1;
      }
    }
     for(int i = 1; i < len  ;i += 2){
      String n = str.charAt(i);
      if(n.equal('L') == true || n.equal('U') == true || n.equal('D') == true){
      	cnt2 += 1;
      }
    }
    if(cnt1 == (len/2) || cnt2 == (len/2 + len%2)){
      System.out.println("Yes");
    }else{
    	System.out.println("No");
    }
    
  }
}


Compiler output:
Main.java:12: error: char cannot be dereferenced
      if(n.equal('R') == true || n.equal('U') == true || n.equal('D') == true){
          ^
Main.java:12: error: char cannot be dereferenced
      if(n.equal('R') == true || n.equal('U') == true || n.equal('D') == true){
                                  ^
Main.java:12: error: char cannot be dereferenced
      if(n.equal('R') == true || n.equal('U') == true || n.equal('D') == true){
                                                          ^
Main.java:17: error: incompatible types: char cannot be converted to String
      String n = str.charAt(i);
                           ^
Main.java:18: error: cannot find symbol
      if(n.equal('L') == true || n.equal('U') == true || n.equal('D') == true){
          ^
  symbol:   method equal(char)
  location: variable n of type String
Main.java:18: error: cannot find symbol
      if(n.equal('L') == true || n.equal('U') == true || n.equal('D') == true){
                                  ^
  symbol:   method equal(char)
  location: variable n of type String
Main.java:18: error: cannot find symbol
      if(n.equal('L') == true || n.equal('U') == true || n.equal('D') == true){
                                                          ^
  symbol:   method equal(char)
  location: variable n of type String
7 errors
Language: C++

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

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

#include <iostream>
 
using namespace std;
 
int main(){
	string S;
 	cout << S;
	bool isOk = true;
  
  	for (int i = 0; i < S.size();i++){
    	if(i%2 == 1){
          if(S.at(i)=="R"){
              isOK = false;
          }
        }else
        {
        	if(S.at(i)== "L"){
              isOK = false;
          }
        }
    }
  	if(isOK){
    	cout<<"Yes";
    }else{
    	cout <<"No";
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |           if(S.at(i)=="R"){
      |              ~~~~~~~^~~~~
a.cc:13:15: error: 'isOK' was not declared in this scope; did you mean 'isOk'?
   13 |               isOK = false;
      |               ^~~~
      |               isOk
a.cc:17:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |                 if(S.at(i)== "L"){
      |                    ~~~~~~~^~~~~~
a.cc:18:15: error: 'isOK' was not declared in this scope; did you mean 'isOk'?
   18 |               isOK = false;
      |               ^~~~
      |               isOk
a.cc:22:12: error: 'isOK' was not declared in this scope; did you mean 'isOk'?
   22 |         if(isOK){
      |            ^~~~
      |            isOk
Language: C++

#include <bits/stdc++.h>
#include <string>
using namespace std;
 
int main() {
  int i=1;
  string moji[i];
  int flag1=1;
  int flag2=1;
  cin >> moji[i];
 
while(i<1oo){
  if ( i % 2 == 1 ){
  	if (moji[i] == "R" || moji[i] == "U" || moji[i] =="D"||moji[i] =="\0"){
    	if(flag1 == 1){
          flag1 =1;
        }
	    else{
    	  flag1=0;
   		}
    }
  }
  else{
      	if (moji[i] == "L" || moji[i] == "U" || moji[i] =="D"||moji[i] =="\0"){
    		if(flag2 == 1){
          	flag2 = 1;
         	}
	   		else{
    	  	  flag2 = 0;
    		}
        }
  }
  i++;
}
 
 
if (flag1 == 1 || flag2 ==1) {
    cout << "Yes" << endl;
  }
else{
      cout << "No" << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: unable to find numeric literal operator 'operator""oo'
   12 | while(i<1oo){
      |         ^~~
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
   Scanner scan = new Scanner(System.in);
    String str = scan.nextLine();
    int len = str.length();
    int cnt1 = 0;
    int cnt2 = 0;
    for(int i = 0; i < len  ;i += 2){
      String n = str.charAt(i);
      if(n.equal("R") == true && n.equal("U") == true && n.equal("D") == true){
      	cnt1 += 1;
      }
    }
     for(int i = 1; i < len  ;i += 2){
      String n = str.charAt(i);
      if(n.equal("L") == true && n.equal("U") == true && n.equal("D") == true){
      	cnt2 += 1;
      }
    }
    if(cnt1 == (len/2) || cnt2 == (len/2 + len%2)){
      System.out.println("Yes");
    }else{
    	System.out.println("No");
    }
    
  }
}

Compiler output:
Main.java:11: error: incompatible types: char cannot be converted to String
      String n = str.charAt(i);
                           ^
Main.java:12: error: cannot find symbol
      if(n.equal("R") == true && n.equal("U") == true && n.equal("D") == true){
          ^
  symbol:   method equal(String)
  location: variable n of type String
Main.java:12: error: cannot find symbol
      if(n.equal("R") == true && n.equal("U") == true && n.equal("D") == true){
                                  ^
  symbol:   method equal(String)
  location: variable n of type String
Main.java:12: error: cannot find symbol
      if(n.equal("R") == true && n.equal("U") == true && n.equal("D") == true){
                                                          ^
  symbol:   method equal(String)
  location: variable n of type String
Main.java:17: error: incompatible types: char cannot be converted to String
      String n = str.charAt(i);
                           ^
Main.java:18: error: cannot find symbol
      if(n.equal("L") == true && n.equal("U") == true && n.equal("D") == true){
          ^
  symbol:   method equal(String)
  location: variable n of type String
Main.java:18: error: cannot find symbol
      if(n.equal("L") == true && n.equal("U") == true && n.equal("D") == true){
                                  ^
  symbol:   method equal(String)
  location: variable n of type String
Main.java:18: error: cannot find symbol
      if(n.equal("L") == true && n.equal("U") == true && n.equal("D") == true){
                                                          ^
  symbol:   method equal(String)
  location: variable n of type String
8 errors
Language: C++

int main(){
  string s; 
  cin >>s;
  int check=0;
  for (int i = 0; i < s.length(); i+=2)
  {
    if(s[i]=='L') check++;
  }
  for (int i = 1; i < s.length(); i+=2)
  {
    if(s[i]=='R') check++;
  }
    if(check>0) cout<< "No";
  else cout << "Yes";
  

}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:3: error: 'string' was not declared in this scope
    2 |   string s;
      |   ^~~~~~
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >>s;
      |   ^~~
a.cc:3:9: error: 's' was not declared in this scope
    3 |   cin >>s;
      |         ^
a.cc:13:17: error: 'cout' was not declared in this scope
   13 |     if(check>0) cout<< "No";
      |                 ^~~~
a.cc:14:8: error: 'cout' was not declared in this scope
   14 |   else cout << "Yes";
      |        ^~~~
Language: C++

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


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]!="R"&&s[i]!="U"&&s[i]!="D"){
a.cc:8:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |       if(s[i]!="R"&&s[i]!="U"&&s[i]!="D"){
a.cc:8:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |       if(s[i]!="R"&&s[i]!="U"&&s[i]!="D"){
a.cc:14:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |       if(s[i]!="L"&&s[i]!="U"&&s[i]!="D"){
a.cc:14:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |       if(s[i]!="L"&&s[i]!="U"&&s[i]!="D"){
a.cc:14:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |       if(s[i]!="L"&&s[i]!="U"&&s[i]!="D"){
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String line = sc.nextLine();
    boolean no_t = false;
    for(int i = 0; line.length(); i++){
      String one = line.substring(i, i + 1);
      if((i + 1) % 2 == 0) {
        if(!one.equals("L") && !one.equals("U") && !one.equals("D")) {
          System.out.println("No");
          no_t = true;
        }
      } else {
        if(!one.equals("R") && !one.equals("U") && !one.equals("D")) {
          System.out.println("No");
          no_t = true;
        }
      }
    }
    if(!no_t) {
       System.out.println("Yes");
    }
  }
}

Compiler output:
Main.java:8: error: incompatible types: int cannot be converted to boolean
    for(int i = 0; line.length(); i++){
                              ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int i=0;
  char moji[];
  int flag1=1;
  int flag2=1;
  cin >> moji[i];
 
while(moji[i] != "\0" && i<100){
  if ( i % 2 == 1 ){
  	if (moji[i] == "R" || moji[i] == "U" || moji[i] =="D"){
    	if(flag1 == 1){
          flag1 =1;
        }
    }
    else{
      flag1=0;
   	}
  }
  else{
      	if (moji[i] == "L" || moji[i] == "U" || moji[i] =="D"){
    		if(flag2 == 1){
          	flag2 = 1;
         	}
    	}
   		else{
      	  flag2 = 0;
    	}
  }
}
 
 
if (flag1 == 1 || flag2 ==1) {
    cout << "Yes" << endl;
  }
else{
      cout << "No" << endl;
}
}

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

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

int main(){
	string S;
	cin >> S;
	
	bool flag = true;
	for (int i = 0; i < S.length; i++) {
		
		if (i % 2 == 1 && ("S[i]" == "R" || "S[i]" == "U" || "S[i]" == "D")) {

		}
		else if (i % 2 == 0 && ("S[i]" == "L" || "S[i]" == "U" || "S[i]" == "D")) {
		}
		else {
			flag = false;
				break;
		}
	}
	if (flag) {
		cout << "YES";
	}
	else {
		cout << "NO";
	}
	return 0;
}

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

#include<stdio.h>
#include<string.h>
int main(){
    int i;
    char s[101];
    scanf("%s",s);
    for(i=0;i<100;i++){
      　if(s[i]=='\0'){
			break;
        }
        else if(i/2==0&&s[i]=='L'){
            printf("No");
            return 0;
        }
        else if(i/2==1&&s[i]=='R'){
            printf("No");
            return 0;
        }
    }
    printf("Yes");
}


Compiler output:
a.cc:8:7: error: extended character 　 is not valid in an identifier
    8 |       　if(s[i]=='\0'){
      |       ^
a.cc: In function 'int main()':
a.cc:8:7: error: '\U00003000if' was not declared in this scope
    8 |       　if(s[i]=='\0'){
      |       ^~~~
a.cc:11:9: error: 'else' without a previous 'if'
   11 |         else if(i/2==0&&s[i]=='L'){
      |         ^~~~
Language: C++

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: 'R' was not declared in this scope
    8 |       if(s[i]!=R&&s[i]!=U&&s[i]!=D){
      |                ^
a.cc:8:25: error: 'U' was not declared in this scope
    8 |       if(s[i]!=R&&s[i]!=U&&s[i]!=D){
      |                         ^
a.cc:8:34: error: 'D' was not declared in this scope
    8 |       if(s[i]!=R&&s[i]!=U&&s[i]!=D){
      |                                  ^
a.cc:14:16: error: 'L' was not declared in this scope
   14 |       if(s[i]!=L&&s[i]!=U&&s[i]!=D){
      |                ^
a.cc:14:25: error: 'U' was not declared in this scope
   14 |       if(s[i]!=L&&s[i]!=U&&s[i]!=D){
      |                         ^
a.cc:14:34: error: 'D' was not declared in this scope
   14 |       if(s[i]!=L&&s[i]!=U&&s[i]!=D){
      |                                  ^
Language: C

#include <stdio.h>

int main(void)
{
  char str[101];
  int i;
  for (i=0;i<50;i++){
    if(str[2i]=='L' || str[2i+1]=='R' ) {
      printf("No");
    } else {
      printf("Yes");  
    }
    
  }
    
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:11: error: array subscript is not an integer
    8 |     if(str[2i]=='L' || str[2i+1]=='R' ) {
      |           ^
main.c:8:27: error: array subscript is not an integer
    8 |     if(str[2i]=='L' || str[2i+1]=='R' ) {
      |                           ^
Language: C++

#include <iostream>

using namespace std;

int main(){
	string S;
 	cout << S;
  	const char *s = S.c_str();
	bool isOk = true;
  
  	for (int i = 0; i < S.length();i++){
    	if(i%2 == 0){
          if(s[i] == "R"){
              isOK = false;
          }
        }else
        {
        	if(s[i] == "L"){
              isOK = false;
          }
        }
    }
  	if(isOK){
    	cout<<"Yes";
    }else{
    	cout <<"No";
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |           if(s[i] == "R"){
      |              ~~~~~^~~~~~
a.cc:14:15: error: 'isOK' was not declared in this scope; did you mean 'isOk'?
   14 |               isOK = false;
      |               ^~~~
      |               isOk
a.cc:18:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |                 if(s[i] == "L"){
      |                    ~~~~~^~~~~~
a.cc:19:15: error: 'isOK' was not declared in this scope; did you mean 'isOk'?
   19 |               isOK = false;
      |               ^~~~
      |               isOk
a.cc:23:12: error: 'isOK' was not declared in this scope; did you mean 'isOk'?
   23 |         if(isOK){
      |            ^~~~
      |            isOk
Language: C++

#include <bits/stdc++.h>                                                
#define int long long                                                   
#define double long double                                              
#define INF 1e18                                                        
#define MOD 1000000007                                                  
using namespace std;                                                    
signed main() {                                                         
  string s; cin >> s;                                                   
  for (int i = 0; i < s.length(); i++) {                                
    if ((i % 2 == 0 && s[i] == 'L') || (i % 2 == 1 && s[i] == 'R')) {   
      cout << "No" << endl;                                             
      return;                                                           
    }                                                                   
  }                                                                     
  cout << "Yes" << endl;                                                
}                                                                       
                                                                        

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

#include <bits/stdc++.h>
#include <string>
using namespace std;
 
int main() {
  int i=1;
  string moji[i];
  int flag1=1;
  int flag2=1;
  cin >> moji[i];
 
while(moji[i] != "\0" && i<100){
  if ( i % 2 == 1 ){
  	if (moji[i] == "R" || moji[i] == "U" || moji[i] =="D"){
    	if(flag1 == 1){
          flag1 =1;
        }
    }
    else{
      	  flag1=0;
    }
  	else{
      	if (moji[i] == "L" || moji[i] == "U" || moji[i] =="D"){
    		if(flag2 == 1){
          	flag2 = 1;
         	}
    	}
   		else{
      	  flag2 = 0;
    	}
  	}
  }
}
 
if (flag1 == 1 || flag2 ==1) {
    cout << "yes" << endl;
  }
else{
      cout << "no" << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:9: error: expected '}' before 'else'
   22 |         else{
      |         ^~~~
a.cc:13:20: note: to match this '{'
   13 |   if ( i % 2 == 1 ){
      |                    ^
a.cc: At global scope:
a.cc:35:1: error: expected unqualified-id before 'if'
   35 | if (flag1 == 1 || flag2 ==1) {
      | ^~
a.cc:38:1: error: expected unqualified-id before 'else'
   38 | else{
      | ^~~~
a.cc:41:1: error: expected declaration before '}' token
   41 | }
      | ^
Language: C++

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

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]!="R"&&s[i]!="U"&&s[i]!="D"){
a.cc:8:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |       if(s[i]!="R"&&s[i]!="U"&&s[i]!="D"){
a.cc:8:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |       if(s[i]!="R"&&s[i]!="U"&&s[i]!="D"){
a.cc:14:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |       if(s[i]!="L"&&s[i]!="U"&&s[i]!="D"){
a.cc:14:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |       if(s[i]!="L"&&s[i]!="U"&&s[i]!="D"){
a.cc:14:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |       if(s[i]!="L"&&s[i]!="U"&&s[i]!="D"){
Language: C++

#include <iostream>

using namespace std;

int main(){
	string S;
 	cout << S;
  	const char *s = S.c_str();
	bool isOk = true;
  
  	for (int i = 0; i < S.length();i++){
    	if(i%2 == 0){
          switch(s[i]){
          	case "R":
              isOK = false;
          }
        }else
        {
        	switch(s[i]){
          		case "L":
              isOK = false;
          }
        }
    }
  	if(isOK){
    	cout<<"Yes";
    }else{
    	cout <<"No";
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:22: error: conversion from 'const char*' to 'int' in a converted constant expression
   14 |                 case "R":
      |                      ^~~
a.cc:14:22: error: could not convert '"R"' from 'const char [2]' to 'int'
   14 |                 case "R":
      |                      ^~~
      |                      |
      |                      const char [2]
a.cc:15:15: error: 'isOK' was not declared in this scope; did you mean 'isOk'?
   15 |               isOK = false;
      |               ^~~~
      |               isOk
a.cc:20:30: error: conversion from 'const char*' to 'int' in a converted constant expression
   20 |                         case "L":
      |                              ^~~
a.cc:20:30: error: could not convert '"L"' from 'const char [2]' to 'int'
   20 |                         case "L":
      |                              ^~~
      |                              |
      |                              const char [2]
a.cc:21:15: error: 'isOK' was not declared in this scope; did you mean 'isOk'?
   21 |               isOK = false;
      |               ^~~~
      |               isOk
a.cc:25:12: error: 'isOK' was not declared in this scope; did you mean 'isOk'?
   25 |         if(isOK){
      |            ^~~~
      |            isOk
Language: C++

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

int main() {
	string s;
	cin >> s;
	int res = 0;
	for (int i = 0;i <= s.size()/2;++i) {
		if (s[2 * i] == "R" || s[2 * i] == "U" || s[2 * i] == "D")res++;
		else if (s[2 * i + 1] == "L" || s[2 * i + 1] == "U" || s[2 * i + 1] == "D")res++;
	}
	if (res == s.size())cout << "Yes" << endl;
	else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |                 if (s[2 * i] == "R" || s[2 * i] == "U" || s[2 * i] == "D")res++;
a.cc:11:49: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |                 if (s[2 * i] == "R" || s[2 * i] == "U" || s[2 * i] == "D")res++;
a.cc:11:68: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |                 if (s[2 * i] == "R" || s[2 * i] == "U" || s[2 * i] == "D")res++;
a.cc:12:39: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |                 else if (s[2 * i + 1] == "L" || s[2 * i + 1] == "U" || s[2 * i + 1] == "D")res++;
a.cc:12:62: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |                 else if (s[2 * i + 1] == "L" || s[2 * i + 1] == "U" || s[2 * i + 1] == "D")res++;
a.cc:12:85: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |                 else if (s[2 * i + 1] == "L" || s[2 * i + 1] == "U" || s[2 * i + 1] == "D")res++;
Language: C++

#include <bits/stdc++.h>
#define int int64_t
#define rep(i, N) for(int i=0; i<N; i++)
using namespace std;
using pair = pair<int, int>;
using tup  = tuple<int, int, int>;
using vec  = vector<char>;
using vvec = vector<vec>;
// " ", ' '
// std::string str;
// str = std::to_string(int i);
// bitset<3> s(N);

// プロトタイプ宣言
// int myfunc(int, vvec);

// グローバル変数
// int N, M;
// vvec data(N, vec(M));

// 関数：

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	string S, ans; cin >> S;
	int lg = S.size();
	ans = "Yes";

	rep(i, lg) {
		int l = i * 2;
		if(l >= lg-1) break;
		if (S.at(k) != 'L' && S.at(k) != 'U' && S.at(k) != 'D')  ans = "No";

		int k = i * 2 + 1;
		if(k >= lg-1) break;
		if(S.at(k) != 'R' && S.at(k) != 'U' && S.at(k) != 'D')  ans = "No";
	}

	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:26: error: 'k' was not declared in this scope
   34 |                 if (S.at(k) != 'L' && S.at(k) != 'U' && S.at(k) != 'D')  ans = "No";
      |                          ^
Language: C

#include <stdio.h>

int main(void)
{
  char str[101];
  int i;
  for (i=0;i<100;i+2){
    if(str[i]=='L' || str[i+1]=='R' ) {
      printf("No");
    } else {
      printf("Yes");  
    }
    
  return 0;
}

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

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

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

#include <iostream>

using namespace std;

int main(){
	string S;
 	cout << S;
  	char *s = S.c_str();
	bool isOk = true;
  
  	for (int i = 0; i < S.length();i++){
    	if(i%2 == 0){
          switch(s[i]){
          	case:"R":
              isOK = false;
          }
        }else
        {
        	switch(s[i]){
          		case:"L":
              isOK = false;
          }
        }
    }
  	cout << isOK;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
    8 |         char *s = S.c_str();
      |                   ~~~~~~~^~
      |                          |
      |                          const char*
a.cc:14:21: error: expected primary-expression before ':' token
   14 |                 case:"R":
      |                     ^
a.cc:14:25: error: expected ';' before ':' token
   14 |                 case:"R":
      |                         ^
      |                         ;
a.cc:20:29: error: expected primary-expression before ':' token
   20 |                         case:"L":
      |                             ^
a.cc:20:33: error: expected ';' before ':' token
   20 |                         case:"L":
      |                                 ^
      |                                 ;
a.cc:25:17: error: 'isOK' was not declared in this scope; did you mean 'isOk'?
   25 |         cout << isOK;
      |                 ^~~~
      |                 isOk
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string str;
  cin >> str;
 
  int counter = 1;
  bool is_not_easy = false;
  
  for (int i = 0; i < str.size(); i++){
    char c = str[counter-1]];
    if (counter % 2 == 0){
      if (c != 'L' || c != 'U' || c != 'D'){
        is_not_easy = true;
      }
    }else{
      if (c != 'R' || c != 'U' || c != 'D'){
        is_not_easy = true;
      }
    }
    counter += 1;
  }
  
  if (is_not_easy){
  	cout << "No" << endl;
  }else{
  	cout << "Yes" << endl;
  }
  return 0;
}
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string str;
  cin >> str;
 
  int counter = 1;
  bool is_not_easy = false;
  
  for (int i = 0; i < str.size(); i++){
    char c = str[counter-1]];
    if (counter % 2 == 0){
      if (c != 'L' || c != 'U' || c != 'D'){
        is_not_easy = true;
      }
    }else{
      if (c != 'R' || c != 'U' || c != 'D'){
        is_not_easy = true;
      }
    }
    counter += 1;
  }
  
  if (is_not_easy){
  	cout << "No" << endl;
  }else{
  	cout << "Yes" << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:28: error: expected ',' or ';' before ']' token
   12 |     char c = str[counter-1]];
      |                            ^
a.cc: At global scope:
a.cc:35:5: error: redefinition of 'int main()'
   35 | int main() {
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main() {
      |     ^~~~
a.cc: In function 'int main()':
a.cc:43:28: error: expected ',' or ';' before ']' token
   43 |     char c = str[counter-1]];
      |                            ^
Language: C

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

int main(){
  char odd[4] = {"RUD"};
  char even[4] = {"LUD"};
  char S1[101], S2[101];
  scanf("%s", S1);
  int len = strlen(S1);
  strcpy(S2, S1);
  for (int i = 0; i < len; i++) {
    int val = 1;
    int tmp = 0;#include <stdio.h>
#include <string.h>

int main(){
  char odd[3][2] = {"R","U","D"};
  char even[3][2] = {"L","U","D"};
  char S1[101], S2[101];
  scanf("%s", S1);
  int len = strlen(S1);
  strcpy(S2, S1);
  for (int i = 0; i < len; i++) {
    int val = 1;
    int tmp = 0;
    if (i%2 == 1) val = 0;
    for (int j = 0; j < 3; j++) {
      if (val == 0) {
        if (strncmp(S2, &even[j][0], 1) == 0) tmp = 1;
      }
      else {
        if (strncmp(S2, &odd[j][0], 1) == 0) tmp = 1;
      }
    }
    if (tmp == 1 && i+1 != len) {
      strcpy(S2, &S1[i+1]);
    }
    else if (tmp == 0){
      printf("No\n");
      return 0;
    }
  }
  printf("Yes\n");
  return 0;
}
    if (i%2 == 1) val = 0;
    for (int j = 0; j < 3; j++) {
      if (val == 0) {
        if (strncmp(S2, even, 1) == 0) tmp = 1;
      }
      else {
        if (strncmp(S2, odd, 1) == 0) tmp = 1;
      }
    }
    if (tmp == 1 && i+1 != len) {
      strcpy(S2, &S1[i+1]);
    }
    else {
      printf("No\n");
      return 0;
    }
  }
  printf("Yes\n");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:17: error: stray '#' in program
   13 |     int tmp = 0;#include <stdio.h>
      |                 ^
main.c:13:18: error: 'include' undeclared (first use in this function)
   13 |     int tmp = 0;#include <stdio.h>
      |                  ^~~~~~~
main.c:13:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:27: error: 'stdio' undeclared (first use in this function); did you mean 'stdin'?
   13 |     int tmp = 0;#include <stdio.h>
      |                           ^~~~~
      |                           stdin
main.c:16:1: error: expected expression before 'int'
   16 | int main(){
      | ^~~
Language: C++

#include <iostream>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
 
  string S;
  cin >> S;
  string result;
  for(int i=0; i < S.size(); i++){
    
    if (i%2==0){
      if(S[i] != "R" && S[i] != "U" && S[i] != "D"){
        result = "No";
        break;
      }
    } else {
      if(S[i] != "L" && S[i] != "U" && S[i] != "D"){
        result = "No";
        break;
      }
    }
    result = "Yes";
  }

  cout << result << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |       if(S[i] != "R" && S[i] != "U" && S[i] != "D"){
a.cc:13:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |       if(S[i] != "R" && S[i] != "U" && S[i] != "D"){
a.cc:13:45: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |       if(S[i] != "R" && S[i] != "U" && S[i] != "D"){
a.cc:18:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |       if(S[i] != "L" && S[i] != "U" && S[i] != "D"){
a.cc:18:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |       if(S[i] != "L" && S[i] != "U" && S[i] != "D"){
a.cc:18:45: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |       if(S[i] != "L" && S[i] != "U" && S[i] != "D"){
Language: C++

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

int main() {
    string s;
    cin >> s;
    int k=0;
    for(int i=0; ; i+=2) {
        if(s[i] != "R" || s[i] != "U" || s[i] != "D") {
            k++;
        }
    }
    for(int j=0; ; j+=2) {
        if(s[j] == "L" || s[j] == "U" || s[j] == "D") {
            k++;
        }
    }
    if(k == s.length()) {
        cout << "Yes";
    } else {
        cout << "No";
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |         if(s[i] != "R" || s[i] != "U" || s[i] != "D") {
a.cc:9:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |         if(s[i] != "R" || s[i] != "U" || s[i] != "D") {
a.cc:9:47: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |         if(s[i] != "R" || s[i] != "U" || s[i] != "D") {
a.cc:14:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |         if(s[j] == "L" || s[j] == "U" || s[j] == "D") {
a.cc:14:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |         if(s[j] == "L" || s[j] == "U" || s[j] == "D") {
a.cc:14:47: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |         if(s[j] == "L" || s[j] == "U" || s[j] == "D") {
Language: C++

#include <stdio.h>
#include <string.h>
char txt[256];
		scanf("%s",txt);

		int n = strlen(txt);

		int result=0;
		int i;

		if(txt[0]=='L')
			result=-1;

		for(i=1;i<n;i++){
			if(i%2==0){
				if(txt[i]=='L')
					result=-1;
			}else{
				if(txt[i]=='R')
					result=-1;
			}
			if(result!=0)
				break;
		}
		if(result==0)
			printf("Yes");
		else
			printf("No");

Compiler output:
a.cc:4:22: error: expected constructor, destructor, or type conversion before '(' token
    4 |                 scanf("%s",txt);
      |                      ^
a.cc:11:17: error: expected unqualified-id before 'if'
   11 |                 if(txt[0]=='L')
      |                 ^~
a.cc:14:17: error: expected unqualified-id before 'for'
   14 |                 for(i=1;i<n;i++){
      |                 ^~~
a.cc:14:25: error: 'i' does not name a type
   14 |                 for(i=1;i<n;i++){
      |                         ^
a.cc:14:29: error: 'i' does not name a type
   14 |                 for(i=1;i<n;i++){
      |                             ^
a.cc:25:17: error: expected unqualified-id before 'if'
   25 |                 if(result==0)
      |                 ^~
a.cc:27:17: error: expected unqualified-id before 'else'
   27 |                 else
      |                 ^~~~
Language: C++

//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP 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())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int main(int argc, char const *argv[]) {
    string S;
    cin >> S;
    size_t size = S.length();
    if(size%2==1){
        len = size/2 + 1;
    }else{
        len = size/2;
    }
    bool kan = true;
    bool ni = true;

    FOR(i,0,len){
        if(S[(2*i)]=='L'){
            kan = false;
            break;
        }
    }
    FOR(i,0,len){
        if(S[(2*i)+1]=='R'){
            ni = false;
            break;
        }
    }



    if(kan && ni){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:77:9: error: 'len' was not declared in this scope
   77 |         len = size/2 + 1;
      |         ^~~
a.cc:79:9: error: 'len' was not declared in this scope
   79 |         len = size/2;
      |         ^~~
a.cc:84:13: error: 'len' was not declared in this scope
   84 |     FOR(i,0,len){
      |             ^~~
a.cc:57:37: note: in definition of macro 'FOR'
   57 | #define FOR(i,a,b) for(int i=(a);i<(b);++i)
      |                                     ^
a.cc:90:13: error: 'len' was not declared in this scope
   90 |     FOR(i,0,len){
      |             ^~~
a.cc:57:37: note: in definition of macro 'FOR'
   57 | #define FOR(i,a,b) for(int i=(a);i<(b);++i)
      |                                     ^
Language: C++

#include <iostream>
#include <math.h>
using namespace std;
int main() {
  int a = 0;
  string s;
  cin >> s;
  for(int i = 0; i <(s + (s%2))/2; i++){
    if(s.at(i*2)=='L'){
      a = 1;
      break;
    }
  }
  for(int i = 0; i <(s - (s%2))/2; i++){
    if(s.at(i*2+1)=='R'){
      a = 1;
      break;
    }
  }
  if(a ==1){
    cout << "No" << endl;
  }
  else{
    cout << "Yes" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:28: error: no match for 'operator%' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
    8 |   for(int i = 0; i <(s + (s%2))/2; i++){
      |                           ~^~
      |                           | |
      |                           | int
      |                           std::string {aka std::__cxx11::basic_string<char>}
a.cc:14:28: error: no match for 'operator%' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
   14 |   for(int i = 0; i <(s - (s%2))/2; i++){
      |                           ~^~
      |                           | |
      |                           | int
      |                           std::string {aka std::__cxx11::basic_string<char>}
Language: C++

#include<iostream>
#include<iomanip>
#include<vector>
#include<map>
#include<set>
#include<algorithm>
#include<numeric>
#include<limits>
#include<bitset>
#include<functional>
#include<type_traits>
#include<queue>
#include<stack>
#include<array>
#include<random>
#include<utility>
#include<cstdlib>
#include<ctime>

using namespace std;

#define rep(i,n) for(int i;i<(int)n;i++)

int main(){
   string S;
   cin>>S;
   string Odd="RUD",Even="LUD";
   bool check[100];
   for(int i=0;i<S.length;i++)
       check[i]=false;

   for(int i=0;i<(int)(S.length());i++){
       if(i%2==0){
           for(int j=0;j<3;j++){
               if(Odd.at(j)==S.at(i)){
                  check[i]=true;
               }
           }
       }
       if(i%2==1){
           for(int j=0;j<3;j++){
               if(Even.at(j)==S.at(i)){
                  check[i]=true;
               }
           }
       }
   }
   for(int i=0;i<(int)(S.length());i++)
       if(check[i]==false){
           cout<<"No"<<endl;
           return 0;
       }
       cout<<"Yes"<<endl;
    return 0; 
}




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

#include<iostream>
#include<bits/stdc++.h>
#include<string>
using namespace std;
int main()
{
  vector<char> a(1100) ;
  
  for(int i=0;i<=100;i++){
   cin >> a.at(i) ;
  }
  
  bool cond2 = 1 ;
  for(int i=0;i<1100;i++){
   if(i%2==0){
   if(a.at(i)=='L'){
     cond2 = 0 ;
     break ;
   }else if(i%2!=0){
     if(a.at(i)=='R'){
     cond2 = 0 ;
     break ;
   }
   }
  }//for(i)
  
  if(cond2)
    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:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

#include <stdio.h>
int main(){
  char S[100];
  scanf("%s",S);
  int i=0,j=0;
  for(i=0;i<100;i=i+2){
    if(S[i]=='L' || S[i]=='U' || S[i]=='D' || S[i]=='\0'){
      continue;
    }
    else{
      goto aaa;
    }
    while(0){aaa:
             printf("No\n");
             return 0;
    }
  }
  for(i=1;i<100;i=i+2){
    if(S[i]=='R' || S[i]=='U' || S[i]=='D' || S[i]=='\0'){
      continue;
    }
    else{
      goto aaa;
    }
    while(0){aaa:
             printf("No\n");
             return 0;
    }
  }
  printf("Yes\n");
  return 0;  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:14: error: duplicate label 'aaa'
   25 |     while(0){aaa:
      |              ^~~
Language: C++

#include <stdio.h>
int main(void){

	char txt[256];
	scanf("%s",txt);

	int n = strlen(txt);

	int result=0;
	int i;

	if(txt[0]=='L')
		result=-1;

	for(i=1;i<n;i++){
		printf("i:%d txt: %c\n",i,txt[i]);
		if(i%2==0){
			if(txt[i]=='L')
				result=-1;

		}else{
			if(txt[i]=='R')
				result=-1;

		}
		if(result!=0)
			break;
	}
	if(result==0)
		printf("Yes");
	else
		printf("No");


}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'strlen' was not declared in this scope
    7 |         int n = strlen(txt);
      |                 ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <stdio.h>
  +++ |+#include <cstring>
    2 | int main(void){
Language: C++

#include <stdio.h>
int main(){
  char S[100];
  gets(S);
  int i=0,j=0;
  for(i=0;i<100;i=i+2){
    if(S[i]=='L' || S[i]=='U' || S[i]=='D' || S[i]=='\0'){
      continue;
    }
    else{
      goto aaa;
    }
    while(0){aaa:
             printf("No\n");
             return 0;
    }
  }
  for(i=1;i<100;i=i+2){
    if(S[i]=='R' || S[i]=='U' || S[i]=='D' || S[i]=='\0'){
      continue;
    }
    else{
      goto aaa;
    }
    while(0){aaa:
             printf("No\n");
             return 0;
    }
  }
  printf("Yes\n");
  return 0;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'gets' was not declared in this scope; did you mean 'getw'?
    4 |   gets(S);
      |   ^~~~
      |   getw
a.cc:25:14: error: duplicate label 'aaa'
   25 |     while(0){aaa:
      |              ^~~
Language: C++

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

using namespace std;


int main(){
  string S;
  bool ans=true;
  cin >>  S;
  int a=S.size();
  cout << a << endl;
  for(int i=0;i<a;i++){
    if(i%2==0){
      if(S==`R`){
        ans=false;
      }
    }
    if(i%2==1){
      if(S==`L`){
        ans=true;
      }
    }
  }
  if(ans==true){
    cout << "Yes" << endl;
  }
  if(ans==false){
    cout << "No" << endl;
  }
}

Compiler output:
a.cc:17:13: error: stray '`' in program
   17 |       if(S==`R`){
      |             ^
a.cc:17:15: error: stray '`' in program
   17 |       if(S==`R`){
      |               ^
a.cc:22:13: error: stray '`' in program
   22 |       if(S==`L`){
      |             ^
a.cc:22:15: error: stray '`' in program
   22 |       if(S==`L`){
      |               ^
a.cc: In function 'int main()':
a.cc:17:14: error: 'R' was not declared in this scope
   17 |       if(S==`R`){
      |              ^
a.cc:22:14: error: 'L' was not declared in this scope
   22 |       if(S==`L`){
      |              ^