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

#include<iostream>
using namespace std;
int main()
{
  string S;
  cin>>S;
  while(S[i]!='\0')
  {
   if(i%2==0&&S[i]=='R')
   { cout<<"No"'
     break;
   }
   else if(S[i]=='L'&&i%2!=0)
   {
     cout<<"Yes";
     break;
   }
  }
return 0;
}

    
  

Compiler output:
a.cc:10:16: warning: missing terminating ' character
   10 |    { cout<<"No"'
      |                ^
a.cc:10:16: error: missing terminating ' character
a.cc: In function 'int main()':
a.cc:7:11: error: 'i' was not declared in this scope
    7 |   while(S[i]!='\0')
      |           ^
a.cc:10:16: error: expected ';' before 'break'
   10 |    { cout<<"No"'
      |                ^
      |                ;
   11 |      break;
      |      ~~~~~
Language: C++

2#include <bits/stdc++.h>
#define endl '\n'
#define PB push_back
#define PF push_front
#define MP make_pair
#define fi first
#define se second
#define all(v) v.begin(),v.end()
 
using namespace std;
 
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
 
const int INF = 1e9 + 7;
const ll LINF = 1e18 + 14;

vector<vector<int> > G;
vector<int> used;

int main(){
    ios_base::sync_with_stdio(false); //cin.tie(nullptr); cout.tie(nullptr);
    string s;
    cin >> s;
    for (int i = i; i < s.size(); i++){
        if (i % 2 == 0){
            if (s[i] == 'L'){
                cout << "No";
                return 0;
            }
        }
        if (i % 2 == 1){
            if (s[i] == 'R'){
                cout << "No";
                return 0;
            }
        }
    }
    cout << "Yes";
    return 0;
}  


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | 2#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 2#include <bits/stdc++.h>
      | ^
a.cc:15:9: error: 'pair' does not name a type
   15 | typedef pair<int,int> pii;
      |         ^~~~
a.cc:16:9: error: 'pair' does not name a type
   16 | typedef pair<ll,ll> pll;
      |         ^~~~
a.cc:17:9: error: 'vector' does not name a type
   17 | typedef vector<int> vi;
      |         ^~~~~~
a.cc:18:9: error: 'vector' does not name a type
   18 | typedef vector<ll> vl;
      |         ^~~~~~
a.cc:23:1: error: 'vector' does not name a type
   23 | vector<vector<int> > G;
      | ^~~~~~
a.cc:24:1: error: 'vector' does not name a type
   24 | vector<int> used;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:27:5: error: 'ios_base' has not been declared
   27 |     ios_base::sync_with_stdio(false); //cin.tie(nullptr); cout.tie(nullptr);
      |     ^~~~~~~~
a.cc:28:5: error: 'string' was not declared in this scope
   28 |     string s;
      |     ^~~~~~
a.cc:29:5: error: 'cin' was not declared in this scope
   29 |     cin >> s;
      |     ^~~
a.cc:29:12: error: 's' was not declared in this scope; did you mean 'se'?
   29 |     cin >> s;
      |            ^
      |            se
a.cc:33:17: error: 'cout' was not declared in this scope
   33 |                 cout << "No";
      |                 ^~~~
a.cc:39:17: error: 'cout' was not declared in this scope
   39 |                 cout << "No";
      |                 ^~~~
a.cc:44:5: error: 'cout' was not declared in this scope
   44 |     cout << "Yes";
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
    string s;
    cin >> s;
    string ans = "Yes";
    for(int i = 0, i < s.length, i++){
        if(i % 2 == 0){
            if(s[i] == "L"){
                ans = "No";
            }
        }else if(i % 2 == 1){
            if(s[i] == "R"){
                ans = "No";
            }
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: expected ';' before '<' token
    7 |     for(int i = 0, i < s.length, i++){
      |                     ^~
      |                     ;
a.cc:7:22: error: expected primary-expression before '<' token
    7 |     for(int i = 0, i < s.length, i++){
      |                      ^
a.cc:7:37: error: expected ';' before ')' token
    7 |     for(int i = 0, i < s.length, i++){
      |                                     ^
      |                                     ;
a.cc:9:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |             if(s[i] == "L"){
a.cc:13:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |             if(s[i] == "R"){
Language: C++

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

int main() {
  int i = move.size;
  bool a = true;
  string move[i];
  cin >> move[i];

  for(int i = 0; i < move.length; i++){
      int b, c;
      if(move[b] != "R" || "U" || "D"){
        a = false;
        b += 2;
      }
      if(move[c] != "L" || "U" || "D"){
          a = false;
          c += 2;
      }
  }
  if (a == true){
      cout << "Yes";
    }
    else{
        cout << "No";
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: overloaded function with no contextual type information
    5 |   int i = move.size;
      |                ^~~~
a.cc:10:27: error: request for member 'length' in 'move', which is of non-class type 'std::string [i]' {aka 'std::__cxx11::basic_string<char> [i]'}
   10 |   for(int i = 0; i < move.length; i++){
      |                           ^~~~~~
a.cc: At global scope:
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: Java

import java.io.*;
public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String steps = br.readLine();
		boolean often_pattern = true;

		for(int i = 1; i <+ steps.length(); i++){
			char step = steps.charAt(i-1å);
			if(i % 2 == 0){
				if(step == 'R'){
					often_pattern = false;
					break;
				}
			} else {
				if(step == 'L'){
					often_pattern = false;
					break;
				}
			}
		}

		String answer;
		if(often_pattern){
			answer = "Yes";
		} else {
			answer = "No";
		}
		System.out.println(answer);
	}
}

Compiler output:
Main.java:9: error: ')' or ',' expected
			char step = steps.charAt(i-1?);
			                            ^
Main.java:9: error: ';' expected
			char step = steps.charAt(i-1?);
			                             ^
2 errors
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(){
  string str;
  char c;
  int i;
  bool flg = true;
  
  cin >> str;
  
  for(i=1;i<=str.length();i++){
    c = str.substr(i,1);
    if((i%2 == 1 && c == 'L')
      ||(i%2 == 0 && c == 'R')){
      flg = false;
    }
  }
  if(flg) {
    cout << "Yes";
  }
  else {
    cout << "No";
  }
  
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:15:19: error: cannot convert 'std::__cxx11::basic_string<char>' to 'char' in assignment
   15 |     c = str.substr(i,1);
      |         ~~~~~~~~~~^~~~~
      |                   |
      |                   std::__cxx11::basic_string<char>
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(){
  string = str;
  char c;
  int i;
  bool flg = true;
  
  cin >> str;
  
  for(i=1;i<=str.length();i++){
    c = str.substr(i,1);
    if((i%2 == 1 && c == 'L')
      ||(i%2 == 0 && c == 'R')){
      flg = false;
    }
  }
  if(flg) {
    cout << "Yes";
  }
  else {
    cout << "No";
  }
  
  return 0;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected unqualified-id before '=' token
    7 |   string = str;
      |          ^
a.cc:12:10: error: 'str' was not declared in this scope; did you mean 'std'?
   12 |   cin >> str;
      |          ^~~
      |          std
Language: C++

#include<iosream>
#include<string>

using namespace std;

int main(){
  string = str;
  char c;
  int i;
  bool flg = true;
  
  cin >> str;
  
  for(i=1;i<=str.length();i++){
    c = str.substr(i,1);
    if((i%2 == 1 && c == 'L')
      ||(i%2 == 0 && c == 'R')){
      flg = false;
    }
  }
  if(flg) {
    cout << "Yes";
  }
  else {
    cout << "No";
  }
  
  return 0;
}
  

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

#include <bits/stdc++.h>

#define MIN_INT -2147483648
#define MAX_INT 2147483647
#define MIN_LONG -9223372036854775808L
#define MAX_LONG 9223372036854775807L

#define long long long int

using namespace std;

// @author: pashka

int main() {
    ios::sync_with_stdio(false);

    string s;
    for (int i = 0; i < s.size(); i++) {
        if (i % 2 == 0 && s[i] == 'L' || i % 2 == 1 && s[i] == "R") {
            cout << "No";
            return 0;
        }
    }
    cout << "Yes";

    return 0;
}

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

#include<iostream>
using namespace std;
int main(){
  string s;
  bool check = true;
  for(int i=0; i<s.size(); i++){
    if(i%2){
      if(s[i]!='R' && s[i]!='U' && s[i]!='D'){
        check = false;
        break;
      }
    }else{
      if(s[i]!='L' && s[i]!='U' && s[i]!='D'){
        check = false;
        break;
      }
    }
    if(check)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
    return 0;
  }

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

#include<iostream>
using namespace std;
int main(){
  string s;
  bool check = true;
  for(int i=0; i<s.size; i++){
    if(i%2){
      if(s[i]!='R' && s[i]!='U' && s[i]!='D'){
        check = false;
        break;
      }
    }else{
      if(s[i]!='L' && s[i]!='U' && s[i]!='D'){
        check = false;
        break;
      }
    }
    if(check)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
    return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    6 |   for(int i=0; i<s.size; i++){
      |                  ~~^~~~
      |                        ()
a.cc:23:4: error: expected '}' at end of input
   23 |   }
      |    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  string s;
  bool check = true;
  for(int i=0; i<i.size; i++){
    if(i%2){
      if(s[i]!='R' && s[i]!='U' && s[i]!='D'){
        check = false;
        break;
      }
    }else{
      if(s[i]!='L' && s[i]!='U' && s[i]!='D'){
        check = false;
        break;
      }
    }
    if(check)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
    return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: request for member 'size' in 'i', which is of non-class type 'int'
    6 |   for(int i=0; i<i.size; i++){
      |                    ^~~~
a.cc:23:4: error: expected '}' at end of input
   23 |   }
      |    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

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

int main() {
    string S;
    cin >> S;
    string ans = "Yes";
    for(int i = 0; i < S.length; i++) {
        if(i % 2 == 0) {
            if(S[i] == 'L') {
                ans = "No";
                break;
            }
        }else{
            if(S[i] == 'R') {
                ans = "No";
                break;
            }
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: 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<iostream>
#include<string>
using namespace std;

int main(){
    vector<string> S;
    cin>>S;
    bool flag = true; 

    for(int i=0;i<S.size();i++){
        if(i%2 != 0){
            if(!(S[i] == 'R'||S[i] == 'U'||S[i] == 'D')){
                flag = false;
                break;
            }
        }
        if(i%2 == 0){
            if(!(S[i] == 'L'||S[i] == 'U'||S[i] == 'D')){
                flag = false;
                break;
            }
        }
    }

    if(flag == true)
        cout<<"Yes"<<endl;
    if(flag == false)
        cout<<"No"<<endl;
    
    return 0;
}

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

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


int main (){
    string S;
    int flag;

    cin >> S;

    for(int i=0;i<=S.length();i++){
        if(i%2 == 0){
            if(S[i] == "R"){
                flag = 1;
            }
        }

        else{
            if(S[i] == "L"){
                flag = 1;
            }
        }
    }

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

Compiler output:
a.cc:1:2: error: extended character   is not valid in an identifier
    1 | #include <iostream>
      |  ^
a.cc:1:2: error: invalid preprocessing directive #include\U000000a0
    1 | #include <iostream>
      |  ^~~~~~~~
a.cc:3:2: error: extended character   is not valid in an identifier
    3 | #include <utility>
      |  ^
a.cc:3:2: error: invalid preprocessing directive #include\U000000a0
    3 | #include <utility>
      |  ^~~~~~~~
a.cc:4:2: error: extended character   is not valid in an identifier
    4 | #include <algorithm>
      |  ^
a.cc:4:2: error: invalid preprocessing directive #include\U000000a0
    4 | #include <algorithm>
      |  ^~~~~~~~
a.cc:5:1: error: extended character   is not valid in an identifier
    5 | using namespace std;
      | ^
a.cc:5:1: error: extended character   is not valid in an identifier
a.cc:5:1: error: 'using\U000000a0namespace\U000000a0std' does not name a type
    5 | using namespace std;
      | ^~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:5: error: 'string' was not declared in this scope
    9 |     string S;
      |     ^~~~~~
a.cc:9:5: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from a.cc:2:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:12:5: error: 'cin' was not declared in this scope
   12 |     cin >> S;
      |     ^~~
a.cc:12:12: error: 'S' was not declared in this scope
   12 |     cin >> S;
      |            ^
a.cc:29:9: error: 'cout' was not declared in this scope
   29 |         cout << "Yes" << endl;
      |         ^~~~
a.cc:29:26: error: 'endl' was not declared in this scope
   29 |         cout << "Yes" << endl;
      |                          ^~~~
a.cc:32:9: error: 'cout' was not declared in this scope
   32 |         cout << "No" << endl;
      |         ^~~~
a.cc:32:25: error: 'endl' was not declared in this scope
   32 |         cout << "No" << endl;
      |                         ^~~~
Language: Java

import java.util.Scanner;

public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        String s = sc.next();

        boolean result = true;
        String[] target = s.split("");
        for (int i = 0; i < target.length - 1 && result; i++) {
            if (i % 2 == 0) {
                result = "R".equals(target[i]) || "U".equals(target[i]) || "D".equals(target[i])
            } else {
                result = "L".equals(target[i]) || "U".equals(target[i]) || "D".equals(target[i])
            }
        }

        System.out.println(result ? "Yes" : "No");
    }
}


Compiler output:
Main.java:14: error: ';' expected
                result = "R".equals(target[i]) || "U".equals(target[i]) || "D".equals(target[i])
                                                                                                ^
Main.java:16: error: ';' expected
                result = "L".equals(target[i]) || "U".equals(target[i]) || "D".equals(target[i])
                                                                                                ^
2 errors
Language: Java

import java.util.*;

public class Main

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] input = sc.nextLine().toCharArray();
		for(int i = 0;i<input.length;i++) {

			if(i%2==0&&input[i]!='R'&&input[i]!='U'&&input[i]!='D') {
				//System.out.println(input[i]+"hit"+i);
				System.out.println("No");
				return;
			}else if(i%2!=0&&input[i]!='L'&&input[i]!='U'&&input[i]!='D') {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");

	}

}


Compiler output:
Main.java:3: error: '{' expected
public class Main
                 ^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args) {
	              ^
  (use --enable-preview to enable unnamed classes)
Main.java:23: error: class, interface, enum, or record expected
}
^
3 errors
Language: C++

#include <iostream>
using std::cout;
using std::cin ;

int main(){
  std::string S;
  cin >> S;
  const char *cs = S.c_str(); 
  for(int i = 0;i<S.length();++i){
    if(i + 1 == S.length()){
      cout << "Yes" << std::endl;
    }
    if( ((i % 2 == 0) && cs[i] == "L")
      ||((i & 2 == 1) && cs[i] == "R") ){
      cout << "No" << std::endl;
    }
  }
}

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

#include <iostream>
using std::cout;
using std::cin ;

int main(){
  std::string S;
  cin >> S;
  char* cs = S.c_str();
  for(int i = 0;i<S.length();++i){
    if(i + 1 == S.length()){
      cout << "Yes" << std::endl;
    }
    if( ((i % 2 == 0) && cs[i] == "L")
      ||((i & 2 == 1) && cs[i] == "R") ){
      cout << "No" << std::endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
    8 |   char* cs = S.c_str();
      |              ~~~~~~~^~
      |                     |
      |                     const char*
a.cc:13:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     if( ((i % 2 == 0) && cs[i] == "L")
      |                          ~~~~~~^~~~~~
a.cc:14:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |       ||((i & 2 == 1) && cs[i] == "R") ){
      |                          ~~~~~~^~~~~~
Language: C++

#include <iostream>
using std::cout;
using std::cin ;

int main(){
  std::string S;
  cin >> S;
  for(int i = 0;i<S.length();++i){
    if(i + 1 == S.length()){
      cout << "Yes" << std::endl;
    }
    if( ((i % 2 == 0) && S[i] == "L")
      ||((i & 2 == 1) && S[i] == "R") ){
      cout << "No" << std::endl;
    }
  }
}

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

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

int main(){
  string s;
  cin >> s;
  int n = strlen(s);
  
  rep(i,n){
    if(s[i]=='R' && i%2==0){
      puts("No");
      return 0;
    }
    if(s[i]=='L' && i%2==1){
      puts("No");
      return 0;
    }
  }
  
  cout << "Yes" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    8 |   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 <iostream>
using namespace std;
int main(){
  //入力用
  char S[100];
  cin >> S;
  //奇数番目にRなし
  //偶数番目にLなし
  for(int i=0;i<sizeof(S);i++){
    if(i%2==0 && S[i]=="R"){
      cout << "No" <<endl;
      return 0;
    }else if(i%2==1 && S[i]=="L"){
      cout << "No" <<endl;
      return 0;
    }
  }
  cout << "Yes" <<endl;
  return 0;
}

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

#include <iostream>
using namespace std;
int main(){
  //入力用
  char S[100];
  cin >> S;
  //奇数番目にRなし
  //偶数番目にLなし
  for(int i=0;i<sizeof(S);i++){
    if(i%2==0 && S[i]==R){
      cout << "No" <<endl;
      return 0;
    }else if(i%2==1 && S[i]==L){
      cout << "No" <<endl;
      return 0;
    }
  }
  cout << "Yes" <<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: 'R' was not declared in this scope
   10 |     if(i%2==0 && S[i]==R){
      |                        ^
a.cc:13:30: error: 'L' was not declared in this scope
   13 |     }else if(i%2==1 && S[i]==L){
      |                              ^
Language: C++

#include <iostream>
using namespace std;
int main(){
  //入力用
  char S[100];
  cin >> S;
  //奇数番目にRなし
  //偶数番目にLなし
  for(int i=0;i<sizeof(S);i++){
    if(i%2==0 && S[i] == "R"){
      cout << "No" <<endl;
      return 0;
    }else if(i%2==1 && S[i] =="L"){
      cout << "No" <<endl;
      return 0;
    }
  }
  cout << "Yes" <<endl;
  return 0;
}

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

#include <iostream>
using namespace std;
int main(){
  //入力用
  char S[];
  cin >> S;
  //奇数番目にRなし
  //偶数番目にLなし
  for(int i=0;i<sizeof(S);i++){
    if(i%2==0 && S[i] == "R"){
      cout << "No" <<endl;
      return 0;
    }else if(i%2==1 && S[i] =="L"){
      cout << "No" <<endl;
      return 0;
    }
  }
  cout << "Yes" <<endl;
  return 0;
}

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

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

int main(){
  string s;
  cin >> s;
  int cnt=0;
  bool flag = True;
  for (char c: s){
    if(cnt%2==0){
      if (c=='R' || c=='U' || c=='D') continue;
      flag == Flase;
    }
    else{
      if (c=='L' || c=='U' || c=='D') continue;
      flag == False;
    }
  }
  string ans;
  if(flag == True) ans = "Yes";
  else ans = "No";
  cout << ans << endl;
}

        

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 'True' was not declared in this scope
    9 |   bool flag = True;
      |               ^~~~
a.cc:13:15: error: 'Flase' was not declared in this scope
   13 |       flag == Flase;
      |               ^~~~~
a.cc:17:15: error: 'False' was not declared in this scope
   17 |       flag == False;
      |               ^~~~~
Language: C++

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

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 A=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>
using namespace std;
int main(){
  string S;
  cin >> S;
  int A=S.size;
  string ans="Yes";
  for(int i=0;i<A;i++){
    if(i%2==1){
      if(S.at(i)=='L'){
        ans="No";
      }
    }
    else{
      if(S.at(i)=='R'){
        ans="No";
      }
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: cannot convert 'std::__cxx11::basic_string<char>::size' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
    6 |   int A=S.size;
      |           ^~~~
Language: C

#include <stdio>
int main()
{
	char s[101];
	scanf("%s",s);
	for (int i = 0; i < strlen(s); i++)
	{
		if (i % 2  == 0)
		{
			if (s[i] != 'R' && s[i] != 'U' && s[i] != 'D')
			{
				printf("No");
				return 0;
			}
		}
		if (i % 2 == 1)
		{
			if (s[i] != 'L' && s[i] != 'U' && s[i] != 'D')
			{
				printf("No");
				return 0;
			}
		}
	}
	printf("Yes");
	return 0;
}

Compiler output:
main.c:1:10: fatal error: stdio: No such file or directory
    1 | #include <stdio>
      |          ^~~~~~~
compilation terminated.
Language: C

#include <stdio.h>

int main33()
{
	char s[101];
	scanf("%s",s);
	for (int i = 0; i < strlen(s); i++)
	{
		if (i % 2  == 0)
		{
			if (s[i] != 'R' && s[i] != 'U' && s[i] != 'D')
			{
				printf("No");
				return 0;
			}
		}
		if (i % 2 == 1)
		{
			if (s[i] != 'L' && s[i] != 'U' && s[i] != 'D')
			{
				printf("No");
				return 0;
			}
		}
	}
	printf("Yes");
	return 0;
}

Compiler output:
main.c: In function 'main33':
main.c:7:29: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
    7 |         for (int i = 0; i < strlen(s); i++)
      |                             ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
    1 | #include <stdio.h>
  +++ |+#include <string.h>
    2 | 
main.c:7:29: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
    7 |         for (int i = 0; i < strlen(s); i++)
      |                             ^~~~~~
main.c:7:29: note: include '<string.h>' or provide a declaration of 'strlen'
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main() {
  bool b = true;
  string s;
  cin >> s;
  for(int i = 0; i<s.size(); i++) {
    if((i+1) % 2 == 0) {
      if(s[i] == 'R') {
        b = false;
       // cout << "No" << endl;
        break;
      }
    }
    else {
      if(s[i] == 'L') {
        b = false;
        break;
      }
    }
  }
    if(b) {
      cout << "Yes" << endl;
    }
    else {
      cout << "No" << Endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:23: error: 'Endl' was not declared in this scope
   27 |       cout << "No" << Endl;
      |                       ^~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  int count=0;
  string S;
  cin>>S;
  int N = (int)(S.length());
  for(int i=0;i<N;i++){
    if(i%2==0){
      if(S[i]=="R"||S[i]=="U"||S[i]=="D"){
        count++;}
    }
    if(i%2!=0){
      if(S[i]=="L"||S[i]=="U"||S[i]=="D"){
        count++;}
    }
  }
    if(count==N){
      cout<<"Yes"<<endl;
    }else{
      cout<<"No"<<endl;
    }
return 0;
}

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

#include<iostream>
using namespace std;
int main(){
  int count=0;
  string S;
  cin>>S;
  int N = (int)(S.length());
  for(int i=0;i<N;i++){
    if(i%2==0){
      if(S[i]=="R"||S[i]=="U"||S[i]=="D"){
        count++;}
    }
    if(i%2!=0){
      if(S[i]=="L"||S[i]=="U"||S[i]=="D"){
        count++;}
    }
  }
    if(count==N){
      cout<<"Yes"<<endl;
    }else{
      cout<<"No"<<endl;
    }
return 0;
}
        

        
    

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]=="R"||S[i]=="U"||S[i]=="D"){
a.cc:10:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |       if(S[i]=="R"||S[i]=="U"||S[i]=="D"){
a.cc:10:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |       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<bits/stdc++.h>
using namespace std;
int main(){
  int sum;
  string s,frag = "Yes";
  cin >> s;
  sum = count(s.begin(),s.end());
  for(int i = 0;i <=sum ; i++){
    if(i%2 == 0){
      if(s.at(i) == "L") frag = "No"
    }else{
      if(s.at(i) == "R") frag = "No";
    }
  }
  cout << frag;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: no matching function for call to 'count(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator)'
    7 |   sum = count(s.begin(),s.end());
      |         ~~~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4025:5: note: candidate: 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note:   candidate expects 4 arguments, 2 provided
a.cc:10:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |       if(s.at(i) == "L") frag = "No"
      |          ~~~~~~~~^~~~~~
a.cc:10:37: error: expected ';' before '}' token
   10 |       if(s.at(i) == "L") frag = "No"
      |                                     ^
      |                                     ;
   11 |     }else{
      |     ~                                
a.cc:12:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |       if(s.at(i) == "R") frag = "No";
      |          ~~~~~~~~^~~~~~
Language: C++

#include<iostream>
#include<cstdio>
char s[105];
using namespace std;
int main()
{
	gets(s);
	for(int i=1;i<=105;i+=2)
	{
		if(s[i]=!"R" && "R" && "D")
		{
			cout<<"No";break;
		}
		else
		{
			if(s[i+1]=!"L" && "R" && "D")
			{
				cout<<"No";break;
			}
			else
			{
				cout<<"Yes";break;
			}
		}
	}
	return 0;
}

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

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

int main(){
  char s[100];
  int i;
  
  cin>>s;
  size_t l=s.length();
  
  for(i=0,i<l,i++)
    if(i%2==1)
      if(s[i]=="R")
        cout<<"No";
  		return 0:
  	if(i%2==0)
      if(s[i]=="L")
        cout<<"No";
  		return 0;
    
  cout<<"Yes";
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: request for member 'length' in 's', which is of non-class type 'char [100]'
   10 |   size_t l=s.length();
      |              ^~~~~~
a.cc:12:18: error: expected ';' before ')' token
   12 |   for(i=0,i<l,i++)
      |                  ^
      |                  ;
a.cc:16:17: error: expected primary-expression before 'return'
   16 |                 return 0:
      |                 ^~~~~~
a.cc:15:20: error: expected ';' before 'return'
   15 |         cout<<"No";
      |                    ^
      |                    ;
   16 |                 return 0:
      |                 ~~~~~~
a.cc:16:17: error: expected primary-expression before 'return'
   16 |                 return 0:
      |                 ^~~~~~
a.cc:15:20: error: expected ')' before 'return'
   15 |         cout<<"No";
      |                    ^
      |                    )
   16 |                 return 0:
      |                 ~~~~~~
a.cc:12:6: note: to match this '('
   12 |   for(i=0,i<l,i++)
      |      ^
a.cc:16:25: error: expected ';' before ':' token
   16 |                 return 0:
      |                         ^
      |                         ;
a.cc:16:25: error: expected primary-expression before ':' token
Language: C++

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'N' was not declared in this scope
    7 |   N = St.size();
      |   ^
a.cc:10:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |       if(St.at(i)=="L"){
      |          ~~~~~~~~^~~~~
a.cc:16:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |       if(St.at(i)=="R"){
      |          ~~~~~~~~^~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'N' was not declared in this scope
    7 |   for(int i=0;i<N;i++){
      |                 ^
a.cc:9:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |       if(St.at(i)=="L"){
      |          ~~~~~~~~^~~~~
a.cc:15:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |       if(St.at(i)=="R"){
      |          ~~~~~~~~^~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'N' was not declared in this scope
    7 |   for(int i=0;i<N;i++){
      |                 ^
a.cc:9:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |       if(St.at(i)=="L"){
      |          ~~~~~~~~^~~~~
a.cc:15:10: error: 'S' was not declared in this scope
   15 |       if(S.at(i)=="R"){
      |          ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:38: error: expected primary-expression before '=' token
   12 |     if (i == s.size()/2 && s.at(i) /== 'L' ){
      |                                      ^
a.cc:20:37: error: expected primary-expression before '=' token
   20 |     if(i == s.size()/2 && s.at(i) /== 'R'){
      |                                     ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:25: error: lvalue required as left operand of assignment
   12 |     if (i == s.size()/2 && s.at(i) /= 'L' ){
      |         ~~~~~~~~~~~~~~~~^~~~~~~~~~
a.cc:20:24: error: lvalue required as left operand of assignment
   20 |     if(i == s.size()/2 && s.at(i) /= 'R'){
      |        ~~~~~~~~~~~~~~~~^~~~~~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:27:11: error: 'Ans' was not declared in this scope
   27 |   cout << Ans << endl;
      |           ^~~
Language: C++

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

int main(){
  char s[100];
  int i;
  
  cin>>s;
  size_t l=s.length();
  
  for(i=0,i<l,i+1)
    if(i%2==1)
      if(s[i]=="R")
        cout<<"No";
  		return 0:
  	if(i%2==0)
      if(s[i]=="L")
        cout<<"No";
  		return 0;
    
  cout<<"Yes";
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: request for member 'length' in 's', which is of non-class type 'char [100]'
   10 |   size_t l=s.length();
      |              ^~~~~~
a.cc:12:18: error: expected ';' before ')' token
   12 |   for(i=0,i<l,i+1)
      |                  ^
      |                  ;
a.cc:16:17: error: expected primary-expression before 'return'
   16 |                 return 0:
      |                 ^~~~~~
a.cc:15:20: error: expected ';' before 'return'
   15 |         cout<<"No";
      |                    ^
      |                    ;
   16 |                 return 0:
      |                 ~~~~~~
a.cc:16:17: error: expected primary-expression before 'return'
   16 |                 return 0:
      |                 ^~~~~~
a.cc:15:20: error: expected ')' before 'return'
   15 |         cout<<"No";
      |                    ^
      |                    )
   16 |                 return 0:
      |                 ~~~~~~
a.cc:12:6: note: to match this '('
   12 |   for(i=0,i<l,i+1)
      |      ^
a.cc:16:25: error: expected ';' before ':' token
   16 |                 return 0:
      |                         ^
      |                         ;
a.cc:16:25: error: expected primary-expression before ':' token
Language: C++

#include <iostream>

int main() {
  std::string inp;
  std::cin >> inp;
  bool is = true;
  for(int i = 0; i < inp.length; i++) {
    if(i % 2 == 0) {
      char a = inp.at(i);
      if(a != 'R' && a != 'U' && a != 'D') {
        std::cout << "No";
        return 0;
      }
    }
    else {
      char a = inp.at(i);
      if(a != 'L' && a != 'U' && a != 'D') {
        std::cout << "No";
        return 0;
      }
    }
  }
  std::cout << "Yes";
  return 0;
}

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

/*
    Author:DurJoy
*/
#include<bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;

int temp = 0, tot = 0, oll = 0, np = 0;
int R = 0, U = 0, D = 0, L = 0;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    string s;
    cin >> s;
    bool ok = true;
    for(int i = 0; i < s.size(); i++){
        if(s[i] = 'R' && (i + 1) % 2 == 0||s[i] = 'L' && (i + 1) % 2 != 1){
            ok = false;
            
        } 
    }
    if(ok){
        cout <<"yes"<<endl;
    }
    else{
        cout <<"No"<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:42: error: lvalue required as left operand of assignment
   18 |         if(s[i] = 'R' && (i + 1) % 2 == 0||s[i] = 'L' && (i + 1) % 2 != 1){
Language: C++

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

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

#include <bits/stdc++.h>

using namespace std;

string s, tf;
long long i;

int main()
{
    ios_base::sync_with_stdio(false));
    cin >> s;
    for (i ; i < sizeof(s) - 1 ; ++ i) {
        if (i % 2 != 0 && s[i] == 'U' || s[i] == 'D' || s[i] == 'L') tf = "Yes";
        else if (i % 2 == 0 && s[i] == 'U' || s[i] == 'D' || s[i] == 'R') tf = "Yes";
        else tf = "No";
    }
    cout << tf;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:37: error: expected ';' before ')' token
   10 |     ios_base::sync_with_stdio(false));
      |                                     ^
      |                                     ;
Language: Java

import java.util.*;
class Main
{
    public static void main(String[] args)
    {
        
        Scanner sc = new Scanner(System.in);
        
        String a = sc.next();
        
        boolean flag =true;
        
        for(int i=0; i < a.length();i++) {
            char c = a.charAt(i);
            if(c=='U' || c=='D' ) continue;
            if(i%2 == 0 && c!='R') {
                System.out.println("No");
                sign=false;
                break;
            }
            else if (i%2!=0 && c!='L') {
                System.out.println("No");
                sign=false;
                break;
            }
        
        }
        if(flag){
            System.out.println("Yes");
            
        }
       
    }
}

Compiler output:
Main.java:18: error: cannot find symbol
                sign=false;
                ^
  symbol:   variable sign
  location: class Main
Main.java:23: error: cannot find symbol
                sign=false;
                ^
  symbol:   variable sign
  location: class Main
2 errors
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'court' was not declared in this scope
   16 |     court<<"Yes"<<endl;
      |     ^~~~~