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

v#include <bits/stdc++.h>
using namespace std;
const int MOD=1e9+7;
//const int MOD=998244353;
const int INF=1e9;
const long long LINF=1e18;
#define int long long
//template
template <typename T>
void fin(T a){
  cout<<a<<endl;
  exit(0);
}
//main
signed main(){
  string s;cin>>s;
  for(int i=0;i<s.size();i++){
    if(i&1){
      if(s[i]=='R')fin("No");
    }
    else if(s[i]=='L')fin("No");
  }
  fin("Yes");
}


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include <bits/stdc++.h>
      | ^
a.cc: In function 'void fin(T)':
a.cc:11:3: error: 'cout' was not declared in this scope
   11 |   cout<<a<<endl;
      |   ^~~~
a.cc:11:12: error: 'endl' was not declared in this scope
   11 |   cout<<a<<endl;
      |            ^~~~
a.cc:12:3: error: there are no arguments to 'exit' that depend on a template parameter, so a declaration of 'exit' must be available [-fpermissive]
   12 |   exit(0);
      |   ^~~~
a.cc:12:3: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
a.cc: In function 'int main()':
a.cc:16:3: error: 'string' was not declared in this scope
   16 |   string s;cin>>s;
      |   ^~~~~~
a.cc:16:12: error: 'cin' was not declared in this scope; did you mean 'fin'?
   16 |   string s;cin>>s;
      |            ^~~
      |            fin
a.cc:16:17: error: 's' was not declared in this scope
   16 |   string s;cin>>s;
      |                 ^
a.cc: In instantiation of 'void fin(T) [with T = const char*]':
a.cc:19:23:   required from here
   19 |       if(s[i]=='R')fin("No");
      |                    ~~~^~~~~~
a.cc:12:7: error: 'exit' was not declared in this scope
   12 |   exit(0);
      |   ~~~~^~~
