Problem:


Score : 100 points

Problem Statement

You are given three integers A, B and C.

Determine if there exists an equilateral triangle whose sides have lengths A, B and C.

Constraints

All values in input are integers.

1 \leq A,B,C \leq 100

Input

Input is given from Standard Input in the following format:

A B C

Output

If there exists an equilateral triangle whose sides have lengths A, B and C, print Yes; otherwise, print No.

Sample Input 1

2 2 2

Sample Output 1

Yes

There exists an equilateral triangle whose sides have lengths 2, 2 and 2.

Sample Input 2

3 4 5

Sample Output 2

No

There is no equilateral triangle whose sides have lengths 3, 4 and 5.



Sample input:
2 2 2


Sample output:
Yes

Submission status: Runtime Error

Solution code:
num = int(input())
seq = input()
num_R = seq.count('R')
if num_R > num // 2:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
x = input()
inputs = x.split()
a, b, c = int(inputs[0]), int(inputs[1]), int(inputs[2])
if a == b and b == c:
  return 'Yes'
else:
  return 'No'

Submission status: Runtime Error

Solution code:
x = input()
inputs = x.split()
a, b, c = int(inputs[0]), int(inputs[1]), int(inputs[2])
if a = b and b = c:
  return 'Yes'
else:
  return 'No'

Submission status: Runtime Error

Solution code:
inputs = input()
a, b, c = inputs.split()
if a == b and b == c:
  return 'YES'
else:
  return 'No'

Submission status: Runtime Error

Solution code:
inputs = input()
a, b, c = input.split()
if a == b and b == c:
  return 'YES'
else:
  return 'No'

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())

if a*b*c==a*a*a and a+b+c==3a:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
A,B,C = map(int, input().split())
if A=B and B=C:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
A,B,C = map(int, input().split())
if A=B=C:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
a,b,c=map(int(input().split()))
if a==b && b== c:
	print(Yes)
else:
    print(No)

Submission status: Runtime Error

Solution code:
a,b,c=int(input().split())
if a==b && b== c:
	print(Yes)
else:
    print(No)

Submission status: Runtime Error

Solution code:
a,b,c=int(input().split())))
if a==b && b== c:
	print(Yes)
else:
    print(No)

Submission status: Runtime Error

Solution code:
a,b,c = map(int, input().split())
return "Yes" if a==b==c else "No"

Submission status: Runtime Error

Solution code:
n, q = map(int, input().split())
s = input()
L = [1 for i in range(n)] #カウント用
x = [list(input().split()) for i in range(q)]


for i in range(q):#呪文ループ
  for j in range(n):#マスループ　左から
    if x[i][0] == s[j]:
      if x[i][1]=='L':

        if j-1>=0:
          L[j-1] +=L[j]
          L[j] = 0
        else:
          L[j] = 0

      elif x[i][1]=='R':

        if (j+1)<=(n-1):
          L[j+1] +=L[j]
          L[j] = 0
        else:
          L[j] = 0

sum = 0
for i in range(n):
  sum += L[i]

print(sum)

Submission status: Runtime Error

Solution code:
n, q = map(int, input().split())
s = input()
L = [1 for i in range(n+2)] #カウント用
L[0] = -99999
L[n+1] = -99999
x = [list(input().split()) for i in range(q)]
    
S = [c  for c in s] #一文字ずつにわける
    
for i in range(q):
    index = [k for k, X in enumerate(S) if X == x[i][0]]
    for _, j in enumerate(index):
    if x[i][1]=='L':
        L[j+1-1] +=L[j+1]
        L[j+1] = 0
    else:
        L[j+1+1] +=L[j+1]
        L[j+1] = 0
     
print(sum(L[1:n+1]))

Submission status: Runtime Error

Solution code:
N=int(input())
s=input().split()
y=0
v=0
for i in s:
    if i=='R':
        y+=1
    elif i=='B':
        v+=1
if y>v:
    print('Yes')
elif v>=y:
    print('No')

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())
if A==B==C:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
a, b, c = map(int,input().split())
if (a == b) and (b == c):
  print ("Yes")
 else:
  print ("No")

Submission status: Runtime Error

