ZhenlongDai/ACPR huggingface dataset:
Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import re

s = input()
pattern = re.compile(r'^([^L][^R])*[L]?$')
is_easy_to_dance = pattern.match(s)

print("Yes") if is_easy_to_dance else print("No")

Failing test case input:
UUUUUUUUUUUUUUU

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
import re

s = input()

pattern = re.compile(r'^([^L][^R])*[^L]?$')
is_easy_to_dance = pattern.match(s)

print("Yes") if is_easy_to_dance else print("No")

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=list(input())
print(S)
for i,j in enumerate(S):
    if i%2==0:
        
        if j=="R"or j=="U"or j=="D":
            
            continue
        else:
            print("No")
            break
    else:
        if j=="L"or j=="U"or j=="D":
            continue
        else:
            print("No")
            break
else:
    print("Yes")
        

Failing test case input:
VRMLCQKVQKRRDVKWVDS

Expected output:
No


Actual output:
['V', 'R', 'M', 'L', 'C', 'Q', 'K', 'V', 'Q', 'K', 'R', 'R', 'D', 'V', 'K', 'W', 'V', 'D', 'S']
No


Fixed submission (verdict: Accepted):
S=list(input())

for i,j in enumerate(S):
    if i%2==0:
        
        if j=="R"or j=="U"or j=="D":
            
            continue
        else:
            print("No")
            break
    else:
        if j=="L"or j=="U"or j=="D":
            continue
        else:
            print("No")
            break
else:
    print("Yes")

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
odd = ["R","U","D"]
even = ["L","U","D"]
flag1=True
flag2=True
for i in range(1,len(s)+1):
    if (i%2==1) and not(s[i-1] in odd):
        flag1 =False
    if (i%2==0) and not(s[i-1] in even):
        flag2 = False

print(flag1,flag2)
if flag1 and flag2:
    print("Yes")
else:
    print("No")

Failing test case input:
DVMLCRKVQJRRDRKSVWW

Expected output:
No


Actual output:
False False
No


Fixed submission (verdict: Accepted):
s = input()
odd = ["R","U","D"]
even = ["L","U","D"]
flag1=True
flag2=True
for i in range(1,len(s)+1):
    if (i%2==1) and not(s[i-1] in odd):
        flag1 =False
    if (i%2==0) and not(s[i-1] in even):
        flag2 = False

if flag1 and flag2:
    print("Yes")
else:
    print("No")

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(input())

result = "No"

if S[0::2] =="L"or"U"or"D":
    result = "Yes"
elif S[1::2] =="R"or"U"or"D":
    result = "Yes"
else:
    result = "No"

print(result)

Failing test case input:
ULURV

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S = list(input())
result = "Yes"
for i in  S[0::2]:
    if i == "L":
        result = "No"
for i in  S[1::2]:
    if i == "R":
        result = "No"

print(result)
Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
RDULDUR

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
S=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
if a == len(S):
  print("Yes")
else:
  print("No")

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=input()
print(a[0::2],a[1::2])
if set(a[0::2])<=set(['R','U','D']) and set(a[1::2])<=set(['L','U','D']):
  print('Yes')
else:
  print('No')

Failing test case input:
KXVKPBCRQJMSUQRLWWE

Expected output:
No


Actual output:
KVPCQMURWE XKBRJSQLW
No


Fixed submission (verdict: Accepted):
a=input()

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

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()

print(S)
flg = True
for s in range(0,len(S)-1):
    print(s)
    if s%2 == 0 and S[s] == "L":
        flg = False
    elif s%2 != 0 and S[s] == "R":
        flg = False
    
if flg:
    print("Yes")
else:
    print("No")


Failing test case input:
KWVLQBCRQSMQWJWLURE

Expected output:
No


Actual output:
KWVLQBCRQSMQWJWLURE
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
No


Fixed submission (verdict: Accepted):
S = input()
flg = True
for s in range(0,len(S)):
    
    if s%2 == 0 and S[s] == "L":
       
        flg = False
    elif s%2 != 0 and S[s] == "R":
        flg = False
    
