Problem:


Score: 200 points

Problem Statement

Takahashi will do a tap dance. The dance is described by a string S where each character is L, R, U, or D. These characters indicate the positions on which Takahashi should step. He will follow these instructions one by one in order, starting with the first character.

S is said to be easily playable if and only if it satisfies both of the following conditions:

Every character in an odd position (1-st, 3-rd, 5-th, \ldots) is R, U, or D.

Every character in an even position (2-nd, 4-th, 6-th, \ldots) is L, U, or D.

Your task is to print Yes if S is easily playable, and No otherwise.

Constraints

S is a string of length between 1 and 100 (inclusive).

Each character of S is L, R, U, or D.

Input

Input is given from Standard Input in the following format:

S

Output

Print Yes if S is easily playable, and No otherwise.

Sample Input 1

RUDLUDR

Sample Output 1

Yes

Every character in an odd position (1-st, 3-rd, 5-th, 7-th) is R, U, or D.

Every character in an even position (2-nd, 4-th, 6-th) is L, U, or D.

Thus, S is easily playable.

Sample Input 2

DULL

Sample Output 2

No

The 3-rd character is not R, U, nor D, so S is not easily playable.

Sample Input 3

UUUUUUUUUUUUUUU

Sample Output 3

Yes

Sample Input 4

ULURU

Sample Output 4

No

Sample Input 5

RDULULDURURLRDULRLR

Sample Output 5

Yes



Sample input:
RUDLUDR


Sample output:
Yes

Submission status: Wrong Answer

Solution code:
S = input()
SW1 = 0
SW2 = 0

for i in range(0,len(S),2):
    if S[i] == 'L' or S[i] == 'U' or S[i] == 'D':
        SW1 += 1

for i in range(1,len(S),2):
    if S[i] == 'R' or S[i] == 'U' or S[i] == 'D':
        SW2 += 1

if SW1 == len(S)/2 and SW2 == len(S)/2:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s=list(input())
even=s[0::2]
odd=s[1::2]
for i in even:
    if i!="L" or i!="U" or i!="D":
        print("No")
        exit()
for i in odd:
    if i!="R" or i!="U" or i!="D":
        print("No")
        exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
s=list(input())
even=s[0::2]
odd=s[1::2]
for i in even:
    if i!="L" or "U" or "D":
        print("No")
        exit()
for i in odd:
    if i!="R" or "U" or "D":
        print("No")
        exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
s=list(input())
even=s[0::2]
odd=s[1::2]
for i in even:
    if i!="L" or "U" or "D":
        print("No")
        exit()
for i in even:
    if i!="R" or "U" or "D":
        print("No")
        exit()
print("Yes")

Submission status: Wrong Answer

Solution code:

s=str(input())


def n1():
    for i in range(len(s)):
        if i%2 == 0:
            if "R" not in s[i]:
                return True
def n2():
    for i in range(len(s)):
        if i%2 != 0:
            if "L" not in s[i]:
                return True


if n1() and n2() ==True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:

s=str(input())


def n1():
    for i in range(len(s)):
        if i%2 == 0:
            if "L" and "U" and "D" in s[i]:
                return True
def n2():
    for i in range(len(s)):
        if i%2 != 0:
            if "R" and "U" and "D" in s[i]:
                return True

if n1() and n2() ==True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
N = str(input())
c = []
for i in range(0,len(N)-1):
    if i % 2 == 0:
        if N[i] == 'R' or N[i] == 'U' or N[i] == 'D':
            c.append(N[i])
    else:
        if N[i] =='L' or N[i] == 'U' or N[i] == 'D':
            c.append(N[i])



if len(c) == len(N):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = str(input())
c = []
for i in range(0,len(N)):
    if i % 2 == 0:
        if i == 'R' or i == 'U' or i == 'D':
            c.append(i)

    else:
        if i =='L' or i == 'U' or i == 'D':
            c.append(i)



