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:
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]
    for target in Odds:
        if target not in Odd:
            O = 0

    for target in Evens:
        if target not in Even:
            E = 0

    tmp = O + E
    if tmp == 2:
        print("yes")
    else:
        print("No")
        

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
S = input()

is_easy2step = all(i in ['R', 'U', 'D'] for i in S[::2]) and all(i in ['L', 'U', 'D'] for i in S[1::2])
print('yes' if is_easy2step else 'no')

Submission status: Wrong Answer

Solution code:
s = input()

ch = 1

for i in range(len(s)):
    if(s[i]=='R'):
        if(i%2!=0):
            ch = 0
    elif(s[i]=='L'):
        if(i%2==0):
            ch = 0
            
if(ch==0):
    print('NO')
else:
    print('YES')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

if all([not 'L'==i  for i in S[0::2]] and [not 'R'==i for i in S[1::2]]):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()

if all([not 'L'==i  for i in S[0::2]] and [not 'R'==i for i in S[1::2]]):
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
odd = set(s[::1])
if "L" in odd:
  print("No")
  exit()
even = set(s[1::1])
if "R" in even:
  print("No")
  exit()
print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
_ans = 0
_S = len(S)
for s in range(1,_S):
  X = (s) % 2
  if X == 1 :
    if S[s] == 'R':
      _ans += 1
     
  if X == 0 :
    if S[s] == 'L' :
      _ans += 1
  
  
if _ans >= 1:
  print ('No')
elif _ans ==0:
  print ('Yes')

Submission status: Wrong Answer

Solution code:
S = input()
f = True
for s, i in zip(S, range(1, len(S))):
    if i % 2 == 0:
        if s == "R":
            f = False
            break
    else:
        if s == "L":
            f = False
            break
if f:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
import sys
N = input()
b=0

for i in range (len(N)):
    if i%2==0:
        if N[i]!="R" or N[i]!="U" or N[i]!="D":
            b=1
    else:
        if N[i]!="L" or N[i]!="U" or N[i]!="D":
            b=1

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

Submission status: Wrong Answer

Solution code:
import sys

s = list(input())

for i in range(len(s)):
  if i % 2 == 1:
    if s[i] == "R" or s[i] == "U"or s[i] == "D":
      continue
    else:
      print("No")
      sys.exit()
  else:
    if s[i] == "L" or s[i] == "U"or s[i] == "D":
      continue
    else:
      print("No")
      sys.exit()

print("Yes")

Submission status: Wrong Answer

Solution code:
S = input()
odd = {'R', 'U', 'D'}
even = {'L', 'U', 'D'}
isEasy = "Yes"
for i in range(1,len(S)):
  if (i % 2 == 0 and S[i-1] not in even) or i % 2 != 0 and S[i-1] not in odd:
    isEasy = "No"
print(isEasy)

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
a = input()
b = list(a)
count = 0

for i in range(0, len(b)):
    if i % 2 == 0 and b[i] == 'L':
        count += 1
        print('No')
        break
    if i % 2 == 1 and b[i] == 'R':
        print('No')
        break
if count == 0:
    print('Yes')

Submission status: Wrong Answer

Solution code:
from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
import math
import time
import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
ts=time.time()
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
show_flg=False
show_flg=True

an=0
k=0
s=list(input())
n=len(s)
d=[['R','U','D'],['L','U','D']]
for i in range(n):
    if s[i] in d[k]:
        0
    else:
        an=1
    k=1-k
    
print(YN[an])

Submission status: Wrong Answer

Solution code:
import sys
S=list(input())
q=len(S)//2

for i in range (0,q):
    if S[2*i]=="L" or S[2*i+1]=="R" :
        print("No")
        sys.exit()
    else:
        continue
print("Yes")

Submission status: Wrong Answer

Solution code:
S=list(input())
q=len(S)//2
i=0
K="Yes"
for i in range (0,q):
    if S[2*i]=="L" or S[2*i+1]=="R" :
        K="No"
        break
    else:
        continue
print(K)

Submission status: Wrong Answer

Solution code:
S=list(input())
q=len(S)//2
K="Yes"
for i in range (0,q):
    if S[2*i]=="L":
        K="No"
        break
    else:
        if S[2*i+1]=="R":
            K="No"
            break
        else:
            continue
print(K)

Submission status: Wrong Answer