if flg:
    print("Yes")
else:
    print("No")

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(input())

result = "Yes"

if S[0::2] =="L"or"U"or"D":
    result = "Yes"
elif S[1::2] =="R"or"U"or"D":
    result = "Yes"
else:
    result = "No"

print(result)

Failing test case input:
VRMLCQKDQVRRKVKWVDS

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S = list(input())
result = "Yes"
for i in  S[0::2]:
    if i == "L":
        result = "No"
for i in  S[1::2]:
    if i == "R":
        result = "No"

print(result)

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(input())

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

if num != 0:
    print("No")
else:
    print("Yes")

Failing test case input:
KXVKWSCRQJPSUQCLMVE

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S = str(input())

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

if num == 0:
    print("Yes")
else:
    print("No")
Problem: p02910
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
string = str(input())
flag = True
for i in range(len(string)):
	if (i+1)%2==0:
		if( string[i]!='L' and string!='U' and string[i]!='D' ):
			flag = False
			break
	else:
		if ( string[i]!='R' and string!='U' and string[i]!='D' ):
			flag = False
			break
if(flag):
	print("Yes")
else:
	print("No")

Failing test case input:
UUUUUUUUUUUUUUU

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
string = str(input())
flag = True
for i in range(len(string)):
	if (i+1)%2==0:
		if( string[i]!='L' and string[i]!='U' and string[i]!='D' ):
			
			flag = False
			break
	else:
		if ( string[i]!='R' and string[i]!='U' and string[i]!='D' ):
			flag = False
			
			break
if(flag):
	print("Yes")
else:
	print("No")

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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
  else:
    if s[i] == 'R':
      ans = 'NO'
      break
print(ans)

Failing test case input:
VRMLCPKDQVRRKVKWVDS

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
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)

Problem: p02910
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):




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

        


Failing test case input:
RCVLUUDURLRKLDULRRR

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):
s = input()
a=s[::2]
b=s[1::2]
for i in a:
        if i == 'L':
                print("No")
                exit()
for i in b:
        if i == 'R':
                print("No")
                exit()
print("Yes")

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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


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


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

Failing test case input:
RCVLUWDVRLDKLRVLRQR

Expected output:
No


Actual output:
NO


Fixed submission (verdict: Accepted):

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


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


if detect_q2(step_list):
    print('Yes')
else:
    print('No')
Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=list(input())

flag=0

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


Failing test case input:
UKURU

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S=list(input())

flag=0

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

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
DVMLCQKVQJRRDRKWVVS

Expected output:
No


Actual output:
7
10
19
No


Fixed submission (verdict: Accepted):
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

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

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
index = 0
for n in S:
  if index % 2 == 0:
    if n == "R" or n == "U" or n == "D":
      pass
    else:
      print("No")
      exit()
  else:
    if n == "L" or n == "U" or n == "D":
      pass
    else:
      print("No")
      exit()
print("Yes")

Failing test case input:
RUDLUDR

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
S = input()
index = 0
for n in S:
  if index % 2 == 0:
    if n == "R" or n == "U" or n == "D":
      pass
    else:
      print("No")
      exit()
  else:
    if n == "L" or n == "U" or n == "D":
      pass
    else:
      print("No")
      exit()
  index += 1
print("Yes")

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')