if len(c) == len(N):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N = str(input())
c = []
for i in range(len(N)):
    if i % 2 == 0:
        if i == 'L' or i == 'U' or i == 'D':
            c.append(i)

    else:
        if i =='R' or i == 'U' or i == 'D':
            c.append(i)



if len(c) == len(N):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S=input()

def ans141(S:str):
    judge=0

    for i in range(0,len(S)):
        if (i+1)%2==1:
            if S[i]=="R" or "U" or "D":
                continue
            else:
                judge+=1
        else:
            if S[i]=="L" or "U" or "D":
                continue
            else:
                judge+=1
    if judge>0:
        return "No"
    else:
        return "Yes"

print(ans141(S))

Submission status: Wrong Answer

Solution code:
s = input()

howmany = len(s)
judge = "Yes"

for x in range(howmany):
  if x % 2 == 0:
    if s[x] != "L" and s[x] != "U" and s[x] != "D":
      judge = "No"
      break
  else:
    if s[x] != "R" and s[x] != "U" and s[x] != "D":
      judge = "No"
      break
      
print(judge)

Submission status: Wrong Answer

Solution code:
s = input()
for i in range(len(s)):
    if i % 2 == 1:
        if s[i] not in ['R','U','D']:
            print('No')
            exit()
    else:
        if s[i] not in ['L','U','D']:
            print('No')
            exit()        
print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()
k = 1
for i in range(len(s)):
    if i % 2 == 1:
        if s[i] not in ['R','U','D']:
            k = 0
            break
    else:
        if s[i] not in ['L','U','D']:
            k = 0
            break
if k==1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()
k = 1
for i in range(len(s)):
    if i % 2 == 1:
        if s[i] != ('R' or 'U' or 'D'):
            k = 0
            break
    else:
        if s[i] != ('L' or 'U' or 'D'):
            k = 0
            break
if k==1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = list(input())
k = 1
for i in range(0,len(s),2):
    if s[i] != ('R' or 'U' or 'D'):
        k = 0
        break
for j in range(1,len(s),2):
    if s[j] != ('L' or 'U' or 'D'):
        k = 0
        break
        
if k==1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = list(input())
k = 0
for i in range(0,len(s),2):
    if s[i] == ('R' or 'U' or 'D'):
        k = 1
    else:
        k = 0
        break
for j in range(1,len(s),2):
    if s[j] == ('L' or 'U' or 'D'):
        k = 1
    else:
        k = 0
        break
        
if k==1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = list(input())
k = 0
for i in range(0,len(s),2):
    if s[i] == ('R' or 'U' or 'D'):
        k = 1
    else:
        k = 0
for j in range(1,len(s),2):
    if s[j] == ('L' or 'U' or 'D'):
        k = 1
    else:
        k = 0
        
if k==1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = list(input())
k = 0
for i in range(0,len(s),2):
    if s[i] == ('R' or 'U' or 'D'):
        k = 1
for j in range(1,len(s),2):
    if s[j] == ('L' or 'U' or 'D'):
        k = 1
    else:
        k = 0
        
if k==1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:

s=input()
k=0
for i in range(0,len(s),2):
    if s[i] ==('R' or 'U' or 'D'):
        k = 1
for j in range (1,len(s),2):
    if s[j] == ('L' or 'U' or 'D'):
        k = 1
    else:
        k = 0
        
if k==1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()
print("Yes" if all(s.index(i) % 2 == 1 and i in "RUD" or s.index(i) % 2 == 0 and i in "LUD" for i in s) else "No")

Submission status: Wrong Answer

Solution code:
s = input()
ans = 0
for i in range(len(s)):
  if ans != 0:
    print('No')
    exit()
  if i % 2 == 0:
    if s[i] == 'L':
      ans += 1
  else:
    if s[i] == 'R':
      ans += 1
print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()
ans = 0
for i in range(len(s)):
  if ans != 0:
    print('No')
    exit()
  if i % 2 == 0:
    if s[i] == 'R':
      ans += 1
  else:
    if s[i] == 'L':
      ans += 1
print('Yes')

