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:
a = input()
if len(a)==1 and a == "L":
    print("No")
    exit()
elif len(a)==1:
    print("Yes")
    exit()
for i in a[::2]:
    for j in a[1::2]:
        print(i,j)
        if i =="L" or j =="R":
            print("No")
            exit()
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
a = input()
for i in a[::2]:
    for j in a[1::2]:
        if i =="L" or j =="R":
            print("No")
            exit()
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
a = input()
for i in a[::2]:
    for j in a[1::2]:
        if i not in ["R","U","D"] or j not in ["L","U","D"]:
            print("No")
            exit()
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
s=list(input())
print(s)
odd = [s[i] for i in range(0, len(s), 2)]
even = [s[i] for i in range(1, len(s), 2)]
#print(odd,even)

if "R" in even or "L"in odd:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
S = list(str(input()))
print(S)
for i in range(len(S)) :
  if i % 2 == 1 and S[i] == "R" :
    print("No")
    break
  elif i % 2 == 0 and S[i] == "L" :
    print("No")
    break
else :
  print("Yes")

Submission status: Wrong Answer

Solution code:
s = str(input())

n = len(s)
a = True
odd = ['R','U','D']
even = ['L','U','D']

m = n // 2
if all((s[2 * i] in odd) for i in range(m)):
    if all(((s[2 * i + 1]) in even) for i in range(m)):
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

i = str(input())
if i =="Sunny":
	print("Cloudy")
elif i =="Cloudy":
	print("Rainy")
elif i =="Rainy":
	print("Sunny")

Submission status: Wrong Answer

Solution code:
s = input()

odd = s[0::2]
even = s[1::2]
print("{} {}".format(odd, even))

if 'L' in odd or 'R' in even:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
S=input()

cnt=0
for i in range(len(S)):
    if i%2==0:
        if S[i]=='R':
            cnt+=1
    else:
        if S[i]=='L':
            cnt+=1
if cnt==0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
N=list(input())
a=[]
b=[]
#print(N)
#print(len(N))
for k in range(len(N)):
    if k%2>0:
        a.append(N[k])
    else:
        b.append(N[k])
if   a.count('L')==0 and b.count('R')==0:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
even = 'LUD'
odd = 'RUD'

s = input()

for i in range(0,len(s)):

    if i + 1 % 2 == 0 and s[i] not in even:
        print('No')
        exit()

    if i + 1  % 2 == 1 and s[i] not in odd:
        print('No')
        exit()

print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()

for i in range(1, len(s)):
    if (i%2 != 0 and s[i] == "R") or (i%2 == 0 and s[i] == "L"):
        print("No")
        exit()

print("Yes")

Submission status: Wrong Answer

Solution code:
s = list(input("ddd"))

flg = 0

for i in range(len(s)):
    if i % 2 ==1:
        if str(s[i]) == "R":
            flg = 1
    else:
        if str(s[i]) == "L":
            flg = 1

if flg == 0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = list(input())
Even = ["L","U","D"]
Odd = ["R", "U", "D"]
answer = "Yes"
for i in range(len(S)):
  if i % 2 == 0 and S[i] not in Even:
    answer = "No"
  elif i % 2 != 0 and S[i] not in Odd:
    answer = "No"
print(answer)

Submission status: Wrong Answer

Solution code:
s = input()

e=0
for x in range(0, len(s)):
  if x%2==0 and s[x] == 'R':
    e = 1

o=0
for y in range(0, len(s)):
  if y%2!=0 and s[y] == 'L':
    o = 1
    
if e==1 or o==1:
  print('No')

else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()

#奇数にlがなくて偶数にrがなければいい

e=0
for x in s:
  if s.index(x)%2==0 and x == 'R':
    e = 1

o=0
for y in s:
  if s.index(y)%2!=0 and y == 'L':
    o = 1
    
if e==1 or o==1:
  print('No')

else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()

