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:
l = ['L', 'R', 'U', 'D']
s = list(input())
ans = 'YES'
for i in range(len(s)):
  if i % 2 == 0:
    if s[i] == 'L':
      ans = 'NO'
      break
  if i % 2 == 1:
    if s[i] == 'R':
      ans = 'NO'
      break
print(ans,end='')

Submission status: Wrong Answer

Solution code:
S = input()
 
for i in range(0,int(len(S)/2)):
	if S[i * 2] == "L": #奇数
		print("No")
		break
	elif S[i * 2 + 1] == "R":
		print("No")
		break
if S[len(S) - 1] == "L":
		print("No")
else:print("Yes")

Submission status: Wrong Answer

Solution code:
input0=input("")
e=0
f=0
g=0
i=0

c=input0[::2]
d=input0[1::2]

for a in c:
    b=2
    if(a=="L"):
        b=1
    else:
        b=0
    e=+b
    
for a in d:
    b=2
    if(a=="R"):
        b=1
    else:
        b=0
    f=+b

g=e+f

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

Submission status: Wrong Answer

Solution code:
S = input()
if len(S) % 2 == 0:
	for i in range(0,int(len(S)/2)):
		print(S[i * 2])
		print(S[i * 2 + 1])
		if S[i * 2] == "L":
			print("No")
			break
		elif S[i * 2 + 1] == "R":
			print("No")
			break
	else:print("Yes")
	
if len(S) % 2 == 1:
	for i in range(0,int(len(S)/2)):
		if S[i * 2] == "L": #奇数
			print("No")
			break
		elif S[i * 2 + 1] == "R":
			print("No")
			break
	if S[len(S) - 1] == "L":
		print("No")
	else:print("Yes")

Submission status: Wrong Answer

Solution code:
__author__ = 'Esfandiar'

s = input()
a=s[::2]
b=s[1::2]
for i in a:
        if i not in['R','U','D']:
                print("NO")
                exit()
for i in b:
        if i not in['L','U','D']:
                print("NO")
                exit()
print("YES")

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
  inputstr = input()
  size = len(inputstr)

  isEasy = True

  for i in range(size):
    if i % 2 == 0:
      if inputstr[i] in ["L", "U", "D"]:
        pass
      else:
        isEasy = False
        break
    else:
      if inputstr[i] in ["R", "U", "D"]:
        pass
      else:
        isEasy = False
        break

  if isEasy == True:
    print("Yes")
  else:
    print("No")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = list(map(str, input()))
c = len(s)
flg = 1

for i in range(0,c-1):
  if i%2 == 0 :
    if s[i]=="R" or s[i]=="U" or s[i]=="D":
      flg = flg*1 
    else:
      flg = flg*0
  else:
    if s[i]=="L" or s[i]=="U" or s[i]=="D":
      flg = flg*1
    else:
      flg = flg*0
if flg == 0:
  print("No")
else:
  print("Yes")

Submission status: Wrong Answer

Solution code:
__author__ = 'Esfandiar'

s = input()
a=s[1::2]
b=s[::2]
for i in a:
        if i not in['R','U','D']:
                print("NO")
                exit()
for i in b:
        if i not in['L','U','D']:
                print("NO")
                exit()
print("YES")

Submission status: Wrong Answer

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

if ("R" in S) & ("L" in S):
    if (S.index("R")%2 == 0) & (S.index("L")%2 == 1):
        print("Yes") 
    else:
        print("No")
elif  ("R" in S):
    if (S.index("R")%2 == 0):
        print("Yes")
    else:
        print("No")
elif ("L" in S):
    if (S.index("L")%2 == 1):
        print("Yes")
    else:
        print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
s=list(input())
s_o = s[::2]
s_e = s[1::2]

#print(set(od))
od = {"R","U","D"}
ev = {"L","U","D"}
if len(od-set(s_o))==0 and  len(ev-set(s_e))==0:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=str(input())
L = list(s)
count = 0
n = 0
for i in L:
  n += 1
  if n % 2 == 1:
    if i == "R":
      count += 1
  else:
    if i == "L":
      count += 1
