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):
a = list(input())
i = 0
while True:
    odd = a[i]
    if odd == 'L':
        print('NO')
        break
    i += 1
    if i+1 == len(a):
        print('YES')
        break
    even = a[i]
    if even == 'R':
        print('NO')
    i += 1
    if i+1 == len(a):
        print('YES')
        break


a = list(input())
print(a)
i = 0
while True:
    odd = a[i]
    if odd == 'L':
        print('NO')
        break
    i += 1
    if i == len(a):
        print('YES')
        break
    even = a[i]
    if even == 'R':
        print('NO')
    i += 1
    if i == len(a):
        print('YES')
        break


a = list(input())
print(a)
i = 0
while True:
    odd = a[i]
    if odd == 'L':
        print('NO')
        break
    i += 1
    if i+1 == len(a):
        print('YES')
        break
    even = a[i]
    if even == 'R':
        print('NO')
    i += 1
    if i+1 == len(a):
        print('YES')
        break


a = list(input())
i = 0
while True:
    odd = a[i]
    if odd == 'L':
        print('NO')
        break
    i += 1
    if i+1 == len(a):
        print('YES')
        break
    even = a[i]
    if even == 'R':
        print('NO')
        break
    i += 1
    if i+1 == len(a):
        print('YES')
        break

       

a = list(input())
i = 0
while True:
    odd = a[i]
    if odd == 'L':
        print('NO')
        break
    i += 1
    if i+1 == len(a):
        print('YES')
        break
    even = a[i]
    if even == 'R':
        print('NO')
        break
    i += 1
    if i+1 == len(a):
        print('YES')
        break


a = list(input())
i = 0
while True:
    odd = a[i]
    if odd == 'L':
        print('No')
        break
    i += 1
    if i == len(a):
        print('Yes')
        break
    even = a[i]
    if even == 'R':
        print('No')
        break
    i += 1
    if i == len(a):
        print('Yes')
        break


Verdicts: Runtime Error

Wrong Answer

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

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




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



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

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

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

    return True

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

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


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

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

    return True

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

# main
if detect_q2(step_list):
    print('Yes')
else:
    print('No')

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()
nocounter = 0
n = len(s)

for i in range(n):
  if (i % 2 == 0):
    if s[i] == "L":
      print("No")
      nocounter = 1
      break
  if (i % 2 == 1):
    if s[i] == "R":
      print("No"):
      nocounter = 1
      break
      
if (nocounter = 0):
  print("Yes")

s = input()
nocounter = 0
n = len(s)
 
for i in range(n):
  if (i % 2 == 0):
    if s[i] == "L":
      print("No")
      nocounter = 1
      break
  if (i % 2 == 1):
    if s[i] == "R":
      print("No")
      nocounter = 1
      break
      
if (nocounter == 0):
  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 = 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')

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

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()
if s[0::2]=='L' or s[1::2]=='R':
  print('No')
else('Yes')

s=input()
if 'L' in s[0::2] or 'R' in s[1::2]:
  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 = input()

ans = "YES"

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

print(ans)

s = input()

ans = "Yes"

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

print(ans)


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()
o = s[::2]
e = s[1::2]

co = 'L' in o
ce = 'R' in e

if co or ce:
  print('Yes')
else:
  print('No')

s = input()
o = s[::2]
e = s[1::2]
 
co = 'L' in o
ce = 'R' in e
 
if co or ce:
  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()