Failing test case input:
LLUD

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S = input()
_ans = 0
_S = len(S)
for s in range(0,_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')
Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
def main():
    input = sys.stdin.readline
    S = input()
    s_len = len(list(S))
    for i in range(s_len):
        s = S[i]
        ans = "Yes"
        if s == "U" or s == "D":
            pass
        else:
            if i % 2 == 0:
                if s == "R":
                    pass
                else:
                    ans = "No"
                    break
            else:
                if s == "L":
                    pass
                else:
                    ans = "No"
                    break

    print(ans)
if __name__ == '__main__':
    main()

Failing test case input:
RDULDUR

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
def main():
    S = input()
    s_len = len(list(S))
    for i in range(s_len):
        s = S[i]
        ans = "Yes"
        if s == "U" or s == "D":
            pass
        else:
            if i % 2 == 0:
                if s == "R":
                    pass
                else:
                    ans = "No"
                    break
            else:
                if s == "L":
                    pass
                else:
                    ans = "No"
                    break
 
    print(ans)
if __name__ == '__main__':
    main()

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
li = list(S)
ans = "Yes"
for i in range(len(S)):
  if i % 2 == 0:
    if li[i] == "L":
      ans == "No"
      break
  else:
    if li[i] == "R":
      ans == "No"
      break
print(ans)

Failing test case input:
LWVLRBCSQPQLWLWRUJE

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S = input()
li = list(S)
ans = "Yes"
for i in range(len(S)):
  if i % 2 == 0:
    if li[i] == "L":
      ans = "No"
  else:
    if li[i] == "R":
      ans = "No"
print(ans)

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
flag=True
for i in range(len(s)):
  if i%2==0 and s[i]=='L':
    flag=False
    break
  if i%2==1 and s[i]=='R':
    flag=True
    break
if flag:
  print("Yes")
else:
  print("No")



Failing test case input:
KWVKQBCRQJMSUQWLWRE

Expected output:
No


Actual output:
Yes


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

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')

Failing test case input:
LLUD

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s = list(str(input()))
for i in range(len(s)):
  if ((i+1)%2 and s[i]=='L') or ((i+1)%2==0 and s[i]=='R'):
    print('No')
    exit()
print('Yes')
Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')

Failing test case input:
RUDLUDR

Expected output:
Yes

Actual output:
yes


Fixed submission (verdict: Accepted):
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')

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
i = input()
chars = list(i)
if "R" in chars[1::2]:
    if "L" in chars[0::2]:
        print("No")
    else:
        print("No")
else:
    print("Yes")

Failing test case input:
EULL

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
i = input()
chars = list(i)
if "R" in chars[1::2]:
    print("No")
elif "L" in chars[0::2]:
    print("No")
else:
    print("Yes")

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
RCVLULDURURLLDULRRR

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
str = input()

list = list(str)

i = 0
f = True
for l in list:
    i+=1
    if i%2 != 0:
        if l == "L":
            f=False
            break
    else:
        if l == "R":
            f=False
            break

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

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
l=len(s)
flag=True
for i in range(l):
  if i%2==0:
    if s[i]=='R':
      flag=False
  else:
    if s[i]=='L':
      flag=False
if flag==True:
  print('Yes')
else:
  print('No')

Failing test case input:
RUDLUDR

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
s=input()
l=len(s)
flag=True
for i in range(l):
  if i%2==0:
    if s[i]=='L':
      flag=False
  else:
    if s[i]=='R':
      flag=False
if flag==True:
  print('Yes')
else:
  print('No')

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
i = 0
flag = True
for c in s:
  i += 1
  if (i % 2 == 0 and c == "L") or (i % 2 == 1 and c == "R"):
    print("No")
    exit(0)
print("Yes")


Failing test case input:
EULM

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s = input()
i = 0
flag = True
for c in s:
  i += 1
  if (i % 2 == 0 and c == "R") or (i % 2 == 1 and c == "L"):
    print("No")
    exit(0)
print("Yes")
Problem: p02910
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
s = input()
n = len(s)

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

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

print('Yes')


Failing test case input:
KWVLQBCRQJMSUQWLWRE

Expected output:
No


Actual output:
No
No
Yes


Fixed submission (verdict: Accepted):
s = input()
n = len(s)

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

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

print('Yes')

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
KWVLPBCRQSLQWRWLUJE

Expected output:
No


Actual output:
No
No
No
Yes


Fixed submission (verdict: Accepted):
S = list(map(str, input()))
unreadble = 0
for i in range(len(S)):
  if i % 2 == 0:
    if S[i] == "L":
      unreadble += 1
  else:
    if S[i] == "R":
  	  unreadble += 1
if unreadble >= 1:
  print("No")
else:
  print("Yes")

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')



Failing test case input:
RDULULDURURLRDULRLR

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
array = ['L','R','U','D']
s = input()
c = 0
for i in range(len(s)):
  if i%2 == 1:
    if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
      continue
    else:
      c = 1
  if i%2 == 0:
    if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
      continue
    else:
      c = 1
if c== 0:
  print('Yes')
else:
  print('No')

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
j = 'Yes'
for i in range(len(s)):
  if (s[i] == 'U') or (s[i] == 'D'):
    continue
  if (i % 2) == 0:
    if (s[i] == 'L'):
      continue
    else:
      j = 'No'
      break
  if (i % 2) == 1:
    if (s[i] == 'R'):
      continue
    else:
      j = 'No'
      break
print(j)


Failing test case input:
RDULULDURURLRDULRLR

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
s = input()
j = 'Yes'
for i in range(len(s)):
  if (s[i] == 'U') or (s[i] == 'D'):
    continue
  if (i % 2) == 0:
    if (s[i] == 'R'):
      continue
    else:
      j = 'No'
      break
  if (i % 2) == 1:
    if (s[i] == 'L'):
      continue
    else:
      j = 'No'
      break
print(j)
Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
RDULDUR

Expected output:
Yes


Actual output:
No


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

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()

for i in range(len(s)):
    if i % 2 ==0:
        if s[i] == "R" or "U" or"D":
            ans = "Yes"
        else:
            ans = "No"
            break
    elif i % 2 ==1:
        if s[i] =="L" or "U" or "D":
            ans = "Yes"
        else:
            ans = "No"
            break
print(ans)

Failing test case input:
VRMLCPKEQURRKVKWVDS

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s = input()
 
for i in range(len(s)):
    if i%2 == 0:
        if s[i] == "R" or s[i] == "U" or s[i] == "D":
            ans = "Yes"
        else:
            ans = "No"
            break
    elif i%2 == 1:
        if s[i] == "L" or s[i] == "U" or s[i] == "D":
            ans = "Yes"
        else:
            ans = "No"
            break
 
print(ans)

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c=input()
test='Yes'
for i in range (len(c)) :
    if( i % 2) ==0 :
        if not (c[i] in 'ULD') :
            test = 'No'
            break
    else :
        if not (c[i] in 'URD') :
            test = 'No'
            break
print( test)
       

Failing test case input:
RDULDUR

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
c=input()
test='Yes'
for i in range (len(c)) :
    if( i % 2) ==0 :
        if not (c[i] in 'URD') :
            test = 'No'
            break
    else :
        if not (c[i] in 'ULD') :
            test = 'No'
            break
print( test)

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()

for i in range(len(s)):
    if i % 2 ==0:
        if s[i] == "R" or "U" or"D":
            print("YES")
        else:
            print("NO")
            break
    elif i % 2 ==1:
        if s[i] =="L" or "U" or "D":
            print("YES")
        else:
            print("NO")
            break

Failing test case input:
RCVLULDURURLLDULRRR

Expected output:
No


Actual output:
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES


Fixed submission (verdict: Accepted):
s = input()
 
for i in range(len(s)):
    if i%2 == 0:
        if s[i] == "R" or s[i] == "U" or s[i] == "D":
            ans = "Yes"
        else:
            ans = "No"
            break
    elif i%2 == 1:
        if s[i] == "L" or s[i] == "U" or s[i] == "D":
            ans = "Yes"
        else:
            ans = "No"
            break
 
print(ans)
Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()

flag = False


for a in set(S[1::2]):
    
    for b in set(S[::2]):
        if a == "L" or a == "U" or a == "D":
            if b == "R" or b == "U" or b == "D":
                flag = True
            else:
                flag = False
                
    if flag:
        break       

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

Failing test case input:
RQRLVRLKDLRVDVULVCR

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S = input()

flag = True


for a in set(S[1::2]):
    if a == "R":
        flag = False
        break 
    

for b in set(S[::2]):
    if b == "L":
        flag = False
        break
        
if flag:
    print("Yes")
else:
    print("No")

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=list(input())
a=S[::2]
b='Yes'
for i in a:
  if i!='R' or i!='U' or i!='D':
    b='No'
    break
c=S[1::2]
for j in c:
  if j!='L' or j!='U' or j!='D':
    b='No'
    break
print(b)
  



Failing test case input:
RDULULDURURLRDULRLR

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
S=list(input())
a=S[::2]
b='Yes'
for i in a:
  if i!='R' and i!='U' and i!='D':
    b='No'
    break
c=S[1::2]
for j in c:
  if j!='L' and j!='U' and j!='D':
    b='No'
    break
print(b)

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=list(input())
s_o = s[::2]
s_e = s[1::2]

od = ["R","U","D"]
ev = ["L","U","D"]
flag1 = False
for i in range(len(s_o)):
    if (s_o[i] in od):
        flag1 = True
    else:
        flag1 = False
flag2 = False
for i in range(len(s_e)):
    if (s_e[i] in ev):
        flag2 = True
    else:
        flag1 = False
if flag1 and flag2:
    print("Yes")
else:
    print("No")

Failing test case input:
LLUD

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s = list(input())
flag = False
for i in range(len(s)):
    if i%2 == 0:
        if s[i] == "L":
            flag = False
            break
        else:
            flag = True
    elif i%2 == 1:
        if s[i] == "R":
            flag = False
            break
        else:
            flag = True
if flag:
    print("Yes")
else:
    print("No")

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=list(map(str,input()))
N=len(S)

count=0
for i in range(N):
  if i %2==0:
    if S[i]=="R":
      count+=1
    else:
      count+=0
  if i %2==1:
    if S[i]=="L":
      count+=1
    else:
      count+=0
if count==0:
  print("Yes")
else:
  print("No")

Failing test case input:
URUJU

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S=list(map(str,input()))
N=len(S)

count=0
for i in range(N):
  if i %2==0:
    if S[i]=="L":
      count+=1
    else:
      count+=0
  if i %2==1:
    if S[i]=="R":
      count+=1
    else:
      count+=0
if count==0:
  print("Yes")
else:
  print("No")
Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
ng=False
for i in range(len(s)):
  if i%2==0:
    if s[i]=='R':
      ng=True
  else:
    if s[i]=='L':
      ng= True
if ng:
  print('No')
else:
  print('Yes')

Failing test case input:
RDULULDURURLRDULRLR

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
s=input()
ng=False
for i in range(len(s)):
  if i%2==0:
    if s[i]=='L':
      ng=True
  else:
    if s[i]=='R':
      ng= True
if ng:
  print('No')
else:
  print('Yes')

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()

kisu = ['R', 'U', 'D']
gusu = ['L', 'U', 'D']

hard = 0

for i in range(len(S)):
    moji = S[i]
    if i % 2 == 0:
        if moji not in gusu:
            hard = 1
            break
        else:
            hard = 0
    elif i % 2 == 1:
        if moji not in kisu:
            hard = 1
            break
        else:
            hard = 0
if hard == 0:
    print("Yes")
else:
    print("No")
            
            

Failing test case input:
RDULDUR

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
S = input()

kisu = ['R', 'U', 'D']
gusu = ['L', 'U', 'D']

hard = 0


for i in range(len(S)):
    moji = S[i]
    if i % 2 == 1:

        if moji not in gusu:
            hard = 1
            break
    if i % 2 == 0:

        if moji not in kisu:
            hard = 1
            break
if hard == 0:
    print("Yes")
else:
    print("No")

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
a=list(s[1::2])
b=list(s[0::2])
if "R" in a or "L" in b:
    print("No")
else:
    print("Yes")
print(b)

Failing test case input:
DVMLCQKVQJRRCRWSVWK

Expected output:
No


Actual output:
No
['D', 'M', 'C', 'K', 'Q', 'R', 'C', 'W', 'V', 'K']


Fixed submission (verdict: Accepted):
s=input()
a=list(s[1::2])
b=list(s[0::2])
if "R" in a or "L" in b:
    print("No")
else:
    print("Yes")

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
UKURU

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s=list(input())
l=len(s)
for i  in range(0,l):
  if i%2==0:
    if s[i]=="L":
      print("No")
      exit()
  elif i%2==1:
    if s[i]=="R":
      print("No")
      exit()
  else:
    pass
print("Yes")
Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def tap_dance(st):
  size = len(st)
  for i in range(size):
    if (i+1) % 2 == 0:
      if st[i] not in "LUD":
        return False
    else:
      if st[i] not in "RUD":
        return False
  return True
st = input()
print(tap_dance(st))

Failing test case input:
DVMLCRKVQJRRDRKWVVS

Expected output:
No


Actual output:
False


Fixed submission (verdict: Accepted):
def tap_dance(st):
  size = len(st)
  for i in range(size):
    if (i+1) % 2 == 0:
      if st[i] not in "LUD":
        return "No"
    else:
      if st[i] not in "RUD":
        return "No"
  return "Yes"
st = input()
print(tap_dance(st))

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')
            
    else:
        
        if S[i]!='R' and S[i]!='U' and S[i]!='D':
            ctr = False
            print('No')
            

if(ctr):
    print('Yes')

Failing test case input:
RCVLUVDVRLDKLRVLRQR

Expected output:
No


Actual output:
0
R
No
1
C
No
2
V
No
3
L
No
4
U
5
V
No
6
D
7
V
No
8
R
No
9
L
No
10
D
11
K
No
12
L
13
R
14
V
No
15
L
No
16
R
No
17
Q
No
18
R
No


Fixed submission (verdict: Accepted):
S = input()

ctr = True
for i in range(len(S)):
    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')

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(input())

num = 0
for i in S:
    num += 1
    if num % 2 != 0 and i == "L":
        print("No")
        break
    elif num % 2 == 0 and i == "R":
        print("No")
        break
    else:
        print("Yes")
        break

Failing test case input:
SVVWKRDRRJQVKQCLMVD

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S = str(input())

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

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

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
print("Yes" if S[0::2]!="L" and S[1::2]!="R" else "No")

Failing test case input:
WRMQLPLDDKRRKVUWVCS

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S = input()
print("No" if "L" in S[0::2] or "R" in S[1::2] else "Yes")
Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = str(input())
d = []
p = []
i = 1
s = 1
l = 1
for k in n:
 if i % 2 == 0:
  if k == "R" or k == "U" or k == "D":
   pass
  else:
   s = 0
 else:
  if k == "L" or k == "U" or k == "D":
   pass
  else:
    l = 0
 i = i + 1
if s or l == "1":
 print("Yes")
else:
 print("No")

Failing test case input:
RDULULDURURLRDULRLR

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
n = str(input())
d = []
p = []
i = 1
s = 1
l = 1
for k in n:
 if i % 2 == 0:
  if k == "L" or k == "U" or k == "D":
   pass
  else:
   s = 0
 else:
  if k == "R" or k == "U" or k == "D":
   pass
  else:
    l = 0
 i = i + 1

if s and l == 1:
 print("Yes")
else:
 print("No")

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
UUUUUUUUUUUUUUU

Expected output:
Yes

Actual output:
No


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

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin
S = (stdin.readline().rstrip())
if (set(S[0::2]) <= {"L","U","D"}) and  (set(S[1::2]) <= {"L","U","D"}):
    print("Yes")
else:
    print("No")

Failing test case input:
RDULDUR

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
from sys import stdin
S = (stdin.readline().rstrip())

if (set(S[0::2]) <= {"R","U","D"}) and  (set(S[1::2]) <= {"L","U","D"}):
    print("Yes")
else:
    print("No")

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

if __name__ == "__main__":
    main()
        
        



Failing test case input:
URUJU

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):

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