if count == 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S=input()
cnt=0
for k in range((len(S)+1)//2):
  if S[2*k] in 'RUD':
    cnt+=1
for j in range((len(S)-1)//2):
  if S[2*j+1] in 'LUD':
    cnt+=1
if cnt==len(S):
  print('Yes')
else:
  print('No')

Submission status: Wrong Answer

Solution code:
s = input()
count = 0
count2 = 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:
            count = 0
            break
    elif i%2==0:
        if s[i]=='R' or s[i]=='U' or s[i]=='D':
            count2 = 1
        else:
            count2 = 0
            break

if count ==1 and count2==1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    odd = False
    even = False
    for i, s in enumerate(list(input()), 1):
        if i % 2 == 1:
            odd = s in ['L', 'U', 'D']
        else:
            even = s in ['R', 'U', 'D']

    r = 'No'
    if odd and even:
        r = 'Yes'

    print(r)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
s=input().split()

g=s[0::2]
k=s[1::2]

if g!="R" and k!="L":
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = list(input())
check = 0
for i in range(len(S)):
  if i % 2 == 0:
    if (S[i] == 'R' or S[i] == 'U' or S[i] == 'D') and len(S) >= 1 and len(S) <= 100:
        check += 1
  elif i % 2 == 1:
    if (S[i] == 'L' or S[i] == 'U' or S[i] == 'D') and len(S) >= 1 and len(S) <= 100:
        check += 1

if check == len(S):
    print('yes')
else:
    print('no')

Submission status: Wrong Answer

Solution code:
S=input()
s=list(S)
sE=s[1::2]
sO=s[::2]
n=0;m=0;
for i in range(len(sO)):
    if(sO[i]=="L" ):
                n=1;
for i in range(len(sE)):
    if(sO[i]=="R" ):
                m=1;



if(n==1 | m==1):
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
s=list(input())
s_o = s[::2]
s_e = s[1::2]

#print(set(od))
od = {"R","U","D"}
ev = {"L","U","D"}
if (set(s_o) == set(od)) and (set(s_e) == set(ev)):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:

a = input()

count_even = 0
count_odd  = 0
#2,4,6を判別
for i in range(1,len(a),2):
   if a[i] == "L" or "U" or "D":
        count_even += 1

        
#print(count_even)

#1,3,5を判別
for k in range(0,len(a),2):
    if a[k] == "R" or "U" or "D":
        count_odd +=1
  
       




if len(a) % 2 == 1:
    jud_even = int(len(a)/2)
    jud_odd  = int(len(a)/2)+1
else:
    jud_even = int(len(a)/2)
    jud_odd  = int(len(a)/2)

if jud_even == count_even and jud_odd == count_odd:
    print("Yes")

else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=list(input())
s_o = s[::2]
s_e = s[1::2]
print(set(s_o))
#print(set(od))
od = {"R","U","D"}
ev = {"L","U","D"}
if (set(s_o) == set(od)) and (set(s_e) == set(ev)):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
kisuu = S[::2]
guusuu = S[1:2]
hantei = []
ans = 0

for i in kisuu:
  if i == 'R' or i == 'U' or i == 'D':
    hantei.append('ok')
  else:
    hantei.append('no')

for j in guusuu:
  if j == 'L' or j == 'U' or j == 'D':
    hantei.append('ok')
  else:
    hantei.append('no')

ans = hantei.count('no')
if ans > 0:
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()
count = 0
count2 = 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:
            count = 0
            break
    
for i in range(len(s)):
    if i%2==0:
        if s[i]=='R' or s[i]=='U' or s[i]=='D':
            count2 = 1
        else:
            count2 = 0
            break

if count ==1 and count2==1:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = list(input())

ki = S[1::2]
gu = S[0::2]
ans = ''

for g in gu:
    if g == 'R' or g == 'U'  or g == 'D':
        for i in ki:
            if i == 'L' or i == 'U'  or i == 'D':
                ans = 'Yes'         
            else:
                ans = 'No'
                break
    else:
        ans = 'No'
        break

print(ans)

Submission status: Wrong Answer

Solution code:
S=input()
s=list(S)
sE=s[1::2]
sO=s[::2]
n=0;m=0;
for i in range(len(sO)):
    if(sO[i]!="R" ):
        if(sO[i]!="U"):
            if( sO[i]!="D"):
                n=1;
for i in range(len(sE)):
    if(sO[i]!="L" ):
        if(sO[i]!="U"):
            if( sO[i]!="D"):
                m=1;



if(n==1 | m==1):
    print("No")
else:
    print("Yes")

Submission status: Wrong Answer

Solution code:
input0=input("")
b=2
i=0

c=input0[::2]
d=input0[1::2]

for a in c:
    if(a=="L"):
        b=0
    else:
        b=1
    
for a in d:
    if(a=="R"):
        b=0
    else:
        b=b


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

Submission status: Wrong Answer

Solution code:

Dance = input()
i = 0
flag = 0
for char in Dance:
  if i%2 == 0:
    if char == "R":
      flag = 1
      break
  else:
    if char == "L":
      flag = 1
      break
  i+=1
  
if flag == 0:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
tap = input()
list = [str(i) for i in tap]
Even = list[1::2]
Odd = list[0::2]

#奇数 RUD 偶数 LUDで踏みやすい
print(list)
print(Odd)
print(Even)

if 'L' in Odd or 'R' in Even:
        print('No')
else:
        print('Yes')

Submission status: Wrong Answer

Solution code:
def main():
    odd = False
    even = False
    for i, s in enumerate(list(input())):
        if i % 2 == 0:
            even = s in ['R', 'U', 'D']
        else:
            odd = s in ['L', 'U', 'D']

    r = 'No'
    if odd and even:
        r = 'Yes'

    print(r)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
S = input()
kisuu = S[::2]
guusuu = S[1:2]
hantei = []
ans = 0

for i in kisuu:
  if i == 'R' or i == 'U' or i == 'D':
    hantei.append('ok')
  else:
    hantei.append('no')

for j in guusuu:
  if j == 'L' or j == 'U' or j == 'D':
    hantei.append('ok')
  else:
    hantei.append('no')

ans = hantei.count('no')
if ans > 0:
  print('no')
else:
  print('yes')

Submission status: Wrong Answer

Solution code:
S = input()
b = list(S)
a = b[0::2]
c = b[1::2]
d = len(b)
e = len(c)
cnt = 0
count = 0
for i in range(d):
    if a == 'R' or 'U' or 'D':
        cnt += 1
for i in range(e):
    if c == 'L' or 'U' or 'D':
        count += 1
if cnt == d and count ==e:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()

ctr = True
for i in range(len(S)):
    print(i)
    print(S[i])
    if i%2 ==0:
        # 奇数
        if S[i]!='L' and S[i]!='U' and S[i]!='D':
            ctr = False
            print('No')
            break
    else:
        # 偶数
        if S[i]!='R' and S[i]!='U' and S[i]!='D':
            ctr = False
            print('No')
            break

if(ctr):
    print('Yes')

Submission status: Wrong Answer

Solution code:
S=input()
s=list(S)
sE=s[1::2]
sO=s[::2]
n=0;m=0;
for i in range(len(sO)):
    if(sO[i]!="R" ):
        if(sO[i]!="U"):
            if( sO[i]!="D"):
                n=1;
for i in range(len(sE)):
    if(sO[i]!="L" ):
        if(sO[i]!="U"):
            if( sO[i]!="D"):
                m=1;



if(n==0 & m==0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()
A = S[::2] #奇数
B = S[1::2] #偶数
C = A in 'L'
D = B in 'R'
if C == False and D == False:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
def _input():
    string = input()
    return list(string)

def is_easy_dance(movings):
    index = 0
    for i in movings:
        if index % 2 == 0:
            if i == 'R' or i == 'U' or i == 'D':
                pass
            else:
                return 'No'
        else:
            if i == 'L' or i == 'U' or i == 'D':
                pass
            else:
                return 'No'
        index += 1
        if index == len(movings) - 1:
            return 'Yes'

if __name__ == "__main__":
    movings = _input()
    print(is_easy_dance(movings))

Submission status: Wrong Answer

Solution code:
S = input()
b = list(S)
a = b[0::2]
c = b[1::2]
d = len(b)
e = len(c)
cnt = 0
f = a.count('R')
g = a.count('U')
h = a.count('D')
i = f + g + h


j = c.count('L')
k = c.count('U')
l = c.count('D')
m = j + k + l


if i == d and m == e:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
S = input()

ctr = True
for i in range(len(S)):
    print(i)
    print(S[i])
    if i%2 ==0:
        # 奇数
        if S[i]!='L' and S[i]!='U' and S[i]!='D':
            ctr = False
            print('No')
            # break
    else:
        # 偶数
        if S[i]!='R' and S[i]!='U' and S[i]!='D':
            ctr = False
            print('No')
            # break

if(ctr):
    print('Yes')

Submission status: Wrong Answer

Solution code:
S = input()
b = list(S)
a = b[0::2]
c = b[1::2]
d = len(b)
e = len(c)
cnt = 0
f = a.count('R')
g = a.count('U')
h = a.count('D')
i = f + g + h
print(i)

j = c.count('L')
k = c.count('U')
l = c.count('D')
m = j + k + l
print(m)

if i == d and m == e:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
input0=input("")
b=2
i=0

c=input0[::2]
d=input0[1::2]

for a in c:
    if(a=="L"):
        b=0
    else:
        b=1
    
for a in d:
    if(a=="R"):
        b=0
    else:
        b=b


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

Submission status: Wrong Answer

Solution code:
S=input()
s=list(S)
sE=s[1::2]
sO=s[::2]
n=0;m=0;
for i in range(len(sO)):
    if(sO[i]!="R" ):
        if(sO[i]!="U"):
            if( sO[i]!="D"):
                n=1;
for i in range(len(sE)):
    if(sO[i]!="L" ):
        if(sO[i]!="U"):
            if( sO[i]!="D"):
                m=1;



if(n==0 | m==0):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s=list(input())
s_o = s[::2]
s_e = s[1::2]
#print(s_o)
od = ["R","U","D"]
ev = ["L","U","D"]
if (set(s_o) == set(od)) and (set(s_e) == set(ev)):
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
S = input()

ctr = True
for i in range(len(S)-1):
    print(i)
    print(S[i])
    if i%2 ==0:
        # 奇数
        if S[i]!='R' and S[i]!='U' and S[i]!='D':
            ctr = False
            print('No')
            break
    else:
        # 偶数
        if S[i]!='L' and S[i]!='U' and S[i]!='D':
            ctr = False
            print('No')
            break

if(ctr):
    print('Yes')

Submission status: Wrong Answer

Solution code:
S = list(input())

ki = S[1::2]
gu = S[0::2]
ans = ''

for g in gu:
    if g == 'L' or g == 'U'  or g == 'D':
        for i in ki:
            if i == 'R' or i == 'U'  or i == 'D':
                ans = 'Yes'         
            else:
                ans = 'No'
                break
    else:
        print('No')

print(ans)

Submission status: Wrong Answer

Solution code:
s = input()
sev = ''
sod = ''

for i in range(1,len(s),2):
	sev+=s[i]
	sod+=s[i-1]
#print(sev,sod)
if ('L' in sod) or ('R' in sev):
	print('No')
else:
	print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()
a = list(s)
#print(len(s))
bad_count = 0

for i in range(len(s)):
 # print(a[2 * i: 2* i + 1:1])
 # print(a[2 * i + 1 : 2 * i + 1 + 1 : 1])
 # print(i)
  if(i % 2 == 1):		# EVEN
    if a[i] == "R":
      bad_count += 1
    #  print("ODD",bad_count)
  else:
    if a[i] == "L":	# ODD
      bad_count += 1
    #  print("EVEN",bad_count)

#print(bad_count)

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

Submission status: Wrong Answer

Solution code:
S = list(input())

ki = S[1::2]
gu = S[0::2]
ans = ''

for g in gu:
    if g == 'L' or g == 'U'  or g == 'D':
        for i in ki:
            if i == 'R' or i == 'U'  or i == 'D':
                ans = 'Yes'         
            else:
                ans = 'No'
    else:
        print('No')

print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
b = list(S)
a = b[0::2]
c = b[1::2]
d = len(b)
e = len(c)
cnt = 0
f = a.count('R')
g = a.count('U')
h = a.count('D')
i = f + g + h

j = b.count('L')
k = b.count('U')
l = b.count('D')
m = j + k + l

if i == d and m == e:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=str(input())
for i in range(len(S)):
  if i%2==0:
    S.replace("R","Q")
  else:
    S.replace("L","Q")
S.replace("U","")
S.replace("D","")
S.replace("Q","")
if S=="":
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

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

if ("R" in S) & ("L" in S):
    if (S.index("R")%2 == 0) & (S.index("L")%2 == 1):
        print("Yes") 
    else:
        print("No")
elif  ("R" in S):
    if (S.index("R")%2 == 0):
        print("Yes")
    else:
        print("No")
elif ("L" in S):
    if (S.index("L")%2 == 1):
        print("Yes")
    else:
        print("No")

Submission status: Wrong Answer

Solution code:
s = input()
sev = ''
sod = ''

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

Submission status: Wrong Answer

Solution code:
S= list(input())
a=[]
for i in range(0,int((len(S))/2)):
  if S[2*i]== "R" or S[2*i]== "U" or  S[2*i]=="D":
    a.append(1)
for i in range(1,int(len(S)/2)+1):
  if S[2*i-1]=="L" or S[2*i-1]=="U" or S[2*i-1]=="D":
    a.append(1)
if len(S)==sum(a):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
tap = input()
list = [str(i) for i in tap]
Even = list[0::2]
Odd = list[1::2]

if 'L' in Odd or 'R' in Even:
        print('No')
else:
        print('Yes')

Submission status: Wrong Answer

Solution code:
odd=["R","U","D"]
even=["L","U","D"]

S=input()

k=0
for i in range(0,len(S),2):
  print(i)
  if S[i] not in odd:
     break
  else:
    k=k+1

for i in range(1,len(S),2):
#  print(i)
  if S[i] not in even:
#    print("No")
    break
  else:
    k=k+1

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

Submission status: Wrong Answer

Solution code:
def main():
    odd = False
    even = False
    for i, s in enumerate([x for x in input()]):
        if i % 2 == 0:
            even = s in ['R', 'U', 'D']
        else:
            odd = s in ['L', 'U', 'D']

    r = 'No'
    if odd and even:
        r = 'Yes'

    print(r)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
S = input()

string = list(S)
judge = True

for i in range(1,len(string)+1):
    if string[i-1] == 'U' or string[i-1] == 'D':
        pass
    elif string[i-1] == 'L' and i % 2 == 0:
        pass
    elif string[i-1] == 'R' and i % 2 == 1:
        pass
    elif string[i-1] == 'R' and i == 1:
        pass
    else:
        judge = False
        print(string[i-1] + ':' + str(i))

if judge == True:
    print('Yes')
elif judge == False:
    print('No')

Submission status: Wrong Answer

Solution code:
S = list(input())
S_o = []
S_e = []
for i in range(len(S)):
    if i%2 == 0:
        S_e.append(S[i])
    elif i%2 == 1:
        S_o.append(S[i])
if ('L' not in set(S_o)) and ('R' not in set(S_e)):
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = list(input())
i = 0
for s in S:
    c = S.index(s)+1
    if (c%2 == 0) and ((s=="L")or(s=="U")or(s=="D")) :
        i +=1
    elif (c%2 !=0) and ((s=="R")or(s=="U")or(s=="D")): 
        i +=1
    else:
        print("No")
        break
    if i == len(S):
            print("Yes")

Submission status: Wrong Answer

Solution code:
s = input()
a = list(s)
#print(len(s))
bad_count = 0

for i in range(len(s)):
 # print(a[2 * i: 2* i + 1:1])
 # print(a[2 * i + 1 : 2 * i + 1 + 1 : 1])
 #  print(i)
  if(i % 2 == 1):		# EVEN
    if a[i] == "R":
      bad_count += 1
  #    print("ODD",bad_count)
  else:
    if a[i] == "L":	# ODD
      bad_count += 1
  #    print("EVEN",bad_count)

#print(bad_count)

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

Submission status: Wrong Answer

Solution code:
S= list(input())
a=[]
for i in range(0,int((len(S))/2)):
  if S[2*i]== "R" or S[2*i]== "U" or  S[2*i]=="D":
    a.append(1)
for i in range(1,int(len(S)/2)+1):
  if S[2*i+-1]=="L" or S[2*i-1]=="U" or S[2*i-1]=="D":
    a.append(1)
if len(S)==sum(a):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
S = input()
b = list(S)
a = b[0::2]
c = b[1::2]
d = len(b)
e = len(c)
cnt = 0
f = a.count('R' or 'U' or 'D')
g = c.count('L' or 'U' or 'D')
if f == d and e == g:
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

Solution code:
s = input()
a = list(s)
#print(len(s))
bad_count = 0

for i in range(len(s)):
 # print(a[2 * i: 2* i + 1:1])
 # print(a[2 * i + 1 : 2 * i + 1 + 1 : 1])
  print(i)
  if(i % 2 == 1):		# EVEN
    if a[i] == "R":
      bad_count += 1
      print("ODD",bad_count)
  else:
    if a[i] == "L":	# ODD
      bad_count += 1
      print("EVEN",bad_count)

print(bad_count)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
ev = 'RUD'
od = 'LUD'
sev = ''
sod = ''
if ('R' in sev)  or ('L' in sod):
  print('No')
else:
  print('Yes')

Submission status: Wrong Answer

Solution code:
s = input()
s_list =  list(s)
jun = 0
ans = 1

while(len(s_list)):
    if jun % 2 == 0:
        if s_list[jun] != "R" or s_list[jun] != "U" or s_list[jun] != "D":
            ans = 0
    if jun % 2 == 1:
        if s_list[jun] != "L" or s_list[jun] != "U" or s_list[jun] != "D":
            ans = 0
    jun += 1
    if jun == len(s_list):
      break
if ans == 1:
    print("Yes")
else:
    print("No")

Submission status: Wrong Answer

Solution code:
s = input()

is_good = True
for i,string in enumerate(s):
  if i % 2 == 0 and string in ["R", "U", "D"]:
    continue
  elif i % 2 == 1 and string in ["L", "U", "D"]:
    continue
  else:
    is_good = False
    break
print(is_good)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
str = input()

list = str.split()
i = 0
f = True
for l in list:
    i+=1
    if i%2 == 0:
        if l == "R":
            f=False
            break
    else:
        if l == "L":
            f=False
            break
if(f):
    print("Yes",end="\n")
else:
    print("No",end="\n")

Submission status: Wrong Answer

Solution code:
# def
def detect_q2(step_list):
    for k,s in enumerate(step_list):

        if k % 2 == 0:
            if s == 'L':
                return False
        else:
            if s == 'R':
                return False

    return True

# input
step = str(input())
step_list = list(step)

# main
if detect_q2(step_list):
    print('YES')
else:
    print('NO')

Submission status: Wrong Answer

Solution code:
from sys import exit
a = input()

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

for i in range(len(a)):
    if (i+1) % 2 == 0:
        if a[i] not in odd:
            print("No")
            exit()
    elif (i+1) % 3 == 0 or i == 0:
        if a[i] not in p:
            print("No")
            exit()
    else:
        pass
print("Yes")

Submission status: Wrong Answer

Solution code:
import re

s = input()
even_list = []
odd_list = []

for i in range(len(s)):
    if (i+1) % 2 == 0:
        even_list.append(s[i])
    else:
        odd_list.append(s[i])

for i in range(len(even_list)):
    if not re.match(r'[L,U,D]',even_list[i]):
        print("No")
        exit()

for i in range(len(odd_list)):
    if not re.match(r'[R,U,D]', odd_list[i]):
        print("No")
        exit()

print("YES")

Submission status: Wrong Answer

Solution code:
S=input()
n=len(S)
hantei1='No'
hantei2='No'
for i in range(0,n,2):
    if S[i]=='R' or S[i]=='U' or S[i]=='D':
        hantei1='Yes'
    else:
        hantei1='No'
        break

for j in range(1,n,2):
    if S[j]=='L' or S[j]=='U' or S[j]=='D':
        hantei2='Yes'
    else:
        hantei2='No'
        break

if hantei1=='Yes' and hantei2=='Yes':
    print('Yes')
else:
    print('No')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys


def input():
    return sys.stdin.readline().rstrip()


def main():
    S = input()
    ans = "Yes"
    for i in range(len(S)):
        if (i+1) % 2 == 1:
            if S[i] is "L":
                ans = "No"
        else:
            if S[i] is "R":
                ans = "No"
        if ans == "No":
            print("No")
            exit()
    print("Yes")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
str = input()

list = str.split()

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

i = 0
flag = False
for l in list:
    i = i + 1
    if i % 2 == 0: # even
        if l in even:
            flag = True
            break
    else: # odd
        if l in odd:
            flag = True
            break

if(flag):
    print("No",end="\n")
else:
    print("Yes",end="\n")

Submission status: Wrong Answer

Solution code:
s = list(input())
flg=0
for i in range(1,len(s)):
    if(i%2!=0):
        if s[i-1] not in ["R","U","D"]:
            flg=1
    elif(i%2==0):
        if s[i-1] not in ["L","U","D"]:
            flg=1
if(flg==1):
    print("No")
else: print("Yes")

Submission status: Wrong Answer

Solution code:
import re

s = input()
even_list = []
odd_list = []

for i in range(len(s)):
    if (i+1) % 2 == 0:
        even_list.append(s[i])
    else:
        odd_list.append(s[i])

for i in range(len(even_list)):
    if not re.match(r'[R,U,D]',even_list[i]):
        print("No")
        exit()

for i in range(len(odd_list)):
    if not re.match(r'[L,U,D]', odd_list[i]):
        print("No")
        exit()

print("YES")

Submission status: Wrong Answer

Solution code:
s = input()
ev = 'RUD'
od = 'LUD'
sev = ''
sod = ''

for i in range(0,len(s),2):
  sod +=s[i]
for i in range(1,len(s),2):
  sev += s[i]
ans = 'Yes'
for i in range(len(sev)):
  if sev[i] not in ev:
    ans = 'No'
    break;
if ans != 'No':
  for i in range(len(sod)):
    if sod[i] not in od:
      ans = 'No'
      break;
print(ans)

Submission status: Wrong Answer

Solution code:
s = input()

flag = True

for i in range(len(s)):
  if i % 2 == 1 and s[i] in ['L', 'U', 'D']:
    pass
  elif i % 2 == 1:
    print('NO')
    flag = False
    break
  
  if i % 2 == 0 and s[i] in ['R', 'U', 'D']:
    pass
  elif i % 2 == 0:
    print('No')
    flag = False
    break
    
if flag:
  print('Yes')

Submission status: Wrong Answer

Solution code:
import re

s = input()
even_list = []
odd_list = []

for i in range(len(s)):
    if (i+1) % 2 == 0:
        even_list.append(s[i])
    else:
        odd_list.append(s[i])

for i in range(len(even_list)):
    if not re.match(r'[R,L,U]',even_list[i]):
        print("No")
        exit()

for i in range(len(odd_list)):
    if not re.match(r'[L,U,D]', odd_list[i]):
        print("No")
        exit()

print("YES")

Submission status: Wrong Answer

Solution code:
n = str(input())

length = len(n)
flg = 0
for num in range(length):
    if (num+1)%2!=0:
        if n[num] == 'R' or n[num] == 'U' or n[num] == 'D':
            flg = 1
        else:
            break
    else:
        if n[num] == 'L' or n[num] == 'U' or n[num] == 'D':
            flg = 1
        else:
            break
if flg == 1:
    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 :
    if S[i] != "L":
    	a += 1
  else:
    if S[i] != "R":
    	a += 1
if a == len(S):
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
result = "No"
S = list(input())
if S[0::2] == "L":
    result = "Yes"
elif S[1::2] =="R":
    result = "Yes"
else:
    pass

print(result)

Submission status: Wrong Answer

Solution code:
str = input()

list = str.split()

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

i = 0
flag = False
for l in list:
    i = i + 1
    if i % 2 == 0: # even
        if l in even:
            print(l not in even)
            flag = True
            break
    else: # odd
        if l in odd:
            flag = True
            break

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