n=len(s)
for i in range((n+1)//2):
    if s[2*i]=="L":
        print("No")
        exit()
for j in range(n//2):
    if s[2*i+1]=="R":
        print("No")
        exit()
print("Yes")

s=input()
n=len(s)
p=0
for i in range(n):
  if i%2==0 and s[i]=="L":
    p=1
  if i%2==1 and s[i]=="R":
    p=1
if p==0:
  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=list(input())
l=len(s)
for i  in range(0,l):
  if i%2==0:
    if s[i]=="R":
      print("No")
      exit()
  if i%2==1:
    if s[i]=="L":
      print("No")
      exit()
print("Yes")

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

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

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

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

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":
      pirnt("No")
      exit()
print("Yes")

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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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

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

S = input()

print("Yes" if ('L' not in S[0::2] and 'R' not in S[1::2]) 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 = input()
for i, j in enumerate(s):
	if i % 2 == 0 and j == 'L':
		print('No')
        return
    elif i % 2 == 1 and j == 'R':
		print('No')
        return
print('Yes')

s = input()
for i, j in enumerate(s):
    if i % 2 == 0 and j == 'L':
        print('No')
        break
    elif i % 2 == 1 and j == 'R':
        print('No')
        break
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 = input()
b = list(S)
a = b[0::2]
c = b[1::2]
d = len(b)
e = len(c)
cnt = 0
f = a.count('R')
g = a.count('U')
h = a.count('D')
i = f + g + h
print(i)

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

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

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


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


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

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

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

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

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

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

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



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



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

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

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()
ans = "YES"
for i in range(0,len(s),2):
    if(s[i] == "L"):
        ans = "NO"
        break
for i in range(1,len(s),2):
    if(s[i] == "R"):
        ans = "NO"
        break
print(ans)


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


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

counter = 1
yorn = 1
for foot in S:
    if foot == 'R':
        if counter % 2 == 0:
            yorn=0
            break
    elif foot == 'L':
        if counter % 2 == 1:
            yorn = 0
            break
    counter++

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



S = input()

counter = 1
yorn = 1
for foot in S:
    if foot == 'R':
        if counter % 2 == 0:
            yorn=0
            break
    elif foot == 'L':
        if counter % 2 == 1:
            yorn = 0
            break
    counter+=1

if yorn == 1:
    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):
import Re
a=input()
b=re.compile('^[^L][^R]*[^L]?$')
if a.match(b):
print('Yes')
else:
print('No')

import re
a = input()
b = re.compile('^([^L][^R])*[^L]?$')
if b.match(a):
print('Yes')
else:
print('No')


import Re
a=input()
b=re.compile('^([^L][^R])*[^L]?$')
if a.match(b):
print('Yes')
else:
print('No')


import Re
a=input()
b=re.compile('^[^L][^R]*[^L]?$')
if a.match(b)
print('Yes')
else
print('No')


import Re
a=input()
b=re.compile('^([^L][^R]*[^L]?)$')
if a.match(b)
print('Yes')
else
print('No')

import re 
a = input()
b = re.compile('^([^L][^R])*[^L]?$')
if match(a,b):
    print('Yes')
else:
    print('No')


import re
a=input()
b=re.compile('^([^L][^R])*[^L]?$')
if b.match(a):
print('Yes')
else:
print('No')


import re
a = input()
b = re.compile('^([^L][^R])*[^L]?$')
if b.match(a):
	print('Yes')
else:
	print('No')


Verdicts: Runtime Error

Runtime Error

Runtime Error

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 = input()

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

s = input()

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

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)

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)

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)

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

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)

Verdicts: Wrong Answer

Wrong Answer

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):
S = input().strip()

odd_set = set(["R", "U", "D"])
even_set = set(["L", "U", "D"])

flag = True
for i,s in enumerate(S):
  if((i+1)%2 == 0):
    if(s not in odd_set):
      flag = False
      break
  else:
    if(s not in even_set):
      flag = False
      break
if(flag):
  print("Yes")
else:
  print("No")
      

S = input().strip()

odd_set = set(["R", "U", "D"])
even_set = set(["L", "U", "D"])

flag = True
for i,s in enumerate(S):
  if((i+1)%2 == 1):
    if(s not in odd_set):
      flag = False
      break
  else:
    if(s not in even_set):
      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 = input()
flg = 0
for i in range(len(S)):
    if (i+1)%2==0:
        if (S[i]!="R") & (S[i]!="U") & (S[i]!="D"):
            flg = 1
    else:
        if (S[i]!="L") & (S[i]!="U") & (S[i]!="D"):
            flg = 1
if flg == 0:
    print("Yes")
else:
    print("No")

S = input()
flg = 0
for i in range(len(S)):
    if (i+1)%2==1:
        if (S[i]=="R") or (S[i]=="U") or (S[i]=="D"):
            flg += 1
    else:
        if (S[i]=="L") or (S[i]=="U") or (S[i]=="D"):
            flg += 1
if flg == 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()

fail_even = False
fail_odd = False
for i in range(len(S)):
    c = S[i]
    
    if i % 2 != 0:
        if c not in ['R', 'U', 'D']:
            fail_even = True
    else:
        if c not in ['L', 'U', 'D']:
            fail_odd = True


if not fail_odd and not fail_even:
    print('Yes')
else:
    print('No')

S = input()

even_success = True
odd_success = True
for i in range(len(S)):
    c = S[i]
    
    if i % 2 != 0:
        # print('even')
        if c not in ['L', 'U', 'D']:
            
            even_success = False
    else:
        # print('odd')
        if c not in ['R', 'U', 'D']:        
        
            # print('odd failed', c)
            odd_success = False

if even_success and odd_success:
    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):
import sys

s=input()

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

    
        
      


s=input()

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

    
        
      

import sys

s=input()

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

    
        
      


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=input()
if "L" in S[::2] or "R"in S[1::2]:
    print("Yes")
else:
    print("No")

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):
for j in range(len(s)):
    if j % 2 == 0 and s[j] == "L":
        print("No")
        break
    elif j % 2 == 1 and s[j] == "R":
        print("No")
        break
    elif j == len(s) -1:
        print("Yes")

s = [i for i in input()]

for j in range(len(s)):
    if (j % 2 == 0) and (s[j] == "L"):
        print("No")
        break
    elif (j % 2 == 1) and (s[j] == "R"):
        print("No")
        break
    elif j == len(s) - 1:
        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 = 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')

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

# coding: utf-8
# Your code here!

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

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