if __name__ == "__main__":
    main()
Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())
n = len(s)

k,g=[],[]
for i in range(n):
    if i%2==0:
        k.append(s[i])
    else:
        g.append(s[i])


for j in k:
    if j == 'L':
        print('No')
        break

else:
    for l in g:
        if l == 'R':
            print('No')
            break
        else:
            print('Yes')
            break


Failing test case input:
DVMLCRKVQJRRDRKSVWW

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s = list(input())
n = len(s)

k,g=[],[]
for i in range(n):
    if i%2==0:
        k.append(s[i])
    else:
        g.append(s[i])


for j in k:
    if j == 'L':
        print('No')
        break

else:
    for l in g:
        if l == 'R':
            print('No')
            break
    else:
        print('Yes')

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=input()
print('YES' if all([s=='R'or s=='U' or s=='D' for s in S[::2]]) and all([t=='L'or t=='U' or t=='D' for t in S[1::2]]) else 'No')

Failing test case input:
UUUUUUUUUUUUUUU

Expected output:
Yes

Actual output:
YES


Fixed submission (verdict: Accepted):
S=input()
print('Yes' if all([s=='R'or s=='U' or s=='D' for s in S[::2]]) and all([t=='L'or t=='U' or t=='D' for t in S[1::2]]) else 'No')