Solution code:
from sys import stdin, stdout
from math import sqrt, pi, acos, gcd, atan2, cos, sin, factorial, log10
# from matplotlib import mlab
# from matplotlib import pylab
# from decimal import Decimal
# from random import randint
# import re
PEPS = 1e-10
INF = float('inf')


def sqr(a):
    return a * a


def dist(a, b = (0, 0)):
    return sqrt(sqr(a[0] - b[0]) + sqr(a[1] - b[1]))


def s_dist(a, b = (0, 0)):
    return (sqr(a[0] - b[0]) + sqr(a[1] - b[1]))


def dist3(a, b = (0, 0, 0)):
    return sqrt(sqr(a[0] - b[0]) + sqr(a[1] - b[1]) + sqr(a[2] - b[2]))


def s_dist3(a, b = (0, 0, 0)):
    return (sqr(a[0] - b[0]) + sqr(a[1] - b[1]) + sqr(a[2] - b[2]))


def trans(p, al):
    return (p[0] * cos(al) + p[1] * sin(al), - p[0] * sin(al) + p[1] * cos(al))


def get_angle(a, b, c):
    cos_al = (sqr(a) + sqr(b) - sqr(c)) / (2 * a * b)
    return acos(cos_al)


def write_float(ans):
    stdout.write(str('%.13f' % ans) + '\n')


def get_hight(pt1, pt2, pt3):
    a = (pt2[0] - pt1[0], pt2[1] - pt1[1])
    b = (pt3[0] - pt1[0], pt3[1] - pt1[1])
    return abs(a[0] * b[1] - a[1] * b[0]) / dist(pt1, pt2)


def get_square(pt1, pt2, pt3):
    a = (pt2[0] - pt1[0], pt2[1] - pt1[1])
    b = (pt3[0] - pt2[0], pt3[1] - pt2[1])
    return (a[0] * b[-1] - a[1] * b[0]) / 2


def sign(v):
    if v > 0:
        return 1
    elif v < 0:
        return -1
    else:
        return 0


def inn(pt, triangle):
    signs = set()
    signs.add(sign(get_square(triangle[0], triangle[1], pt)))
    signs.add(sign(get_square(triangle[1], triangle[2], pt)))
    signs.add(sign(get_square(triangle[2], triangle[0], pt)))
    return len(signs) == 1


def inter_in(a, b):
    return dist((a[0], a[1]), (b[0], b[1])) < a[-1] + b[-1]


def inter_in3(a, b):
    return dist3(a[:-1], b[:-1]) < a[-1] + b[-1]


def shift(what, wth):
    return (what[0] - wth[0], what[1] - wth[1])


a = list(map(int, stdin.readline().split()))
stdout.write(['No', 'Yes'][a[0] == a[1] == a[2]])

Submission status: Runtime Error

Solution code:
from sys import stdin, stdout
from math import sqrt, pi, acos, gcd, atan2, cos, sin, factorial, log10
# from matplotlib import mlab
# from matplotlib import pylab
from decimal import Decimal
from random import randint
# import re
PEPS = 1e-10
INF = float('inf')


def sqr(a):
    return a * a


def dist(a, b = (0, 0)):
    return sqrt(sqr(a[0] - b[0]) + sqr(a[1] - b[1]))


def s_dist(a, b = (0, 0)):
    return (sqr(a[0] - b[0]) + sqr(a[1] - b[1]))


def dist3(a, b = (0, 0, 0)):
    return sqrt(sqr(a[0] - b[0]) + sqr(a[1] - b[1]) + sqr(a[2] - b[2]))


def s_dist3(a, b = (0, 0, 0)):
    return (sqr(a[0] - b[0]) + sqr(a[1] - b[1]) + sqr(a[2] - b[2]))


def trans(p, al):
    return (p[0] * cos(al) + p[1] * sin(al), - p[0] * sin(al) + p[1] * cos(al))


def get_angle(a, b, c):
    cos_al = (sqr(a) + sqr(b) - sqr(c)) / (2 * a * b)
    return acos(cos_al)


def write_float(ans):
    stdout.write(str('%.13f' % ans) + '\n')


def get_hight(pt1, pt2, pt3):
    a = (pt2[0] - pt1[0], pt2[1] - pt1[1])
    b = (pt3[0] - pt1[0], pt3[1] - pt1[1])
    return abs(a[0] * b[1] - a[1] * b[0]) / dist(pt1, pt2)