a.cc:1:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
  +++ |+#include <cstdlib>
    1 | v#include <bits/stdc++.h>
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {

	std::ios::sync_with_stdio(0);
	std::cin.tie(NULL);
	std::cout.tie(0);

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

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

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

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

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

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

int main() {
  string s;
  cin>>s;
  for(int i=1; i <= s.size(); i++){
    if((i%2==1 && s.at(i-1) == "L") || (i%2==0 && s.at(i-1) == "R")){
      cout<<"No";
      return 0;
    }
    cout<<"Yes";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if((i%2==1 && s.at(i-1) == "L") || (i%2==0 && s.at(i-1) == "R")){
      |                   ~~~~~~~~~~^~~~~~
a.cc:8:61: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if((i%2==1 && s.at(i-1) == "L") || (i%2==0 && s.at(i-1) == "R")){
      |                                                   ~~~~~~~~~~^~~~~~
a.cc:14:2: error: expected '}' at end of input
   14 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  string s;
  cin>>s;
  for(int i=1; i <= s.size(); i++){
    if((i%2==1 && s.at(i-1)=="L") || (i%2==0 && s.at(i-1)=="L")){
      cout<<"No";
      return 0;
    }
    cout<<"Yes";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if((i%2==1 && s.at(i-1)=="L") || (i%2==0 && s.at(i-1)=="L")){
      |                   ~~~~~~~~~^~~~~
a.cc:8:58: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if((i%2==1 && s.at(i-1)=="L") || (i%2==0 && s.at(i-1)=="L")){
      |                                                 ~~~~~~~~~^~~~~
a.cc:14:2: error: expected '}' at end of input
   14 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C

#include<stdio.h>
#include<string.h>
int main(void){
  char n[100];
  int len;
  bool isno = false;
  scanf("%s",n);
  len = strlen(n);
  for(int i=0;i<len;i++){
    if((i%2==0&&n[i]=='L')||(i%2!=0&&n[i]=='R')){
      printf("No");
      isno=true;
      break;
    }
  }
  if(isno==false){
    printf("Yes");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:3: error: unknown type name 'bool'
    6 |   bool isno = false;
      |   ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include<string.h>
  +++ |+#include <stdbool.h>
    3 | int main(void){
main.c:6:15: error: 'false' undeclared (first use in this function)
    6 |   bool isno = false;
      |               ^~~~~
main.c:6:15: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:6:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:12: error: 'true' undeclared (first use in this function)
   12 |       isno=true;
      |            ^~~~
main.c:12:12: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

#include<stdio.h>
#include<string.h>
int main(void){
  char n[100];
  int len;
  bool isno = false;
  scanf("%s",n);
  len = strlen(n);
  for(int i=0;i<len;i++){
    if((i%2==0&&n[i]=='L')||(i%2!=0&&n[i]=='R')){
      printf("No");
      isno=true;
      break;
    }
  }
  if(isno!=false){
    printf("Yes");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:3: error: unknown type name 'bool'
    6 |   bool isno = false;
      |   ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include<string.h>
  +++ |+#include <stdbool.h>
    3 | int main(void){
main.c:6:15: error: 'false' undeclared (first use in this function)
    6 |   bool isno = false;
      |               ^~~~~
main.c:6:15: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:6:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:12: error: 'true' undeclared (first use in this function)
   12 |       isno=true;
      |            ^~~~
main.c:12:12: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main() {
  string s;
  cin >> s;
  
  string danceMove = "LR";
  for (int i = 0; i < s.length(); i++) {
   	if (danceMove[i%2] != s[i]) {
      cout << "NO";
      break;
    }
  }
  
  if (i == s.length())
    cout << "YES";
}

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

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end() //使うときはsort(all())という感じで
using ll = long long;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   10 |   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 <stdio.h>
#include <stdlib.h>
int main(){
    char input[200];
    double i,num;
    
    for(i=0;input[i]!='\0';i++){
    scanf("%c",&input[i]);
    if(input[i]=='\0'){
        num=i-1;
      break;
    }
    }    
    
    
    
    for(i=num;i>=0;i=i-2){
        if(input[i]=='L'){
            printf("No");
            return 0;
        }
    }
    for(i=num;i>=0;i=i-2){
        
     if(input[i]=='R'){
            printf("No");
            return 0;
    
        }
    } 
        printf("Yes");
 
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:18: error: array subscript is not an integer
    7 |     for(i=0;input[i]!='\0';i++){
      |                  ^
main.c:8:22: error: array subscript is not an integer
    8 |     scanf("%c",&input[i]);
      |                      ^
main.c:9:13: error: array subscript is not an integer
    9 |     if(input[i]=='\0'){
      |             ^
main.c:18:17: error: array subscript is not an integer
   18 |         if(input[i]=='L'){
      |                 ^
main.c:25:14: error: array subscript is not an integer
   25 |      if(input[i]=='R'){
      |              ^
Language: Java

import java.io.IOException;
import java.io.InputStream;
import java.util.Collections;
import java.util.LinkedList;
import java.util.NoSuchElementException;

import utility.FastScanner;

public class Main {
	public static void main(String args[]) {

		FastScanner sc = new FastScanner();
		char n[] = sc.next().toCharArray();

		boolean result = true;
		for (int i = 0; i < n.length; i++) {
			if (n[i] == (((i + 1) % 2 == 0) ? 'R' : 'L')) {
				result = false;
				break;
			}
		}

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

class FastScanner {
	private final InputStream in = System.in;
	private final byte[] buffer = new byte[1024];
	private int ptr = 0;
	private int buflen = 0;

	private boolean hasNextByte() {
		if (ptr < buflen) {
			return true;
		} else {
			ptr = 0;
			try {
				buflen = in.read(buffer);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (buflen <= 0) {
				return false;
			}
		}
            return true;
	}

	private int readByte() {
		if (hasNextByte())
			return buffer[ptr++];
		else
			return -1;
	}

	private static boolean isPrintableChar(int c) {
		return 33 <= c && c <= 126;
	}

	public boolean hasNext() {
		while (hasNextByte() && !isPrintableChar(buffer[ptr]))
			ptr++;
		return hasNextByte();
	}

	public String next() {
		if (!hasNext())
			throw new NoSuchElementException();
		StringBuilder sb = new StringBuilder();
		int b = readByte();
		while (isPrintableChar(b)) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	public long nextLong() {
		if (!hasNext())
			throw new NoSuchElementException();
		long n = 0;
		boolean minus = false;
		int b = readByte();
		if (b == '-') {
			minus = true;
			b = readByte();
		}
		if (b < '0' || '9' < b) {
			throw new NumberFormatException();
            }
		while (true) {
			if ('0' <= b && b <= '9') {
				n *= 10;
				n += b - '0';
			} else if (b == -1 || !isPrintableChar(b)) {
				return minus ? -n : n;
			} else {
				throw new NumberFormatException();
			}
			b = readByte();
            }
        }

	public int nextInt() {
		long nl = nextLong();
		if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
			throw new NumberFormatException();
		return (int) nl;
        }

	public double nextDouble() {
		return Double.parseDouble(next());
	}
}

Compiler output:
Main.java:7: error: package utility does not exist
import utility.FastScanner;
              ^
1 error
Language: C++

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

int main(){
  string s;
  cin>>s;
  int ans=-1;
  for(int i=-1;i<=s.lenght()-2;i+=2){
    if(s.at(i)=='L'){
      ans=0;
    }
  }
  if(ans!=0){
  for(int i=0;i<=n-2;i+=2){
    if(s.at(i)=='R'){
      ans=0;
    }
   }
  }
  if(ans==0){
    cout<<"No"<<endl;
  }else{
    cout<<"Yes"<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenght'; did you mean 'length'?
    9 |   for(int i=-1;i<=s.lenght()-2;i+=2){
      |                     ^~~~~~
      |                     length
a.cc:15:18: error: 'n' was not declared in this scope
   15 |   for(int i=0;i<=n-2;i+=2){
      |                  ^
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 n = strlen(s);
	for (int i = 0;i < n;++i) {
		if (s[i] % 2 == 0) {
			if (s[i] == 'L')cout << "No" << endl;
		}
		if (s[i] % 2 != 0) {
			if (s[i] == 'R')cout << "No" << endl;
		}
		cout << "Yes" << endl;
	}
}

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

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

int main() {
	string s;
	cin >> s;
	int n = strlen(s);
	for (int i = 0;i < n;++i) {
		if (s[i] % 2 == 0) {
			if (s[i] == "L")cout << "No" << endl;
		}
		if (s[i] % 2 != 0) {
			if (s[i] == "R")cout << "No" << endl;
		}
		cout << "Yes" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:24: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    9 |         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)
      |                       ~~~~~~~~~~~~^~~
a.cc:12:34: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |                         if (s[i] == "L")cout << "No" << endl;
a.cc:15:34: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |                         if (s[i] == "R")cout << "No" << endl;
Language: C++

#include<bits/stdc++.h>
#include<algorithm>
#include<math.h>
#include<string>
#include<iostream>
#include<vector>
#include<cstdlib>
using namespace std;
 
template <class T> using V = vector<T>;
 
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
 
const long long INF = 1LL << 60;
 
using ll = long long;
using db = double;
using st = string;
using ch = char;
using bl = bool;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;
using vbl = V<bl>;
 
 
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define rFOR(i,a,b) for(ll i=(a);i>(b);i--)
#define oFOR(i,a,b) for(ll i=(a);i<(b);i+=2)
#define bgn begin()
#define en end()
#define SORT(a) sort((a).bgn,(a).en)
#define REV(a) reverse((a).bgn,(a).en)
#define M(a,b) max(a,b)
#define rM(a,b) min(a,b)
#define fi first
#define se second
#define sz size()
#define gcd(a,b) __gcd(a,b)
#define co(a) cout<<a<<endl;
#define ci(a) cin>>a;
 

vll dp(100100);

ll sum(ll n) {
  ll m=0;
  FOR(i,0,20){
    m+=n%10;
    n/=10;
    if(n==0){
      break;
    }
  }
  return m;
}
 
 
const int MAX = 510000;
const int MOD = 1000000007;
 
long long fac[MAX], finv[MAX], inv[MAX];
 
void Comuse() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}
 
 
#define comuse Comuse()
 
ll combi(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
 
 
 
 
ll lcm(ll a,ll b){
  ll n;
  n=a/gcd(a,b)*b;
  return n;
}
 
 
/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/
 
 
signed main() {
  st s;	
  	ci(s);
  ll n=s.sz.;
  bl b=true;
  FOR(i,0,n){
    if(i%2==0&&s[i]=='L'){
      co("No")
        b=false;
      break;
    }
    else if(i%2==1&&s[i]=='R'){
      co("No")
        b=false;
      break;
    }
  }
  if(b){
    co("Yes")
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:119:13: error: expected unqualified-id before ';' token
  119 |   ll n=s.sz.;
      |             ^
Language: C

#include<stdio.h>
#include<cmath>
#include<string.h>
#include<functional>
#include<algorithm>
int main()
{ 
	int  n;
	char S[110];
	scanf("%s",S);
	n = strlen(S);
	for (int i = 0; i < n; i++)
	{
		scanf("%s", S[i]);
	}
		
	
	for (int i = 0; i < n; i++)
	{	
		if (n % 2 == 0)
		{
			if (S[i] == 'L')
			{
				printf("No");
				return 0;
			}
		}else 
		{
			if (S[i] == 'R')
			{
				printf("No");
				return 0;
			}
		}
	}
	printf("Yes");
	return 0;
}

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

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:27: error: expected primary-expression before ')' token
   14 |             if (S[i]=='R')){
      |                           ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |       if (S.at(i) == "L"){
      |           ~~~~~~~~^~~~~~
a.cc:13:17: error: 'No' was not declared in this scope
   13 |         cout << No << endl;
      |                 ^~
a.cc:19:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |       if (S.at(i) == "R"){
      |           ~~~~~~~~^~~~~~
a.cc:21:17: error: 'No' was not declared in this scope
   21 |         cout << No << endl;
      |                 ^~
a.cc:27:11: error: 'Yes' was not declared in this scope
   27 |   cout << Yes << endl;
      |           ^~~
a.cc: At global scope:
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  string S;
  char X,Y;
  int count,a,b;
  cin >> S;
  
  for(int i = 0;i < S.size();i++){
    a = 2 * i + 1;
    b = 2 * i;
    x = S.at(a);
    Y = S.at(b);
    if(X == 'L')
      count++;
    if(Y == 'R')
      count++;
  }
  if(count == 0)
    cout << "Yes\n";
  else
    cout << "No\n";
  return 0;
}
    
      

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'x' was not declared in this scope
   13 |     x = S.at(a);
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
main () {
  string S;
  cin >> S;
  string q = "No";
  int w = S.size();
  string e = "No";
  if(S.size() < 3) {
    if(S.at(i) == 'R' || S.at(i) == 'U' || S.at(i) == 'D') {
      q = "Yes";
    }
  }
    else {
  for(int i = 0; i < S.size(); i += 2) {
    if(S.at(i) == 'R' || S.at(i) == 'U' || S.at(i) == 'D') {
      q = "Yes";
    }
    else {
      q = "No";
      break;
    }
    if (!(i >= w - 2) && !(S.size() <= 2)) {
     q = "No";
    }
  }
  for(int j = 1; j < S.size(); j += 2) {
    if(S.at(j) == 'L' || S.at(j) == 'U' || S.at(j) == 'D') {
      e = "Yes";
    }
    else {
      e = "No";
      break;
    }
      if (!(j >= w - 2) && !(S.size() <= 2)) {
    e = "No";
      }
  }
    }
  
  if(q == "Yes" && e == "Yes") {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main () {
      | ^~~~
a.cc: In function 'int main()':
a.cc:10:13: error: 'i' was not declared in this scope
   10 |     if(S.at(i) == 'R' || S.at(i) == 'U' || S.at(i) == 'D') {
      |             ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: expected initializer before '==' token
    9 |   bool f == false;
      |          ^~
a.cc:15:9: error: 'f' was not declared in this scope
   15 |         f = true;
      |         ^
a.cc:20:9: error: 'f' was not declared in this scope
   20 |         f = true;
      |         ^
a.cc:26:6: error: 'f' was not declared in this scope
   26 |   if(f == true){
      |      ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |   if(moji != "\0"){
      |      ~~~~~^~~~~~~
a.cc:17:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |         if (moji == "R" || moji == "U" || moji =="D"){
      |             ~~~~~^~~~~~
a.cc:17:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |         if (moji == "R" || moji == "U" || moji =="D"){
      |                            ~~~~~^~~~~~
a.cc:17:48: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |         if (moji == "R" || moji == "U" || moji =="D"){
      |                                           ~~~~~^~~~~
a.cc:27:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   27 |         if (moji == "L" || moji == "U" || moji =="D"){
      |             ~~~~~^~~~~~
a.cc:27:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   27 |         if (moji == "L" || moji == "U" || moji =="D"){
      |                            ~~~~~^~~~~~
a.cc:27:48: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   27 |         if (moji == "L" || moji == "U" || moji =="D"){
      |                                           ~~~~~^~~~~
Language: C++

#include <iostream>
#include "cstdio"
#include<iomanip>
using namespace std;
int main()
{
	char s[105];
	bool test=false;
	scanf("%s",s);
	for(int i=0;i<strlen(s);i++){
		if(i%2==0){
			switch(s[i]){
				case 'L':
				case 'U':
				case 'D':
				{
					test=true;
					break;
				}
				default:test=false;
			}
		}
		if(i%2!=0){
			switch(s[i]){
				case 'R':
				case 'U':
				case 'D':
				{
					test=true;
					break;
				}
				default:test=false;
			}
		}
	}
	if(test){
		printf("Yes\n");
	}
	else printf("No\n");
	return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: expected initializer before '<' token
   13 |   char moji < bun[i];
      |             ^
a.cc:14:6: error: 'moji' was not declared in this scope
   14 |   if(moji != "\0"){
      |      ^~~~
Language: C++

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

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

#include <math.h>
int main(void){
    char input[101];
    int i,num;
    
    for(i=0;input[i]!='\0';i++){
    scanf("%c",input[i]);
    if(input[i]=='\0'){
        num=i-1;
    }
    }    
    
    
    
    for(i=0;i<num;i=i+2){
        if(input[i]!='L'){
            printf("No");
            exit(0);
        }
    }
    for(i=1;i<num;i++){
        
     if(input[i]!='R'){
            printf("No");
            exit(0);
    
        }
    } 
        printf("Yes");

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'scanf' was not declared in this scope
    7 |     scanf("%c",input[i]);
      |     ^~~~~
a.cc:17:13: error: 'printf' was not declared in this scope
   17 |             printf("No");
      |             ^~~~~~
a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    1 | #include <math.h>
  +++ |+#include <cstdio>
    2 | int main(void){
a.cc:24:13: error: 'printf' was not declared in this scope
   24 |             printf("No");
      |             ^~~~~~
a.cc:24:13: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:29:9: error: 'printf' was not declared in this scope
   29 |         printf("Yes");
      |         ^~~~~~
a.cc:29:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <bits/stdc++.h>
#include <string>
using namespace std;
 
int main() {
  int i=1;
  string moji[];
  int flag1=1;
  int flag2=1;
  cin >> moji[i];
 
while(i<100){
if(moji[i] != "\0"){
  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;
    	}
  }
  i=i+1;
}
}
 
if (flag1 == 1 || flag2 ==1) {
    cout << "Yes" << endl;
  }
else{
      cout << "No" << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: array size missing in 'moji'
    7 |   string moji[];
      |          ^~~~
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;
    vector<int> A(S.size());
    if(S.size() >= 3) {
    if(S.size() % 2 == 1) {
        rep(i, S.size()-2) {
            if(S[2*i] == 'R') A[2*i] = 1;
            if(S[2*i] == 'U') A[2*i] = 1;
            if(S[2*i] == 'D') A[2*i] = 1;
            }
        rep(i, S.size()-3) {
            if(S[2*i+1] == 'L') A[2*i+1] = 1;
            if(S[2*i+1] == 'U') A[2*i+1] = 1;
            if(S[2*i+1] == 'D') A[2*i+1] = 1;
        }
        }
    if(S.size() % 2 == 0) {
        rep(i, S.size()-3) {
            if(S[2*i] == 'R') A[2*i] = 1;
            if(S[2*i] == 'U') A[2*i] = 1;
            if(S[2*i] == 'D') A[2*i] = 1;
            if(S[2*i+1] == 'L') A[2*i+1] = 1;
            if(S[2*i+1] == 'U') A[2*i+1] = 1
            if(S[2*i+1] == 'D') A[2*i+1] = 1;
        }
        }
    } else if (S.size() == 1) {
        if(S[0] == 'R') A[0] = 1;
        if(S[0] == 'U') A[0] = 1;
        if(S[0] == 'D') A[0] = 1;
    } else if(S.size() == 2) {
        if(S[0] == 'R') A[0] = 1;
        if(S[0] == 'U') A[0] = 1;
        if(S[0] == 'D') A[0] = 1;
        if(S[1] == 'L') A[1] = 1;
        if(S[1] == 'U') A[1] = 1;
        if(S[1] == 'D') A[1] = 1;
    }
    int sum=0;

    rep(i, A.size()) sum+=A[i];

    if(sum == A.size()) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:45: error: expected ';' before 'if'
   28 |             if(S[2*i+1] == 'U') A[2*i+1] = 1
      |                                             ^
      |                                             ;
   29 |             if(S[2*i+1] == 'D') A[2*i+1] = 1;
      |             ~~
Language: C++

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

//奇数の文字を取り出して判定
//偶数の文字を取り出して判定

int main(){
  string step;
  cin >> step;
  bool a =false;
  for(int i=0;i<step.size();i++){
    if(i%2 == 0){
      if(step.at(i)=='R'|| step.at(i)=='U'|| step.at(i)=='D'){
        a =true;
      }else {a=false; break;}}
    else if(i%2 == 1){
      if(step.at(i)=='L'|| step.at(i)=='U'|| step.at(i)=='D'){
        a =true;
        }else {a = false; break}}}
    if(a){
      cout << "Yes" << endl;
    }else{
      cout << "No" << endl;
    }
 }
   

Compiler output:
a.cc: In function 'int main()':
a.cc:19:32: error: expected ';' before '}' token
   19 |         }else {a = false; break}}}
      |                                ^
      |                                ;
Language: C++

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

//奇数の文字を取り出して判定
//偶数の文字を取り出して判定

int main(){
  string step;
  cin >> step;
  bool a =false;
  for(int i=0;i<step.size();i++){
    if(i%2 == 0){
      if(step.at(i)=='R'|| step.at(i)=='U'|| step.at(i)=='D'){
        a =true;
      }else {a=false break;}}
    else if(i%2 == 1){
      if(step.at(i)=='L'|| step.at(i)=='U'|| step.at(i)=='D'){
        a =true;
        }else {a = false break}}}
    if(a){
      cout << "Yes" << endl;
    }else{
      cout << "No" << endl;
    }
 }
   

Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: expected ';' before 'break'
   15 |       }else {a=false break;}}
      |                     ^~~~~~
      |                     ;
a.cc:19:25: error: expected ';' before 'break'
   19 |         }else {a = false break}}}
      |                         ^~~~~~
      |                         ;
Language: C++

v#include <bits/stdc++.h>

#define f first
#define s second

#define pb push_back
#define mp make_pair

#define ll long long
#define pii pair<int, int>
#define all(v) v.begin(), v.end()
#define sz(v) int(v.size())

using namespace std;

const int MAXN = (int) 2e5 + 10;
const int INF = (int) 2e9 + 7;



int main() {
    #ifdef sony
        freopen("input.txt", "r", stdin);
    #endif // sony
    string s;
    cin >> s;
    for (int i = 0; i < sz(s); i++) {
        if (i % 2 && (s[i] != 'L' && s[i] != 'U' && s[i] != 'D')) cout << "No", exit(0);
        if (i % 2 == 0 && (s[i] != 'R' && s[i] != 'U' && s[i] != 'D')) cout << "No", exit(0);

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


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include <bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:25:5: error: 'string' was not declared in this scope
   25 |     string s;
      |     ^~~~~~
a.cc:26:5: error: 'cin' was not declared in this scope
   26 |     cin >> s;
      |     ^~~
a.cc:4:11: error: 'second' was not declared in this scope
    4 | #define s second
      |           ^~~~~~
a.cc:26:12: note: in expansion of macro 's'
   26 |     cin >> s;
      |            ^
a.cc:28:67: error: 'cout' was not declared in this scope
   28 |         if (i % 2 && (s[i] != 'L' && s[i] != 'U' && s[i] != 'D')) cout << "No", exit(0);
      |                                                                   ^~~~
a.cc:28:81: error: 'exit' was not declared in this scope
   28 |         if (i % 2 && (s[i] != 'L' && s[i] != 'U' && s[i] != 'D')) cout << "No", exit(0);
      |                                                                                 ^~~~
a.cc:1:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
  +++ |+#include <cstdlib>
    1 | v#include <bits/stdc++.h>
a.cc:29:72: error: 'cout' was not declared in this scope
   29 |         if (i % 2 == 0 && (s[i] != 'R' && s[i] != 'U' && s[i] != 'D')) cout << "No", exit(0);
      |                                                                        ^~~~
a.cc:29:86: error: 'exit' was not declared in this scope
   29 |         if (i % 2 == 0 && (s[i] != 'R' && s[i] != 'U' && s[i] != 'D')) cout << "No", exit(0);
      |                                                                                      ^~~~
a.cc:29:86: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
a.cc:32:5: error: 'cout' was not declared in this scope
   32 |     cout << "Yes";
      |     ^~~~
Language: Java

public class Main{
    public static void main(String[] args){
    String S ="abababa";
    // char c1 = S.substring(int i%2==0);

        for(int i = 0; i < S.length(); i++){
            // char c = S.charAt(i);
            if (i%2  == 1){
                if (S.charAt(i).equals("R") && S.charAt(i).equals("U") &&S.charAt(i).equals("D"));
            System.out.println("Yes");
            } else if(S.charAt(i).equals("L") && S.charAt(i).equals("U") &&S.charAt(i).equals("D")){
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }
        }
    }
}

Compiler output:
Main.java:9: error: char cannot be dereferenced
                if (S.charAt(i).equals("R") && S.charAt(i).equals("U") &&S.charAt(i).equals("D"));
                               ^
Main.java:9: error: char cannot be dereferenced
                if (S.charAt(i).equals("R") && S.charAt(i).equals("U") &&S.charAt(i).equals("D"));
                                                          ^
Main.java:9: error: char cannot be dereferenced
                if (S.charAt(i).equals("R") && S.charAt(i).equals("U") &&S.charAt(i).equals("D"));
                                                                                    ^
Main.java:11: error: char cannot be dereferenced
            } else if(S.charAt(i).equals("L") && S.charAt(i).equals("U") &&S.charAt(i).equals("D")){
                                 ^
Main.java:11: error: char cannot be dereferenced
            } else if(S.charAt(i).equals("L") && S.charAt(i).equals("U") &&S.charAt(i).equals("D")){
                                                            ^
Main.java:11: error: char cannot be dereferenced
            } else if(S.charAt(i).equals("L") && S.charAt(i).equals("U") &&S.charAt(i).equals("D")){
                                                                                      ^
6 errors
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: 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;
typedef long long ll;
 
int main() {
  
  int n; 
  
  string one;
  string two;
  string three;
  
  
  vector<int> s(n);
  rep(i,n) cin >> s[i];
  
  for (int i = 0; i < n; i++) {
    if (i%2 == 0 && s[i] == 'R'|| i%2 == 0 && s[i] == 'U' || i%2 == 0 && s[i] == 'D') {
      one = um;
    }
    
    
    
    else if (i%2 != 0 && s[i] == 'L' || i%2 != 0 && s[i] == 'U' || i%2 != 0 && s[i] == 'D'){
      
      two = um;
    }
    
     
    
  }
    
    if(one == um && two == um){
    
    cout << "Yes" << endl;
    
    
  }
  
  else{
      cout << "No" << endl;
      
  }
  
  return 0;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:20:13: error: 'um' was not declared in this scope; did you mean 'tm'?
   20 |       one = um;
      |             ^~
      |             tm
a.cc:27:13: error: 'um' was not declared in this scope; did you mean 'tm'?
   27 |       two = um;
      |             ^~
      |             tm
a.cc:34:15: error: 'um' was not declared in this scope; did you mean 'tm'?
   34 |     if(one == um && two == um){
      |               ^~
      |               tm
Language: Java

//import java.util.*;
//import java.io.*;
//
//class Main {
//    public static String LongestWord(String sen) {
//
//        char[] a= sen.toCharArray();
//        int k1=0,  temp, len=0;
//        for(int i=0; i< a.length; i++){
//            if("a[i]" != " " && ((a[i] >= 65 && a[i]<= (char)90) || (a[i] >= (char)97 && a[i]<= (char)122)) ){
//                k1++;
//
//            }
//            else{
//                if(k1 > len ){
//                    len = k1;
//                    temp= i;
//                }
//            }
//        }
//        String sent;
//        for(int i= temp-len-1; i<temp; i++ ){
//            sent = a[i];
//        }
//
//        return sent;
//
//    }
//
//    public static void main (String[] args) {
//        // keep this function call here
//        Scanner s = new Scanner(System.in);
//        System.out.print(LongestWord(s.nextLine()));
//    }
//
//}
//
package com.company;
import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

import java.util.Scanner;

class Syllabus
{
    public static void main(String[] arg)
    {
        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        char[] a= S.toCharArray();
        boolean flag = true;
        for (int i = 0; i < S.length(); i++) {

            if(i%2 == 0 && (a[i] == 'R' || a[i] == 'U' || a[i] == 'D')) {
                continue;
            }
            else if(i%2 == 1 && (a[i] == 'L' || a[i] == 'U' || a[i] == 'D')){
                continue;
            }

            else {
               
                flag = false;
                break;
            }
        }
        if(flag){
            System.out.println("YES");
        }
        else{
            System.out.println("NO");
        }

    }
}


Compiler output:
Main.java:39: error: package com.sun.scenario.effect.impl.sw.sse does not exist
import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;
                                          ^
1 error
Language: C++

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

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

    string s;
    cin >> s;
    int n = s.size();
    for(int i = 0; i < n; ++i){

        if((i + 1) & 1){
            if(!(s[i] == 'R' || s[i] == 'U' || s[i] == 'D'))
            {
                cout << "No\n";
                return 0;
            }
        }
        else if{
            if(!(s[i] == 'L' || s[i] == 'U' || s[i] == 'D')){
                cout << "No\n";
                return 0;
            }
        }
    }
    cout << "Yes\n";

return 0;}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:16: error: expected '(' before '{' token
   20 |         else if{
      |                ^
      |                (
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
 
int main() {
  
  int n; 
  
  string one;
  string two;
  string three;
  
  
  vector<int> s(n);
  rep(i,n) cin >> s[i];
  
  for (int i = 0; i < n; i++) {
    if (i%2 == 0 && s[i] == 'R'|| i%2 == 0 && s[i] == 'U' || i%2 == 0 && s[i] == 'D') {
      one = um;
    }
    
    
    
    else if (i%2 != 0 && s[i] == 'L' || i%2 != 0 && s[i] == 'U' || i%2 != 0 && s[i] == 'D'){
      
      two = um;
    }
    
     
    else{
      
      three = yeah;
    }
  }
    
    if(one == um && two == um){
    
    cout << "Yes" << endl;
    
    
  }
  
  else{
      cout << "No" << endl;
      
  }
  
  return 0;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:20:13: error: 'um' was not declared in this scope; did you mean 'tm'?
   20 |       one = um;
      |             ^~
      |             tm
a.cc:27:13: error: 'um' was not declared in this scope; did you mean 'tm'?
   27 |       two = um;
      |             ^~
      |             tm
a.cc:33:15: error: 'yeah' was not declared in this scope
   33 |       three = yeah;
      |               ^~~~
a.cc:37:15: error: 'um' was not declared in this scope; did you mean 'tm'?
   37 |     if(one == um && two == um){
      |               ^~
      |               tm
Language: C++

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

int main()
{
  string S;
  bool a = false;
  cin >> S;
  
  for (int i = 0; i < S.size(); ++i)
  {
    char 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:16:15: warning: multi-character character constant [-Wmultichar]
   16 |       cout << 'No' << endl;
      |               ^~~~
a.cc: In function 'int main()':
a.cc:14:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     if ((c == 'L' && o) || (c == "R" && !o))
      |                             ~~^~~~~~
Language: C++

# include <bits/stdc++.h>
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: In function 'int main()':
a.cc:14:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     if ((c == "L" && o) || (c == "R" && !o))
      |          ~~^~~~~~
a.cc:14:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |     if ((c == "L" && o) || (c == "R" && !o))
      |                             ~~^~~~~~
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 == 'R') == true || (n == 'U') == true || (n == 'D') == true){
      	cnt1 += 1;
      }
    }
     for(int i = 1; i < len  ;i += 2){
      String n = str.charAt(i);
      if((n =='L') == true || (n == 'U') == true || (n == '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:17: error: incompatible types: char cannot be converted to String
      String n = str.charAt(i);
                           ^
Main.java:18: error: bad operand types for binary operator '=='
      if((n =='L') == true || (n == 'U') == true || (n == 'D') == true){
            ^
  first type:  String
  second type: char
Main.java:18: error: bad operand types for binary operator '=='
      if((n =='L') == true || (n == 'U') == true || (n == 'D') == true){
                                 ^
  first type:  String
  second type: char
Main.java:18: error: bad operand types for binary operator '=='
      if((n =='L') == true || (n == 'U') == true || (n == 'D') == true){
                                                       ^
  first type:  String
  second type: char
4 errors