#奇数にlがなくて偶数にrがなければいい

e=0
for x in s:
  if s.index(x)%2==0 and x == 'R':
    e = 1

o=0
for y in s:
  if s.index(y)%2!=0 and x == 'L':
    o = 1
    
if e==1 or o==1:
  print('No')

else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()

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

Submission status: Wrong Answer

Solution code:
s = input()

bool = True
for i in range(0,len(s)-1):
    if i % 2 == 0:
        if s[i] not in ['R','U','D']:
            bool = False
    else:
        if s[i] not  in ['L','U','D']:
            bool = False
if bool :
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()

#奇数にlがなくて偶数にrがなければいい

e=0
for x in s:
  if s.index(x)%2==0 and x == 'R':
    e += 1

o=0
for y in s:
  if s.index(y)%2!=0 and x == 'L':
    o += 1
    
if e==1 or o==1:
  print('No')

else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
S = list(input())
Flag = True
for i in range(0,len(S)):
  if i % 2 == 0:
    a = S[i]
    if Flag == True and a == 'R':
       Flag = False
  else:
    b = S[i]
    if Flag == True and b == 'L':
       Flag = False
if Flag == True:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()
ans="Yes"
y="Yes"
n="No"
for i in range(len(S)):
    if i%2==1:
        if S[i] in {"L","U","D"} and S[i-1] in {"R","U","D"} and S[len(S)-1] in {"R","U","D"}:
            ans=y
        else:
            ans=n
    else:
        continue
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
s_odd = s[0::2]
s_even = s[1::2]

print("YNeos"[s_odd.find('L')*s==-1 and even.find('R')==-1 :: 2])

Submission status: Wrong Answer

Solution code:
S = str(input())
for i in range(1, len(S), 2):
    if S[i] != "L" and S[i] != "U" and S[i] != "D":
        print("No")
        exit()
    elif S[i - 1] != "R" and S[i - 1] != "U" and S[i - 1] != "D":
        print("No")
        exit()
    else:
        continue
print("Yes")

Submission status: Wrong Answer

Solution code:
S = str(input())
for i in range(1, len(S), 2):
    if S[i] == "L" or S[i] == "U" or S[i] == "D":
        pass
    elif S[i - 1] == "R" or S[i - 1] == "U" or S[i - 1] == "D":
        continue
    else:
        print("No")
        exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
S = str(input())
for i in range(1, len(S), 2):
    if S[i] == "L" or S[i] == "U" or S[i] == "D":
        continue
    elif S[i - 1] == "R" or S[i - 1] == "U" or S[i - 1] == "D":
        continue
    else:
        print("No")
        exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
S = str(input())
for i in range(1, len(S), 2):
    if S[i] == "R" or S[i] == "U" or S[i] == "D":
        continue
    else:
        print("No")
        exit()
for i in range(0, len(S), 2):
    if S[i] == "L" or S[i] == "U" or S[i] == "D":
        continue
    else:
        print("No")
        exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
import numpy

S = input()
isContinue = True

for i in range(0, len(S), 2):
    if isContinue and S[i] not in ['R', 'U', 'D']:
        print('No')
        isContinue = False

for i in range(1, len(S), 2):
    if isContinue and S[i] not in ['L', 'U', 'D']:
        print('No')
        isContinue = False

if isContinue:
    print('YesDULL')

Submission status: Wrong Answer

Solution code:
s = input()
yes = True
for i, c in enumerate(s):
    if i % 2 == 0 and c == 'R':
        yes = False
    elif i % 2 == 1 and c == 'L':
        yes = False
if yes:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()
Mylist = list(S)
Rlist = ["R","U","D"]
Llist = ["L","U","D"]
ANSlist = []
for i in range(len(Mylist)):
    if i%2 == 1:
        if Mylist[i] in Rlist:
            ANSlist.append("Y")
    else:
        if Mylist[i] in Llist:
            ANSlist.append("Y")