Problem: p02910
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s = input()

odd = s[::2]
print(odd)

even = s[1::2]
print(even)

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

Failing test case input:
UJURU

Expected output:
No


Actual output:
UUU
JR
No


Fixed submission (verdict: Accepted):
s = input()

odd = s[::2]


even = s[1::2]


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

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
odd = S[0::2]
even = S[1::2]
ans = 'No'

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

print(ans)

Failing test case input:
EULM

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S = input()
odd = S[0::2]
even = S[1::2]
ans = 'No'

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

print(ans)

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
for i in range(len(s)):
  if not (i %2 == 0 and (s[i] == 'L' or s[i] == 'U' or s[i] == 'D')):
    print('No')
    exit(0)
  if not (i %2 == 1 and (s[i] == 'R'or s[i] == 'U' or s[i] == 'D')):
    print('No')
    exit(0)
print('Yes')

Failing test case input:
RUDLUDR

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):



s = input()
for i in range(1,len(s)+1):
    if i%2 == 0 and s[i-1] == 'R':
        print('No')
        exit(0)
    if i%2 == 1 and s[i-1] == 'L':
        print('No')
        exit(0)
print('Yes')
Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
KXVKWSCRQJMSUQCLPVE

Expected output:
No


Actual output:
No
Yes


Fixed submission (verdict: Accepted):
F = input()
o = {"R", "U","D"}
e = {"L", "U","D"}
flag = False
for i in range(len(F)):
    if( i+1) % 2 == 1:
        if F[i] not in o:
            print("No")
            flag = True
            break
    else:
        if F[i] not in e:
            print("No")
            flag = True
            break