def get_square(pt1, pt2, pt3):
    a = (pt2[0] - pt1[0], pt2[1] - pt1[1])
    b = (pt3[0] - pt2[0], pt3[1] - pt2[1])
    return (a[0] * b[-1] - a[1] * b[0]) / 2


def sign(v):
    if v > 0:
        return 1
    elif v < 0:
        return -1
    else:
        return 0


def inn(pt, triangle):
    signs = set()
    signs.add(sign(get_square(triangle[0], triangle[1], pt)))
    signs.add(sign(get_square(triangle[1], triangle[2], pt)))
    signs.add(sign(get_square(triangle[2], triangle[0], pt)))
    return len(signs) == 1


def inter_in(a, b):
    return dist((a[0], a[1]), (b[0], b[1])) < a[-1] + b[-1]


def inter_in3(a, b):
    return dist3(a[:-1], b[:-1]) < a[-1] + b[-1]


def shift(what, wth):
    return (what[0] - wth[0], what[1] - wth[1])


a = sorted(list(map(int, stdin.readline().split())))
stdout.write(['No', 'Yes'][a[0] == a[1] == a[2]])

Submission status: Runtime Error

Solution code:
from sys import stdin, stdout
from math import sqrt, pi, acos, gcd, atan2, cos, sin, factorial, log10
from matplotlib import mlab
from matplotlib import pylab
from decimal import Decimal
from random import randint
import re
PEPS = 1e-10
INF = float('inf')


def sqr(a):
    return a * a


def dist(a, b = (0, 0)):
    return sqrt(sqr(a[0] - b[0]) + sqr(a[1] - b[1]))


def s_dist(a, b = (0, 0)):
    return (sqr(a[0] - b[0]) + sqr(a[1] - b[1]))


def dist3(a, b = (0, 0, 0)):
    return sqrt(sqr(a[0] - b[0]) + sqr(a[1] - b[1]) + sqr(a[2] - b[2]))


def s_dist3(a, b = (0, 0, 0)):
    return (sqr(a[0] - b[0]) + sqr(a[1] - b[1]) + sqr(a[2] - b[2]))


def trans(p, al):
    return (p[0] * cos(al) + p[1] * sin(al), - p[0] * sin(al) + p[1] * cos(al))


def get_angle(a, b, c):
    cos_al = (sqr(a) + sqr(b) - sqr(c)) / (2 * a * b)
    return acos(cos_al)


def write_float(ans):
    stdout.write(str('%.13f' % ans) + '\n')


def get_hight(pt1, pt2, pt3):
    a = (pt2[0] - pt1[0], pt2[1] - pt1[1])
    b = (pt3[0] - pt1[0], pt3[1] - pt1[1])
    return abs(a[0] * b[1] - a[1] * b[0]) / dist(pt1, pt2)


def get_square(pt1, pt2, pt3):
    a = (pt2[0] - pt1[0], pt2[1] - pt1[1])
    b = (pt3[0] - pt2[0], pt3[1] - pt2[1])
    return (a[0] * b[-1] - a[1] * b[0]) / 2


def sign(v):
    if v > 0:
        return 1
    elif v < 0:
        return -1
    else:
        return 0


def inn(pt, triangle):
    signs = set()
    signs.add(sign(get_square(triangle[0], triangle[1], pt)))
    signs.add(sign(get_square(triangle[1], triangle[2], pt)))
    signs.add(sign(get_square(triangle[2], triangle[0], pt)))
    return len(signs) == 1


def inter_in(a, b):
    return dist((a[0], a[1]), (b[0], b[1])) < a[-1] + b[-1]


def inter_in3(a, b):
    return dist3(a[:-1], b[:-1]) < a[-1] + b[-1]


def shift(what, wth):
    return (what[0] - wth[0], what[1] - wth[1])


a = sorted(list(map(int, stdin.readline().split())))
stdout.write(['No', 'Yes'][a[0] == a[1] == a[2]])

Submission status: Runtime Error

Solution code:
a =input(int())
b =input(int())
c =input(int())
if a+b>c or a+c>b or b+c>a:
    print("Yes")
else:print("No")

Submission status: Runtime Error