Solution code:
S=list(input())
q=len(S)//2
K="Yes"
for i in range (0,q):
    if S[2*i]=="L":
        K="No"
        break
    elif S[2*i+1]=="R":
        K="No"
        break
    else:
        continue
print(K)

Submission status: Wrong Answer

Solution code:
S=list(input())
q=len(S)//2
i=0
K="Yes"
for i in range (0,q):
    if S[2*i]=="L":
        K="No"
        break
    elif S[2*i+1]=="R":
        K="No"
        break
    else:
        continue
print(K)

Submission status: Wrong Answer

Solution code:
stepableodd = False
stepableeven = False
step = input()
for i in range(len(step)):
    if (i+1) % 2 == 1:
        if step[i] == "R" or step[i] == "D" or step[i] == "U":
            stepableodd = True
        else:
            stepableodd = False
    if (i+1) % 2 == 0:
        if step[i] == "L" or step[i] == "D" or step[i] == "U":
            stepableeven = True
        else:
            stepableeven = False
if stepableodd == True and stepableeven == True:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=input()
s2=s[0: :2]
s1=s[1: :2]
ans=0

for i in range(len(s1)):
    if s1[i]=='L' or s1[i]=='U' or s1[i]=='D':
        ans+=1
    else:
        print('No')
        break

for i in range(len(s2)):
    if s2[i]=='R' or s2[i]=='U' or s2[i]=='D':
        ans+=1
    else:
        print('No')
        break
        
if ans==len(s):
    print('Yes')

Submission status: Wrong Answer

Solution code:
s=input()
s2=s[0: :2]
s1=s[1: :2]
print(s1, s2)
ans=0

for i in range(len(s1)):
    if s1[i]=='L' or s1[i]=='U' or s1[i]=='D':
        ans+=1
    else:
        print('No')
        break

for i in range(len(s2)):
    if s2[i]=='R' or s2[i]=='U' or s2[i]=='D':
        ans+=1
    else:
        print('No')
        break
        
if ans==len(s):
    print('Yes')

Submission status: Wrong Answer

Solution code:
S = raw_input()
ansOdd = True
ansEven = True

for i in range(0,len(S),2):
  if S[i] == "L":
    ansOdd = False
  else:
    ansOdd = True
for i in range(1,len(S),2):
  if S[i] == "R":
    ansEven = False
  else:
    ansEven = True
    
if ansOdd and ansEven:
  print "Yes"
else:
  print "No"

Submission status: Wrong Answer

Solution code:
S = raw_input()
ansOdd = False
ansEven = False

for i in range(0,len(S),2):
  if S[i] == "L":
    ansOdd = False
  else:
    ansOdd = True
for i in range(1,len(S),2):
  if S[i] == "R":
    ansEven = False
  else:
    ansEven = True
    
if ansOdd and ansEven:
  print "Yes"
else:
  print "No"

Submission status: Wrong Answer

Solution code:
s = list(input())
a = 0

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

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

Submission status: Wrong Answer

Solution code:
s = list(input())
a = 0

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

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

Submission status: Wrong Answer

Solution code:
import sys
line = sys.stdin.readlines()[0]

if all([c == "R" or c == "U" or c == "D" for c in line[0::2]]) and all([c == "L" or c == "U" or c == "D" for c in line[1::2]]):
    print "Yes"
else:
    print "No"

Submission status: Wrong Answer

Solution code:
odd = ['R','U','D']
even = ['L', 'U', 'D']
S = input()
for s in S[::2]:
  if s not in odd:
    print('No')
    break
    
for s in S[1::2]:
  if s not in even:
    print('No')
    break
    
print('Yes')

Submission status: Wrong Answer

Solution code:
odd = ['R','U','D']
even = ['L', 'U', 'D']
S = input()
for s in S[::2]:
  if s not in even:
    print('No')
    break
    
for s in S[1::2]:
  if s not in odd:
    print('No')
    break
    
print('Yes')

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc141/tasks/abc141_b
s = input()
sr = s[1::2].replace("R", "").replace("U", "").replace("D", "")
sl = s[::2].replace("L", "").replace("U", "").replace("D", "")
if sr and sl:
    print("Yes")
    exit()
print("No")

Submission status: Wrong Answer