if flag == False:
    print("Yes")

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()

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

Failing test case input:
RDULDUR

Expected output:
Yes


Actual output:
No


Fixed submission (verdict: Accepted):
S = input()

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

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()

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

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

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


Failing test case input:
LLUD

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
s = input()


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

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

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")

Failing test case input:
KXVKPBCRQJMSUQRLWWE

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
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

if number_pop == (even_clear + odd_clear):
    print("Yes")
else:
    print("No")
Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')

Failing test case input:
KWVSWRCRQJQKVQCLMVD

Expected output:
No


Actual output:
no


Fixed submission (verdict: Accepted):
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')

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)
    

Failing test case input:
RDULULDURURLRDULRLR

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
S = list(input())
Even = ["L","U","D"]
Odd = ["R", "U", "D"]
for i in range(len(S)):
  if (i+1) % 2 == 0 and S[i] not in Even:
    print("No")
    exit()
  elif (i+1) % 2 != 0 and S[i] not in Odd:
    print("No")
    exit()
print("Yes")

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=input()
flag = 0
for i in range(0,len(S)):
  if (i+1)%2==0 and not (S[i]=='L'):
    flag = 1
  elif (i+1)%2!=0 and not (S[i]=='R'):
    flag = 1
    
if flag==1:
  print("No")