Solution code:
s = list(input().split)
if s.count(s[0]) ==3:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
    a,b,c=input().split()
    if a==b and b==c and a==c:
      print("Yes")
    else:
      print("No")

Submission status: Runtime Error

Solution code:
a,b,c=input()
if a==b and b==c and a==c:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
print("Yes" if a == b && a == c else "No")

Submission status: Runtime Error

Solution code:
a = [map(int, input().split())]
print("Yes" if a[0] == a[1] and a[0] == a[2] else "No")

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
if a=b=c:
    print(Yes)
else:
    print(No)

Submission status: Runtime Error

Solution code:
print( 'Yes' if len(collections.Counter(map(int,input().split())).items()) == 1 else 'No' )

Submission status: Runtime Error

Solution code:
a,b,c == map(int,input().split())

if a==b and b==c:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input().split())
if (a==b and b==c)
	print("Yes")
else
	print("No")

Submission status: Runtime Error

Solution code:
A,B,C = (int(i) for i in input().split())
 
if A = B and B = C:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
A,B,C = (int(i) for i in input().split())

if A = B = C:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
import itertools
N, X = map(int, input().split())
S = list(map(int, input().split()))
ans = 0

for tpl in itertools.permutations(S):
    x = X
    if 1 in tpl:
        continue

    for y in tpl:
        x = x % y
        if x == 0 or x == 1:
            break
    ans += x
print(ans % (10**9 + 7))

Submission status: Runtime Error

Solution code:

while True:
  a,b,c =map(int,input().split())
  if(a==b==c):
    print("Yes")
  elif(a>100 or b>100 or c>100) :
    continue
  else:
    print("No")

Submission status: Runtime Error

Solution code:

while True:
  a,b,c =map(int,input().split())
  if(a==b==c):
    print("Yes")
  elif(a>100 or b>100 or c>100) :
    continue
  else:
    print("No")

Submission status: Runtime Error

Solution code:
while True:
  a,b,c =map(int,input().split())
  if(a==b==c):
    print("Yes")
  else:
    print("No")

Submission status: Runtime Error

Solution code:
a,b,c =map(int,input().split())
if(a==b==c):
  print("Yes")
  else:
    print("No")

Submission status: Runtime Error

Solution code:
a = map(int,input().split())

if max(a) == min(a):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
abc = list(map(int, input.split()))
if len(set(abc)) == 1:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
a,b c = map(int,input().split())

if a == b == c:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
if __name__ == '__main__':
	a, b, c = map(int, input().split(' '))
    if a == b and b == c:
		print('Yes')
	else:
		print('No')

Submission status: Runtime Error

Solution code:
a, b, c = map(int(input().split()))

if a == b == c:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
a, b, c = (int(i) for i in input().split())

if a = b and a = c :
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())

if a==b==c
	print("Yes")
else
	print("No")

Submission status: Runtime Error

Solution code:

l = map(int, input().split())

if l[0] == l[1] == l[2]
	print("Yes")
else
	print("No")

Submission status: Runtime Error

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

if l[0] == l[1] and l[1] == l[2]
	print("Yes")
else
	print("No")

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
if a == b and b == c:
  return True
return False

Submission status: Runtime Error

Solution code:
# coding: utf-8
def main():
    N,Q = map(int, input().split())
    s = input()
    ans = N
    command = []

    # print(char_list)

    for i in range(Q):
        t,d = input().split()
        command.append([t,d])

    r = binary_serch_R(command,s,N)
    #print(r)
    l = binary_serch_L(command,s,N)
    #print(l)
    ans = ans - (N-r) - (l+1)
    if ans < 0:
        ans = 0
    print(ans)

def simulation_R(command,s,now,N):
    for pair in command:
        if pair[0] == s[now]:
            if pair[1] == 'L':
                now -= 1
            elif pair[1] == 'R':
                now += 1
        if now < 0:
            return False
        elif now >= N:
            return True
    return False

def simulation_L(command,s,now,N):
    for pair in command:
        if pair[0] == s[now]:
            if pair[1] == 'L':
                now -= 1
            elif pair[1] == 'R':
                now += 1
        if now < 0:
            return True
        elif now >= N:
            return False
    return False