if len(ANSlist) == len(Mylist):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
list_1 = input()
l_st = filter(lambda x: x % 2 == 0, list_1)
l_is = filter(lambda x: x % 2 == 1, list_1)
lis = ["R","U","D"]
lit = ["L","U","D"]
s = 0
if  l_st in lis :
  s+=1
elif l_is in lit:
  s+=1
if s==2:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s=input()
if "L" not in s[::2]:
    print("Yes")
elif "R" not in s[1::2]:
    print("No")

Submission status: Wrong Answer

Solution code:
st = input()
y = 0
lst2 = []
lst3 = []
while y < len(st)-1:
    if y % 2 == 0:
        lst2.append(st[y])
    else:
        lst3.append(st[y])
    y += 1
if "R" in lst3:
    print("No")
elif "L" in lst2:
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
S = list(input())
T = []
for i in range(len(S)):
    if i%2 == 0 :
        S[i] = "R"
        T.append("A")
    if i%2 == 1 :
        S[i] = "L"
        T.append("B")
if "A" in T or "B" in T:
    print("No")
else :
    print("Yes")

Submission status: Wrong Answer

Solution code:
#Sは文字
s=input()

A=[]
B=[]
#sが奇数、偶数の場合に分ける。奇数の場合
for i in range(len(s)):
    if (i+1)%2==0:
        if s[i] in "R":
            A="false"
        else:
            A="true"
    elif i%2==0:
        if s[i] in "L":
            B="false"
        else:
            B="true"
if A and B == "true":
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=input()
a=0
for i in range (0,len(s)):
  if s[i]=="R"or"L":
    if i%2==0:
      if s[i]=="R":
        a=a+1
    else:
      if s[i]=="L":
        a=a+1
if a==0:
  print("Yes")
else:
  print("No")
print(len(s))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
play = True
s = input()

for i in range(len(s)):
  if i%2 == 0:
    if s[i] =='L':
      play = False
  else:
    if s[i] == 'R':
      play = False
if play:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
play = True
s = input()

for i in range(len(s)):
  if i%2 == 0:
    if s[i] =='R' or s[i] == 'U' or s[i] == 'D':
      pass
    else:
      play = False
  else:
    if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
      pass
    else:
      play = False
if play:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
s = list(input())

if s[0::2] == 'L' or 'U' or 'D':
    if s[1::2] == 'R' or 'U' or 'D':
        print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
x = input()
judge1=False
judge2=False
for i in range(0,len(x),2):
  if x[i]=="R" or x[i]=="U" or x[i]=="D":
    judge1=True
for j in range(1,len(x),2):
  if x[j]=="L" or x[j]=="U" or x[j]=="D":
    judge2=True
if judge1==True and judge2==True:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S=str(input())
N=len(S)
ans=0
if N==1:
    if S=='R':
        print('Yes')
    else:
        print('No')
else:
    for i in range(0,N-1):
        if i%2 ==1:
            if S[i]=='R':
                ans=1
                break
            
        else:
            if S[i]=='L':
                ans=1
                break

        
    if ans==1:
        print('No')
    else :
        print('Yes')

Submission status: Wrong Answer

Solution code:
S=str(input())
N=len(S)
ans=0
for i in range(0,N-1):
    if N==1:
        ans=1
        break
    if i%2 ==1:
        if S[i]=='R':
            ans=1
            break
        
    else:
        if S[i]=='L':
            ans=1
            break
if N>1:
        
    if ans==1:
        print('No')
    else :
        print('Yes')
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S=str(input())
N=len(S)
ans=0
for i in range(0,N-1):
    if i%2 ==1:
        if S[i]=='R':
            ans=1
            break
        
    else:
        if S[i]=='L':
            ans=1
            break

if ans==1:
    print('No')
else :
    print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()
list_A=[]
for letter in S:
    list_A.append(letter)
