TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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.

Submission attempts (in order):
s = input()
ans = 1

for i in range(len(s)):
  if i % 2 == 0:
    if s[i] != 'R' OR 'U' OR 'D':
      ans -= 1
  else:
    if s[i] != 'L' OR 'U' OR 'D':
      ans -= 1
      
if ans < 1:
  print("No")
else: print("Yes")

s = input()
ans = 1

for i in range(len(s)):
  if i % 2 == 0:
    if s[i] == 'L':
      ans -= 1
  else:
    if s[i] == 'R':
      ans -= 1
     
if ans < 1:
  print("No")
else: print("Yes")


Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
import numpy

S = input()
isContinue = True

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

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

if isContinue:
    print('YesDULL')


import numpy

S = input()
isContinue = True

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

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

if isContinue:
    print('Yes')


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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')

s=input()
l=len(s)
flag=True
for i in range(l):
  print(i%2,s[i])
  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')

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')

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
for i in range(1, len(S)):
  print(S[i - 1])
  if i % 2 == 0:
    if S[i - 1] == 'R':
      print('No')
      break
  else:
    if S[i - 1] == 'L':
      print('No')
      break

print('Yes')

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s=input()
ng=False
for i in range(n):
  if i%2=0:
    if s[i]=='R':
      ng=True
  else:
    if s[i]=='L':
      ng= True
if ng:
  print('No')
else:
  print('Yes')

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')

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


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')

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
a = True

for i in range(les(s)):
    if i%2==0 and s[i]=="L":
        a = False
    elif i%2 ==1 and s[i]=="R":
        a = False
if a:
    print("Yes")
else:
    print("No")

s = list(input())
a = True

for i in range(les(s)):
    if i%2==0 and s[i]=="L":
        a = False
    elif i%2 ==1 and s[i]=="R":
        a = False
if a:
    print("Yes")
else:
    print("No")

s = input()
a = True

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

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


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

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


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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input().strip()

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

import sys

s = sys.stdin.readline().strip()

def solve(s):
	n = len(s)
	for i in range(n):
		if i%2==0:
			if s[i] == "L":
				return False
		else:
			if s[i] == "R":
				return False
	return True

print("Yes" if solve(s) else "No")

Verdicts: Runtime Error

Accepted
Problem: 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.

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S=input()
flag=False
for i in range(len(S)):
  if i%2==0:
    if S[i]!='R' and S[i]!='U' and S[i]!='D':
      flag=True
  else:
    if S[i]!='L' and S[i]!='U' and S[i]!='D':
      flag=True
if flag=True:
  print('No')
else:
  print('Yes')

S=input()
flag=False
for i in range(len(S)):
  if i%2==0:
    if S[i]!='R' and S[i]!='U' and S[i]!='D':
      flag=True
  else:
    if S[i]!='L' and S[i]!='U' and S[i]!='D':
      flag=True
if flag==True:
  print('No')
else:
  print('Yes')

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
odd = [ "R", "U", "D"]
add = ["L", "U", "D"] 
ans = 1

S = input()
for i,s in enumerate(S):
  if i%2 == 0:
    if (s in add) == False:
      ans = 0
  else:
    if (s in odd) == False:
      ans = 0
      
if ans == 0:
  print("No")
else:
  print("Yes")

  

odd = [ "R", "U", "D"]
add = ["L", "U", "D"] 
ans = 1
 
S = input()
for i,s in enumerate(S):
  if (i+1)%2 == 0:
    if (s in add) == False:
      ans = 0
  else:
    if (s in odd) == False:
      ans = 0
      
if ans == 0:
  print("No")
else:
  print("Yes")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
for i, s_ in enumerate(s, 1):
  if not (i%2==1) and (s_ in ['R', 'U', 'D']):
    print('No')
    exit()
  if not (i%2==0) and (s_ in ['L', 'U', 'D']):
    print('No')
    exit()

print('Yes')

s = input()
for i, s_ in enumerate(s, 1):
  if not ((i%2==1) and (s_ in ['R', 'U', 'D'])):
    print('No')
    exit()
  if not ((i%2==0) and (s_ in ['L', 'U', 'D'])):
    print('No')
    exit()

print('Yes')