def binary_serch_R(command,s,N):
    left = 0
    right = N-1
    if simulation_R(command,s,left,N) :
        return -1
    if simulation_R(command,s,right,N) == False:
        return N

    while abs(right - left) > 1:
        mid = int((left+right)/2)
        # print(mid)
        if simulation_R(command,s,mid,N) :
            right = mid
        else :
            left = mid 
    return right

def binary_serch_L(command,s,N):
    left = 0
    right = N-1
    if simulation_L(command,s,left,N) == False :
        return -1
    if simulation_L(command,s,right,N):
        return N
        
    while abs(right-left) > 1:
        mid = int((left+right)/2)
        if simulation_L(command,s,mid,N) :
            left = mid
        else :
            right = mid 
    return left

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
a, b, c = list(map(int, input().split())).sort(reverse=True)
print('Yes' if b - c < a and a < b + c else 'No')

Submission status: Runtime Error

Solution code:
A,B,C = map(int, input().split())
print('Yes') if A+B/C*2 == 1 print('No')

Submission status: Runtime Error

Solution code:
A,B,C = map(int, input().split())
print('Yes') if abs(A-B)<C and A+B>C and A=B and B=C else print('No')

Submission status: Runtime Error

Solution code:
temp = input()
temp_spl = temp.split()
N = int(temp_spl[0])
Q = int(temp_spl[1])

temp = input()
s = temp
golem_place = list(range(N))

# 呪文の数だけループする
for i in range(Q):
    temp = input()
    temp_spl = temp.split()
    t = temp_spl[0]
    d = temp_spl[1]
    if d == "L":
        adder = -1
    else:
        adder = 1
    # golemの移動
    for j in range(N):
        if golem_place[j] != 99999999:
            if s[golem_place[j]] == t:
                golem_place[j] = golem_place[j] + adder

    # ゴーレムを排除
    for j in range(N):
        if golem_place[j] < 0 or golem_place[j] >= N:
            golem_place[j] = 99999999
    #print(golem_place)

alive_count = 0
for i in range(N):
    if golem_place[i] < 99999999:
        alive_count = alive_count + 1
print(alive_count)

Submission status: Runtime Error

Solution code:
temp = input()
temp_spl = temp.split()
a = int(temp_spl[0])
b = int(temp_spl[1])
c = int(temp_spl[2])

if a == b and b == c and b >=1 and b <= 100:
    print("Yes")
else:
    pritn("No")

Submission status: Runtime Error

Solution code:
N = int(input())
while True:
    s = input()
    if len(s) == N:
        break
        
caps = list(s)

if caps.count('R') > N / 2:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
a = input()
b = input()
c = input()

d = int(a)
e = int(b)
f = int(c)

if d == e and e == f:
  print("Yes")

else:
  print("No");

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input().split())
msg = 'Yes' if A == B and B == C else 'No'
print(mssg)

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input().split())
msg = 'YES' if A == B and B == C else 'NO'
print(mssg)

Submission status: Runtime Error

Solution code:
N, Q = map(int, input().split())
s = input()
t_list, d_list = list(), list()
for i in range(Q):
    t, d = input().split()
    t_list.append(t)
    d_list.append(d)


def go_away_to_left(idx):
    for t, d in zip(t_list, d_list):
        if s[idx] == t:
            if d == 'L':
                idx = idx - 1
            else:
                idx = idx + 1
        
        if idx == -1:
            return True
        
        elif idx == N:
            return False
    
    return False


def go_away_to_right(idx):
    for t, d in zip(t_list, d_list):
        if s[idx] == t:
            if d == 'L':
                idx = idx - 1
            else:
                idx = idx + 1
        
        if idx == N:
            return True
        
        elif idx == -1:
            return False
    
    return False


def binary_search_left(boundary, pyfunc):
    """search left boundary index where pyfunc returns True
    Args:
        boundary (tuple): [a, b)
        pyfunc
    Returns:
        index (int)
    """
    idx = sum(boundary) // 2
    if pyfunc(idx):
        boundary = (idx, boundary[1])
    else:
        boundary = (boundary[0], idx)
    
    if (boundary[1] - boundary[0]) == 1:
        return boundary[0]
    else:
        return binary_search_left(boundary, pyfunc)


