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

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

    int  oh;
   int ohh;
   bool oj=false;
   bool ojj=false;
    string s;
    cin>>s;
    int len=s.size();
     for(int i=0;i<len;++i) {
        if(i%2==0) {
            if(s[i]=='L') oj=false;
        }
        else {
            if(s[i]=='R') oj=false;
        }
    }
    
    }
    if(oj==true) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;


    return 0;
}


Compiler output:
a.cc:23:5: error: expected unqualified-id before 'if'
   23 |     if(oj==true) cout<<"Yes"<<endl;
      |     ^~
a.cc:24:5: error: expected unqualified-id before 'else'
   24 |     else cout<<"No"<<endl;
      |     ^~~~
a.cc:27:5: error: expected unqualified-id before 'return'
   27 |     return 0;
      |     ^~~~~~
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^
Language: C++

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

    int  oh;
   int ohh;
   bool oj=false;
   bool ojj=false;
    string s;
    cin>>s;
    int len=s.size();
    for(int i=0;i<len;++i)
    {
        if(i%2==0)
        {
            if(s[i]=='L')

            {
             
             oj=true;
            }
        }
        else if(i%2==1)
        {
           if(s[i]=='R')
           {
           ojj=true;
           }

        }


    }
    if(oj==true||ojj=true) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:16: error: lvalue required as left operand of assignment
   35 |     if(oj==true||ojj=true) cout<<"Yes"<<endl;
      |        ~~~~~~~~^~~~~
Language: C++

#include <iostream>
#include <string>

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

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

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