Submission status: Wrong Answer

Solution code:
# 問題：https://atcoder.jp/contests/abc141/tasks/abc141_b

s = input()
i = 1
res = True
for ch in s:
    if i % 2 == 1 and ch == 'L':
        res = False
        break
    elif i % 2 == 0 and ch == 'R':
        res = True
        break
    i += 1

if res:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = list(input())

for i in s[::2]:
    if i=='L':
        print('No')
        exit()

for i in s[1::2]:
    if i=='R':
        print('No')
        exit

print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()
odd = s[::2]
even = s[1::2]
if 'L'  in odd and 'R'  in even:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
# coding: utf-8

str = input()
table = list(str)
print(table)

Submission status: Wrong Answer

Solution code:
s=input()

ans='No'

for i,ss in enumerate(s):
  if i%2==0:
    if ss =='R' or ss=='U' or ss=='D':
      ans ='Yes'
    else:
      ans='No'
  else:
    if ss=='L' or ss=='U' or ss=='D':
      ans='Yes'
    else:
      ans='No'
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()

for i in range(1,len(s),2):
    if s[i-1] == 'L':
        print('No')
        break
else:
    for i in range(2,len(s),2):
        if s[i-1] == 'R':
            print('No')
            break
    else:
        print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()
print("Yes" if ("R"or"U"or"D") in s[::2] and ("L"or"U"or"D") in s[1::2] else "No")

Submission status: Wrong Answer

Solution code:
s = input()
print("Yes" if s[::2] in "RUD" and s[1::2] in "LUD" else "No")

Submission status: Wrong Answer

Solution code:
s = input()
if 'R' in s[0::2] or 'L' in s[1::2]:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
s=input() 
ans=0
for i in range(0,len(s),2):
  if s[i]!='R' and s[i]!='U'  and s[i]!='D':
    ans=1
for j in range(1,len(s),2):
  if s[i]!='U' and s[i]!='L' and s[i]!='D':
    ans=1
if ans==0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = input()
n = len(s)

for i in range(0, n, 2):
    if s[i] == 'L':
        print('No')
        exit()

for i in range(1, n, 2):
    if s[i] == 'R':
        print('No')

print('Yes')

Submission status: Wrong Answer

Solution code:
S = input()
if 'L' in S[::2] and 'R' in S[1::2]:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
S=input()
count=0
Ans=True
for i in range(len(S)):
    if i%2==1 and S[i]=="R":
        Ans=False
    elif i%2==0 and S[i]=="L": 
        Ans=False
print(Ans)

Submission status: Wrong Answer

Solution code:
S=input()
count=0
for i in range(len(S)):
    if i%2==1 and (S[i]=="L" or S[i]=="U"or S[i]=="D"):
        count+=1
    elif S[i]=="R" or S[i]=="U" or S[i]=="D":
        count+=1
if count==len(S):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S=input()
count=0
for i in range(len(S)):
    if i%2==1 and S[i]=="L" or S[i]=="U"or S[i]=="D":
        count+=1
    elif S[i]=="R" or S[i]=="U" or S[i]=="D":
        count+=1
if count==len(S):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
l1 = ['D','R','U']
l2 = ["D",'L','U']
#print(sorted(set(s[::2])))
#print(sorted(set(s[1::2])))
s_odd = sorted(set(s[::2]))
s_even = sorted(set(s[1::2]))

if (s_odd == l1) and (s_even == l2 ):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N=str(input())
if 'R' in N[0::2] or 'L' in N[1::2]:
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()

od = s[0 : -1 : 2]
ev = s[1 : -1 : 2]

if all(x != 'L' for x in od) and all(y != 'R' for y in ev):
  print('Yes')

elif len(s) == 1:
  if s[0] == 'L':
    print('No')
  else:
    print('Yes')
  
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = input()

od = s[0 : -1 : 2]
ev = s[1 : -1 : 2]

if all(x != 'L' for x in od) and all(y != 'R' for y in ev):
  print('Yes')