def binary_search_right(boundary, pyfunc):
    """search right boundary index where pyfunc returns True
    Args:
        boundary (tuple): (a, b]
        pyfunc
    Returns:
        index (int)
    """
    idx = sum(boundary) // 2
    if pyfunc(idx):
        boundary = (boundary[0], idx)
    else:
        boundary = (idx, boundary[1])
    
    if (boundary[1] - boundary[0]) == 1:
        return boundary[1]
    else:
        return binary_search_right(boundary, pyfunc)

left = binary_search_left((-1, N), go_away_to_left)
right = binary_search_right((-1, N), go_away_to_right)
if left >= right:
    print(0)
else:
    print(right - left - 1)
# if left >= right:
#     golem_del = N
# else:
#     golem_del = (left - -1) + (N - right)
# print(N - golem_del)

Submission status: Runtime Error

Solution code:
N, Q = map(int, input().split())
s = input()
t_list, d_list = list(), list()
for i in range(Q):
    t, d = input().split()
    t_list.append(t)
    d_list.append(d)


def go_away_to_left(idx):
    for t, d in zip(t_list, d_list):
        if s[idx] == t:
            if d == 'L':
                idx = idx - 1
            else:
                idx = idx + 1
        
        if idx == -1:
            return True
    
    return False


def go_away_to_right(idx):
    for t, d in zip(t_list, d_list):
        if s[idx] == t:
            if d == 'L':
                idx = idx - 1
            else:
                idx = idx + 1
        
        if idx == N:
            return True
    
    return False


def binary_search_left(boundary, pyfunc):
    """search left boundary index where pyfunc returns True
    Args:
        boundary (tuple): [a, b)
        pyfunc
    Returns:
        index (int)
    """
    idx = sum(boundary) // 2
    if pyfunc(idx):
        boundary = (idx, boundary[1])
    else:
        boundary = (boundary[0], idx)
    
    if (boundary[1] - boundary[0]) == 1:
        return boundary[0]
    else:
        return binary_search_left(boundary, pyfunc)


def binary_search_right(boundary, pyfunc):
    """search right boundary index where pyfunc returns True
    Args:
        boundary (tuple): (a, b]
        pyfunc
    Returns:
        index (int)
    """
    idx = sum(boundary) // 2
    if pyfunc(idx):
        boundary = (boundary[0], idx)
    else:
        boundary = (idx, boundary[1])
    
    if (boundary[1] - boundary[0]) == 1:
        return boundary[1]
    else:
        return binary_search_right(boundary, pyfunc)

left = binary_search_left((-1, N), go_away_to_left)
right = binary_search_right((-1, N), go_away_to_right)
if left >= right:
    golem_del = N
else:
    golem_del = (left - -1) + (N - right)
print(N - golem_del)

Submission status: Runtime Error

Solution code:
N, Q = map(int, input().split())
s = list(input())
del s[-1]
sSet = set(s) 

death = 0

for i in range(Q):
	t, d = input().split()

	if t in sSet:
		tmpS = s.copy()
		for index, golems in enumerate(tmpS):
			if t in golems:
				if d == 'L' and index == 0: 
					s[index] = ""
					death += len(golems) 
				elif d == 'L':
					s[index-1] = tmpS[index-1] + golems
					s[index] = ""
				elif d == 'R' and index == N - 1:
					s[index] = ""
					death += len(golems)
				else:
					s[index+1] = tmpS[index+1] + golems
					s[index] = ""


print(len(s) - death)

Submission status: Runtime Error

Solution code:
N, Q = map(int, input().split())
s = input()
t_list, d_list = list(), list()
for i in range(Q):
    t, d = input().split()
    t_list.append(t)
    d_list.append(d)


def go_away_to_left(idx):
    if idx == -1:
        return True

    for t, d in zip(t_list, d_list):
        if s[idx] == t:
            if d == 'L':
                idx = idx - 1
            else:
                idx = idx + 1
        
        if idx == -1:
            return True
    
    return False


def go_away_to_right(idx):
    if idx == N:
        return True

    for t, d in zip(t_list, d_list):
        if s[idx] == t:
            if d == 'L':
                idx = idx - 1
            else:
                idx = idx + 1
        
        if idx == N:
            return True
    
    return False