list_B=list_A[0::2]
list_C=list_A[1::2]
b=0
c=0
for letter2 in list_B:
    if letter2=='R'or letter2=='U'or letter2=='D':
        b+=1
for letter3 in list_C:
    if letter3=='L'or letter2=='U'or letter2=='D':
        c+=1
if b==len(list_B)and c==len(list_C):
        print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = list(str(input()))
for i in range(1, len(s)):
  if ((i+1)%2 and s[i]=='L') or ((i+1)%2==0 and s[i]=='R'):
    print('No')
    exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
s = list(str(input()))
for i in range(1, len(s)):
  if (i%2 and s[i]=='R') or (i%2==0 and s[i]=='L'):
    print('No')
    exit()
print('Yes')

Submission status: Wrong Answer

Solution code:
s = list(str(input()))
for i in range(1, len(s)):
  if (i%2 and s[i]=='L') or (i%2==0 and s[i]=='R'):
    print('No')
    exit()
print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
S = input()
N = len(S)
count = 0
for i in range(math.ceil(N/2) - 1):
    if S[2 * i] != 'L' and S[2 * i + 1] != 'R':
        count += 2
    else:
        break
if N % 2 == 1:
    if S != 'R':
        count += 1
if count == N:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
dic = [{'L':1, 'R':0, 'U':1, 'D':1},{'L':0, 'R':1, 'U':1, 'D':1}]
s = input()
ans = 1
for i ,key in enumerate(s):
  ans = ans*(dic[(i+1)%2][key])
print(ans)

Submission status: Wrong Answer

Solution code:
s=list(input())
l=len(s)
for i  in range(0,l):
  if i%2==0:
    if s[i]=="R":
      print("No")
      exit()
  elif i%2==1:
    if s[i]=="L":
      print("No")
      exit()
  else:
    pass
print("Yes")

Submission status: Wrong Answer

Solution code:
s=list(input())
l=len(s)
for i  in range(0,l):
  if i%2==0:
    if s[i]=="R":
      print("No")
      exit()
  if i%2==1:
    if s[i]=="L":
      print("No")
      exit()
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
s=list(input())
l=len(s)
for i  in range(0,l):
  if i%2==0:
    if s[i]=="R":
      print("No")
  exit()
  if i%2==1:
    if s[i]=="L":
      print("No")
  exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
s=list(input())
l=len(s)
for i  in range(0,l):
  if i%2==0:
    if s[i]=="R":
      print("No")
      exit()
  if i%2==1:
    if s[i]=="L":
      print("No")
      exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
s=list(input())
l=len(s)
for i  in range(0,l):
  if i%2==0:
    if s[i]=="R":
      break
  if i%2==1:
    if s[i]=="L":
      break
  print("Yes")