Solution code:
s = input()
ans = "YES"
for i, char in enumerate(s):
    if i % 2 == 1:
        if char == "R":
            ans = "No"
    else:
        if char == "L":
            ans = "No"

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()
N = len(S)
even_set = {S[i] for i in range(N) if i % 2 == 1}
odd_set = {S[i] for i in range(N) if i % 2 == 0}
even_Yes = {'L', 'U', 'D'}
odd_Yes = {'R', 'U', 'D'}
if even_set <= odd_Yes or odd_set <= odd_Yes:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
#input
S = input()

isDance = True
for i, s in enumerate(S):
    print("{}: {}".format(i, s))
    if i % 2 != 0 and s == "R":
        isDance = False
    if i % 2 == 0 and s == "L":
        isDance = False

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

Submission status: Wrong Answer

Solution code:
s = input()


for i in s:
    if (s.index(i) + 1) % 2 == 0:
        if not (i == 'L' or i == 'U' or i == 'D'):
            # print(s.index(i))
            print('No')
            break
    elif (s.index(i) + 1) % 2 != 0:
        if not (i == 'R' or i == 'U' or i == 'D'):
    
            print('No')
            break
else:
    print('Yes')

Submission status: Wrong Answer

Solution code:
F = input()
o = {"R", "U","D"}
e = {"L", "U","D"}
for i in range(len(F)):
    if i % 2 == 0:
        if F[i] not in o:
            print("No")
            break
    else:
        if F[i] not in e:
            print("No")
            break
print("Yes")

Submission status: Wrong Answer

Solution code:
F = input()
o = {"R", "U","D"}
e = {"L", "U","D"}
for i in range(len(F)):
    if i % 2 == 0:
        if F[i] not in e:
            print("No")
            break
    else:
        if F[i] not in o:
            print("No")
            break
print("Yes")

Submission status: Wrong Answer

Solution code:
a=input()
i=0
while(i<len(a)):
    if(i%2==0):
        if a[i]=="R" or "U" or "D":
            i=i+1
        else:
            print("No")
            break
    else:
        if a[i]=="L" or "U" or "D":
            i=i+1
        else:
            print("No")
            break
else:
    if(i==len(a)):
        print("Yes")

Submission status: Wrong Answer

Solution code:
a=input()
i=0
while(i<len(a)):
    if(i%2==0):
        if a[i]=="R" or "U" or "D":
            i=i+1
        else:
            print("No")
            break
    else:
        if a[i]=="L" or "U" or "D":
            i=i+1
        else:
            print("No")
            break
else:
    if(i==len(a)-1):
        print("Yes")

Submission status: Wrong Answer

Solution code:
a=input()
i=0
while(i<len(a)):
    if(i%2==0):
        if a[i]=="R" or "U" or "D":
            i=i+1
        else:
            print("No")
            break
    else:
        if a[i]=="L" or "U" or "D":
            i=i+1
        else:
            print("No")
            break
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

S = str(input())

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

Submission status: Wrong Answer

Solution code:
import sys

s = input()
i = 0
while i < 100 and i < len(s):
    if s[i] != "R" and s[i] != "U" and s[i] != "D":
        print(i)
        print(s[i])
        print("1No")
        sys.exit()
    i += 2
i = 1
while i < 100 and i < len(s):
    if s[i] != 'L' and s[i] != 'U' and s[i] != 'D':
        print(s[i])
        print("2No")
        sys.exit()
    i += 2

print("Yes")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
inList=list(input())
inOdd=[]
inEven=[]
for i in range(1,len(inList)):
    if i%2==1:
        inOdd.append(inList[i-1])
    else:
        inEven.append(inList[i-1])
if ("R" in inEven) or ("L" in inOdd):
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
S = input()
res = "Yes"
for x in range(int(len(S)/2)):
  if S[2*x] not in ["R","U","D"]:
    res = "No"
  if S[2*x+1] not in ["L","U","D"]:
    res = "No"
print(res)

Submission status: Wrong Answer

Solution code:
s = [i.upper() for i in str(input())]

k = set('RUD')
g = set('LUD')


kk = set(s[::2])
gg = set(s[1::2])


if k == kk or g == gg:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()
res = "Yes"
for n in range(int(len(S)/2)):
  if S[2*n] not in ["R","U","D"]:
    res = "No"
  if S[2*n+1] not in ["L","U","D"]:
    res = "No"
print(res)

Submission status: Wrong Answer

Solution code:
S = input()
res = "Yes"
for n in range(int(len(S)/2)):
  if S[2*n+1] not in ["R","U","D"]:
    res = "No"
  if S[2*n] not in ["L","U","D"]:
    res = "No"