def binary_search_left(boundary, pyfunc):
    """search left boundary index where pyfunc returns True
    Args:
        boundary (tuple): [a, b)
        pyfunc
    Returns:
        index (int)
    """
    idx = sum(boundary) // 2
    if pyfunc(idx):
        boundary = (idx, boundary[1])
    else:
        boundary = (boundary[0], idx)
    
    if (boundary[1] - boundary[0]) == 1:
        return boundary[0]
    else:
        return binary_search_left(boundary, pyfunc)


def binary_search_right(boundary, pyfunc):
    """search right boundary index where pyfunc returns True
    Args:
        boundary (tuple): (a, b]
        pyfunc
    Returns:
        index (int)
    """
    idx = sum(boundary) // 2
    if pyfunc(idx):
        boundary = (boundary[0], idx)
    else:
        boundary = (idx, boundary[1])
    
    if (boundary[1] - boundary[0]) == 1:
        return boundary[1]
    else:
        return binary_search_right(boundary, pyfunc)

left = binary_search_left((-1, N), go_away_to_left)
right = binary_search_right((-1, N), go_away_to_right)
golem_del = (left - -1) + (N - right)
print(N - golem_del)

Submission status: Runtime Error

Solution code:
a, b, c = input()
if a == b == c:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
while True:
    line = [int(i) for i in input().split(" ")]
    b = line[0]
    flag = 0
    for i in line:
        if i != b:
            flag = 1
    if flag == 1:
        print("No")
    else:
        print("Yes")

Submission status: Runtime Error

Solution code:
a = int(input())
line = [i for i in a if i]
b = line[0]
for i in line:
  if i != b:
    return print("No")
print("Yes")

Submission status: Runtime Error

Solution code:
A,B,C = map(int,input().split())
if (A==B)and(B==C):
  print"Yes"
else:
  print"No"

Submission status: Runtime Error

Solution code:
A,B,C = input()
if A == B == C:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
a,b,c=list(map(int.input().split()))
if a==b==c:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
A,B,C=int(input().split())
if A==B and B==C:
  print("YES")
else:
  print("NO")

Submission status: Runtime Error

Solution code:
def regularTraiangle(A,B,C):
  list = [A, B, C].sort()
  if list[2] < (list[0] + list[1]):
    return("Yes")
  else:
    return("No")
  


def main(A, B, C):
  rc = regularTriangle(A, B, C)
  return rc
  
if __name__ = "__main__":
  main()

Submission status: Runtime Error

Solution code:
a = input()
b = input()
c = input()
 
a = int(a)
b = int(b)
c = int(c)
 
if a == b and b  == c:
   print (“Yes”)
 
else:
    print (“No”)

Submission status: Runtime Error

Solution code:
a = input()
b = input()
c = input()
 
a = int(a)
b = int(b)
c = int(c)

if a == b and b  == c:
   print “Yes”
 
else:
    print “No”

Submission status: Runtime Error

Solution code:
a = input()
b = input()
c = input()
 
if a == b and b  == c:
   print “Yes”
 
else:
    print ”No”

Submission status: Runtime Error

Solution code:
a = input()
b = input()
c = input()
 
if a == b and b  == c:
   print “Yes”
 
else:
    print “No”

Submission status: Runtime Error

Solution code:
a = input()
b = input()
c = input()
 
if a == b and b  == c:
   print(“Yes”)
 
else:
    print(“No”)

Submission status: Runtime Error

Solution code:
def is_left_removed(i, S, td):
  direction = {'L': -1, 'R': +1}
  for t, d in td:
    if S[i] == t:
      i += direction[d]
    if i < 0:
      return True
    if i >= N:
      return False
  return False
def is_right_removed(i, S, td):
  direction = {'L': -1, 'R': +1}
  for t, d in td:
    if S[i] == t:
      i += direction[d]
    if i >= N:
      return True
    if i < 0:
      return False
  return False

N, Q = map(int, raw_input().split())
s = raw_input()
td = [raw_input().split() for _ in range(Q)]

# left
l = 0
r = N - 1
l_res = -1
while (l <= r):
  target = (r + l) / 2
  if is_left_removed(target, s, td):
    l = target + 1
    l_res = target
  else:
    r = target - 1

# right
l = 0
r = N - 1
r_res = N
while (l <= r):
  target = (r + l) / 2
  if is_right_removed(target, s, td):
    r = target - 1
    r_res = target
  else:
    l = target + 1