else:
  print("Yes")

Failing test case input:
UUUUUUUUUUUUUUU

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
S=input()
flag = 0
for i in range(0,len(S)):
  if (i+1)%2==0 and not (S[i]=='L' or S[i]=='U' or S[i]=='D'):
    flag = 1
  elif (i+1)%2!=0 and not (S[i]=='R' or S[i]=='U' or S[i]=='D'):
    flag = 1
    
if flag==1:
  print("No")
else:
  print("Yes")

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()

for i in range(1, len(S), 2):
    if i == 'L':
        print('NO')
        exit()

for j in range(0, len(S), 2):
    if j == 'R':
        print('NO')
        exit()

print('YES')

Failing test case input:
VRMLCQKVQKRRDVKWVDS

Expected output:
No


Actual output:
YES


Fixed submission (verdict: Accepted):
S = input()
 
for i in S[::2]:
    if i == "L":
        print("No")
        exit()
for j in S[1::2]:
    if j == "R":
        print("No")
        exit()
print("Yes")
Problem: p02910
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()
SW1 = 0
SW2 = 0

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

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

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

Failing test case input:
UUUUUUUUUUUUUUU

Expected output:
Yes

Actual output:
No


Fixed submission (verdict: Accepted):
S = input()
point = 0
l = len(S)
i = 0
while i < l:
    if int(i % 2) == 1:
        if S[i] == 'L' or S[i] == 'U' or S[i] == 'D':
            point += 1
    else:
        if S[i] == 'R' or S[i] == 'U' or S[i] == 'D':
            point += 1
    i += 1

