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

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

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

#include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <cmath>
#define rep(i,cc,n) for(int i=cc;i<=n;++i)
#define drep(i,cc,n) for(int i=cc;i>=n;--i)
typedef long long ll;
using namespace std;
int main(){
    string s;
    cin>>s;
    bool ans = true;
    rep(i,0,s.size()-1){
        if((i+1)%2==1){
            if(w[i]=='L'){
                flag = false;
                break;
            }
        }
        else{
            if(w[i]=='R'){
                flag = false;
                break;
            }
        }
    }
    if(flag) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: 'w' was not declared in this scope
   16 |             if(w[i]=='L'){
      |                ^
a.cc:17:17: error: 'flag' was not declared in this scope
   17 |                 flag = false;
      |                 ^~~~
a.cc:22:16: error: 'w' was not declared in this scope
   22 |             if(w[i]=='R'){
      |                ^
a.cc:23:17: error: 'flag' was not declared in this scope
   23 |                 flag = false;
      |                 ^~~~
a.cc:28:8: error: 'flag' was not declared in this scope
   28 |     if(flag) cout<<"Yes"<<endl;
      |        ^~~~
Language: C++

 #include <stdio.h> 
#include <string.h>
 int main(void){ 
   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:21:13: error: expected '}' at end of input
   21 |    return 0;
      |             ^
a.cc:3:16: note: to match this '{'
    3 |  int main(void){
      |                ^
Language: C++

s = input()
odd = ["R", "U", "D"]
even = ["L", "U", "D"]
for i in list(s[::2]):
    if i not in odd: 
        print("No")
        exit()
for i in list(s[1::2]):
    if i not in even: 
        print("No")
        exit()
print("Yes")


Compiler output:
a.cc:1:1: error: 's' does not name a type
    1 | s = input()
      | ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:6:11: error: conflicting types for 'a'; have 'int'
    6 |   int i,n,a,b;
      |           ^
main.c:4:8: note: previous declaration of 'a' with type 'char[101]'
    4 |   char a[101];
      |        ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:9:52: error: lvalue required as increment operand
    9 |     if(i%2==1&&(a[i]=='R'||a[i]=='U'||a[i]=='D')) a++;
      |                                                    ^~
main.c:10:51: error: 'b' undeclared (first use in this function)
   10 |     if(i%2==0&&(a[i]=='L'||a[i]=='U'||a[i]=='D')) b++;
      |                                                   ^
main.c:10:51: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int)(n); ++i)
using P = pair<int,int>;
using ll = long long;
static const int INF = 10000000;
static const ll MOD = 1000000007;

ll gcd(ll a, ll b){return b!=0 ? gcd(b, a%b) : a;}
ll lcm(ll a, ll b){return a / gcd(a, b) * b;}

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



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

#include<bits/stdc++.h>
using namespace std;
#define Yes(n) cout<<(n)?"Yes":"No"
int main()
{
    string s;cin>>s;
    bool yes = true;
    for(int i = 0;i < s.length;i++)
    {
        if(i % 2 == 0)
        {
            if(s[i] == 'L')
                yes = false;
        }
        else
        {
            if(s[i] == 'R')
                yes = false;
        }
    }
    Yes(yes);
}

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

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

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

  bool odd = true;
  bool even = true;
  
  for (int = 0; i < S.size(); i++) {
    if (S.at(i) % 2 == 1) {
      if (S.at(i) == 'L') {
        odd = false;
      }
    }
    if (S.at(i) % 2 == 0) {
      if (S.at(i) == 'R') {
        even = false;
      }
    }
  }
  
  if(odd == 1 && even == 1) {
    cout << "Yes" << endl;
  }
  else cout << "No" << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: expected unqualified-id before '=' token
   11 |   for (int = 0; i < S.size(); i++) {
      |            ^
a.cc:11:11: error: expected ';' before '=' token
   11 |   for (int = 0; i < S.size(); i++) {
      |           ^~
      |           ;
a.cc:11:12: error: expected primary-expression before '=' token
   11 |   for (int = 0; i < S.size(); i++) {
      |            ^
a.cc:11:17: error: 'i' was not declared in this scope
   11 |   for (int = 0; i < S.size(); i++) {
      |                 ^
a.cc:11:29: error: expected ')' before ';' token
   11 |   for (int = 0; i < S.size(); i++) {
      |       ~                     ^
      |                             )
a.cc:11:31: error: 'i' was not declared in this scope
   11 |   for (int = 0; i < S.size(); i++) {
      |                               ^
Language: C++

#include "stdafx.h" //プリインクルードされている場合はコメントアウト
#include <iostream>
#include <string>
#include <cstdlib> //func147bでインクルード
#include <vector>  //func146b
using namespace std;

size_t length(const string& str) {
    return str.length();
}

void func141b()
{
    string s, tmp;
    vector<char> v = { 'L','R' };
    tmp = "Yes";
    cin >> s;
    for (int i = 0; i < length(s); ++i) {
        if (s[i] == v[i % 2]) tmp = "No";
    }
    cout << tmp << endl;
}

int main(){
  func141b();
  return 0;
}

Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h" //プリインクルードされている場合はコメントアウト
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(s,i, n) for (int i = (int)s; i < (int)(n); i++)
#define pb push_back
typedef long long ll;
  
int main(){
    string s;
    cin>>s;
    int l =s.length();
    bool check=true;
    rep(i,n){
        if(i%2==0){
            if(s[i]=='L')check=false;
        }else{
            if(s[i]=='R')check=false;
        }
    }
    string ans=check?"Yes":"No";
    cout<<ans<<endl;
    return 0;
}

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

// AtCoder140150b.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>
#include <string>


using namespace std;

void func141b (){
	string s;
	char check[2] = { 'L', 'R' };
	cin >> s;
	for (int i = 0; i < s.size(); i++) {
		if (s[i] == check[i % 2]) {
			cout << "No\n";
			return;
		}
	}
	cout << "Yes\n";
}

int main()
{
	func141b();
	return 0;	
}



Compiler output:
a.cc:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

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


int main(){
   cin.tie(0);
   ios::sync_with_stdio(false);
   cout << fixed << setprecision(20);
   
   //int n,ans; cin >> n;
   string s,ans="No"; cin >> s;
   for(int i=1; i<s.size();i+=2){
   	if(s[i]=='R' or s[i]=='U' s[i]=='D') ans="Yes";
   }
   for(int i=0; i<s.size();i+=2){
   	if(s[i]=='L' or s[i]=='U' s[i]=='D') ans="Yes";
   }
   //vector<int> a(n),b(n),c(n),d(n);

   cout << ans << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:15:34: error: expected ')' before 's'
   15 |         if(s[i]=='R' or s[i]=='U' s[i]=='D') ans="Yes";
      |           ~                      ^~
      |                                  )
a.cc:18:34: error: expected ')' before 's'
   18 |         if(s[i]=='L' or s[i]=='U' s[i]=='D') ans="Yes";
      |           ~                      ^~
      |                                  )
Language: C++

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


int main(){
   cin.tie(0);
   ios::sync_with_stdio(false);
   cout << fixed << setprecision(20);
   
   //int n,ans; cin >> n;
   string s,ans="No"; cin >> s;
   for(int i=1; i<s.size();i+=2;){
   	if(s[i]=='R' or s[i]=='U' s[i]=='D') ans="Yes";
   }
   for(int i=0; i<s.size();i+=2;){
   	if(s[i]=='L' or s[i]=='U' s[i]=='D') ans="Yes";
   }
   //vector<int> a(n),b(n),c(n),d(n);

   cout << ans << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:14:32: error: expected ')' before ';' token
   14 |    for(int i=1; i<s.size();i+=2;){
      |       ~                        ^
      |                                )
a.cc:14:33: error: expected primary-expression before ')' token
   14 |    for(int i=1; i<s.size();i+=2;){
      |                                 ^
a.cc:17:32: error: expected ')' before ';' token
   17 |    for(int i=0; i<s.size();i+=2;){
      |       ~                        ^
      |                                )
a.cc:17:33: error: expected primary-expression before ')' token
   17 |    for(int i=0; i<s.size();i+=2;){
      |                                 ^
Language: Java

import java.util.*;
import java.io.*;
public class Main
{
    public static void main(String []args) throws IOException {
    	FastScanner in  = new FastScanner(System.in);
    	PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)), false);
    	solve(in, out);
    	in.close();
    	out.close();
    }
    static long gcd(long a, long b){ return (b==0) ? a : gcd(b, a%b); }
    static int gcd(int a, int b){ return (b==0) ? a : gcd(b, a%b); }
    static class FastScanner{
	BufferedReader reader;
	StringTokenizer st;
	FastScanner(InputStream stream){reader=new BufferedReader(new InputStreamReader(stream));st=null;}
	String next(){while(st == null || !st.hasMoreTokens()){try{String line = reader.readLine();if(line == null){return null;}
	     st = new StringTokenizer(line);}catch (Exception e){throw new RuntimeException();}}return st.nextToken();}
	String nextLine()  {String s=null;try{s=reader.readLine();}catch(IOException e){e.printStackTrace();}return s;}
	int    nextInt()   {return Integer.parseInt(next());}
	long   nextLong()  {return Long.parseLong(next());}
	double nextDouble(){return Double.parseDouble(next());}
	char   nextChar()  {return next().charAt(0);}
	int[]  nextIntArray(int n)         {int[] arr= new int[n];   int i=0;while(i<n){arr[i++]=nextInt();}  return arr;}
	long[] nextLongArray(int n)        {long[]arr= new long[n];  int i=0;while(i<n){arr[i++]=nextLong();} return arr;}
	int[]  nextIntArrayOneBased(int n) {int[] arr= new int[n+1]; int i=1;while(i<=n){arr[i++]=nextInt();} return arr;}
	long[] nextLongArrayOneBased(int n){long[]arr= new long[n+1];int i=1;while(i<=n){arr[i++]=nextLong();}return arr;}
	void   close(){try{reader.close();}catch(IOException e){e.printStackTrace();}}
    }
    
    /********* SOLUTION STARTS HERE ************/
    
    private static void solve(FastScanner in, PrintWriter out){
        String s = in.nextInt();
        int n = s.length(),f=0;
        for(int i=0;i<n;i++){
            if(i%2==0){
                if(s.charAt(i)=='L' || s.charAt(i)=='U' || s.charAt(i)=='D'){}
                else f=l;
            }else{
                if(s.charAt(i)=='R' || s.charAt(i)=='U' || s.charAt(i)=='D'){}
                else f=l;
            }
        }
        out.println(f==0?"Yes":"No");
    }
    
    /************* SOLUTION ENDS HERE **********/
}

Compiler output:
Main.java:35: error: incompatible types: int cannot be converted to String
        String s = in.nextInt();
                             ^
Main.java:40: error: cannot find symbol
                else f=l;
                       ^
  symbol:   variable l
  location: class Main
Main.java:43: error: cannot find symbol
                else f=l;
                       ^
  symbol:   variable l
  location: class Main
3 errors
Language: C++

S = input()
flag = 0
for i in range(N):
	if i%2 = 0 and (S[i] not in ['R', 'U', 'D']):
		flag = 1
	if i%2 = 1 and (S[i] not in ['L', 'U', 'D']):
		flag = 1
if flag == 0:
	print('Yes')
else:
	print('No')

Compiler output:
a.cc:9:15: warning: multi-character character constant [-Wmultichar]
    9 |         print('Yes')
      |               ^~~~~
a.cc:11:15: warning: multi-character character constant [-Wmultichar]
   11 |         print('No')
      |               ^~~~
a.cc:1:1: error: 'S' does not name a type
    1 | S = input()
      | ^
Language: Java

import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] a = s.next().toCharArray();
		
		for (int i=0; i<a.length; i++) {
			int t = i%2+a[i];
			if (t=='S' || t=='L') {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
		char[] a = s.next().toCharArray();
		           ^
  symbol:   variable s
  location: class Main
1 error
Language: Java

import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		char[] a = s.next().toCharArray();
		
		for (int i=0; i<a.length; i++) {
			int t = i%2+a[i];
			if (t=='S' || t=='L') {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	}
}


Compiler output:
Main.java:7: error: cannot find symbol
		char[] a = s.next().toCharArray();
		           ^
  symbol:   variable s
  location: class Main
1 error
Language: Java

import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		char[] a = s.next().toCharArray();
		
		for (int i=0; i<a.length; i++) {
			int t = i%2+a[i];
			if (t=="S" || t=="L") {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	}
}

Compiler output:
Main.java:7: error: cannot find symbol
		char[] a = s.next().toCharArray();
		           ^
  symbol:   variable s
  location: class Main
Main.java:11: error: bad operand types for binary operator '=='
			if (t=="S" || t=="L") {
			     ^
  first type:  int
  second type: String
Main.java:11: error: bad operand types for binary operator '=='
			if (t=="S" || t=="L") {
			               ^
  first type:  int
  second type: String
3 errors
Language: Java


import java.util.*;


public class Main {
	public static void main(String[] args) {
	
   Scanner sc = new Scanner(System.in);
   
    String S = sc.next();
    int n = S.length();
    int ans = 1;
    
    for(int i=0; i<N; i++) {
    	if(i % 2 == 0) {
    		if((S.charAt(i) != "R") && (S.charAt(i) != "U") && (S.charAt(i) != "D")) {
    			ans = 0;
    		}
    	}
    	if(i % 2 == 1) {
    		if((S.charAt(i) != "L") && (S.charAt(i) != "U") && (S.charAt(i) != "D")) {
    			ans = 0;
    	}
    }
    }
}
}




Compiler output:
Main.java:14: error: cannot find symbol
    for(int i=0; i<N; i++) {
                   ^
  symbol:   variable N
  location: class Main
Main.java:16: error: bad operand types for binary operator '!='
    		if((S.charAt(i) != "R") && (S.charAt(i) != "U") && (S.charAt(i) != "D")) {
    		                ^
  first type:  char
  second type: String
Main.java:16: error: bad operand types for binary operator '!='
    		if((S.charAt(i) != "R") && (S.charAt(i) != "U") && (S.charAt(i) != "D")) {
    		                                        ^
  first type:  char
  second type: String
Main.java:16: error: bad operand types for binary operator '!='
    		if((S.charAt(i) != "R") && (S.charAt(i) != "U") && (S.charAt(i) != "D")) {
    		                                                                ^
  first type:  char
  second type: String
Main.java:21: error: bad operand types for binary operator '!='
    		if((S.charAt(i) != "L") && (S.charAt(i) != "U") && (S.charAt(i) != "D")) {
    		                ^
  first type:  char
  second type: String
Main.java:21: error: bad operand types for binary operator '!='
    		if((S.charAt(i) != "L") && (S.charAt(i) != "U") && (S.charAt(i) != "D")) {
    		                                        ^
  first type:  char
  second type: String
Main.java:21: error: bad operand types for binary operator '!='
    		if((S.charAt(i) != "L") && (S.charAt(i) != "U") && (S.charAt(i) != "D")) {
    		                                                                ^
  first type:  char
  second type: String
7 errors
Language: C++

/*B - Tap Dance*/

#include <bits/Stdc++.h>

using namespace std;

int main(){

	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	string cad;
	cin >> cad;

	bool easily = true;

	for (int i = 0; i < cad.size(); ++i)
	{
		if((i + 1) % 2 == 0 and cad[i] == 'R'){
			easily = false;
			break;
		}

		if((i + 1) % 2 == 1 and cad[i] == 'L'){
			easily = false;
			break;
		}
	}

	if(easily)
		cout << "Yes";
	else
		cout << "No";


	return 0;
}



Compiler output:
a.cc:3:10: fatal error: bits/Stdc++.h: No such file or directory
    3 | #include <bits/Stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int main() {
  string TapDanceMove;
  char buff;
  cin >> TapDanceMove;
  for (int i = 1; i <= TapDanceMove.size(); i++) {
    buff = TapDanceMove[i-1];
    //cout << i << "文字目: " << buff << endl;
    if (i % 2 == 0) {
      if (buff == 'R') {
        cout << "No";
        return;
      }
    } else {
      if (buff == 'L') {
        cout << "No" << endl;
        return;
      }
    }
  }
  cout << "Yes" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   15 |         return;
      |         ^~~~~~
a.cc:20:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   20 |         return;
      |         ^~~~~~
Language: Java

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

int main() {
  string TapDanceMove;
  char buff;
  cin >> TapDanceMove;
  for (int i = 1; i <= TapDanceMove.size(); i++) {
    buff = TapDanceMove[i-1];
    //cout << i << "文字目: " << buff << endl;
    if (i % 2 == 0) {
      if (buff == 'R') {
        cout << "No";
        return;
      }
    } else {
      if (buff == 'L') {
        cout << "No" << endl;
        return;
      }
    }
  }
  cout << "Yes" << endl;
  return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:2: error: illegal character: '#'
#include <string>
^
Main.java:8: error: not a statement
  cin >> TapDanceMove;
      ^
Main.java:14: error: not a statement
        cout << "No";
             ^
Main.java:19: error: not a statement
        cout << "No" << endl;
                     ^
Main.java:24: error: not a statement
  cout << "Yes" << endl;
                ^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
int main() {
^
  (use --enable-preview to enable unnamed classes)
7 errors
Language: Java

#include "stdafx.h"
#include <iostream>
#include <string>
#include <cstring>
using namespace std;

int main() {
  string TapDanceMove;
  char buff;
  cin >> TapDanceMove;
  for (int i = 1; i <= TapDanceMove.size(); i++) {
    buff = TapDanceMove[i-1];
    //cout << i << "文字目: " << buff << endl;
    if (i % 2 == 0) {
      if (buff == 'R') {
        cout << "No";
        return;
      }
    } else {
      if (buff == 'L') {
        cout << "No" << endl;
        return;
      }
    }
  }
  cout << "Yes" << endl;
  return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include "stdafx.h"
^
Main.java:1: error: class, interface, enum, or record expected
#include "stdafx.h"
         ^
Main.java:2: error: illegal character: '#'
#include <iostream>
^
Main.java:3: error: illegal character: '#'
#include <string>
^
Main.java:4: error: illegal character: '#'
#include <cstring>
^
Main.java:10: error: not a statement
  cin >> TapDanceMove;
      ^
Main.java:16: error: not a statement
        cout << "No";
             ^
Main.java:21: error: not a statement
        cout << "No" << endl;
                     ^
Main.java:26: error: not a statement
  cout << "Yes" << endl;
                ^
Main.java:7: error: unnamed classes are a preview feature and are disabled by default.
int main() {
^
  (use --enable-preview to enable unnamed classes)
10 errors
Language: Java

#include "stdafx.h"
#include <iostream>
#include <string>
#include <cstring>
using namespace std;

string TapDanceMove;
char buff;
cin >> TapDanceMove;
for (int i = 1; i <= TapDanceMove.size(); i++) {
  buff = TapDanceMove[i-1];
  //cout << i << "文字目: " << buff << endl;
  if (i % 2 == 0) {
    if (buff == 'R') {
      cout << "No";
      return;
    }
  } else {
    if (buff == 'L') {
      cout << "No" << endl;
      return;
    }
  }
}
cout << "Yes" << endl;

Compiler output:
Main.java:1: error: illegal character: '#'
#include "stdafx.h"
^
Main.java:1: error: class, interface, enum, or record expected
#include "stdafx.h"
         ^
Main.java:2: error: illegal character: '#'
#include <iostream>
^
Main.java:3: error: illegal character: '#'
#include <string>
^
Main.java:4: error: illegal character: '#'
#include <cstring>
^
Main.java:7: error: unnamed classes are a preview feature and are disabled by default.
string TapDanceMove;
^
  (use --enable-preview to enable unnamed classes)
Main.java:9: error: class, interface, enum, or record expected
cin >> TapDanceMove;
^
Main.java:10: error: class, interface, enum, or record expected
for (int i = 1; i <= TapDanceMove.size(); i++) {
^
Main.java:10: error: class, interface, enum, or record expected
for (int i = 1; i <= TapDanceMove.size(); i++) {
                ^
Main.java:10: error: class, interface, enum, or record expected
for (int i = 1; i <= TapDanceMove.size(); i++) {
                                          ^
Main.java:13: error: class, interface, enum, or record expected
  if (i % 2 == 0) {
  ^
Main.java:16: error: class, interface, enum, or record expected
      return;
      ^
Main.java:17: error: class, interface, enum, or record expected
    }
    ^
Main.java:21: error: class, interface, enum, or record expected
      return;
      ^
Main.java:22: error: class, interface, enum, or record expected
    }
    ^
15 errors
Language: Java

string TapDanceMove;
char buff;
cin >> TapDanceMove;
for (int i = 1; i <= TapDanceMove.size(); i++) {
  buff = TapDanceMove[i-1];
  //cout << i << "文字目: " << buff << endl;
  if (i % 2 == 0) {
    if (buff == 'R') {
      cout << "No";
      return;
    }
  } else {
    if (buff == 'L') {
      cout << "No" << endl;
      return;
    }
  }
}
cout << "Yes" << endl;

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
string TapDanceMove;
^
  (use --enable-preview to enable unnamed classes)
Main.java:3: error: class, interface, enum, or record expected
cin >> TapDanceMove;
^
Main.java:4: error: class, interface, enum, or record expected
for (int i = 1; i <= TapDanceMove.size(); i++) {
^
Main.java:4: error: class, interface, enum, or record expected
for (int i = 1; i <= TapDanceMove.size(); i++) {
                ^
Main.java:4: error: class, interface, enum, or record expected
for (int i = 1; i <= TapDanceMove.size(); i++) {
                                          ^
Main.java:7: error: class, interface, enum, or record expected
  if (i % 2 == 0) {
  ^
Main.java:10: error: class, interface, enum, or record expected
      return;
      ^
Main.java:11: error: class, interface, enum, or record expected
    }
    ^
Main.java:15: error: class, interface, enum, or record expected
      return;
      ^
Main.java:16: error: class, interface, enum, or record expected
    }
    ^
10 errors
Language: Java

  string TapDanceMove;
  char buff;

  cin >> TapDanceMove;
  
  for (int i = 1; i <= TapDanceMove.size(); i++) {
    buff = TapDanceMove[i-1];
    //cout << i << "文字目: " << buff << endl;
    if (i % 2 == 0) {
      if (buff == 'R') {
        cout << "No";
        return;
      }
    } else {
      if (buff == 'L') {
        cout << "No" << endl;
        return;
      }
    }
  }
  cout << "Yes" << endl;

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
  string TapDanceMove;
  ^
  (use --enable-preview to enable unnamed classes)
Main.java:4: error: class, interface, enum, or record expected
  cin >> TapDanceMove;
  ^
Main.java:6: error: class, interface, enum, or record expected
  for (int i = 1; i <= TapDanceMove.size(); i++) {
  ^
Main.java:6: error: class, interface, enum, or record expected
  for (int i = 1; i <= TapDanceMove.size(); i++) {
                  ^
Main.java:6: error: class, interface, enum, or record expected
  for (int i = 1; i <= TapDanceMove.size(); i++) {
                                            ^
Main.java:9: error: class, interface, enum, or record expected
    if (i % 2 == 0) {
    ^
Main.java:12: error: class, interface, enum, or record expected
        return;
        ^
Main.java:13: error: class, interface, enum, or record expected
      }
      ^
Main.java:17: error: class, interface, enum, or record expected
        return;
        ^
Main.java:18: error: class, interface, enum, or record expected
      }
      ^
10 errors
Language: C++

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

int main() {
  string a;
  cin>>a;
  int b=a.size();
  int c=0;
  for(int i=0;i<b,i++){
    if((i+1)%2==0){
      if(a.at(i)=='R'){
        c++;
      }
    }
    else{
      if(a.at(i)=='L'){
        c++;
      }
    }
  }
  if(c>0){
    cout<<"No"<<endl;
  }
  else{
    cout<<"Yes"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:22: error: expected ';' before ')' token
    9 |   for(int i=0;i<b,i++){
      |                      ^
      |                      ;
Language: C++

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

int main(){
  string s;
  cin >> s;
  int tf = 1
  rep(i,s.size()){
    if(i%2==0){
      if(s[i]!="R"&&s[i]!="U"&&s[i]!="D"){
          tf = 0;
      }
    }
    else{
      if(s[i]!="L"&&s[i]!="U"&&s[i]!="D"){
          tf=0;
      }
    }
  }
  if(tf==1){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:18: error: expected ',' or ';' before 'for'
    4 | #define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
      |                  ^~~
a.cc:10:3: note: in expansion of macro 'rep'
   10 |   rep(i,s.size()){
      |   ^~~
a.cc:10:7: error: 'i' was not declared in this scope
   10 |   rep(i,s.size()){
      |       ^
a.cc:4:33: note: in definition of macro 'rep'
    4 | #define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
      |                                 ^
Language: C++

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

  int main() {
      string S;
      cin >> S;
      int count=0;

      for(int i=;1 i<S.size()/2; i++){
          if(S.at(2*i-1)=='L'||S.at(2*i)=='R'){
            cout << "No" << endl;
            count++;
            break;
          }
      }
      if(count==0)
        cout << "Yes" << endl;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: expected primary-expression before ';' token
    9 |       for(int i=;1 i<S.size()/2; i++){
      |                 ^
a.cc:9:19: error: expected ';' before 'i'
    9 |       for(int i=;1 i<S.size()/2; i++){
      |                   ^~
      |                   ;
a.cc:9:32: error: expected ')' before ';' token
    9 |       for(int i=;1 i<S.size()/2; i++){
      |          ~                     ^
      |                                )
a.cc:9:34: error: 'i' was not declared in this scope
    9 |       for(int i=;1 i<S.size()/2; i++){
      |                                  ^
Language: C++

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

int main(){
    string s;
    cin >> s;
    bool ans=false;bool odd=false
    for(int i=0;i<s.size();i+=2){
        if(s[i]=='R' || s[i]=='U' || s[i]=='D' ) odd = true; 
    }
    for(int i=1;i<s.size();i+=2){
        if((s[i]=='L' || s[i]=='U' || s[i]=='D' ) && odd ) ans = true;
    }
    cout << ( ans ? "Yes" : "No") << endl;
}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: no matching function for call to 'size()'
   14 |     for(int i=0;i<size();i+=2){
      |                   ~~~~^~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:262:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:272:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note:   candidate expects 1 argument, 0 provided
Language: C++

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

int main(){
    string s;
    cin >> s;
    bool ans=false;
    for(int i=0;i<s.size();i+=2){
        if(s[i]=='R' || s[i]=='U' || s[i]=='D' ) ans = true; 
    }
    for(int i=0;i<size();i+=2){
        if(s[i]=='L' || s[i]=='U' || s[i]=='D' ) ams = true;
    }
    cout << ( ans ? "Yes" : "No") << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: no matching function for call to 'size()'
   14 |     for(int i=0;i<size();i+=2){
      |                   ~~~~^~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:262:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:   candidate expects 1 argument, 0 provided
/usr/include/c++/14/bits/range_access.h:272:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note:   candidate expects 1 argument, 0 provided
a.cc:15:50: error: 'ams' was not declared in this scope; did you mean 'ans'?
   15 |         if(s[i]=='L' || s[i]=='U' || s[i]=='D' ) ams = true;
      |                                                  ^~~
      |                                                  ans
Language: C++

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

int main(){

  string S;
  cin>>S;
  
  int N=S.length();
  rep(i,N){

    if(i%2==0 && S[i]=="L"){cout<<"No"; return 0;}
    else if(i%2==1 && S[i]=="R"){cout<<"No"; return 0;}
    
  }
  cout<<"Yes";
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |     if(i%2==0 && S[i]=="L"){cout<<"No"; return 0;}
a.cc:16:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     else if(i%2==1 && S[i]=="R"){cout<<"No"; return 0;}
Language: C++

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

int main(){

  string s;
  cin>>s;
  
  int N=s.length();
  rep(i,N){

    if(i%2==0 && S[i]=="L"){cout<<"No"; return 0;}
    else if(i%2==1 && S[i]=="R"){cout<<"No"; return 0;}
    
  }
  cout<<"Yes";
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: 'S' was not declared in this scope
   15 |     if(i%2==0 && S[i]=="L"){cout<<"No"; return 0;}
      |                  ^
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
int main(void)
{
    char s[100];
  	bool f = false;
    scanf("%s", s);
 	for(int i=0;i<N;i++){
    	if((i+1)%2==1&&s[i]=='L'){
        	f = true;
        }else if((i+1)%2==0&&s[i]=='R'){
        	f = true;
        }
    }
  	if(f==false){
    	printf("Yes");
    }else{
    	printf("No");
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:23: error: 'N' undeclared (first use in this function)
    9 |         for(int i=0;i<N;i++){
      |                       ^
main.c:9:23: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
int main(void)
{
    char s[100];
  	bool f = false;
    scanf("%s", s);
 	for(int i=0;i<N;i++){
    	if((i+1)%2==1&&s[i]=='R'){
        	f = true;
        }else if((i+1)%2==0&&s[i]=='L'){
        	f = true;
        }
    }
  	if(f==false){
    	printf("Yes");
    }else{
    	printf("No");
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:23: error: 'N' undeclared (first use in this function)
    9 |         for(int i=0;i<N;i++){
      |                       ^
main.c:9:23: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
#include<string>

using namespace std;

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

for(int i = 0; i < s.size(); ++i)
{
//i == 0, s[0] is first
if(i % 2)//if i is even, do process from first literal
{
if(s[i] == 'R')
{
std::cout << "No";
return;
}
}
else
{
if(s[i] == 'L')
{
cout << "No";
return;
}
}
}

cout << "Yes";
}


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

int main(void){
  char a[100];
  
  scanf("%d",&n);
  
  int i,s=0;
  
  scanf("%s",a);
  
  for(i=0; s[i]!=0; i++){
    if(i%2 == 0){
      a[i] == 'L';
      s = 1;
    }else{
      a[i] == 'R';
      s = 1;
    }    
  }
  
  printf("%s",s ? "No" : "Yes");
}

Compiler output:
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |   scanf("%d",&n);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |   scanf("%d",&n);
      |   ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:15: error: 'n' undeclared (first use in this function)
    4 |   scanf("%d",&n);
      |               ^
main.c:4:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:13: error: subscripted value is neither array nor pointer nor vector
   10 |   for(i=0; s[i]!=0; i++){
      |             ^
main.c:20:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   20 |   printf("%s",s ? "No" : "Yes");
      |   ^~~~~~
main.c:20:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:20:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:20:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

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

#define MOD 1000000007
typedef unsigned long long ull;

int main() {
  string s;
  cin >> s;
  int len = s.length;

  for (int i = 0; i < len; i++) {
    if (i % 2 == 0) {
      // 偶数
      if (s.at(i) == 'L' || s.at(i) == 'U' || s.at(i) == 'D') {

      } else {
          cout << "No";
          return 0;
      }
    } else {
      // 奇数
      if (s.at(i) == 'R' || s.at(i) == 'U' || s.at(i) == 'D') {

      } else {
          cout << "No";
          return 0;
      }
    }
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: cannot convert 'std::__cxx11::basic_string<char>::length' 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'
   10 |   int len = s.length;
      |               ^~~~~~
a.cc:30:4: error: expected '}' at end of input
   30 |   }
      |    ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
     
int main() {
  cin.tie(0);
  ios::sync_With_stdio(false);
      
  string s;
  cin >> s;
  int len = s.length();
  bool judge = true;
      
  for(int i = 0; i < len; i++) {
    if(i % 2 != 0) {
      if(s[i] == 'R') {
        judge = false;
        break;
      }
    }else {
      if(s[i] == 'L') {
        judge = false;
        break;
      }
    }
  }
  if(judge == true) {
    cout << "Yes" << endl;
  }else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'sync_With_stdio' is not a member of 'std::ios' {aka 'std::basic_ios<char>'}
    6 |   ios::sync_With_stdio(false);
      |        ^~~~~~~~~~~~~~~
Language: C++

    #include <bits/stdc++.h>
    using namespace std;
     
    int main() {
      cin.tie(0);
      ios::sync_With_stdio(flse);
      
      string s;
      cin >> s;
      int len = s.length();
      bool judge = true;
      
      for(int i = 0; i < len; i++) {
        if(i % 2 != 0) {
          if(s[i] == 'R') {
            judge = false;
            break;
          }
        }else {
          if(s[i] == 'L') {
            judge = false;
            break;
          }
        }
      }
      if(judge == true) {
        cout << "Yes" << endl;
      }else {
        cout << "No" << endl;
      }
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: 'sync_With_stdio' is not a member of 'std::ios' {aka 'std::basic_ios<char>'}
    6 |       ios::sync_With_stdio(flse);
      |            ^~~~~~~~~~~~~~~
a.cc:6:28: error: 'flse' was not declared in this scope
    6 |       ios::sync_With_stdio(flse);
      |                            ^~~~
Language: C++

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

int main() {
  cin.tie(0);
  ios::sync_With_stdio(flse);
  
  string s;
  cin >> s;
  int len = s.length();
  bool judge = true;
  
  for(int i = 0; i < len; i++) {
    if(i % 2 != 0) {
      if(s[i] == 'R') {
        judge = false;
        break;
      }
    }else {
      if(s[i] == 'L') {
        judge = false;
        break;
      }
    }
  }
  if(judge == true) {
    cout << "Yes" << endl;
  }else {
    cout << "No" << endl;
  }
}

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:54: error: expected ')' before '{' token
   10 |   if((i%2==0 && S[i] != 'R')&&(i%2!=0 && S[i] != 'L'){
      |     ~                                                ^
      |                                                      )
a.cc:16:3: error: expected primary-expression before '}' token
   16 |   }
      |   ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'i' was not declared in this scope
    8 |   for(i=1; i<101; i++){
      |       ^
a.cc:11:5: error: expected primary-expression before 'else'
   11 |     else if(i%2!=0 && S[i] !="L"){
      |     ^~~~
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

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

int main() {
	string S;
  	cin >> S;
  
  string ans = "Yes";
  for(int i = 0; i < S.size(); i++){
    if( i % 2 == 1 && S.at(i) == 'L' ){
      ans = "No";
      break;
    }
    if( i % 2 == 0 && S.at(i) == 'R' ){
      ans = "No";
      break;
    }
    
  cout << ans << endl;
}


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

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

int main() {
	string S;
  	cin >> S;
  
  string ans = "Yes";
  for(int i = 0; i < S.size(); i++){
    if( i % 2 == 1 && S.at(i) == "L" ){
      ans = "No";
      break;
    }
    if( i % 2 == 0 && S.at(i) == "R" ){
      ans = "No";
      break;
    }
    
  cout << ans << endl;
}

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

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




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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: 'True' was not declared in this scope
   12 |         bool ok = True;
      |                   ^~~~
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 void(){
        string s;
        std::cin >> s;
        bool ok = True;
        rep(i, s.size()){
            if (i % 2 == 0 && s[i] == 'L')
            {
                ok = false;
            }
            if (i % 2 == 1 && s[i] == 'R')
            {
                ok = false;
            }
        }
        if(ok)
        {
            std::cout << "Yes" << "\n";
        }
        else{
            std::cout << "No" << "\n";
        }
        return 0;
    }


Compiler output:
a.cc:9:14: error: expected unqualified-id before ')' token
    9 |     int void(){
      |              ^
Language: C++

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




    int main(){
        string s;
        std::cin >> s;
        bool ok = false;
        rep(i, s.size()){
            if (i % 2 == 0 && s[i] == "R")
            {
                ok = true;
            }
            if (i % 2 == 1 && s[i] == "L")
            {
                ok = true;
            }
        }
        if (ok)
        {
            std::cout << "Yes" << "\n";/* code */
        }
        else{
            std::cout << "No" << "\n";
        }
        return 0;
    }


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