elif len(s) == 1:
  print('No')
  
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = input()

od = s[0 : -1 : 2]
ev = s[1 : -1 : 2]

if all(x != 'L' for x in od) and all(y != 'R' for y in ev):
  print('Yes')

else:
  print('No')

Submission status: Wrong Answer

Solution code:
S=input()
isOK=True
for i in range(len(S)):
  if(i%2==1):
    if(S[i]=="L"):
      isOK=False
  else:
    if(S[i]=="R"):
      isOK=False
      
if(isOK):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = input()
even, odd = [], []
for i in range(len(s)):
    if i%2:
        odd.append(s[i])
    else:
        even.append(s[i])
e = list(set(odd))
o = list(set(even))
print('o: ',o,'e: ',e)
if('L' in o or 'R' in e):
    print('No')
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
#<B>
S = input()
S1 = S[0::2]
S2 = S[1::2]
ans1 = S1.count("R") + S1.count("U") + S2.count("D")
ans2 = S2.count("L") + S2.count("U") + S2.count("D")
if ans1 == len(S1) and ans2 == len(S2):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = list(map(str,input()))

odd = ['R','U','D']
even = ['L','U','D']

for i in range(len(S)):
    if (i+1)%2 == 0:
        if S[i] in odd:
            print('No')
            exit()
    elif (i+1)%2 == 1:
        if S[i] in even:
            print('No')
            exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
S = list(map(str,input()))

odd = ['R','U','D']
even = ['L','U','D']

for i in range(len(S)):
    if (i+1) == 0:
        if S[i] in odd:
            print('No')
            exit()
    elif (i+1) == 1:
        if S[i] in even:
            print('No')
            exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
S = list(map(str,input()))

odd = ['R','U','D']
even = ['L','U','D']

for i in range(len(S)):
    if (i+1) == 0:
        if S[i] in odd:
            print('No')
            exit()
    elif (i+1) == 0:
        if S[i] in even:
            print('No')
            exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
s=input()
if set(s[::2])=={'R','U','D'} and set(s[1::2])=={'L','U','D'}:
    print('Yes')
else:print('No')

Submission status: Wrong Answer

Solution code:
s=input()
if set(s[::2])=={'R','U','D'} or set(s[1::2])=={'L','U','D'}:
    print('Yes')
else:print('No')

Submission status: Wrong Answer

Solution code:
N = input()

print("No" if N[::2] == "L" or N[1::2] == "R" else "Yes")

Submission status: Wrong Answer

Solution code:
s = input()
sl = list(s)
for i in range(len(sl)):
    if i % 2 == 1:
        if sl[i] == 'L':
            print('No')
            break
        else:
            continue
    else:
        if sl[i] == 'R':
            print('No')
            break
        else:
            continue
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()

odd = [ (c in 'RUD') for i, c in enumerate(s) if i % 2 == 1 ]
even =[ (c in 'LUD') for i, c in enumerate(s) if i % 2 == 0 ]

if all(odd) and all(even):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = input()

odd  = [ (c in 'RUD') for i, c in enumerate(s) if i % 2 == 1 ]
even = [ (c in 'LUD') for i, c in enumerate(s) if i % 2 == 0 ]

if all(odd) and all(even):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
def main():
    s = input()
    nagasa = len(s)

    for i in range(nagasa):
        if i % 2 != 0 and s[i] == "L":
            print("No")
            exit()
        elif i % 2 == 0 and s[i] == "R":
            print("No")
            exit()
    print("Yes")

    
    
    
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys
s=list(input())
odd=["R","U","D"]
even=["L","U","D"]
for i in range(len(s)):
  if i%2==1:
    if s[i] not in even:
      print("No")
  else:
    if s[i] not in odd:
      print("No")
print("Yes")

Submission status: Wrong Answer

Solution code:
import sys
s=list(input())
odd=["R","U","D"]
even=["L","U","D"]
for i in range(len(s)):
  if i%2==0:
    if s[i] not in even:
      print("No")
      sys.exit()
  else:
    if s[i] not in odd:
      print("No")
      sys.exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