int asc(const void* a, const void* b) {
    return *(int*)b - *(int*)a;
}
int main() {
    char str[110] = { 0 };
    int flag = 1;
    scanf("%s", str);
    for (int i = 0; i < strlen(str); i++) {
        if ((i + 1) % 2 == 1) {
            if (str[i] == 'L') {
                printf("No");
                return 2;
            }
        }
        else {
            if (str[i] == 'R') {
                printf("No");
                return 2;
            }
        }
    }
    if (flag) printf("Yes");
    else printf("No");
    return 0;


Compiler output:
main.c: In function 'main':
main.c:29:5: error: expected declaration or statement at end of input
   29 |     return 0;
      |     ^~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:2:5: error: 'string' was not declared in this scope
    2 |     string s; cin >> s;
      |     ^~~~~~
a.cc:2:15: error: 'cin' was not declared in this scope
    2 |     string s; cin >> s;
      |               ^~~
a.cc:2:22: error: 's' was not declared in this scope
    2 |     string s; cin >> s;
      |                      ^
a.cc:5:9: error: 'i' was not declared in this scope
    5 |     rep(i, n){
      |         ^
a.cc:5:5: error: 'rep' was not declared in this scope
    5 |     rep(i, n){
      |     ^~~
a.cc:9:12: error: 'cout' was not declared in this scope
    9 |     if(ok) cout << "Yes"; else cout << "No";
      |            ^~~~
a.cc:9:32: error: 'cout' was not declared in this scope
    9 |     if(ok) cout << "Yes"; else cout << "No";
      |                                ^~~~
Language: Java

package app;

import java.util.Scanner;

public class App {
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        String str = scan.next();
        System.out.println(str);
        boolean check = false;

        for(int i = 0; i < str.length(); i++){
            if(i % 2 == 1){
                if(str.charAt(i) != 'L' && str.charAt(i) != 'U' && str.charAt(i) != 'D'){
                    check = false;
                    break;
                }
                else{
                    check = true;
                }
            }
            else{
                if(str.charAt(i) != 'R' && str.charAt(i) != 'U' && str.charAt(i) != 'D'){
                    check = false;
                    break;
                }
                else{
                    check = true;
                }
            }
        }
        if(check == true){
            System.out.print("Yes");
        }
        else{
            System.out.print("No");
        }

    }
}

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

#include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define RFOR(i, a, b) for (int i = (a); i >= (b); i--)
#define LFOR(i, a, b) for (long long int i = (a); i <= (b); i++)
#define LRFOR(i, a, b) for (long long int i = (a); i >= (b); i--)
#define MOD 1000000007
#define INF 1000000000           // 2000000000
#define LINF 1000000000000000000 // 9000000000000000000
#define DINF 1000000000000000.0
#define PI 3.14159265358979

//.size()はunsigned int　0-1をするとオーバーフローする

using namespace std;
typedef long long int ll;
typedef pair<long long int, long long int> P;

int dy[5] = {-1, 0, 1, 0, 0};
int dx[5] = {0, -1, 0, 1, 0};

int main(void) {
    string s;
    flag=true;

    cin>>s;

    FOR(i,0,s.size()-1){
        if(i%2==0){
            if(s[i]=='L'){
                flag=false;
            }
        }else{
            if(s[i]=='R'){
                flag=false;
            }
        }
    }
    if(flag){
        cout<<"Yes"<<endl;
    }else{
        cout<<"No"<<endl;
    }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:5: error: 'flag' was not declared in this scope
   23 |     flag=true;
      |     ^~~~
Language: C++

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

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

Compiler output:
a.cc:15:36: warning: multi-character character constant [-Wmultichar]
   15 |     if (ok) puts("Yes"); else puts('No');
      |                                    ^~~~
a.cc:4:19: error: expected unqualified-id before numeric constant
    4 | typedef long long 11;
      |                   ^~
a.cc: In function 'int main()':
a.cc:15:36: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   15 |     if (ok) puts("Yes"); else puts('No');
      |                                    ^~~~
      |                                    |
      |                                    int
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C++

#include <bits/stdh>
using namespace std;

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

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

#include <iostream>
#include <string>

int main(){
  std::string s;
  std::cin >> s;
  std::string d("LR");
  int m = 0;
  for(auto i : s)
    if(i = d[m%2])
      std::cout << "No" << std::endl;
  	  return 0;
  	else
      ++m;
  std::cout << "Yes" << std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'else' without a previous 'if'
   13 |         else
      |         ^~~~
Language: C++

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


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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: lvalue required as left operand of assignment
    9 |     if(i%2=0){
      |        ~^~
a.cc:23:4: error: expected '}' at end of input
   23 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

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

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

	for(int i=0;i<s.size()-1;i++){
		if(s.at(i)=='R')
			if(i%2==1){
				cout << "No" << endl;
				return 0;
			}
		if(s.at(i)=='L')
			if(i%2==0){
				cout << "No" << endl;
				return 0;
	}
	cout << "Yes" << 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(){
  
  vector <char> v;
  string s;
  cin >> s;
  for(int i = 0; i < s.length; i++){
	if(i%2 == 0){
      if(s[i] != 'L' or s[i] != 'U' or s[i] != 'D'){
        cout << "No";
        return 0;
      }
    }else{
      if(s[i] != 'R' or s[i] != 'U' or s[i] != 'D'){
        cout << "No";
        return 0;
      }
    }
  }
  
  cout << "Yes";
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: 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;
    int count = 1; 
    for(int i=0;i<S.size();i++){
        if(i % 2 == 0){
            if(S[i] == L){
                cout << "No";
                count = 0;
                break;
            }
        }else{
            if(S[i] == 'R'){
                cout << "No";
                count = 0;
                break;
            }
        }
        }
    if(count == 1){
        cout << "Yes";
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: 'L' was not declared in this scope
   10 |             if(S[i] == L){
      |                        ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:27: error: expected ']' before ')' token
   10 |     if((i%2==1)&&(s[i=='R')) cout<<"No";
      |                           ^
      |                           ]
Language: C++

#include <iostream>

using namespace std;

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

    //int a = strlen(s);

    for(int i = 0; i < s.length; i++){
        if(i % 2 == 0){
            if(s[i] == 'L'){
                cout << "No" << endl;
            }
        }
        else{
            if(s[i] == 'R'){
                cout << "No" << endl;
            }
        }
    }
    cout << "Yes" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   11 |     for(int i = 0; i < s.length; i++){
      |                        ~~^~~~~~
      |                                ()
Language: C++

#include <iostream>
#include <cstring>

using namespace std;

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

    int a = strlen(s);

    for(int i = 0; i < a; i++){
        if(i % 2 == 0){
            if(s[i] == 'L'){
                cout << "No" << endl;
            }
        }
        else{
            if(s[i] == 'R'){
                cout << "No" << endl;
            }
        }
    }
    cout << "Yes" << endl;
}

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

#include <iostream>

using namespace std;

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

    int a = strlen(s);

    for(int i = 0; i < a; i++){
        if(i % 2 == 0){
            if(s[i] == 'L'){
                cout << "No" << endl;
            }
        }
        else{
            if(s[i] == 'R'){
                cout << "No" << endl;
            }
        }
    }
    cout << "Yes" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'strlen' was not declared in this scope
    9 |     int a = strlen(s);
      |             ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <iostream>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    8 |     for(int i = 0; i < s.length; i++){
      |                        ~~^~~~~~
      |                                ()
Language: C++

#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: 'else' without a previous 'if'
   15 |         else{
      |         ^~~~
a.cc: At global scope:
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include <iostream>

using namespace std;

int main(){
    string s;
    cin >> s;
    for(int i = 0; i < s.size(); i++){
        if(s[1, 3, 5, 7] == "R" || "U" || "D"){
            cout << "Yes" << endl;
        }
        else if(s[2, 4, 6] == "L" || "U" || "D"){
            cout << "Yes" << endl;
        }
        else{
            cout << "No" << endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |         if(s[1, 3, 5, 7] == "R" || "U" || "D"){
a.cc:12:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         else if(s[2, 4, 6] == "L" || "U" || "D"){
Language: C++

#include <iostream>

using namespace std;

int main(){
    string s;
    cin >> s;
    for(int i = 0; i < s.length; i++){
        if(s[1, 3, 5, 7] == "R" || "U" || "D"){
            cout << "Yes" << endl;
        }
        else if(s[2, 4, 6] == "L" || "U" || "D"){
            cout << "Yes" << endl;
        }
        else{
            cout << "No" << endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    8 |     for(int i = 0; i < s.length; i++){
      |                        ~~^~~~~~
      |                                ()
a.cc:9:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |         if(s[1, 3, 5, 7] == "R" || "U" || "D"){
a.cc:12:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         else if(s[2, 4, 6] == "L" || "U" || "D"){
Language: C++

#include <iostream>

using namespace std;

int main(){
    stirng s;
    cin >> s;
    for(int i = 0; i < s.length; i++){
        if(s[1, 3, 5, 7] == "R" || "U" || "D"){
            cout << "Yes" << endl;
        }
        else if(s[2, 4, 6] == "L" || "U" || "D"){
            cout << "Yes" << endl;
        }
        else{
            cout << "No" << endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'stirng' was not declared in this scope
    6 |     stirng s;
      |     ^~~~~~
a.cc:7:12: error: 's' was not declared in this scope
    7 |     cin >> s;
      |            ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:2:3: error: 'string' was not declared in this scope
    2 |   string s;
      |   ^~~~~~
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> s;
      |   ^~~
a.cc:3:10: error: 's' was not declared in this scope
    3 |   cin >> s;
      |          ^
a.cc:4:9: error: expected ';' before 'ans'
    4 |   string ans;
      |         ^~~~
      |         ;
a.cc:8:9: error: 'ans' was not declared in this scope
    8 |         ans = "No";
      |         ^~~
a.cc:14:9: error: 'ans' was not declared in this scope
   14 |         ans = "No";
      |         ^~~
a.cc:19:3: error: 'cout' was not declared in this scope
   19 |   cout << "Yes" << endl;
      |   ^~~~
a.cc:19:20: error: 'endl' was not declared in this scope
   19 |   cout << "Yes" << endl;
      |                    ^~~~
Language: C++

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

int main()
{
  string s;
  cin>>s;
  bool flag=true;
  for(int i=0;i<s.length();i++)
  {
    if((i+1)&1)
    { if(s[i]=='L')
        flag=false,break;}
    else
      if(s[i]=='R')
        flag=false,break;
      
  }
  if(flag)
    cout<<"Yes\n";
  else
    cout<<"No\n";
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: expected primary-expression before 'break'
   13 |         flag=false,break;}
      |                    ^~~~~
a.cc:16:20: error: expected primary-expression before 'break'
   16 |         flag=false,break;
      |                    ^~~~~
Language: C++

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

string S;
int main() {
	cin >> S;
	for(int i = 0; i < (int) S>length(); i++) {
		if(i%2 && S[i] == 'L') {
			printf("No\n");
			return 0;
		}
		if(i%2==0 && S[i] == 'R') {
			printf("No\n");
			return 0;
		}
	}

	printf("Yes\n");

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:28: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'int'
    7 |         for(int i = 0; i < (int) S>length(); i++) {
      |                            ^~~~~~~
a.cc:7:36: error: 'length' was not declared in this scope
    7 |         for(int i = 0; i < (int) S>length(); i++) {
      |                                    ^~~~~~
Language: C++

#include <iostream>

int main(){
	using namespace std;
	int r = 0;
	string s;
	long leng,i;
	cin >> s;
	leng == s.length()

		for (i = 0; i < leng; i += 2) {
			if (s[i] != 'R' && s[i] != 'U' && s[i] != 'D') {
				r++;
			}
		}

	for (i = 1; i < leng; i += 2) {
		if (s[i] != 'L' && s[i] != 'U' && s[i] != 'D') {
			r++;
		}
	}
	if (r == 0) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: expected ';' before 'for'
    9 |         leng == s.length()
      |                           ^
      |                           ;
   10 | 
   11 |                 for (i = 0; i < leng; i += 2) {
      |                 ~~~        
a.cc:11:45: error: expected ';' before ')' token
   11 |                 for (i = 0; i < leng; i += 2) {
      |                                             ^
      |                                             ;
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: expected primary-expression before ';' token
   16 |         ans+;
      |             ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: expected primary-expression before ';' token
   16 |         ans+;
      |             ^
a.cc:19:6: error: expected '(' before 'ans'
   19 |   if ans = 0
      |      ^~~
      |      (
a.cc:21:3: error: 'else' without a previous 'if'
   21 |   else
      |   ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: expected '(' before 'S'
   10 |       if S.at(i) = 'L' {
      |          ^
      |          (
a.cc:15:10: error: expected '(' before 'S'
   15 |       if S.at(i) = 'R' {
      |          ^
      |          (
a.cc:19:6: error: expected '(' before 'ans'
   19 |   if ans = 0
      |      ^~~
      |      (
a.cc:21:3: error: 'else' without a previous 'if'
   21 |   else
      |   ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: lvalue required as left operand of assignment
    9 |     if (i%2 = 0) {
      |         ~^~
a.cc:10:10: error: expected '(' before 'S'
   10 |       if S.at(i) = 'L' {
      |          ^
      |          (
a.cc:15:10: error: expected '(' before 'S'
   15 |       if S.at(i) = 'R' {
      |          ^
      |          (
a.cc:19:6: error: expected '(' before 'ans'
   19 |   if ans = 0
      |      ^~~
      |      (
a.cc:21:3: error: 'else' without a previous 'if'
   21 |   else
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const long long mod = 1e9 + 7;

ll gcd(ll a, ll b) {
	return b ? gcd(b, a % b) : a;
}

ll lcm(ll a, ll b) {
	return a / gcd(a, b) * b;
}

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

	for (int i = 0; i < s.length; i++) {
		if (i % 2 == 0) {
			if (s[i] == 'L') {
				cout << "No" << endl;
			}
		} else {
			if (s[i] == 'R') {
				cout << "No" << endl;
			}
		}
	}

	cout << "Yes" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:31: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   18 |         for (int i = 0; i < s.length; i++) {
      |                             ~~^~~~~~
      |                                     ()
Language: C

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

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

#include <stdio.h>
int main(){
  int i,j,odd,even;
  odd = 2*i+1;
  even = 2*i;
  char S[100];
  scanf("%s",S);
  for(i=0;i<100;i++){
    for(j=0;j<3;j++){
    if((S[odd]!='R')&&S[even]!='L')){
     printf("No");
      return 0;
    }
   }
  }
      printf("Yes");
      return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:36: error: expected statement before ')' token
   10 |     if((S[odd]!='R')&&S[even]!='L')){
      |                                    ^
Language: C

#include <stdio.h>
int main(){
  int i,j;
  char S[100];
  scanf("%s",S);
  for(i=0;i<100;i++){
    for(j=0;j<3;j++){
    if((S[2*i+1]!='R')&&S[2*i]!='L')){
     printf("No");
      return 0;
    }
      printf("Yes");
      return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:37: error: expected statement before ')' token
    8 |     if((S[2*i+1]!='R')&&S[2*i]!='L')){
      |                                     ^
main.c:14:1: error: expected declaration or statement at end of input
   14 | }
      | ^
main.c:14:1: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>
int main(){
  int i,j;
  char S[100];
  char R[3][2]={"R","U","D"};
  char L[3][2]={"L","U","D"};
  scanf("%s",S);
  for(i=0;i<100;i++){
    for(j=0;j<3;j++){
    if((S[2*i+1]!=R[j])&&S[2*i]!=L[j])){
     printf("No");
      return 0;
    }
      printf("Yes");
      return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:17: warning: comparison between pointer and integer
   10 |     if((S[2*i+1]!=R[j])&&S[2*i]!=L[j])){
      |                 ^~
main.c:10:32: warning: comparison between pointer and integer
   10 |     if((S[2*i+1]!=R[j])&&S[2*i]!=L[j])){
      |                                ^~
main.c:10:39: error: expected statement before ')' token
   10 |     if((S[2*i+1]!=R[j])&&S[2*i]!=L[j])){
      |                                       ^
main.c:16:1: error: expected declaration or statement at end of input
   16 | }
      | ^
main.c:16:1: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>
int main(){
  int i,j;
  char S[100];
  char R[3][2]={"R","U","D"};
  char L[4][2]={"L","U","D"};
  scanf("%s",S);
  for(i=0;i<100;i++){
    for(j=0;j<3;j++){
    if((S[2*i+1]!=R[j])&&S[2*i]!=L[j])){
     printf("No");
      return 0;
    }
      printf("Yes");
      return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:17: warning: comparison between pointer and integer
   10 |     if((S[2*i+1]!=R[j])&&S[2*i]!=L[j])){
      |                 ^~
main.c:10:32: warning: comparison between pointer and integer
   10 |     if((S[2*i+1]!=R[j])&&S[2*i]!=L[j])){
      |                                ^~
main.c:10:39: error: expected statement before ')' token
   10 |     if((S[2*i+1]!=R[j])&&S[2*i]!=L[j])){
      |                                       ^
main.c:16:1: error: expected declaration or statement at end of input
   16 | }
      | ^
main.c:16:1: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>
int main(){
  int i,j;
  char S[100];
  char R[3][2]={"R","U","D"};
  char L[4][2]={"L","U","D"};
  scanf("%s",S[100]);
  for(i=0;i<100;i++){
    for(j=0;j<3;j++){
    if((S[2*i+1]!=R[j])&&S[2*i]!=L[j])){
     printf("No");
      return 0;
    }
      printf("Yes");
      return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:17: warning: comparison between pointer and integer
   10 |     if((S[2*i+1]!=R[j])&&S[2*i]!=L[j])){
      |                 ^~
main.c:10:32: warning: comparison between pointer and integer
   10 |     if((S[2*i+1]!=R[j])&&S[2*i]!=L[j])){
      |                                ^~
main.c:10:39: error: expected statement before ')' token
   10 |     if((S[2*i+1]!=R[j])&&S[2*i]!=L[j])){
      |                                       ^
main.c:16:1: error: expected declaration or statement at end of input
   16 | }
      | ^
main.c:16:1: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>
int main(){
  int i,j;
  char S[100];
  char R[3][2]={"R","U","D"};
  char L[4][2]={"L","U","D"};
  scanf("%s",S[100]);
  for(i=0;i<100;i++){
    if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
     printf("No");
    }else{
    printf("Yes");
    }
  }
  }

Compiler output:
main.c: In function 'main':
main.c:9:17: warning: comparison between pointer and integer
    9 |     if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
      |                 ^~
main.c:9:35: warning: comparison between pointer and integer
    9 |     if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
      |                                   ^~
main.c:9:53: warning: comparison between pointer and integer
    9 |     if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
      |                                                     ^~
main.c:9:64: error: array subscript is not an integer
    9 |     if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
      |                                                                ^
main.c:9:79: error: array subscript is not an integer
    9 |     if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
      |                                                                               ^
main.c:9:94: error: array subscript is not an integer
    9 |     if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
      |                                                                                              ^
Language: C

#include <stdio.h>
int main(){
  int i,j;
  char S[100];
  char R[3][2]={"R","U","D"};
  char L[4][2]={"L","U","D"};
  for(i=0;i<100;i++){
    if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
     printf("No");
    }else{
    printf("Yes");
    }
  }
  }

Compiler output:
main.c: In function 'main':
main.c:8:17: warning: comparison between pointer and integer
    8 |     if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
      |                 ^~
main.c:8:35: warning: comparison between pointer and integer
    8 |     if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
      |                                   ^~
main.c:8:53: warning: comparison between pointer and integer
    8 |     if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
      |                                                     ^~
main.c:8:64: error: array subscript is not an integer
    8 |     if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
      |                                                                ^
main.c:8:79: error: array subscript is not an integer
    8 |     if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
      |                                                                               ^
main.c:8:94: error: array subscript is not an integer
    8 |     if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
      |                                                                                              ^
Language: C

#include <stdio.h>
int main(){
  int i,j;
  char S[100];
  char R[3]={"R","U","D"};
  char L[4]={"L","U","D"};
  for(i=0;i<100;i++){
    if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
     printf("No");
    }else{
    printf("Yes");
    }
  }
  }

Compiler output:
main.c: In function 'main':
main.c:5:18: error: excess elements in 'char[3]' initializer
    5 |   char R[3]={"R","U","D"};
      |                  ^~~
main.c:5:18: note: (near initialization for 'R')
main.c:5:22: error: excess elements in 'char[3]' initializer
    5 |   char R[3]={"R","U","D"};
      |                      ^~~
main.c:5:22: note: (near initialization for 'R')
main.c:6:18: error: excess elements in 'char[4]' initializer
    6 |   char L[4]={"L","U","D"};
      |                  ^~~
main.c:6:18: note: (near initialization for 'L')
main.c:6:22: error: excess elements in 'char[4]' initializer
    6 |   char L[4]={"L","U","D"};
      |                      ^~~
main.c:6:22: note: (near initialization for 'L')
main.c:8:64: error: array subscript is not an integer
    8 |     if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
      |                                                                ^
main.c:8:79: error: array subscript is not an integer
    8 |     if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
      |                                                                               ^
main.c:8:94: error: array subscript is not an integer
    8 |     if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
      |                                                                                              ^
Language: C

#include <stdio.h>
int main(){
  int i,j;
  char S[100];
  char R[3]={"R","U","D"};
  char L[4]={"L","U","D"};
  for(i=0;i<100;i++)
    if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
     printf("No");
    }else{
    printf("Yes");
    }
}

Compiler output:
main.c: In function 'main':
main.c:5:18: error: excess elements in 'char[3]' initializer
    5 |   char R[3]={"R","U","D"};
      |                  ^~~
main.c:5:18: note: (near initialization for 'R')
main.c:5:22: error: excess elements in 'char[3]' initializer
    5 |   char R[3]={"R","U","D"};
      |                      ^~~
main.c:5:22: note: (near initialization for 'R')
main.c:6:18: error: excess elements in 'char[4]' initializer
    6 |   char L[4]={"L","U","D"};
      |                  ^~~
main.c:6:18: note: (near initialization for 'L')
main.c:6:22: error: excess elements in 'char[4]' initializer
    6 |   char L[4]={"L","U","D"};
      |                      ^~~
main.c:6:22: note: (near initialization for 'L')
main.c:8:64: error: array subscript is not an integer
    8 |     if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
      |                                                                ^
main.c:8:79: error: array subscript is not an integer
    8 |     if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
      |                                                                               ^
main.c:8:94: error: array subscript is not an integer
    8 |     if((S[2*i-1]!=R[0])&&(S[2*i-1]!=R[1])&&(S[2*i-1]!=R[2])&&(S[2i]!=L[0])&&(S[2i]!=L[1])&&(S[2i]!=L[2])){
      |                                                                                              ^
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
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";
            return -1;
            }  
        }
        else{
            if(s[i]=='R')
            {cout<<"No";
            return -1;
            }
        }
        
    }
cout<<"Yes";
return 0;

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

#include <iostream>
#include <cstring>
using namespace std;
int main(){
  int i, l;
  char s[101];
  cin >> s;
  l=length(s);
  for(i=0; i<l; i++){
    if(i%2)
      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:8:5: error: 'length' was not declared in this scope
    8 |   l=length(s);
      |     ^~~~~~
Language: C++

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

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


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

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

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

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


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

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

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

#include <iostream>
#include<algorithm>
#include<vector>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:38: error: 'flase' was not declared in this scope; did you mean 'fclose'?
   13 |     if((i+1)%2==0 && s[i]=='R') ok = flase;
      |                                      ^~~~~
      |                                      fclose
a.cc:16:21: error: expected ';' before 'else'
   16 |   if(ok) puts("Yes") else puts("No");
      |                     ^~~~~
      |                     ;
Language: C++

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

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

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

#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>

using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

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


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

#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>

using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

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


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

#include<iostream>
#include<string>

using namespace std;

int mainb(void)
{
    string S;
    cin >> S;

    bool isOdd = true;
    bool isEasy = true;

    for (auto &&x : S)
    {
        if (isOdd)
        {
            if (x == 'L')
            {
                isEasy = false;
            }
        }
        else
        {
            if (x == 'R')
            {
                isEasy = false;
            }
        }
        isOdd = !isOdd;
    }
    
    cout << (isEasy?"Yes":"No") << endl;

    return 0;
}

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


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

int main()
{
  string S;
  cin >> S;
  const char tap[] = {'L', 'R'};
  int i = 0;
  for (; i < S.length(); ++i)
    if (tap[i%2] == S[i])
      break;
  cout << (S.length == i ? "Yes" : "No");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: 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 '()' ?)
   15 |   cout << (S.length == i ? "Yes" : "No");
      |            ~~^~~~~~
      |                    ()
Language: C++


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

int main()
{
  string S;
  cin >> S;
  const char tap[] = {'L', 'R'};
  int i = 0;
  for (; i < S.length(); ++i)
    if (tap[i%2] == S[i])
      break;
  cout << (s.length == i ? "Yes" : "No");
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:12: error: 's' was not declared in this scope
   15 |   cout << (s.length == i ? "Yes" : "No");
      |            ^