flg = 0

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

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

s = list(input())

flg = 0

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

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



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):
a=input()

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


a=input()

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

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 = input()
ans = "Yes"
for i in len(s):
  if ((i+1)%2==1 and s[i]=="L") or ((i+1)%2==0 and s[i]=="R"):
    ans = "No"
    break
print(ans)    

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


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()
def checkEasy(s):
  for i in range(len(s)):
    if (i%2 == 0):
      if (s[i] == 'R'):
        return False
    else:
      if (s[i] == 'L'):
        return False
  return True
if (checkEasy(s)):
  print("Yes")
else:
  print("No")

s = input()
def checkEasy(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
if (checkEasy(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()

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
    elif i % 2 == 1:
        if moji not in kisu:
            hard = 1
            break
if hard == 0:
    print("Yes")
else:
    print("No")
            

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

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
    elif i % 2 == 1:
        if moji not in kisu:
            hard = 1
            break
if hard == 0:
    print("Yes")
elif:
    print("No")
            

S = input()

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

hard = 0
#S = "RDULULDURURLRDULRLR"

for i in range(len(S)):
    moji = S[i]
    if i % 2 == 1:
#        print("{} th : {} is in  Kisu(R,U,D)".format(i,moji))
        if moji not in gusu:
            hard = 1
            break
    if i % 2 == 0:
#        print("{} th : {} is in Gusu(L,U,D)".format(i,moji))
        if moji not in kisu:
            hard = 1
            break
if hard == 0:
    print("Yes")
else:
    print("No")
            

Verdicts: Wrong Answer

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()
for i in range(len(s)):
  if (i % 2 == 0 and s[i] == 'R') or (i % 2 == 1 and s[i] == 'L'):
    print('No')
    exit()
print('Yes')

s = input()
for i in range(len(s)):
  if (i % 2 == 1 and s[i] == 'R') or (i % 2 == 0 and 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=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)

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

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

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):
ws = input()
list_e=[]
list_o=[]

for n, v in enumerate(ws):
  if n % 2 == 0:
    list_e.append(v)
  else:
    list_o.append(v)

if "L" not in list_e and "R" not in list_o:
  print("yes")
else:
  print("no")

ws = input()
list_e=[]
list_o=[]

for n, v in enumerate(ws):
  if n % 2 == 0:
    list_e.append(v)
  else:
    list_o.append(v)

if "L" not in list_e and "R" not in list_o:
  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):
from sys import stdin
S = (stdin.readline().rstrip())
if (set(S[1::2]) <= {"R","U","D"}) and  (set(S[0::2]) <= {"L","U","D"}):
    print("Yes")
else:
    print("No")

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

from sys import stdin
S = (stdin.readline().rstrip())
if (set(S[1::2]) <= {"L","U","D"}) and  (set(S[0::2]) <= {"L","U","D"}):
    print("Yes")
else:
    print("No")

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

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):
s = input()
 
oddStep = ['R','U','D']
evenStep = ['L','U','D']
CNST_NO = 'No'
CNST_YES = 'Yes'
good_step = CNST_YES
 
for i in range( len( s )):
  if i % 2 == 0:
    if not ( s[ i ] in evenStep ):
      good_step = CNST_NO
  else:
    if not( s[ i ] in oddStep ):
      good_step = CNST_NO
  if good_step == CNST_NO:
    break
print( good_step )

s = input()
 
oddStep = ['R','U','D']
evenStep = ['L','U','D']
CNST_NO = 'No'
CNST_YES = 'Yes'
good_step = CNST_YES
 
for i in range( len( s ) ):
  if i % 2 == 1: # 0 start
    if not ( s[ i ] in evenStep ):
      good_step = CNST_NO
  else:
    if not( s[ i ] in oddStep ):
      good_step = CNST_NO
  if good_step == CNST_NO:
    break
print( good_step )

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()
bool = 0
if len(S) != 1:
  a = int(len(S)/2)
  for i in range(a):
    if S[2*i] == 'L' or S[2*i+1] == 'R':
      bool = 1
  if bool == 0:
    print('Yes')
  else:
    print('No')
  print(a)
else:
  if S[0] == 'L':
    print('No')
  else:
    print('Yes')

S = input()
bool = 0
k = len(S)
for i in range(k):
  if i%2 == 0 and S[i] == 'L':
    bool = 1
  if i%2 == 1 and S[i] == 'R':
    bool = 1
if bool == 1:
  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()
ans = 'Yes'
for i in range((len(S) + 1) // 2):
  if S[2*i] == 'L' or S[2*i + 1] == 'R':
    ans = 'No'
    break

print(ans)


s = input()
n = len(s)
flg = True
for i in range(n):
  if i % 2 == 0 and s[i] == 'L':
    flg = False
    break
  elif i % 2 == 1 and s[i] == 'R':
    flg = False
    break

if flg:
  print('Yes')
else:
  print('No')

Verdicts: Runtime Error

Accepted