import sys
s=list(input())
odd=["R","U","D"]
even=["L","U","D"]
for i in range(len(s)):
  if i%2==0:
    if s[i] not in even:
      print("No")
  else:
    if s[i] not in odd:
      print("No")
print("Yes")

Submission status: Wrong Answer

Solution code:
import sys
list=input()
def split(a): 
    return [char for char in a]
list=split(list)
even_count=0
odd_count=0
for i in list:
  if even_count%2==0:
      even_count+=1
      continue
  if list[even_count]=="R":
    print("NO")
    sys.exit()
  even_count+=1
for i in list:
  if odd_count%2==1:
      odd_count+=1
      continue
  if list[odd_count]=="L":
    print("NO")
    sys.exit()
  odd_count+=1
print("YES")

Submission status: Wrong Answer

Solution code:
import math
import sys
from collections import deque
import heapq
import copy
import itertools
from itertools import permutations
from itertools import combinations
import bisect
def mi() : return map(int,sys.stdin.readline().split())
def ii() : return int(sys.stdin.readline().rstrip())
def i() : return sys.stdin.readline().rstrip()
s=i()
for i in range(math.ceil(len(s)/2)):
  if not (s[2*i]=="R" or s[2*i]=="U" or s[2*i]=="D"):
    print("No")
    print(i)
    sys.exit()