if point == l:
    print('Yes')
else:
    print('No')

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")
  

Failing test case input:
DVMLCRKVQJRRDRKWVWS

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
x = input()
count=0
for i in range(0,len(x),2):
  if x[i]=="R" or x[i]=="U" or x[i]=="D":
    count += 1
for j in range(1,len(x),2):
  if x[j]=="L" or x[j]=="U" or x[j]=="D":
    count += 1
if count==len(x):
  print("Yes")
else:
  print("No")

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
N = list(S)

ret = ""

for i in range(len(N)):
  if i%2 == 0:
    if N[i] == "R":
      ret = "Yes"
    elif N[i] == "U":
      ret = "Yes"
    elif N[i] == "D":
      ret = "Yes"
    else:
      ret = "No"
  else:
    if N[i] == "L":
      ret = "Yes"
    elif N[i] == "U":
      ret = "Yes"
    elif N[i] == "D":
      ret = "Yes"
    else:
      ret = "No"
      
print(ret)

Failing test case input:
UKURU

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S = input()
N = list(S)

ret = ""

for i in range(len(N)):
  if i%2 == 0:
    if N[i] == "R":
      ret = "Yes"
    elif N[i] == "U":
      ret = "Yes"
    elif N[i] == "D":
      ret = "Yes"
    else:
      ret = "No"
      break
  else:
    if N[i] == "L":
      ret = "Yes"
    elif N[i] == "U":
      ret = "Yes"
    elif N[i] == "D":
      ret = "Yes"
    else:
      ret = "No"
      break
      
print(ret)

Problem: p02910
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = list(input())

c = 1
while len(S) > 0:
    s = S.pop()
    if c%2==1: 
        if s == 'L':
            print('No')
            break
    else:
        if s == 'R':
            print('No')
            break

    c+=1

else:
    print('Yes')


Failing test case input:
EULM

Expected output:
No


Actual output:
Yes


Fixed submission (verdict: Accepted):
S = list(input())

for c in range(1,len(S)+1):
    if c%2==1: 
        if S[c-1] == 'L':
            print('No')
            break
    else:
        if S[c-1] == 'R':
            print('No')
            break
else:
    print('Yes')