print N - min(N, l_res + 1 + N - r_res)

Submission status: Runtime Error

Solution code:
s = input().split("")
if s[0] == s[1] == s[2]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
from math import factorial as f;b,w=map(int,input().split());gcd=lambda a,b:gcd(max(a,b)%min(a,b),min(a,b))if max(a,b)%min(a,b)else min(a,b);p=f(b+w)//f(b)//f(w)
def g(x,y):print((1000000008*x)//y)
q=2
for i in range(min(b,w)):g(1,2);q*=2
x,y=1,2
for i in range(b+w-min(b,w)-1):bunbo=q;bunsi=q//2+1;x,y=bunbo,bunsi;g(y,x);q*=2
g(y,x)

Submission status: Runtime Error

Solution code:
b,w=map(int,input().split())
from math import factorial as f
from math import gcd
p=f(b+w)//f(b)//f(w)
def g(x,y):print((1000000008*x)//y)
q=2
for i in range(min(b,w)):
    g(1,2)
    q*=2
x,y=1,2
for i in range(b+w-min(b,w)-1):
 bunbo=q
 bunsi=q//2+1
 x,y=bunbo,bunsi
 g(y,x)
 q*=2
g(y,x)

Submission status: Runtime Error

Solution code:
N, Q = [int(i) for i in input().split()]
S = input()
tdList = reversed([input().split() for _ in range(Q)])

l, r = 0, N - 1
for td in tdList:
    print("td:",td)
    print("S:",S)
    if td[0] == S[l] and td[1] == "L":
        print("pa1")
        l += 1
        print(l,r)
    elif td[0] == S[r] and td[1] == "R":
        print("pa2")
        r -= 1
        print(l,r)
    if l != 0 and S[l - 1] == td[0] and td[1] == "R":
        print("pa3")
        l -= 1
        print(l,r)
    if r != N - 1 and S[r + 1] == td[0] and td[1] == "L":
        print("pa4")
        r += 1
        print(l,r)
    if l > N - 1 or r < 0:
        print(l,r)
        print("break")
        break

ans = 0
if r >= l:
    ans = r - l + 1

print(ans)

Submission status: Runtime Error

Solution code:
n,q = map(int,input().split())
s = list(input())
o = [1 for  i in range(n)]
t = []
r = []
for i in range(q):
    a,b = map(str,input().split())
    if a not in t:
        t.append(a)
        r.append([i for i, x in enumerate(s) if x == a])
    index1 = t.index(a)
    if b == "L":
        for i in range(len(r[index1])):
            if r[index1][i] == 0:
                n = n - o[0]
                o[0] = 0
            else:
                o[r[index1][i]-1] += o[r[index1][i]]
                o[r[index1][i]] = 0
    else:
        for i in range(len(r[index1])):
            if r[index1][i] == len(s)-1:
                n = n - o[-1]
                o[-1] = 0
            else:
                o[r[index1][i]+1] += o[r[index1][i]]
                o[r[index1][i]] = 0

print(n)

Submission status: Runtime Error

Solution code:
N,Q=input().split()
N=int(N)
Q=int(Q)
s=input()
t=['']*Q
d=['']*Q
for i in range(Q):
    t[i],d[i]=input().split()

    
t.reverse()
d.reverse()

golem=set()
count=set()

for i in range(Q):
    tmp=set()
    
    if d[i]=='R':
        for gtmp in golem-count:
            if gtmp>1 and (gtmp-1 not in golem):
                if s[gtmp-1]==t[i]:
                    tmp.add(gtmp-1)
                    count.add(gtmp)
    else:
        for gtmp in golem-count:
            if gtmp<N-1 and (gtmp+1 not in golem):
                if s[gtmp+1]==t[i]:
                    tmp.add(gtmp+1)
                    count.add(gtmp)

    golem=golem.union(tmp)
    if t[i]==s[0] and d[i]=='L':
        golem.add(0)
    elif t[i]==s[-1] and d[i]=='R':
        golem.add(N-1)

        
print(N-len(golem))

Submission status: Runtime Error

Solution code:
l = list(map(input().split()))
if l[0] == l[1] == l[2]:
  print("Yes")
else:
  print("No")