print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    S = input()
    ans = 'Yes'
    for i in range(len(S)):
        if ((i+1)//2==1 and S[i]=='L') or ((i+1)//2==0 and S[i]=='R'):
            ans == 'No'
            break
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
S = input()
count = 0
for i in range(len(S)):
    if i % 2 == 0:
        if S[i] == 'L' or S[i] == 'U' or S[i] == 'D':
            count += 1    
        
    else:
        if 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 == 0:
        if S[i] == 'L' or S[i] == 'U' or S[i] == 'D':
            count += 1    
        
    else:
        if 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()
for i in range(len(S)):
    if i % 2 == 0:
        if S[i] == 'L' or S[i] == 'U' or S[i] == 'D':
            print('Yes')
        else:
            print('No')
    else:
        if S[i] == 'R' or S[i] == 'U' or S[i] == 'D':
            print('Yes')
        else:
            print('No')

Submission status: Wrong Answer

Solution code:
s=input()

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

Submission status: Wrong Answer

Solution code:
s=input()

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

Submission status: Wrong Answer

Solution code:
strs = input()
 
for i in range(len(strs)):
  if i % 2 == 0:
    if (strs[i] == "L") or (strs[i] == "U") or (strs[i] == "D"):
      continue
    else:
      print("No")
      break
  else:
    if (strs[i] == "R") or (strs[i] == "U") or (strs[i] == "D"):
      continue
    else:
      print("No")
      break
else:
  print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()

ans='Yes'
for i in range(len(s)):
	if(i%2 == 0):
		#奇数
		if(s=="L"):
			ans="No"
			break
	else:
		#偶数
		if(s=="R"):
			ans="No"
			break
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
id = 0
res = 'Yes'
for i in s:
    if id & 1 == 0 and i == 'L' or id & 1 == 1 and i == 'R':
        res = 'No'
        break
print(res)

Submission status: Wrong Answer

Solution code:
s=list(input())
n=len(s)
odd=s[0:n:2]
even=s[1:n:2]
if "L" in odd:
  print("No")
elif "R" in even:
  print("No")
else:
  print("Yes")
print(odd)  
print(even)

Submission status: Wrong Answer

Solution code:
s=list(input())
n=len(s)
odd=s[0:n:2]
even=s[1:n:2]
if "L" in odd:
  print("No")
if "R" in even:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
li_s = list(input())
a = 0
for i in range(0, len(li_s), 2):
  for j in range(1, len(li_s), 2):
    if li_s[i] != "L" and li_s[j] != "R":
      a += 0
    else:
      a += 1
if a == 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
li_s = list(input())
a = 0
for i in range(1, len(li_s), 2):
  for j in range(0, len(li_s), 2):
    if li_s[i] != "L" and li_s[j] != "R":
      a += 0
    else:
      a += 1
if a == 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = input()
odd = ['R','U','D']
even = ['L','U','D']
o,e = False,False
for i in range(1,len(S)+1):
    if i % 2 == 0:
        if S[i-1] in even:
            e = True
        else:
            e = False
    else:
        if S[i-1] in odd:
            o = True
        else:
            o = False
if e and o:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()
flag = True
for i, j in enumerate(s):
    print(i+1 ,j)
    if ( i+1) % 2 == 0:
        if not(j == "L" or j =="U" or j == "D"):
            flag = False
    else:
        if not(j == "R" or j =="U" or  j == "D"):
            flag = False
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
flag = True
for i, j in enumerate(s):
    if ( i+1) % 2 == 0:
        if not(j == "L" or j =="U" or j == "D"):
            flag = False
    else:
        if not(j == "R" or j =="U", j == "D"):
            flag = False
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()

flag = True
for i, j in enumerate(s):
    if (i+1) % 2 == 0:
        if not(j == "L" or j =="U" or j == "D"):
            flag = False
    else:
        if not(j == "R" or j =="U", j == "D"):
            flag = False
if flag:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
a = input()

iseasy = "Yes"
odd_l = ["R","U","D"]
even_l = ["L","U","D"]

for i in range(0,int(len(a)/2)):
	if a[2*i] in odd_l: 
		pass
	else: 
		iseasy = "No"
		break
	if a[2*i+1] in even_l: 
		pass
	else:
		iseasy = "No"
		break
print(iseasy)

Submission status: Wrong Answer

Solution code:
S = input()
flag = True
 
for i in range(len(S)):
  if i%2==0 and S[i] == "R":
    print('No')
    flag = False
    break
  if i%2==1 and S[i] == "L":
    print('No')
    flag = False
    break
if flag:
  print('Yes')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = [s for s in input().split()]

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
ans = "YES"
for i in range(0,len(s),2):
    if(s[i] == "L"):
        ans = "NO"
        break
for i in range(1,len(s),2):
    if(s[i] == "R"):
        ans = "NO"
        break
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
l = []
for i in s :
    l.append(i)

if "L" in l[::2] :
    print("NO")
elif "R" in l[1::2] :
    print("NO")
else :
    print("YES")

Submission status: Wrong Answer

Solution code:
S = input ()

even_clear = 0
odd_clear = 0
number = 1

for value in S:
    if number % 2 == 0 and  not value == "R":
        even_clear += 1

    elif number % 2 == 1  and not value == "L":
        odd_clear += 1
    number += 1

number_pop = number - 1

print(even_clear)
print(odd_clear)
print(number_pop)

if number_pop == (even_clear + odd_clear):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input ()

even_clear = 0
odd_clear = 0
number = 1

for value in S:
    if number % 2 == 0 and  not value == "R":
        even_clear += 1
    elif  not value == "L":
        odd_clear += 1
    number += 1

if number - 1 == (even_clear + odd_clear):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input ()

even_clear = 0
odd_clear = 0
number = 1

for value in S:
    if number % 2 == 0 and  not value == "R":
        even_clear += 1
    elif  not value == "L":
        odd_clear += 1
    number += 1

S_length = len(S)

if S_length == (even_clear + odd_clear):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()
a = []
b = []
n = 0

if len(s) % 2 == 1:
    for i in range((len(s) // 2) + 1):
        a.append(s[2 * i])
else:
    for i in range(len(s) // 2):
        a.append(s[2 * i])
    
for i in range(len(s) // 2):
    b.append(s[2 * i + 1])
    
for i in range(len(a)):
    if a[i] == "L":
        n += 1
        
for i in range(len(b)):
    if b[i] == "R":
        n += 1
        
if n > 0:
    print("NO")
else:
    print("YES")

Submission status: Wrong Answer

Solution code:
S=input()
if all(i in 'RUD' for i in S[::2]) and all(j in 'LUD' for j in S[1::2]):
    print('Yes')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
S = input ()

even_clear = 0
odd_clear = 0
number = 1

for value in S:
    if number % 2 == 0 and  not value == "R":
        even_clear += 1
    elif  not value == "L":
        odd_clear += 1
    number += 1

print("odd=",odd_clear)
print("even=",even_clear)
S_length = len(S)

if S_length == (even_clear + odd_clear):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
Even = ["L","U","D"] #偶数に入る文字
Odd = ["R","U","D"] #奇数に入る文字
s = input()
a = s[1::2] #偶数の文字列
b = s[0::2] #奇数の文字列
print(a)
print(b)
if ("L" in b) or ("R" in a):
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    s = input()
    Odds = s[1::2]
    Evens = s[0::2]
    if "L" in Odds:
        print("No")
    elif "R" in Evens:
        print("No")
    else:
        print("Yes")

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
Odd = []
def main():
    s = input()
    Odds = s[1::2]
    Evens = s[0::2]
    if "L" in Odds or "R" in Evens:
        print("No")
    else:
        print("Yes")

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def main():
    s = input()
    Odds = s[1::2]
    Evens = s[::2]
    if ("L" in Odds) or ("R" in Evens):
        print("No")
    else:
        print("Yes")

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
S = input("")
a = 0
for i in range(len(S)):
    if i%2==1:
        if S[i] == 'L':
            a=a+1
        if S[i] == 'U': 
            a = a+1
        if S[i] == 'D':
            a = a+1
        else:
            a = 0
    elif i%2==0:
        if S[i] == 'R':
            a=a+1
        if S[i] == 'U': 
            a = a+1
        if S[i] == 'D':
            a = a+1
        else:
            a = 0

if len(S)==a:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    s = input()
    Odds = s[1::2]
    Evens = s[::2]
    if Odds in "L" or Evens in "R":
        print("No")
    else:
        print("Yes")

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
Odd = ["L","U","D"]
Even = ["R","U","D"]

def main():
    s = input("Hey,TapDance:")
    O = 1
    E = 1
    Odds = s[1::2]
    Evens = s[::2]
    if Odds in "L" or Evens in "R":
        print("No")
    else:
        print("Yes")
        

if __name__ == "__main__":
    main()