for j in range(len(s)//2):
  if not (s[2*j+1]=="L" or s[2*j+1]=="U" or s[2*j+1]=="D"):
    print("No")
print('Yes')

Submission status: Wrong Answer

Solution code:
s=list(input())
x=''.join(s[0::2])
y=''.join(s[1::2])
if 'R' in x and 'D' in x and 'U' in x:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = input()
print('Yes' if s[::2] != "L" and s[1::2] != "R" else "No")

Submission status: Wrong Answer

Solution code:
s = input()
ans = 'Yes'
for i in range(len(s)):
    if i % 2 == 0:
        if s[i] == 'L':
            ans = 'No'
    else:
        if s[i] == 'R':
            ans = 'Yes'
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()

for i in range(len(s)):
    if i % 2 == 0:
        if s[i] != 'R':
            print('No')
            exit()
    else:
        if s[i] != 'L':
            print('No')
            exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
import sys

S = list(input())
n = len(S)
for i in range(n//2) :
    if S[2*i] == "L" :
        print("No")
        sys.exit()
    if 2*i == n-1 :
        break
    if S[2*i+1] == "R" :
        print("No")
        sys.exit()
    if 2*i + 1 == n-1 :
        break
print("Yes")

Submission status: Wrong Answer

Solution code:
S = input()
S1 = S[0::2]
S2 = S[1::2]

S_count = S1.count('R') + S1.count('U') + S1.count('D')+ S2.count('L') + S2.count('U') + S2.count('D')

if len(S) == S_count:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
S = input()
S1 = S[0::2]
S2 = S[1::2]

S_count = S1.count('R') + S1.count('U') + S1.count('D')+ S2.count('L') + S2.count('U') + S2.count('D')

if len(S) == S_count:
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
s=list(input())

l=[]
for i in s[1::2]:
  l.append(i)

new_l=[]
for i in s[::2]:
  new_l.append(i)

num =0
for i in new_l:
  if i == 'R' or i == 'U' or i == 'D':
    num='Yes'
  else:
    num='No'
    break

ans=0
for i in l:
  if i == 'L' or i == 'U' or i == 'D':
    ans='Yes'
  else:
    ans='No'
    break
if num == 'Yes' and ans == 'Yes':
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s=list(input())

l=[]
for i in s[1::2]:
  l.append(i)

new_l=[]
for i in s[::2]:
  new_l.append(i)

num='No'
for a,b in zip(new_l,l):
  
  if a == 'U' or a == 'R' or a == 'D':
    if b == 'U' or b == 'L' or b == 'D':
      num='Yes'
  else:
    num='No'
print(num)

Submission status: Wrong Answer

Solution code:
s=list(input())

l=[]
for i in s[1::2]:
  l.append(i)

new_l=[]
for i in s[::2]:
  new_l.append(i)

num='No'
for a,b in zip(new_l,l):
  print(a,b)
  if a == 'U' or a == 'R' or a == 'D':
    if b == 'U' or b == 'L' or b == 'D':
      num='Yes'
  else:
    num='No'
print(num)

Submission status: Wrong Answer

Solution code:

def main():
    S = list(input())
    for i, c in enumerate(S):
        if i % 2 == 1 and c == "L":
            print("No")
            return
        if i % 2 == 0 and c == "R":
            print("No")
            return
    print("Yes")

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
s = input()

w1 = [ "R", "U", "D"]
w2 = [ "L", "U", "D"]

for i in range(len(s)):
  if i % 2 == 0:
    if not s[i] in w1 :
      print("No")
      exit()
  else :
    if not s[i] in w2 :
      print("No2")
      exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()
for i in range(len(s)):
    if (i+1) % 2 != 0 and s[i] != 'R' and s[i] != 'U' and s[i] != 'D':
        break
    elif (i+1) % 2 == 0 and s[i] != 'L' and s[i] != 'U' and s[i] != 'D':
        break
if i == len(s) -1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()
for i in range(len(s)):
    if (i+1) % 2 != 0 and s[i] == 'L':
        break
    elif (i+1) % 2 == 0 and s[i] == 'R':
        break
if i == len(s) -1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()
for i in range(len(s)):
    if (i+1) % 2 != 0 and s[i] == 'L':
        break
    elif (i+1) % 2 == 0 and s[i] != 'R':
        break
if i == len(s) -1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()
count = 0
for i in range(len(s)):
    if (i+1) % 2 != 0 and s[i] != 'R' and s[i] != 'U' and s[i] != 'D':
        count += 1
    elif (i+1) % 2 == 0 and s[i] != 'L' and s[i] != 'U' and s[i] != 'D':
        count += 1
    else:
        break
if count == 0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()
for i in range(len(s)):
    if (i+1) % 2 != 0 and (s[i] == 'R' or s[i] == 'U' or s[i] == 'D'):
        pass
    elif (i+1) % 2 == 0 and (s[i] == 'L' or s[i] == 'U' or s[i] == 'D'):
        pass
    else:
        break
if i == len(s) - 1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s=list(input())
ans='YES'
n=len(s)
for i in range(n):
  if i%2:
    if s[i]=='R': ans='NO';break
  else:
    if s[i]=='L': ans='NO';break
print(ans)

Submission status: Wrong Answer

Solution code:
s = list(input())
ans = [0]*(len(s))

for i in range(len(s)):
  if s[i] == 'U':
    ans[i] = 1
  elif s[i] == 'D':
    ans[i] = 1
  elif i%2 == 0 and s[i] == 'R':
    ans[i] = 1
  elif i%2 !=0 and s[i] == 'L':
    ans[i] = 1

if len(set(ans)) == 2:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
s = list(input())
ans = [0]*(len(s))

for i in range(len(s)):
  if i%2 == 0:
    if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
      ans[i] = 1
  else:
    if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
      ans[i] = 1

if len(set(ans)) == 2:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()
for i in range(len(s) // 2):
    if s[i*2] == 'L' or s[i*2+1] == 'R':
        print('No')
        exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
S = input()
even = [v for i, v in enumerate(S) if i % 2 == 0]
odd = [v for i, v in enumerate(S) if i % 2 == 1]
count = even.count("R") + odd.count("L")
print("Yes" if count == 0 else "No")

Submission status: Wrong Answer

Solution code:
s = input()

odd = ["R", "U", "D"]
eve = ["L", "U", "D"]

flag = 1
for i in range(1,len(s)):
    if i % 2 == 0:
        if s[i] == "L":
            flag = 0
            break
    else:
        if s[i] == "R":
            flag = 0
            break

if flag:
    print('Yes')
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
# L = len(S) % 2
youtube = 0
ようつべ = 0
for i in range(len(S)):
  if i % 2 == 0:
    if S[i] == "L" or S[i] == "U" or S[i] == "D":
      youtube += 1
  else:
    ようつべ += 1
# if S[2] % 2 == 0:
if youtube == 1:
  print("Yes")
elif ようつべ == 1:
  print("No")

Submission status: Wrong Answer

Solution code:
S = list(input())

for i in range(len(S)):
    if i % 2 == 1:
        if S[i] not in ["L", "U", "D"]:
            print("No")
            exit()
    else:
        if S[i] not in ["R", "U", "D"]:
            print("No")
            exit()
print("yes")

Submission status: Wrong Answer

Solution code:
s=input()
if s[0::2]=='L' or s[1::2]=='R':
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
s=input()

ans="Yes"
for i in range(len(s)):
  if i%2==0 and s[i]=="R":
    ans="No"
  if i%2!=0 and s[i]=="L":
    ans="No"
    
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()

for i in range(len(S)):
  if i % 2 == 0:
    if S[i] == "R":
      print("No")
      exit()
  else:
    if S[i] == "L":
      print("No")
      exit()
      
print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()
a = 0
for i in s:
    if i == 'R' and s.index(i)%2 == 1:
        a+=1
    elif i == "L" and s.index(i)%2 == 0:
        a+=1
if a == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
for i in s:
  if i == 'L' and s.index(i)%2 == 0:
    print('No')
  elif i == 'R' and s.index(i)%2 == 1:
    print('No')
  else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()
for i in s:
  if i == 'L' and s.index(i)%2 == 1:
    print('No')
  elif i == 'R' and s.index(i)%2 == 0:
    print('No')
  else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
"""
abc141-b
"""

import sys

S = input()

if (len(S) == 1):
    print("No")
    sys.exit()
else:
    for i in range(int(len(S))-1):
        if (i % 2 == 0):
            if (S[i] == "L"):
                print("No")
                sys.exit()
        else:
            if (S[i] == "R"):
                print("No")
                sys.exit()

print("Yes")

Submission status: Wrong Answer

Solution code:
"""
abc141-b
"""

import sys

S = input()

for i in range(int(len(S))-1):
    if (i % 2 == 0):
        if (S[i] == "L"):
            print("No")
            sys.exit()
    else:
        if (S[i] == "R"):
            print("No")
            sys.exit()

print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()
s = list(s)
flag = True
temp = 0
for i in range(len(s)):
    temp += 1
    if temp % 2 == 1 :
        if s[i] == "R" or s[i] == "U" or s[i] == "D":
            continue
        else:
            flag = False
    elif temp % 2 == 0:
        if s[i] == "L" or s[i] == "U" or s[i] == "D":
            continue
        else:
            flaf = False

if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
result = 'Yes'
for i in range(1, len(S)+1):
  print(i)
  if (i % 2 == 0 and S[i-1] == "R") or (i % 2 == 1 and S[i-1] == "L"):
      result = 'No'
      break
      
print(result)

Submission status: Wrong Answer

Solution code:
S = input()
gusu = ["L", "U", "D"]
kisu = ["R", "U", "D"]
result = 'Yes'
for i in range(len(S)):
  if (i % 2 == 0 and S[i] == "R") or (i % 2 == 1 and S[i] == "L"):
      resule = 'No'
      break
      
print(result)

Submission status: Wrong Answer

Solution code:
S = input()
odd = S[0::2]
even = S[1::2]
ans = 'No'

if odd not in 'L':
    if even not in 'R':
        ans = 'Yes'

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
ans = 'No'
for i in s:
	if i == 'R':
		if s.index(i) % 2 == 0:
			print('No')
			exit()
		else:
			ans = 'Yes'
	if i == 'L':
		if s.index(i) % 2 == 0:
			ans = 'Yes'
		else:
			print('No')
			exit()
print(ans)

Submission status: Wrong Answer

Solution code:
s = str(input())
n = len(s)
cnt = 0
for i in range(n):
  if i % 2 == 0:
    if s[i] == 'R' or 'U' or 'D':
      cnt += 0
    else:
      cnt += 1
  else:
    if s[i] == 'L' or 'U' or 'D':
      cnt += 0
    else:
      cnt += 1
if cnt == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = 'ULURU' #input()
cnt = 0
for i in range(1, len(s)+1):
    t = s[i-1]
    if i % 2 == 1:
        if t == 'R':
            cnt += 1
        elif t == 'U':
            cnt += 1
        elif t == 'D':
            cnt += 1
    else:
        if t == 'L':
            cnt += 1
        elif t == 'U':
            cnt += 1
        elif t == 'D':
            cnt += 1


if cnt == len(s):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S=list(input())
a=S[::2]
b='Yes'
for i in a:
  if i!='R' or i!='U' or i!='D':
    b='No'
    break
c=S[1::2]
for j in c:
  if j!='L' or j!='U' or j!='D':
    b='No'
    break
print(b)

Submission status: Wrong Answer

Solution code:
S=list(input())
a=S[::2]
c=S[1::2]
b='Yes'
for i in a:
  if i!='R' or i!='U' or i!='D':
    b='No'
for j in c:
  if j!='L' or j!='U' or j!='D':
    b='No'
print(b)

Submission status: Wrong Answer

Solution code:
S=list(input())
a=S[::2]
c=S[1::2]
b='Yes'
for i in a:
  if i!='R' or i!='U' or i!='D':
    b='No'
for j in c:
  if j!='L' or i!='U' or i!='D':
    b='No'
print(b)

Submission status: Wrong Answer

Solution code:
s = input()
s = list(s)
num = len(s)
count = [0] * num
elist = ['L', 'U', 'D']
olist = ['R', 'U', 'D'] 
list = ['L', 'R', 'U', 'D']
ans = ''

for i in range(num):
  i = i + 1
  if i % 2 == 0:
    if elist.count(s[i - 1]) > 0:
      count[i-1] = 1
  else:
    if olist.count(s[i - 1]) > 0:
      count[i-1] = 1

for i in s:
  if list.count(i) > 0:
    if len(set(count)) == 1:
      ans = 'Yes'
    else:
      ans = 'No'
  else:
    ans = 'No'
    
print(ans)

Submission status: Wrong Answer

Solution code:
S =input()

print('No' if S[::2] == 'L' or S[1::2] == 'R' else 'Yes')

Submission status: Wrong Answer

Solution code:
s = input()
s = list(s)
num = len(s)
count = [0] * num
elist = ['L', 'U', 'D']
olist = ['R', 'U', 'D'] 

for i in range(num):
  i = i + 1
  if i % 2 == 0:
    if elist.count(s[i - 1]) > 0:
      count[i-1] = 1
  else:
    if olist.count(s[i - 1]) > 0:
      count[i-1] = 1

if len(set(count)) == 1:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = str(input())
tf = True
for i,letter in enumerate(s):
  if (i+1) % 2 == 1:
    if letter not in ['R','U','D']:
      tf = False
  if (i+1) % 2 == 0:
    if letter not in ['L','U','D']:
      tf = False
print(tf)

Submission status: Wrong Answer

Solution code:
a=input()
print(a[0::2],a[1::2])
if set(a[0::2])<=set(['R','U','D']) and set(a[1::2])<=set(['L','U','D']):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a=input()
if ('R'or'U'or'D') in a[0::2] and ('L'or'U'or'D') in a[1::2]:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
a=input()
if a[1::2] in ['R','U','D'] and a[2::2] in ['L','U','D']:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
S = list(input())

O = [i for i in range(len(S)) if i % 2 == 0]
E = [i for i in range(len(S)) if i % 2 == 1]

if "L" in O or "R" in E:
  print("No")
else:
  print("Yes")