print(res)

Submission status: Wrong Answer

Solution code:
import re

s = input()
p = re.compile(r'^[R,U,D]([L,U,D][R,U,D])*[L,U,D]?$')

if p.match(s):
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
S =input()
l =len(S)
letters=[]
for i in range(l):
  letters.append(S[i:i+1])
#print(letters)
indicater =0
#odd...R U D even...L U D
if l%2==0:
  for i in range(l//2):
    if (letters[2*i]=="R" or letters[2*i]=="U" or letters[2*i]=="D") and (letters[2*i+1]=="L" or letters[2*i+1]=="U" or letters[2*i+1]=="D"):
      indicater=indicater+0
    else:
      indicater=indicater+1
if l%2==1:
  for i in range((l+1)//2):
    if (letters[2*i]=="R" or letters[2*i]=="U" or letters[2*i]=="D"):
      indicater=indicater+0
    else:
      indicater=indicater+1
  for i in range((l-1)//2):
    if (letters[2*i+1]=="L" or letters[2*i+1]=="U" or letters[2*i+1]=="D"):
      indicater =indicater+0
    else:
      indicater =indicater+1
#print(indicater)
if indicater==0:
  print("YES")
else:
  print("NO")

Submission status: Wrong Answer

Solution code:
line=input()

a=['R','U','D']
b=['L','U','D']
flag=True

for i in range(len(line)):
  if (i+1)%2==1:
    if line[i] not in a:
      flag==False
      print('No')
      break
  else:
    if line[i] not in b:
      flag==False
      print('No')
      break

if flag:
  print('Yes')

Submission status: Wrong Answer

Solution code:
S = input()

lst = []

for ( i , j ) in enumerate(S) :
  if i % 2 == 0:
    if j not in ["L","U","D"]:      
      print("No")
      exit()
  else:
    if j not in ["R","U","D"]:      
      print("No")
      exit()
print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()
def checkEasy(s):
  for i in range(len(s)):
    if (i%2 == 0):
      if (s[i] == 'R'):
        return False
    else:
      if (s[i] == 'L'):
        return False
  return True
if (checkEasy(s)):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()

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

Submission status: Wrong Answer

Solution code:
def main():
    S = input()
    ret = 'YES'

    for i, str in enumerate(S):
        ii = i+1
        if ii % 2 == 1:
            if str in 'L':
                ret = 'No'
                break
        else:
            if str in 'R':
                ret = 'No'
                break

    print(ret)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def main():
    S = input()
    ret = 'YES'

    for i, str in enumerate(S):
        ii = i+1
        if ii % 2 == 1:
            if not str in ['R', 'U', 'D']:
                ret = 'No'
                break
        if ii % 2 == 0:
            if not str in ['L', 'U', 'D']:
                ret = 'No'
                break

    print(ret)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def main():
    S = input()
    ret = 'YES'

    for i, str in enumerate(S):
        if i % 2 == 0:
            if not str in ['R', 'U', 'D']:
                ret = 'No'
                break
        if i % 2 == 1:
            if not str in ['L', 'U', 'D']:
                ret = 'No'
                break

    print(ret)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
S = raw_input()

is_easy = True

for i in range(len(S)/2):
    if S[2*i] == "L":
        is_easy = False
    if S[2*i+1] == "R":
        is_easy = False


if is_easy == False:
    print "No"
else:
    print "Yes"

Submission status: Wrong Answer

Solution code:
#coding: utf-8

S = list(map(str,input()))
even = ['L','U','D']
odd = ['R','U','D']

ans_e, ans_o= [],[]

for i in range(0,len(S),2):
    if S[i] in even:
        ans_e.append(1)

for i in range(1,len(S),2):
    if S[i] in odd:
        ans_o.append(1)

if all(ans_o) and all(ans_e):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
import copy
s=list(input())
a=copy.deepcopy(s)
b=copy.deepcopy(s)
a=a[0:-1:2]
b=b[1:-1:2]
resulta="L" in a
resultb="R" in b
if resulta == "False" and resultb == "False":
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
s = input()

ans = "YES"

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

print(ans)

Submission status: Wrong Answer

Solution code:
Tap = input()
L_Tap = len(Tap)

Flag = 0

for i in range(L_Tap):
  if i % 2 == 0:
    if Tap[i] == 'R' or Tap[i] == 'U' or Tap[i] == 'D':
      Flag = 0
    else:
      Flag = 1
  else:
    if Tap[i] == 'L' or Tap[i] == 'U' or Tap[i] == 'D':
      Flag = 0
    else:
      Flag = 1

if Flag == 0:
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
def receuve_input():
    input_string = str(input())
    return input_string

def judge_steppable(input_string):
    even_strings = [s for i,s in enumerate(input_string) if i % 2 == 0]
    odd_strings = [s for i,s in enumerate(input_string) if i % 2 == 1]

    if 'R' not in even_strings and 'L' not in odd_strings:
         print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    input_string = receuve_input()
    judge_steppable(input_string)

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()
rud=["R","U","D"]
lud=["L","U","D"]
if s[::2] in rud and s[1::2] in lud:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = str(input())
OK = 0
for num,pol in enumerate(S):
  if num%2 == 1:
    if pol == 'R':
      OK = 1
    elif pol == 'L':
      OK = 1
if OK == 0:
  print('OK')
else:
  print('NG')

Submission status: Wrong Answer

Solution code:
S = str(input())
OK = 0
for num,pol in enumerate(S):
  if num%2 == 1:
    if pol == 'L' or 'U' or 'D':
      OK = 1
    elif pol == 'R' or 'U' or 'D':
      OK = 1
if OK == 0:
  print('NG')
else:
  print('OK')

Submission status: Wrong Answer

Solution code:
S = str(input())
OK = 0
for num,pol in enumerate(S):
  if num%2 == 1:
    if pol == 'R' or 'U' or 'D':
      OK = 1
    elif pol == 'L' or 'U' or 'D':
      OK = 1
if OK == 0:
  print('NG')
else:
  print('OK')

Submission status: Wrong Answer

Solution code:
S=list(input())
l=len(S)
e=0
ki=["R","U","D"]
gu=["L","U","D"]
if l%2 ==0:
	tmp=l//2
	for i in range(tmp):
		char1=S[2*i]
		char2=S[2*i+1]
		if char1 not in ki:
			e=1

		if char2 not in gu:
			e=1


else:
	tmp=l//2
	charL=[l-1]
	if charL not in ki:
		e=1
	else:
		for i in range(tmp): 
			char1=S[2*i]
			char2=S[2*i+1]
			if char1 not in ki:
				e=1
			if char2 not in gu:
				e=1

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

Submission status: Wrong Answer

Solution code:
S=list(input())
l=len(S)
e=0
ki=["R","U","D"]
gu=["L","U","D"]
if l%2 ==0:
	tmp=int(l/2)
	for i in range(tmp):
		char1=S[2*i]
		char2=S[2*i+1]
		if char1 not in ki:
			e=1

		if char2 not in gu:
			e=1


else:
	tmp=int(l//2)
	for i in range(tmp): 
		char1=S[2*i]
		char2=S[2*i+1]
		charL=S[l-1]
		if char1 not in ki:
			e=1
		if charL not in ki:
			e=1

		if char2 not in gu:
			e=1

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

Submission status: Wrong Answer

Solution code:
S = input()
l = len(S)
N = 0
for i in range(l):
    if(i % 2 == 0):
        if S[i] != "R" and S[i] != "U" and S[i] != "D":
            N = 1
    else:
        if S[i] != "L" and S[i] != "U" and S[i] != "D":
            N = 1

if N == 0:
    print("YES")
else:
    print("NO")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s=list(input())
n=len(s)
if n%2==1:
        n=n-1
s1=["0"]*(n+1)
s2=["0"]*(n+1)


for i in range(n//2):
        s1[i]=s[2*i]
        s2[i]=s[2*i+1]

if len(s)!=n:
        s1.append(s[len(s)-1])

for i in range(n//2+len(s)%2):
        if s1[i]=="L":
                print("No")
                exit()
for i in range(n//2):
        if s2[i]=="R":
                print("No")
                exit()

print("Yes")

Submission status: Wrong Answer

Solution code:
S =  list(input())
flag = True

for i, name in enumerate(S):
    if i%2 == 0:
        if name == "R":
            flag = False
            break
    elif i%2 == 1:
        if name == "L":
            flag = False
            break

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

Submission status: Wrong Answer

Solution code:
S = input()

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

Submission status: Wrong Answer

Solution code:
# 奇数文字目→R U D　偶数文字目→L U D
S = ' ' + input()  
flag = True 

for i in range(1,len(S)): 
    if i % 2 == 1:  
        if i == 'L':    
            flag = False   
            break
    else:   
        if i =='R':     
            flag = False
            break

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

Submission status: Wrong Answer

Solution code:
s = input()
a=0


for x in range(len(s)):
    if x%2 == 0:
        if s[x]=="R" or "U" or "D":
            a=a
        else:

            a=a+1
    else:
        if s[x] == "L" or "U" or "D":
            a=a
        else:
            a=a+1

if a==0 :
    print("Yes")

else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = str(input())
Odd = s[::2]
Even = s[1::2]
Ocount =0
Ecount =0
for i in range(len(Odd)):
  if Odd[i] == "R" or Odd[i] == "U" or Odd[i] == "D":
     Ocount +=1
for i in range(len(Even)):
  if Even[i] == "L" or Even[i] == "U" or Even[i] == "D":
    Ecount +=1
  if Ecount == len(Even) and Ocount == len(Odd):
    print("Yes")
    quit()
print("No")

Submission status: Wrong Answer

Solution code:
s = str(input())
Odd = s[::2]
Even = s[1::2]
Ocount =0
Ecount =0
for i in range(len(Odd)):
  if Odd[i] == "R" or Odd[i] == "U" or Odd[i] == "D":
     Ocount +=1
for i in range(len(Even)):
  if Even[i] == "L" or Even[i] == "U" or Even[i] == "D":
    Ecount +=1
  if Ecount == len(Even) and Ocount == len(Odd):
    print("Yes")
    quit()
print("Not")

Submission status: Wrong Answer

Solution code:
s = str(input())
Odd = s[::2]
Even = s[1::2]
Ocount =0
Ecount =0
for i in range(len(Odd)):
  if Odd[i] == "R" or Odd[i] == "U" or Odd[i] == "D":
     Ocount +=1
  if(Ocount == len(Odd)):
     print("Yes")
     quit()
for i in range(len(Even)):
  if Even[i] == "L" or Even[i] == "U" or Even[i] == "D":
    Ecount +=1
  if(Ecount == len(Even)):
    print("Yes")
    quit()
print("Not")

Submission status: Wrong Answer

Solution code:
S = list(input())
odd = S[0::2]
even = S[1::2]
if 'L' in odd:
    print('NO')
elif 'R' in even:
    print('NO')
else:
    print('YES')

Submission status: Wrong Answer

Solution code:
S = list(input())
odd = S[0::2]
even = S[1::2]
if 'L' in odd or 'R' in even:
    print('NO')
else:
    print('YES')

Submission status: Wrong Answer

Solution code:
S = list(input())
odd = S[1::2]
even = S[0::2]
if 'L' in odd or 'R' in even:
    print('NO')
else:
    print('YES')

Submission status: Wrong Answer

Solution code:
S = input()

for i in range(len(S)):
  if i % 2 == 0:
    if S[i] in {'L','U','D'}:
      continue
    else:
      print('No')
      exit()
  else:
    if S[i] in {'R','U','D'}:
      continue
    else:
      print('No')
      exit()

print('Yes')

Submission status: Wrong Answer

Solution code:
flags = ['Yes', 'No']

input_s = input()

odd_s = input_s[0::2]
even_s = input_s[1::2]

no_flag = ('L' in odd_s) | ('R' in even_s)

print(odd_s)
print(flags[no_flag])

Submission status: Wrong Answer

Solution code:
flags = ['Yes', 'No']

input_s = input()

odd_s = input_s[1::2]
even_s = input_s[0::2]

no_flag = ('R' in odd_s) | ('L' in even_s)

print(odd_s)
print(flags[no_flag])

Submission status: Wrong Answer

Solution code:
flags = ['Yes', 'No']

input_s = input()

odd_s = input_s[1::2]
even_s = input_s[0::2]

no_flag = ('R' in even_s) | ('L' in odd_s)

print(flags[no_flag])

Submission status: Wrong Answer

Solution code:
s = list(input())
f = True
print(s)
for index, i in enumerate(s):
    if(index % 2 == 0):
        if(i == 'L'):
            f = False
            break
    if(index % 2 == 1):
        if(i == 'R'):
            f = False
            break
if(f):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s=input()

i=0
flug=0
for x in range(len(s)):
    if(i%2==1):
        if(s[i] =='L'):
            flug=1
            break
    else:
        if(s[i] =='R'):
            flug=1
            break

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