s = input()
for i in range(len(s)):
  if i%2==0 and s[i] not in ['R', 'U', 'D']:
    print('No')
    exit()
  elif i%2==1 and s[i] not in ['L', 'U', 'D']:
    print('No')
    exit()


print('Yes')

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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")


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")


S= list(input())
a=[]
for i in range(0,len(S)):
  if i%2==0:
    if S[i]=="R" or S[i] == "U" or S[i]=="D":
      a.append(1)
  elif i%2!=0:
    if S[i]=="L" or S[i]=="U" or S[i]=="D":
      a.append(1)
if len(S)==sum(a):
  print("Yes")
else:
  print("No")


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys
S = list(input())
S_odd = S[::2]
S_even = S[1::2]
easy_odd = ['R','U','D']
easy_even = ['L','U','D']

print('Yes') if set(S_odd).issubset(easy_odd) and set(S_even).issubset(easy_even) else 
    print('No'

import sys
S = list(input())
S_odd = S[::2]
S_even = S[1::2]
easy_odd = ['R','U','D']
easy_even = ['L','U','D']

print('Yes') if set(S_odd).issubset(easy_odd) and set(S_even).issubset(easy_even) else print('No')

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S = list(input())

even_list = ['R', 'U', 'D']
odd_list = ['L', 'U', 'D']

is_even = all(list(map(lambda x: x in even_list, S[1::2])))
is_odd = all(list(map(lambda x: x in odd_list, S[0::2])))

if is_even and is_odd:
    print('Yes')
else:
    print('No')


S = list(input())

even_list = ['R', 'U', 'D']
odd_list = ['L', 'U', 'D']

is_even = all(list(map(lambda x: x in even_list, S[0::2])))
is_odd = all(list(map(lambda x: x in odd_list, S[1::2])))

if is_even and is_odd:
    print('Yes')
else:
    print('No')


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
dancable = True
for i in range(len(S)):
  if i % 2 == 0:
    dancable &= (S[i] == 'L') or (S[i] == 'U') or (S[i] == 'D')
  else:
    dancable &= (S[i] == 'R') or (S[i] == 'U') or (S[i] == 'D')
print('Yes' if dancable else 'No')

S = input()
dancable = True
for i in range(len(S)):
  if i % 2 == 1:
    dancable &= (S[i] == 'L') or (S[i] == 'U') or (S[i] == 'D')
  else:
    dancable &= (S[i] == 'R') or (S[i] == 'U') or (S[i] == 'D')
print('Yes' if dancable else 'No')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = list(input())
if (False not in [i in "R" for i in S[::2]] or False not in [i in "U" for i in S[::2]] or False not in [i in "D" for i in S[::2]]) and (False not in [i in "L" for i in S[1::2]] or False not in [i in "U" for i in S[1::2]] or False not in [i in "D" for i in S[1::2]]):
	print("Yes")
else:
	print("No")

S = input()
slen = len(S)
i = int(0)
j = int(0)
while slen >= i:
	if i%2 == 1 and S[i] == "R","U","D":
		j = 0
	elif i%2 == 0 and S[i] == "L","U","D":
		j = 0
	else:
		j += 1
  i+1
if j == 0:
	print("No")
else:
	print("Yes")

S = list(input())
if False not in [i in "L" for i in S[::2]] or False not in [i in "R" for i in S[1::2]]:
	print("Yes")
else:
	print("No")

S = input()
slen = len(S)
i = int(0)
j = int(0)
while slen >= i:
	if (i%2 == 1 and S[i] == "R","U","D"):
		j = 0
	elif (i%2 == 0 and S[i] == "L","U","D"):
		j = 0
	else:
		j += 1
	i+1
if j == 0:
	print("No")
else:
	print("Yes")

S = list(input())
if False not in [i in "R" for i in S[::2]] and False not in [i in "L" for i in S[1::2]]:
	print("Yes")
else:
	print("No")

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

S = list(input())
if "R" in S[::2] or "L" in S[1::2]:
  print("No")
else:
  print("Yes")

S = list(input())
if False not in [i in "R" or "U" or "D" for i in S[::2]] and False not in [i in "L" or "U" or "D" for i in S[1::2]]:
	print("No")
else:
	print("Yes")


S = list(input())
if False not in [i not in "L" for i in S[::2]] and False not in [i not in "R"for i in S[1::2]]:
	print("Yes")
else:
	print("No")


Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Time Limit Exceeded

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
 import re
 s = input()
 p = re.compile(r'^([^L][^R])*[^L]?$')
 if p.match(s):

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


 import re

s = input()
p = re.compile(r'^([^L][^R])*[^L]?$')
if p.match(s):
	print("Yes")
else:
	print("No")


import re

s = input()
p = re.compile(r'^([^L][^R])*[^L]?$')
if p.match(s):
	print("Yes")
else:
	print("No")


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

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


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


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


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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')


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


print(list)
print(Odd)
print(Even)

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


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

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


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
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")



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")



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")



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")



Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
import sys
sys.setrecursionlimit(int(1e6))

S = input()

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

print('Yes')


import sys
sys.setrecursionlimit(int(1e6))

S = input()

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

print('Yes')


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S=list(input().split())
N=len(S)

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

S=input()

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = list(input())
flag = True
for i, fs in enumerate(s):
    if not((i%2 == 0 and fs in ("L","U","D")) or (i%2 == 1 and fs in ("R","U","D"))):
        flag = False
if flag:
    print("Yes")
else:
    print("No")

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
print("Yes" if all((i%2==0 and s[i] in "RUD") or (i%2!=0 and s[i] in "LUD")) for i in range(len(s)) else "No")


s = int(input())
print("Yes" if all((i%2==0 and s[i] in "RUD") or (i%2!=0 and s[i] in "LUD") for i in range(len(s))) else "No")

s=input()
print("Yes" if all((i%2==0 and s[i] in "RUD") or (i%!==0 and s[i] in "LUD)) else "No")

s=input()
print("Yes" if all((i%2==0 and s[i] in "RUD") or (i%2!=0 and s[i] in "LUD") for i in range(len(s)) else "No")

s = input()
print("Yes" if all((s[i] in "RUD" and i%2==0) or (i%2!=0 and s[i] in "LUD") for i in range(len(s))) else "No")

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s=list(input())

f=0

for i in range(len(s)):
    if i%2==0:
        if s[i]=='L':
            f+=1
    else:
        if s[i]=='R':
            f+=1
if f>0:
    print('No')
else:
    print('YES')

s=list(input())

f=0

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
ans="Yes"
s=input()
for i in range(len(s)):
  if i%2==0:
    if s[i]=="R":ans="No"
  else:
    if s[i]=="L":ans="No"
print(ans)

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


Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
x = len(s) - 1
m = 0
n = 1
c = 0
while m <= x:
  if s[m] == 'R':
    c += 1
  m += 2
while n <= x:
  if s[n] == 'L':
    c += 1
  n += 2
if c == 0:
  print('Yes')
else:
  print('No')

s = input()
x = len(s) - 1
m = 0
n = 1
c = 0
while m <= x:
  if s[m] == 'L':
    c += 1
  m += 2
while n <= x:
  if s[n] == 'R':
    c += 1
  n += 2
if c == 0:
  print('Yes')
else:
  print('No')

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
n = len(s)
count = 0
for i in range(0, n, 2):
    if s[i] == 'R':
        count += 1
for i in range(1, n, 2):
    if s[i] == 'L':
        count += 1
if count == n:
    print("Yes")
else print("No")

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

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
s = input()

flag = True
for i in range(s):
  if i%2 == 0 and s[i] == "L":
    flag = False
  if i%2 == 1 and s[i] == "R":
    flag = False

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

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
a=input()
if a%2==0:
  for i in range(int(len(a)/2)):
    if a[2*i]=="R" or a[2*i]=="U" or a[2*i]=="D":
      b=b+1
    if a[2*i+1]=="L" or a[2*i+1]=="U" or a[2*i+1]=="D":
      b=b+1
  if b=len(a):
    print("Yes")
  else:
    print("No")
if a%2==1:
  for i in range(int(len(a)/2)+1):
    if a[2*i]=="R" or a[2*i]=="U" or a[2*i]=="D":
      b=b+1
  for i in range(int(len(a)/2)):
    if a[2*i+1]=="L" or a[2*i+1]=="U" or a[2*i+1]=="D":
      b=b+1
  if b=len(a):
    print("Yes")
  else:
    print("No")

a=input()
b=0
if (len(a))%2==0:
  for i in range(int(len(a)/2)):
    if a[2*i]=="R" or a[2*i]=="U" or a[2*i]=="D":
      b=b+1
    if a[2*i+1]=="L" or a[2*i+1]=="U" or a[2*i+1]=="D":
      b=b+1
  if b==len(a):
    print("Yes")
  else:
    print("No")
if (len(a))%2==1:
  for i in range(int(len(a)/2)+1):
    if a[2*i]=="R" or a[2*i]=="U" or a[2*i]=="D":
      b=b+1
  for i in range(int(len(a)/2)):
    if a[2*i+1]=="L" or a[2*i+1]=="U" or a[2*i+1]=="D":
      b=b+1
  if b==len(a):
    print("Yes")
  else:
    print("No")

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
S = input()
print("NO" if "L" in S[::2] or "R" in S[1::2] else "YES")

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

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
s = input()
j = 'Yes'
for i in range(len(s)):
  if (s[i] == 'U') or (s[i] == 'D'):
    continue
  if (s[i] % 2) == 0:
    if (s[i] == 'L'):
      continue
    else:
      j = 'No'
      break
  if (s[i] % 2) == 1:
    if (s[i] == 'R'):
      continue
    else:
      j = 'No'
      break
print(j)

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)


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)


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
input_line = input()
for i in input():
    num = index.input_line(i)
    if (num + 1) % 2 == 1 and i == 'R' or i == 'U' or i == 'D':
        pass
    elif num % 2 == 0 and i == 'L' or i == 'U' or i == 'D':
        pass
    print('Yes')
    break
    elif (num + 1) % 2 == 1 and i == 'L':
        print('No')
    elif num % 2 == 0 and i == 'R':
        print('No')

input_line = input()
def check():
  num = 1
  for i in input_line:
      if num % 2 == 1 and i == 'L':
          return 'No'
          break
      elif num % 2 == 0 and i == 'R':
          return 'No'
          break
      elif num % 2 == 1 and i == 'R' or i == 'U' or i == 'D':
          pass
      elif num % 2 == 0 and i == 'L' or i == 'U' or i == 'D':
          pass
      num += 1

if check() == 'No':
  print('No')
else:
  print('Yes')

Verdicts: Runtime Error

Accepted
Problem: 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.

Submission attempts (in order):
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")

s = input()
R = ["R","U","D"]
L = ["L","U","D"]
for i in range(len(s)):
    if i%2 == 0:
        if (s[i] in R):
            flag = True
        else:
            flag = False
            break
    if i%2 == 1:
        if (s[i] in L):
            flag = True
        else:
            flag = False
            break
if flag:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
S = list(input())
k = 0 
for i in range(0, len(S)):
    if i+1 % 2 == 0:
        if S[i] in "LUD":
            k += 1
        else:
            print("No")
            exit()
    else:
        if S[i] in "RUD":
            k += 1
        else:
            print("No")
            exit()
if k >= 1:
    print("Yes")

S = list(input())
k = 0 
for i in range(0, len(S)):
    if (i + 1) % 2 == 0:
        if S[i] in "LUD":
            k += 1
        else:
            print("No")
            exit()
    else:
        if S[i] in "RUD":
            k += 1
        else:
            print("No")
            exit()
if k >= 1:
    print("Yes")

Verdicts: Wrong Answer

Accepted
Problem: 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.

Submission attempts (in order):
str = input()
num = len(str)
ans = True
for i in range(num):
    print(str[i])
    if (i+1) % 2 == 0:
        if str[i] == "R":
            ans = False
    else:
        if str[i] == "L":
            ans = False

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

str = input()
num = len(str)
ans = True
for i in range(num):
    if (i+1) % 2:
        if str[i] == "R":
            ans = False
    else:
        if str[i] == "L":
            ans = False

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

str = input()
num = len(str)
ans = True
for i in range(num):
    print(str[i])
    if (i+1) % 2:
        if str[i] == "R":
            ans = False
    else:
        if str[i] == "L":
            ans = False

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

str = input()
num = len(str)
ans = True
for i in range(num):
    if (i+1) % 2 == 0:
        if str[i] == "R":
            ans = False
    else:
        if str[i] == "L":
            ans = False

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted